These examples describe the current Bijection CLI and SDK source. Use builds
from the same source commit for these APIs. The public CLI and npm SDK
are published independently and may lag this reference.
Label the data and declare roles
bijection/roles.ts
roles, so
they are roles.crm, roles.reader, roles.writer and roles.admin.
Every customer function runs under: crm. A function’s allow names the
roles that may enter it: customers.associate and customers.rename take
allow: [writer], and customers.directory takes allow: [reader, writer].
The continuation customers.renamed has no allow, so it is internal: only
the delivery of its task reaches it. The receiver clears crm, so a task may
carry customer data to the CRM.
Manage members
bijection/team.ts
team, the library contributes team.invite, team.revoke,
team.me and team.list. Its grants, directory and invitations sit at its
roster, crm, which every role it manages clears: a person’s grant never
sits at public. Declare the administrator in the app’s founders
and choose the founder when creating the installation.
team.invite with the recipient’s principal ID (the person:… ID ctx.frame.as.id answers for them) and role.
bijection.lock beside bijection/app.ts lists every exposed
path with its allow and under, the grave acts it can perform and the guards
on it. Run bijection check --write-lock, then review and commit it before
deploying. Grants covers roles and grants in full.
Continue to perform an operation.