Skip to main content

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).

ValueNumberDescription
INVITE_STATUS_UNSPECIFIED0
INVITE_STATUS_PENDING1
INVITE_STATUS_ACCEPTED2
INVITE_STATUS_CANCELLED3
INVITE_STATUS_EXPIRED4
INVITE_STATUS_REJECTED5

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.

FieldTypeNumberDescription
idstring1
tenantIdstring2
tenantNamestring3tenant_name is populated by List responses for display; absent on writes.
emailstring4
roleTenantRole5role granted when the invite is accepted.
statusInviteStatus6
expirygoogle.protobuf.Timestamp7
createdAtgoogle.protobuf.Timestamp8

CreateTenantInviteRequest

FieldTypeNumberDescription
tenantIdstring1
emailstring2
roleTenantRole3

CreateTenantInviteResponse

FieldTypeNumberDescription
inviteTenantInvite1

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.

FieldTypeNumberDescription
emailstring1
tenantIdsrepeated string2

CreatePlatformInviteResponse

FieldTypeNumberDescription
invitesrepeated TenantInvite1

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.

FieldTypeNumberDescription
inviteIdstring1

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.

FieldTypeNumberDescription
inviteIdstring1

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

FieldTypeNumberDescription
invitesrepeated TenantInvite1

ListTenantInvitesRequest

FieldTypeNumberDescription
tenantIdstring1
includeSettledbool2When false (the default), only pending invites are returned. When true, settled invites (accepted, cancelled, rejected, expired) are included.
emailoptional string3
pagecmind.common.v1.PageRequest4

ListTenantInvitesResponse

FieldTypeNumberDescription
invitesrepeated TenantInvite1
pagecmind.common.v1.PageInfo2

DeleteTenantInviteRequest

FieldTypeNumberDescription
tenantIdstring1
inviteIdstring2

DeleteTenantInviteResponse

ResendTenantInviteRequest

FieldTypeNumberDescription
tenantIdstring1
inviteIdstring2

ResendTenantInviteResponse

FieldTypeNumberDescription
inviteTenantInvite1

Services

InviteService

CreateTenantInvite

POST /cmind.tenants.v1.InviteService/CreateTenantInvite

Invites a user to a tenant by email at the given role.

Request: CreateTenantInviteRequest

Response: CreateTenantInviteResponse

CreatePlatformInvite

POST /cmind.tenants.v1.InviteService/CreatePlatformInvite

Onboards a user to the platform, optionally pre-assigning tenants.

Request: CreatePlatformInviteRequest

Response: CreatePlatformInviteResponse

ListUserInvites

GET /cmind.tenants.v1.InviteService/ListUserInvites

Returns the calling user's own pending invites.

Request: ListUserInvitesRequest

Response: ListUserInvitesResponse

AcceptInvite

POST /cmind.tenants.v1.InviteService/AcceptInvite

Accepts an invite. Gated on platform membership; email ownership is checked in the handler.

Request: AcceptInviteRequest

Response: AcceptInviteResponse

RejectInvite

POST /cmind.tenants.v1.InviteService/RejectInvite

Declines an invite. Gated on platform membership; email ownership is checked in the handler.

Request: RejectInviteRequest

Response: RejectInviteResponse

ListTenantInvites

POST /cmind.tenants.v1.InviteService/ListTenantInvites

Lists a tenant's invites.

Request: ListTenantInvitesRequest

Response: ListTenantInvitesResponse

DeleteTenantInvite

POST /cmind.tenants.v1.InviteService/DeleteTenantInvite

Cancels a pending invite.

Request: DeleteTenantInviteRequest

Response: DeleteTenantInviteResponse

ResendTenantInvite

POST /cmind.tenants.v1.InviteService/ResendTenantInvite

Re-sends the email for a pending invite.

Request: ResendTenantInviteRequest

Response: ResendTenantInviteResponse