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.user.delete

Delete user account and all associated data.

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

    Delete user account and all associated data.

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

    Delete user account and all associated data.

    Goal

    Allow users to delete their account (GDPR compliance).

    Context

    Self-service account deletion. Cascades to memberships, sessions, etc.

    Emitted Events

    `user.deleted` (v1.0.0)

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
    
    export const DeleteUserContract = defineCommand({
    	meta: {
    		key: 'identity.user.delete',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.identity-rbac'],
    		tags: ['identity', 'user', 'delete'],
    		description: 'Delete user account and all associated data.',
    		goal: 'Allow users to delete their account (GDPR compliance).',
    		context:
    			'Self-service account deletion. Cascades to memberships, sessions, etc.',
    	},
    	io: {
    		input: DeleteUserInputModel,
    		output: SuccessResultModel,
    	},
    	policy: {
    		auth: 'user',
    		escalate: 'human_review',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'user.deleted',
    				version: '1.0.0',
    				when: 'User account is deleted',
    				payload: UserDeletedPayloadModel,
    			},
    		],
    		audit: ['user.deleted'],
    	},
    });