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.
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'],
},
});