Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

EvanHahn
Copy link
Contributor

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.

You can now import `CREATOR_ROLE_ID`, `COORDINATOR_ROLE_ID`, and
`MEMBER_ROLE_ID`.

```javascript
import { roles } from '@mapeo/core'

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

CoMapeo Mobile [currently hard-codes these values][0].

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].

[#532]: #532
[0]: https://github.com/digidem/comapeo-mobile/blob/2cfa789360a2faa066a85fde8aad73d5e80a5dfd/src/frontend/sharedTypes/index.ts#L31-L37
@EvanHahn EvanHahn requested a review from achou11 June 19, 2024 20:29
src/index.js Show resolved Hide resolved
test-e2e/manager-invite.js Show resolved Hide resolved
src/index.js Show resolved Hide resolved
@EvanHahn EvanHahn merged commit bd492c4 into main Jun 24, 2024
7 checks passed
@EvanHahn EvanHahn deleted the expose-role-ids branch June 24, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose RoleId constants to front end
2 participants