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

Create a new user account.

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

    Create a new user account.

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

    Create a new user account.

    Goal

    Register a new user in the system.

    Context

    Used during signup flows. May trigger email verification.

    Emitted Events

    `user.created` (v1.0.0)

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { ScalarTypeEnum, SchemaModel } from '@lssm-tech/lib.schema';
    
    export const CreateUserContract = defineCommand({
    	meta: {
    		key: 'identity.user.create',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.identity-rbac'],
    		tags: ['identity', 'user', 'create'],
    		description: 'Create a new user account.',
    		goal: 'Register a new user in the system.',
    		context: 'Used during signup flows. May trigger email verification.',
    	},
    	io: {
    		input: CreateUserInputModel,
    		output: UserProfileModel,
    		errors: {
    			EMAIL_EXISTS: {
    				description: 'A user with this email already exists',
    				http: 409,
    				gqlCode: 'EMAIL_EXISTS',
    				when: 'Email is already registered',
    			},
    		},
    	},
    	policy: {
    		auth: 'anonymous',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'user.created',
    				version: '1.0.0',
    				when: 'User is successfully created',
    				payload: UserProfileModel,
    			},
    		],
    		audit: ['user.created'],
    	},
    });