basalt / teams/src / MemoryInvitationStore
Class: MemoryInvitationStore
Defined in: teams/src/stores.ts:142
In-process invitation store (dev/tests). Copies on the way in and out, like MemoryMembershipStore.
Implements
Constructors
Constructor
> new MemoryInvitationStore(): MemoryInvitationStore
Returns
MemoryInvitationStore
Methods
create()
> create(invitation): Promise<void>
Defined in: teams/src/stores.ts:149
Parameters
invitation
Returns
Promise<void>
Implementation of
findById()
> findById(id): Promise<Invitation | null>
Defined in: teams/src/stores.ts:156
Parameters
id
string
Returns
Promise<Invitation | null>
Implementation of
findByToken()
> findByToken(token): Promise<Invitation | null>
Defined in: teams/src/stores.ts:152
Parameters
token
string
Returns
Promise<Invitation | null>
Implementation of
findPending()
> findPending(tenantId, email): Promise<Invitation | null>
Defined in: teams/src/stores.ts:165
A pending invitation for this address. Compare canonicalInviteEmail forms on both sides — rows written before 4.0 may hold mixed case. (Teams itself supersedes invitations via listPending, so it also catches legacy duplicates on stores that don't.)
Parameters
tenantId
string
email
string
Returns
Promise<Invitation | null>
Implementation of
listPending()
> listPending(tenantId): Promise<Invitation[]>
Defined in: teams/src/stores.ts:160
Pending (not accepted, not revoked, not expired-at read time is caller's job).
Parameters
tenantId
string
Returns
Promise<Invitation[]>
Implementation of
markAccepted()
> markAccepted(id, at): Promise<boolean>
Defined in: teams/src/stores.ts:172
Atomically marks a PENDING invitation (not accepted, not revoked) accepted — a compare-and-set. Resolve true when this call flipped it and false when it was no longer pending (a concurrent accept/revoke won), so one token enrolls at most one account. Returning void is accepted for backwards compatibility but gives up that race guarantee.
Parameters
id
string
at
number
Returns
Promise<boolean>
Implementation of
revoke()
> revoke(id, at): Promise<void>
Defined in: teams/src/stores.ts:178
Parameters
id
string
at
number
Returns
Promise<void>