-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: expose creator, coordinator, and member role IDs (#704)
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
- Loading branch information
Showing
3 changed files
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
import { | ||
CREATOR_ROLE_ID, | ||
COORDINATOR_ROLE_ID, | ||
MEMBER_ROLE_ID, | ||
} from './roles.js' | ||
export { plugin as MapeoStaticMapsFastifyPlugin } from './fastify-plugins/maps/static-maps.js' | ||
export { plugin as MapeoOfflineFallbackMapFastifyPlugin } from './fastify-plugins/maps/offline-fallback-map.js' | ||
export { plugin as MapeoMapsFastifyPlugin } from './fastify-plugins/maps/index.js' | ||
export { FastifyController } from './fastify-controller.js' | ||
export { MapeoManager } from './mapeo-manager.js' | ||
|
||
export const roles = /** @type {const} */ ({ | ||
CREATOR_ROLE_ID, | ||
COORDINATOR_ROLE_ID, | ||
MEMBER_ROLE_ID, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters