Invite
Represents an invite for current user to join a realm. This object is obtained by subscribing to the db.cloud.invites observable.
An invite is member from the members table with attached properties realm
, accept()
and reject()
properties. realm
is a lookup from member.realmId to the actual realm object. accept()
and reject()
are methods / callbacks that can be used to accept or reject the realm. A user will only get the desired access after accepting the invite.
export interface Invite {
id: string;
realmId: string; // realmId being invited to.
owner: string; // UserID of the owner of the `member` object that this invite represents
userId?: string; // UserID of the person being invited
email?: string; // email of the person being invited
name?: string; // name of the person being invited
invitedDate?: Date;
invitedBy?: {
name: string;
email: string;
userId: string;
};
roles?: string[]; // Roles to be given within the realm being invited to, if accepted.
permissions?: DBPermissionSet; // Permissions being given in this realm by the invite.
realm: {
name: string; // Name of the realm
represents: string; // A short explainer what this realm represents, such as "a to-do list", "a project", etc.
owner: string; // UserID of Realm owner
permissions: DBPermissionSet; // Current permissions in the realm (before accepting invite)
};
accept: () => Promise<void>; // Callback to accept this invite
reject: () => Promise<void>; // Callback to reject this invite
}
See also
Dexie Cloud Docs
- Access Control in Dexie Cloud
- Add demo users
- Add public data
- Authentication in Dexie Cloud
- Consistency in Dexie Cloud
- DBPermissionSet
- Dexie Cloud API
- Dexie Cloud CLI
- Dexie Cloud Docs
- Dexie Cloud REST API
- DexieCloudOptions
- Invite
- Limits
- Member
- PersistedSyncState
- Purchase Subscription
- Realm
- Role
- Run Dexie Cloud on Own Servers
- Sharding and Scalability
- SyncState
- UserLogin
- db.cloud.configure()
- db.cloud.currentUser
- db.cloud.currentUserId
- db.cloud.events.syncComplete
- db.cloud.invites
- db.cloud.login()
- db.cloud.logout()
- db.cloud.options
- db.cloud.permissions()
- db.cloud.persistedSyncState
- db.cloud.roles
- db.cloud.schema
- db.cloud.sync()
- db.cloud.syncState
- db.cloud.userInteraction
- db.cloud.usingServiceWorker
- db.cloud.version
- db.cloud.webSocketStatus
- db.members
- db.realms
- db.roles
- dexie-cloud-addon