Position
Position protocol schemas
Source: packages/spec/src/identity/position.zod.ts
TypeScript Usage
import { PositionSchema } from '@objectstack/spec/identity';
import type { Position } from '@objectstack/spec/identity';
// Validate data
const result = PositionSchema.parse(data);Position
Properties
| Property | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Position name, unique per organization (lowercase snake_case) |
| label | string | ✅ | Display label (e.g. VP of Sales) |
| description | string | optional | |
| delegatable | boolean | optional (default: false) | ADR-0091 D3: holders may self-service delegate this position, time-boxed (default false). |
| protection | { lock: Enum<'none' | 'no-overlay' | 'no-delete' | 'full'>; reason: string; docsUrl?: string } | optional | Package author protection block — lock policy for this position. |
| _lock | Enum<'none' | 'no-overlay' | 'no-delete' | 'full'> | optional | Item-level lock — controls overlay & delete (ADR-0010). |
| _lockReason | string | optional | Human-readable reason shown when a write is refused by _lock. |
| _lockSource | Enum<'artifact' | 'package' | 'env-forced'> | optional | Layer that set _lock (artifact | package | env-forced). |
| _provenance | Enum<'package' | 'org' | 'env-forced'> | optional | Origin of the item (package | org | env-forced). |
| _packageId | string | optional | Owning package machine id. |
| _packageVersion | string | optional | Owning package version. |
| _lockDocsUrl | string | optional | Optional documentation link surfaced next to _lockReason. |
Nested Shape: Position.protection
| Property | Type | Required | Description |
|---|---|---|---|
| lock | Enum<'none' | 'no-overlay' | 'no-delete' | 'full'> | ✅ | Lock policy — none | no-overlay | no-delete | full. |
| reason | string | ✅ | User-visible reason shown when the lock blocks an action. |
| docsUrl | string | optional | Optional URL the Studio banner links to for more context. |