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.member.remove

Remove a member from the organization.

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

    Remove a member from the organization.

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

    Remove a member from the organization.

    Goal

    Allow org admins to remove members.

    Context

    Team management.

    Emitted Events

    `org.member.removed` (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 RemoveMemberContract = defineCommand({
    	meta: {
    		key: 'identity.org.member.remove',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.identity-rbac'],
    		tags: ['identity', 'org', 'member', 'remove'],
    		description: 'Remove a member from the organization.',
    		goal: 'Allow org admins to remove members.',
    		context: 'Team management.',
    	},
    	io: {
    		input: RemoveMemberInputModel,
    		output: SuccessResultModel,
    		errors: {
    			CANNOT_REMOVE_OWNER: {
    				description: 'Cannot remove the organization owner',
    				http: 403,
    				gqlCode: 'CANNOT_REMOVE_OWNER',
    				when: 'Target is the org owner',
    			},
    		},
    	},
    	policy: {
    		auth: 'user',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'org.member.removed',
    				version: '1.0.0',
    				when: 'Member is removed',
    				payload: MemberRemovedPayloadModel,
    			},
    		],
    		audit: ['org.member.removed'],
    	},
    });