/** * 员工、岗位与端(编码规范 §4 · `org`;语义出处 OS 02 员工管理;鉴权归统一鉴权中心,ADR-012)。 * * 身份来自 Keycloak:`Staff.id` 就是 token 的 `sub`。权限只到「端」(design / ops / workbench), * 角色 → 端由运营中心的表定;岗位仍是本系统的表(流程引擎按它解析负责人)。 * 旧的岗位授权(客体三类 × 动作三种)与口令会话已退役 —— 类型留一轮(@deprecated,下个迭代删)。 */ import { z } from 'zod'; export declare const positionSchema: z.ZodObject<{ id: z.core.$ZodBranded; code: z.ZodString; name: z.ZodString; note: z.ZodOptional; }, z.core.$strip>; export type Position = z.infer; export declare const STAFF_STATES: readonly ["active", "disabled"]; export declare const staffStateSchema: z.ZodEnum<{ active: "active"; disabled: "disabled"; }>; export type StaffState = z.infer; export declare const staffSchema: z.ZodObject<{ id: z.core.$ZodBranded; account: z.ZodString; name: z.ZodString; email: z.ZodOptional; positionId: z.core.$ZodBranded; state: z.ZodDefault>; roles: z.ZodDefault>; }, z.core.$strip>; export type Staff = z.infer; export declare const principalSchema: z.ZodObject<{ staff: z.ZodObject<{ id: z.core.$ZodBranded; account: z.ZodString; name: z.ZodString; email: z.ZodOptional; positionId: z.core.$ZodBranded; state: z.ZodDefault>; roles: z.ZodDefault>; }, z.core.$strip>; position: z.ZodObject<{ id: z.core.$ZodBranded; code: z.ZodString; name: z.ZodString; note: z.ZodOptional; }, z.core.$strip>; roles: z.ZodArray; ends: z.ZodArray>; }, z.core.$strip>; export type Principal = z.infer; /** 角色 → 端:一行一个 realm 角色 */ export declare const roleAccessSchema: z.ZodObject<{ role: z.ZodString; ends: z.ZodArray>; }, z.core.$strip>; export type RoleAccess = z.infer; /** * 名册同步的结果 —— 没配 provisioning 就如实说没配,不摆零。 * 三个计数说的是**真落进库里的条数**,不是打算写几条:单条写失败时它不进计数, * 而是点名进 `failed` —— 一次半途失败的同步不许报成一排绿数字。 */ export declare const rosterSyncOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ configured: z.ZodLiteral; message: z.ZodString; }, z.core.$strip>, z.ZodObject<{ configured: z.ZodLiteral; inserted: z.ZodNumber; updated: z.ZodNumber; disabled: z.ZodNumber; total: z.ZodNumber; failed: z.ZodArray>; }, z.core.$strip>], "configured">; export type RosterSyncOutcome = z.infer; export declare const inFlightWorkSchema: z.ZodObject<{ staffId: z.core.$ZodBranded; blocked: z.ZodBoolean; openTasks: z.ZodDefault>>; openCards: z.ZodDefault>>; openApprovals: z.ZodDefault>>; }, z.core.$strip>; export type InFlightWork = z.infer; /** @deprecated 随 ADR-012 改名 `inFlightWorkSchema`;下个迭代删 */ export declare const disableCheckSchema: z.ZodObject<{ staffId: z.core.$ZodBranded; blocked: z.ZodBoolean; openTasks: z.ZodDefault>>; openCards: z.ZodDefault>>; openApprovals: z.ZodDefault>>; }, z.core.$strip>; /** @deprecated 改用 `InFlightWork` */ export type DisableCheck = InFlightWork; /** @deprecated 权限只到端,动作三分已退役 */ export declare const GRANT_ACTIONS: readonly ["read", "write", "govern"]; /** @deprecated */ export declare const grantActionSchema: z.ZodEnum<{ read: "read"; write: "write"; govern: "govern"; }>; /** @deprecated */ export type GrantAction = z.infer; /** @deprecated */ export declare const GRANT_ACTION_LABEL: Readonly>; /** @deprecated 治理台九功能不再是授权客体 */ export declare const GOVERNANCE_FUNCTIONS: readonly ["task", "staff", "process", "trigger", "activity", "tool", "data", "memory", "system"]; /** @deprecated */ export declare const governanceFunctionSchema: z.ZodEnum<{ trigger: "trigger"; data: "data"; task: "task"; system: "system"; tool: "tool"; activity: "activity"; staff: "staff"; process: "process"; memory: "memory"; }>; /** @deprecated */ export type GovernanceFunction = z.infer; /** @deprecated */ export declare const GOVERNANCE_FUNCTION_LABEL: Readonly>; /** @deprecated */ export declare const grantObjectSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"data">; domain: z.ZodString; object: z.ZodString; field: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"governance">; function: z.ZodEnum<{ trigger: "trigger"; data: "data"; task: "task"; system: "system"; tool: "tool"; activity: "activity"; staff: "staff"; process: "process"; memory: "memory"; }>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"task">; activityId: z.ZodOptional; }, z.core.$strip>], "kind">; /** @deprecated */ export type GrantObject = z.infer; /** @deprecated */ export declare const grantSchema: z.ZodObject<{ positionId: z.core.$ZodBranded; object: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"data">; domain: z.ZodString; object: z.ZodString; field: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"governance">; function: z.ZodEnum<{ trigger: "trigger"; data: "data"; task: "task"; system: "system"; tool: "tool"; activity: "activity"; staff: "staff"; process: "process"; memory: "memory"; }>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"task">; activityId: z.ZodOptional; }, z.core.$strip>], "kind">; action: z.ZodEnum<{ read: "read"; write: "write"; govern: "govern"; }>; }, z.core.$strip>; /** @deprecated */ export type Grant = z.infer; /** @deprecated 改用 `principalSchema` / `GET /api/me` */ export declare const sessionSchema: z.ZodObject<{ staff: z.ZodObject<{ id: z.core.$ZodBranded; account: z.ZodString; name: z.ZodString; email: z.ZodOptional; positionId: z.core.$ZodBranded; state: z.ZodDefault>; roles: z.ZodDefault>; }, z.core.$strip>; position: z.ZodObject<{ id: z.core.$ZodBranded; code: z.ZodString; name: z.ZodString; note: z.ZodOptional; }, z.core.$strip>; grants: z.ZodArray; object: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"data">; domain: z.ZodString; object: z.ZodString; field: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"governance">; function: z.ZodEnum<{ trigger: "trigger"; data: "data"; task: "task"; system: "system"; tool: "tool"; activity: "activity"; staff: "staff"; process: "process"; memory: "memory"; }>; }, z.core.$strip>, z.ZodObject<{ kind: z.ZodLiteral<"task">; activityId: z.ZodOptional; }, z.core.$strip>], "kind">; action: z.ZodEnum<{ read: "read"; write: "write"; govern: "govern"; }>; }, z.core.$strip>>; }, z.core.$strip>; /** @deprecated 改用 `Principal` */ export type Session = z.infer; /** * 工作组 —— 一组「岗位 → 员工」的绑定,起单时装载、随工作流走。 * * **不是第五种负责人策略**(OS 03「策略封闭四选」不动): * 四策略回答的是「这个岗位该派给谁」,工作组直接给出了答案,策略于是无从发问。 * 键是**岗位 code**(BD / PM / FAE …),与流程包 `owner.position` 同一口径。 */ export declare const workGroupSchema: z.ZodObject<{ id: z.ZodString; name: z.ZodString; ownerId: z.core.$ZodBranded; members: z.ZodRecord>; }, z.core.$strip>; export type WorkGroup = z.infer; /** 装进工作流的**快照**:改组不改已起的单(留痕不被改写) */ export declare const workGroupBindingSchema: z.ZodRecord>; export type WorkGroupBinding = z.infer;