digidem / mapeo-core-next

The upcoming version of Mapeo Core
MIT License
7 stars 1 forks source link

feat: expose creator, coordinator, and member role IDs #704

Closed EvanHahn closed 1 week ago

EvanHahn commented 2 weeks ago

You can now import CREATOR_ROLE_ID, COORDINATOR_ROLE_ID, and MEMBER_ROLE_ID.

import { roles } from '@mapeo/core'

myProject.$member.invite(deviceId, { roleId: roles.MEMBER_ROLE_ID })

CoMapeo Mobile currently hard-codes these values.

Note that "weirder" IDs, like LEFT_ROLE_ID, are deliberately not exported right now because they're easy to add later if needed.

Closes #532.