OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

identity.org.invite.accept

Accept an organization invitation.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.identity-rbac
  • Tags: identity, org, invite, accept
  • File: packages/libs/identity-rbac/src/contracts/organization.ts
  • field.key.label
    identity.org.invite.accept
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    identity.org.invite.accept
    field.description.label

    Accept an organization invitation.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.identity-rbac
  • Tags: identity, org, invite, accept
  • File: packages/libs/identity-rbac/src/contracts/organization.ts
  • field.tags.label
    identity,org,invite,accept
    field.owners.label
    platform.identity-rbac
    field.stability.label
    stable

    Accept an organization invitation.

    Goal

    Allow users to join organizations via invitation.

    Context

    Called from invitation email link.

    Emitted Events

    `org.member.added` (v1.0.0)

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
    import { SuccessResultModel } from './user';
    
    export const AcceptInviteContract = defineCommand({
    	meta: {
    		key: 'identity.org.invite.accept',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.identity-rbac'],
    		tags: ['identity', 'org', 'invite', 'accept'],
    		description: 'Accept an organization invitation.',
    		goal: 'Allow users to join organizations via invitation.',
    		context: 'Called from invitation email link.',
    	},
    	io: {
    		input: AcceptInviteInputModel,
    		output: MemberModel,
    		errors: {
    			INVITE_EXPIRED: {
    				description: 'The invitation has expired',
    				http: 410,
    				gqlCode: 'INVITE_EXPIRED',
    				when: 'Invitation is past expiry date',
    			},
    			INVITE_USED: {
    				description: 'The invitation has already been used',
    				http: 409,
    				gqlCode: 'INVITE_USED',
    				when: 'Invitation was already accepted',
    			},
    		},
    	},
    	policy: {
    		auth: 'user',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'org.member.added',
    				version: '1.0.0',
    				when: 'Member joins org',
    				payload: MemberModel,
    			},
    		],
    		audit: ['org.member.added'],
    	},
    });