cmind/tenants/v1/invite_service.proto
Package: cmind.tenants.v1
Enums
InviteStatus
InviteStatus is the lifecycle of an invite. Terminal states (accepted, cancelled, rejected, expired) are reached once and never revert. Cancelled is admin-initiated (the invite was withdrawn); rejected is invitee-initiated (they declined).
| Value | Number | Description |
|---|---|---|
INVITE_STATUS_UNSPECIFIED | 0 | |
INVITE_STATUS_PENDING | 1 | |
INVITE_STATUS_ACCEPTED | 2 | |
INVITE_STATUS_CANCELLED | 3 | |
INVITE_STATUS_EXPIRED | 4 | |
INVITE_STATUS_REJECTED | 5 |
Messages
TenantInvite
TenantInvite is an emailed invitation to join a tenant at a given role. Keyed by email rather than user_id because the invitee may not have an account yet.
| Field | Type | Number | Description |
|---|---|---|---|
id | string | 1 | |
tenantId | string | 2 | |
tenantName | string | 3 | tenant_name is populated by List responses for display; absent on writes. |
email | string | 4 | |
role | TenantRole | 5 | role granted when the invite is accepted. |
status | InviteStatus | 6 | |
expiry | google.protobuf.Timestamp | 7 | |
createdAt | google.protobuf.Timestamp | 8 |
CreateTenantInviteRequest
| Field | Type | Number | Description |
|---|---|---|---|
tenantId | string | 1 | |
email | string | 2 | |
role | TenantRole | 3 |
CreateTenantInviteResponse
| Field | Type | Number | Description |
|---|---|---|---|
invite | TenantInvite | 1 |
CreatePlatformInviteRequest
CreatePlatformInvite onboards a user to the platform, optionally pre-assigning them to tenants (each tenant produces a pending TenantInvite at member role). Platform-admin operation.
| Field | Type | Number | Description |
|---|---|---|---|
email | string | 1 | |
tenantIds | repeated string | 2 |
CreatePlatformInviteResponse
| Field | Type | Number | Description |
|---|---|---|---|
invites | repeated TenantInvite | 1 |
AcceptInviteRequest
AcceptInvite is called by the invitee. Authz only confirms the caller is a platform member; the handler verifies the caller's email matches the invite's before granting membership.
| Field | Type | Number | Description |
|---|---|---|---|
inviteId | string | 1 |
AcceptInviteResponse
RejectInviteRequest
RejectInvite is called by the invitee to decline. Like AcceptInvite, authz only confirms platform membership; the handler verifies the caller's email matches the invite's.
| Field | Type | Number | Description |
|---|---|---|---|
inviteId | string | 1 |
RejectInviteResponse
ListUserInvitesRequest
ListUserInvites returns the calling user's own pending invites, resolved from the caller's identity (email) — not tenant-scoped. Lets a user discover invitations awaiting them across tenants.
ListUserInvitesResponse
| Field | Type | Number | Description |
|---|---|---|---|
invites | repeated TenantInvite | 1 |
ListTenantInvitesRequest
| Field | Type | Number | Description |
|---|---|---|---|
tenantId | string | 1 | |
includeSettled | bool | 2 | When false (the default), only pending invites are returned. When true, settled invites (accepted, cancelled, rejected, expired) are included. |
email | optional string | 3 | |
page | cmind.common.v1.PageRequest | 4 |
ListTenantInvitesResponse
| Field | Type | Number | Description |
|---|---|---|---|
invites | repeated TenantInvite | 1 | |
page | cmind.common.v1.PageInfo | 2 |
DeleteTenantInviteRequest
| Field | Type | Number | Description |
|---|---|---|---|
tenantId | string | 1 | |
inviteId | string | 2 |
DeleteTenantInviteResponse
ResendTenantInviteRequest
| Field | Type | Number | Description |
|---|---|---|---|
tenantId | string | 1 | |
inviteId | string | 2 |
ResendTenantInviteResponse
| Field | Type | Number | Description |
|---|---|---|---|
invite | TenantInvite | 1 |
Services
InviteService
CreateTenantInvite
Invites a user to a tenant by email at the given role.
Request: CreateTenantInviteRequest
Response: CreateTenantInviteResponse
CreatePlatformInvite
Onboards a user to the platform, optionally pre-assigning tenants.
Request: CreatePlatformInviteRequest
Response: CreatePlatformInviteResponse
ListUserInvites
Returns the calling user's own pending invites.
Request: ListUserInvitesRequest
Response: ListUserInvitesResponse
AcceptInvite
Accepts an invite. Gated on platform membership; email ownership is checked in the handler.
Request: AcceptInviteRequest
Response: AcceptInviteResponse
RejectInvite
Declines an invite. Gated on platform membership; email ownership is checked in the handler.
Request: RejectInviteRequest
Response: RejectInviteResponse
ListTenantInvites
Lists a tenant's invites.
Request: ListTenantInvitesRequest
Response: ListTenantInvitesResponse
DeleteTenantInvite
Cancels a pending invite.
Request: DeleteTenantInviteRequest
Response: DeleteTenantInviteResponse
ResendTenantInvite
Re-sends the email for a pending invite.
Request: ResendTenantInviteRequest
Response: ResendTenantInviteResponse