Skip to content

basalt / teams/src / TeamsOptions

Interface: TeamsOptions ​

Defined in: teams/src/teams.ts:104

Properties ​

access? ​

> optional access?: RoleAssigner

Defined in: teams/src/teams.ts:115

Wired to @basaltkit/permissions to mirror memberships into role grants.


grantableRoles? ​

> optional grantableRoles?: readonly string[]

Defined in: teams/src/teams.ts:129

Extra, unranked role names an acting user may grant (e.g. ['viewer']). By default an acting user can only grant roles present in roleRank, so a free-form role string can't smuggle in a custom permission role. Roles listed here are unranked unless also in roleRank: can() and meta.teamRole match them exactly. Trusted server-side calls (no actingUserId) are never restricted.


hooks? ​

> optional hooks?: HookBus

Defined in: teams/src/teams.ts:116


invitations? ​

> optional invitations?: InvitationStore

Defined in: teams/src/teams.ts:106


inviteTtl? ​

> optional inviteTtl?: DurationInput

Defined in: teams/src/teams.ts:118

Invitation link lifetime. Default 7d.


memberships? ​

> optional memberships?: MembershipStore

Defined in: teams/src/teams.ts:105


now? ​

> optional now?: () => number

Defined in: teams/src/teams.ts:131

Injectable clock for tests.

Returns ​

number


roleRank? ​

> optional roleRank?: Record<string, number>

Defined in: teams/src/teams.ts:120

Override the role hierarchy (name → rank).


users? ​

> optional users?: MemberUserSource

Defined in: teams/src/teams.ts:113

A read-only user directory, used by membersWithUsers / roleRecipients to attach contact details to memberships. An @basaltkit/auth UserSource satisfies it structurally: teamsPlugin({ users: yourUserSource }). Teams never imports auth — only this shape.

Released under the MIT License.