@zeitvu97/cms-sdk 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +478 -0
- package/dist/chunks/_shared-48T7q0V3.js +26 -0
- package/dist/chunks/_shared-48T7q0V3.js.map +1 -0
- package/dist/chunks/auth.constant-DO7ZmsKg.js +68 -0
- package/dist/chunks/auth.constant-DO7ZmsKg.js.map +1 -0
- package/dist/chunks/mt5Retcode-DlZLQOLA.js +178 -0
- package/dist/chunks/mt5Retcode-DlZLQOLA.js.map +1 -0
- package/dist/chunks/storage.constant--64BDSPW.js +44 -0
- package/dist/chunks/storage.constant--64BDSPW.js.map +1 -0
- package/dist/common/constants/auth.constant.d.ts +54 -0
- package/dist/common/constants/auth.constant.d.ts.map +1 -0
- package/dist/common/constants/bars.constant.d.ts +15 -0
- package/dist/common/constants/bars.constant.d.ts.map +1 -0
- package/dist/common/constants/content-types.constant.d.ts +29 -0
- package/dist/common/constants/content-types.constant.d.ts.map +1 -0
- package/dist/common/constants/content.constant.d.ts +114 -0
- package/dist/common/constants/content.constant.d.ts.map +1 -0
- package/dist/common/constants/executions.constant.d.ts +56 -0
- package/dist/common/constants/executions.constant.d.ts.map +1 -0
- package/dist/common/constants/gov.constant.d.ts +118 -0
- package/dist/common/constants/gov.constant.d.ts.map +1 -0
- package/dist/common/constants/history.constant.d.ts +108 -0
- package/dist/common/constants/history.constant.d.ts.map +1 -0
- package/dist/common/constants/http.constant.d.ts +46 -0
- package/dist/common/constants/http.constant.d.ts.map +1 -0
- package/dist/common/constants/index.d.ts +16 -0
- package/dist/common/constants/index.d.ts.map +1 -0
- package/dist/common/constants/kalshi.constant.d.ts +35 -0
- package/dist/common/constants/kalshi.constant.d.ts.map +1 -0
- package/dist/common/constants/llm.constant.d.ts +37 -0
- package/dist/common/constants/llm.constant.d.ts.map +1 -0
- package/dist/common/constants/mt5-action.constant.d.ts +131 -0
- package/dist/common/constants/mt5-action.constant.d.ts.map +1 -0
- package/dist/common/constants/mt5.constant.d.ts +254 -0
- package/dist/common/constants/mt5.constant.d.ts.map +1 -0
- package/dist/common/constants/notifications.constant.d.ts +45 -0
- package/dist/common/constants/notifications.constant.d.ts.map +1 -0
- package/dist/common/constants/people.constant.d.ts +269 -0
- package/dist/common/constants/people.constant.d.ts.map +1 -0
- package/dist/common/constants/rules.constant.d.ts +14 -0
- package/dist/common/constants/rules.constant.d.ts.map +1 -0
- package/dist/common/constants/settings.constant.d.ts +17 -0
- package/dist/common/constants/settings.constant.d.ts.map +1 -0
- package/dist/common/constants/sort.constant.d.ts +14 -0
- package/dist/common/constants/sort.constant.d.ts.map +1 -0
- package/dist/common/constants/storage.constant.d.ts +74 -0
- package/dist/common/constants/storage.constant.d.ts.map +1 -0
- package/dist/common/helpers/format.d.ts +7 -0
- package/dist/common/helpers/format.d.ts.map +1 -0
- package/dist/common/helpers/format.js +20 -0
- package/dist/common/helpers/format.js.map +1 -0
- package/dist/common/helpers/mt5Retcode.d.ts +18 -0
- package/dist/common/helpers/mt5Retcode.d.ts.map +1 -0
- package/dist/common/helpers/mt5Retcode.js +2 -0
- package/dist/common/helpers/mt5Retcode.js.map +1 -0
- package/dist/common/utils/case.d.ts +12 -0
- package/dist/common/utils/case.d.ts.map +1 -0
- package/dist/common/utils/clone.d.ts +9 -0
- package/dist/common/utils/clone.d.ts.map +1 -0
- package/dist/composables/cbsStateKey.d.ts +27 -0
- package/dist/composables/cbsStateKey.d.ts.map +1 -0
- package/dist/core/createApi.d.ts +69 -0
- package/dist/core/createApi.d.ts.map +1 -0
- package/dist/core/createCmsSDK.d.ts +19 -0
- package/dist/core/createCmsSDK.d.ts.map +1 -0
- package/dist/core/credentials/TokenManager.d.ts +38 -0
- package/dist/core/credentials/TokenManager.d.ts.map +1 -0
- package/dist/core/credentials/credential.type.d.ts +16 -0
- package/dist/core/credentials/credential.type.d.ts.map +1 -0
- package/dist/core/credentials/resolveStorage.d.ts +6 -0
- package/dist/core/credentials/resolveStorage.d.ts.map +1 -0
- package/dist/core/credentials/storages/cookieStorage.d.ts +18 -0
- package/dist/core/credentials/storages/cookieStorage.d.ts.map +1 -0
- package/dist/core/credentials/storages/localStorageAdapter.d.ts +8 -0
- package/dist/core/credentials/storages/localStorageAdapter.d.ts.map +1 -0
- package/dist/core/credentials/storages/memoryStorage.d.ts +7 -0
- package/dist/core/credentials/storages/memoryStorage.d.ts.map +1 -0
- package/dist/core/errors.d.ts +26 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/sdk.type.d.ts +115 -0
- package/dist/core/sdk.type.d.ts.map +1 -0
- package/dist/core/ws/createEaeraWebSocket.d.ts +21 -0
- package/dist/core/ws/createEaeraWebSocket.d.ts.map +1 -0
- package/dist/core/ws/index.d.ts +4 -0
- package/dist/core/ws/index.d.ts.map +1 -0
- package/dist/core/ws/ws.constants.d.ts +246 -0
- package/dist/core/ws/ws.constants.d.ts.map +1 -0
- package/dist/core/ws/ws.events.d.ts +264 -0
- package/dist/core/ws/ws.events.d.ts.map +1 -0
- package/dist/core/ws/ws.type.d.ts +225 -0
- package/dist/core/ws/ws.type.d.ts.map +1 -0
- package/dist/index.d.ts +130 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8416 -0
- package/dist/index.js.map +1 -0
- package/dist/nuxt.d.ts +49 -0
- package/dist/nuxt.d.ts.map +1 -0
- package/dist/nuxt.js +47 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/runtime/plugin.d.ts +6 -0
- package/dist/runtime/plugin.js +188 -0
- package/dist/runtime/plugin.js.map +1 -0
- package/dist/server/auth/cbs-callback.post.js +42 -0
- package/dist/server/auth/cbs-callback.post.js.map +1 -0
- package/dist/server/auth/cbs-start.post.js +34 -0
- package/dist/server/auth/cbs-start.post.js.map +1 -0
- package/dist/server/auth/idp-callback.get.js +52 -0
- package/dist/server/auth/idp-callback.get.js.map +1 -0
- package/dist/server/auth/idp-link.post.js +38 -0
- package/dist/server/auth/idp-link.post.js.map +1 -0
- package/dist/server/auth/idp-login.get.js +42 -0
- package/dist/server/auth/idp-login.get.js.map +1 -0
- package/dist/server/auth/idp-unlink.delete.js +38 -0
- package/dist/server/auth/idp-unlink.delete.js.map +1 -0
- package/dist/server/auth/login.post.js +42 -0
- package/dist/server/auth/login.post.js.map +1 -0
- package/dist/server/auth/logout.post.js +31 -0
- package/dist/server/auth/logout.post.js.map +1 -0
- package/dist/server/auth/refresh.post.js +46 -0
- package/dist/server/auth/refresh.post.js.map +1 -0
- package/dist/server/clear-token.delete.js +12 -0
- package/dist/server/clear-token.delete.js.map +1 -0
- package/dist/server/persist.post.js +31 -0
- package/dist/server/persist.post.js.map +1 -0
- package/dist/server/set-token.post.js +27 -0
- package/dist/server/set-token.post.js.map +1 -0
- package/dist/services/auth/auth.type.d.ts +66 -0
- package/dist/services/auth/auth.type.d.ts.map +1 -0
- package/dist/services/auth/index.d.ts +127 -0
- package/dist/services/auth/index.d.ts.map +1 -0
- package/dist/services/auth/mock.d.ts +13 -0
- package/dist/services/auth/mock.d.ts.map +1 -0
- package/dist/services/bars/bars.type.d.ts +78 -0
- package/dist/services/bars/bars.type.d.ts.map +1 -0
- package/dist/services/bars/index.d.ts +24 -0
- package/dist/services/bars/index.d.ts.map +1 -0
- package/dist/services/bars/mock.d.ts +23 -0
- package/dist/services/bars/mock.d.ts.map +1 -0
- package/dist/services/content/content.type.d.ts +832 -0
- package/dist/services/content/content.type.d.ts.map +1 -0
- package/dist/services/content/filter.d.ts +46 -0
- package/dist/services/content/filter.d.ts.map +1 -0
- package/dist/services/content/index.d.ts +35 -0
- package/dist/services/content/index.d.ts.map +1 -0
- package/dist/services/content/mock.d.ts +16 -0
- package/dist/services/content/mock.d.ts.map +1 -0
- package/dist/services/content-types/content-types.type.d.ts +70 -0
- package/dist/services/content-types/content-types.type.d.ts.map +1 -0
- package/dist/services/content-types/index.d.ts +18 -0
- package/dist/services/content-types/index.d.ts.map +1 -0
- package/dist/services/content-types/mock.d.ts +15 -0
- package/dist/services/content-types/mock.d.ts.map +1 -0
- package/dist/services/executions/executions.type.d.ts +67 -0
- package/dist/services/executions/executions.type.d.ts.map +1 -0
- package/dist/services/executions/index.d.ts +30 -0
- package/dist/services/executions/index.d.ts.map +1 -0
- package/dist/services/executions/mock.d.ts +29 -0
- package/dist/services/executions/mock.d.ts.map +1 -0
- package/dist/services/gov/gov.type.d.ts +740 -0
- package/dist/services/gov/gov.type.d.ts.map +1 -0
- package/dist/services/gov/index.d.ts +84 -0
- package/dist/services/gov/index.d.ts.map +1 -0
- package/dist/services/history/history.type.d.ts +167 -0
- package/dist/services/history/history.type.d.ts.map +1 -0
- package/dist/services/history/index.d.ts +38 -0
- package/dist/services/history/index.d.ts.map +1 -0
- package/dist/services/history/mock.d.ts +21 -0
- package/dist/services/history/mock.d.ts.map +1 -0
- package/dist/services/kalshi/index.d.ts +19 -0
- package/dist/services/kalshi/index.d.ts.map +1 -0
- package/dist/services/kalshi/kalshi.type.d.ts +99 -0
- package/dist/services/kalshi/kalshi.type.d.ts.map +1 -0
- package/dist/services/kalshi/mock.d.ts +5 -0
- package/dist/services/kalshi/mock.d.ts.map +1 -0
- package/dist/services/llm/index.d.ts +38 -0
- package/dist/services/llm/index.d.ts.map +1 -0
- package/dist/services/llm/llm.type.d.ts +106 -0
- package/dist/services/llm/llm.type.d.ts.map +1 -0
- package/dist/services/notifications/index.d.ts +38 -0
- package/dist/services/notifications/index.d.ts.map +1 -0
- package/dist/services/notifications/mock.d.ts +39 -0
- package/dist/services/notifications/mock.d.ts.map +1 -0
- package/dist/services/notifications/notifications.type.d.ts +75 -0
- package/dist/services/notifications/notifications.type.d.ts.map +1 -0
- package/dist/services/people/_invoke.d.ts +26 -0
- package/dist/services/people/_invoke.d.ts.map +1 -0
- package/dist/services/people/copilot/index.d.ts +132 -0
- package/dist/services/people/copilot/index.d.ts.map +1 -0
- package/dist/services/people/identity/actions.d.ts +116 -0
- package/dist/services/people/identity/actions.d.ts.map +1 -0
- package/dist/services/people/identity/ct.types.d.ts +133 -0
- package/dist/services/people/identity/ct.types.d.ts.map +1 -0
- package/dist/services/people/identity/index.d.ts +14 -0
- package/dist/services/people/identity/index.d.ts.map +1 -0
- package/dist/services/people/identity/projections.d.ts +63 -0
- package/dist/services/people/identity/projections.d.ts.map +1 -0
- package/dist/services/people/index.d.ts +31 -0
- package/dist/services/people/index.d.ts.map +1 -0
- package/dist/services/people/legal/actions.d.ts +161 -0
- package/dist/services/people/legal/actions.d.ts.map +1 -0
- package/dist/services/people/legal/ct.types.d.ts +186 -0
- package/dist/services/people/legal/ct.types.d.ts.map +1 -0
- package/dist/services/people/legal/index.d.ts +15 -0
- package/dist/services/people/legal/index.d.ts.map +1 -0
- package/dist/services/people/packops/index.d.ts +70 -0
- package/dist/services/people/packops/index.d.ts.map +1 -0
- package/dist/services/people/packops/packops.type.d.ts +183 -0
- package/dist/services/people/packops/packops.type.d.ts.map +1 -0
- package/dist/services/people/perms/actions.d.ts +214 -0
- package/dist/services/people/perms/actions.d.ts.map +1 -0
- package/dist/services/people/perms/ct.types.d.ts +140 -0
- package/dist/services/people/perms/ct.types.d.ts.map +1 -0
- package/dist/services/people/perms/index.d.ts +14 -0
- package/dist/services/people/perms/index.d.ts.map +1 -0
- package/dist/services/people/perms/projections.d.ts +47 -0
- package/dist/services/people/perms/projections.d.ts.map +1 -0
- package/dist/services/people/process/actions.d.ts +154 -0
- package/dist/services/people/process/actions.d.ts.map +1 -0
- package/dist/services/people/process/ct.types.d.ts +304 -0
- package/dist/services/people/process/ct.types.d.ts.map +1 -0
- package/dist/services/people/process/index.d.ts +12 -0
- package/dist/services/people/process/index.d.ts.map +1 -0
- package/dist/services/people/shared.types.d.ts +36 -0
- package/dist/services/people/shared.types.d.ts.map +1 -0
- package/dist/services/rules/conditions.d.ts +264 -0
- package/dist/services/rules/conditions.d.ts.map +1 -0
- package/dist/services/rules/index.d.ts +49 -0
- package/dist/services/rules/index.d.ts.map +1 -0
- package/dist/services/rules/llm-rule.constant.d.ts +84 -0
- package/dist/services/rules/llm-rule.constant.d.ts.map +1 -0
- package/dist/services/rules/mock.d.ts +20 -0
- package/dist/services/rules/mock.d.ts.map +1 -0
- package/dist/services/rules/rules.type.d.ts +262 -0
- package/dist/services/rules/rules.type.d.ts.map +1 -0
- package/dist/services/rules/triggers.d.ts +140 -0
- package/dist/services/rules/triggers.d.ts.map +1 -0
- package/dist/services/settings/index.d.ts +36 -0
- package/dist/services/settings/index.d.ts.map +1 -0
- package/dist/services/settings/mock.d.ts +14 -0
- package/dist/services/settings/mock.d.ts.map +1 -0
- package/dist/services/settings/settings.type.d.ts +39 -0
- package/dist/services/settings/settings.type.d.ts.map +1 -0
- package/dist/stores/auth.d.ts +192 -0
- package/dist/stores/auth.d.ts.map +1 -0
- package/dist/stores/bars.d.ts +288 -0
- package/dist/stores/bars.d.ts.map +1 -0
- package/dist/stores/content.d.ts +4101 -0
- package/dist/stores/content.d.ts.map +1 -0
- package/dist/stores/executions.d.ts +249 -0
- package/dist/stores/executions.d.ts.map +1 -0
- package/dist/stores/gov.d.ts +238 -0
- package/dist/stores/gov.d.ts.map +1 -0
- package/dist/stores/history.d.ts +833 -0
- package/dist/stores/history.d.ts.map +1 -0
- package/dist/stores/index.d.ts +15 -0
- package/dist/stores/index.d.ts.map +1 -0
- package/dist/stores/kalshi.d.ts +728 -0
- package/dist/stores/kalshi.d.ts.map +1 -0
- package/dist/stores/llm-providers.d.ts +97 -0
- package/dist/stores/llm-providers.d.ts.map +1 -0
- package/dist/stores/llm.d.ts +102 -0
- package/dist/stores/llm.d.ts.map +1 -0
- package/dist/stores/people.d.ts +596 -0
- package/dist/stores/people.d.ts.map +1 -0
- package/dist/stores/persist.d.ts +58 -0
- package/dist/stores/persist.d.ts.map +1 -0
- package/dist/stores/rules.d.ts +485 -0
- package/dist/stores/rules.d.ts.map +1 -0
- package/dist/stores/settings.d.ts +36 -0
- package/dist/stores/settings.d.ts.map +1 -0
- package/dist/stores/ws.d.ts +66 -0
- package/dist/stores/ws.d.ts.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legal & Org domain — barrel.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the public surface for `fe-data-design.md` consumers:
|
|
5
|
+
* - CT payload types (FEAT-001 + FEAT-002) → `ct.types.ts`
|
|
6
|
+
* - Action params + outputs + mixin shape + factory → `actions.ts`
|
|
7
|
+
* - CT row envelopes (typed)
|
|
8
|
+
*
|
|
9
|
+
* The service (`src/services/people/index.ts`) imports the mixin factory;
|
|
10
|
+
* the FE composes against typed rows + action outputs.
|
|
11
|
+
*/
|
|
12
|
+
export type { PeopleLegalEntityData, PeopleLegalEntity, PeopleRegisteredBranchData, PeopleRegisteredBranch, PeopleEffectiveRevisionData, PeopleEffectiveRevision, PeopleClosureCaseData, PeopleClosureCase, PeoplePolicyAssignmentData, PeoplePolicyAssignment, PeoplePolicyData, PeoplePolicy, PeopleOrgNodeData, PeopleOrgUnit, PeoplePosition, PeopleWorkLocation, PeopleTypeCatalogueData, PeopleUnitType, PeopleWorkLocationType, PeopleOrgChangeSetData, PeopleOrgChangeSet, } from './ct.types';
|
|
13
|
+
export type { PeopleRegisterLegalEntityParams, PeopleScheduleBranchParams, PeopleRescheduleBranchParams, PeopleCorrectCodeParams, PeopleReactivateParams, PeopleArchiveVisibilityParams, PeopleScheduleRevisionParams, PeopleClosureSubmitParams, PeopleClosureApproveParams, PeopleClosureCompleteOutput, PeopleClosureRejectParams, PeopleClosureCancelParams, PeopleScheduleAssignmentParams, PeopleCsSubmitParams, PeopleCsScheduleParams, LegalAndOrgActions, } from './actions';
|
|
14
|
+
export { buildLegalActions } from './actions';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/people/legal/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,0BAA0B,EAC1B,sBAAsB,EACtB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,+BAA+B,EAC/B,0BAA0B,EAC1B,4BAA4B,EAC5B,uBAAuB,EACvB,sBAAsB,EACtB,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,8BAA8B,EAC9B,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { $Fetch } from 'ofetch';
|
|
2
|
+
import { PeoplePackAuditEntry, PeoplePackAuditQuery, PeoplePackConflictEntry, PeoplePackConflictPreview, PeoplePackImpact, PeoplePackPreflight, PeoplePackPreflightQuery, PeoplePackSyncLog, PeoplePackUpgradeCheck, PeoplePackOpsRegistry } from './packops.type';
|
|
3
|
+
export interface IPeoplePackOpsServiceOptions {
|
|
4
|
+
/** The CMS `$Fetch` instance (one of `sdk.apis`). */
|
|
5
|
+
api: $Fetch;
|
|
6
|
+
}
|
|
7
|
+
/** FEAT-015 — pack-operation reads (projections) + engine pack mutations. */
|
|
8
|
+
export interface IPeoplePackOpsService {
|
|
9
|
+
/** `GET /people/pack-ops/registry` — CMS packs + template catalog. */
|
|
10
|
+
registry(): Promise<PeoplePackOpsRegistry>;
|
|
11
|
+
/** `GET /people/pack-ops/preflight?slug=&source=&ref=` — no install. */
|
|
12
|
+
preflight(query: PeoplePackPreflightQuery): Promise<PeoplePackPreflight>;
|
|
13
|
+
/** `GET /people/pack-ops/{slug}/upgrade-check` — installed vs branch. */
|
|
14
|
+
upgradeCheck(slug: string): Promise<PeoplePackUpgradeCheck>;
|
|
15
|
+
/** `GET /people/pack-ops/{slug}/impact?ref=` — read-only target preview. */
|
|
16
|
+
impact(slug: string, ref: string): Promise<PeoplePackImpact>;
|
|
17
|
+
/** `GET /packs/audit-log` — every pack transition with actor (US7). */
|
|
18
|
+
auditLog(query?: PeoplePackAuditQuery): Promise<PeoplePackAuditEntry[]>;
|
|
19
|
+
/** `POST /packs/{slug}/install?ref=` — E8a gates run server-side. */
|
|
20
|
+
install(slug: string, ref?: string): Promise<Record<string, unknown>>;
|
|
21
|
+
/** `POST /packs` — register a pack (git remote + metadata) before install
|
|
22
|
+
* (registry-catalog entries have no CMS row yet; 409 when the slug
|
|
23
|
+
* exists — treat as registered and continue to preflight/install). */
|
|
24
|
+
register(params: {
|
|
25
|
+
slug: string;
|
|
26
|
+
name?: string;
|
|
27
|
+
source: string;
|
|
28
|
+
branch?: string;
|
|
29
|
+
}): Promise<Record<string, unknown>>;
|
|
30
|
+
/** `POST /packs/{slug}/rollback?to_version=` — 202 accepted. */
|
|
31
|
+
rollback(slug: string, toVersion?: string): Promise<Record<string, unknown>>;
|
|
32
|
+
/**
|
|
33
|
+
* `DELETE /packs/{slug}` (archive = uninstall) — engine belt rejects 409
|
|
34
|
+
* `PEOPLE_PACK_REFERENCED_CONTENT` while CTs still own content unless
|
|
35
|
+
* `force: true` (purge flow, two-layer confirm portal-side).
|
|
36
|
+
*/
|
|
37
|
+
uninstall(slug: string, force?: boolean): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* `PUT /packs/{slug}` — metadata update. Disable is the People-pack
|
|
40
|
+
* convention `metadata.kind`-preserving flag write
|
|
41
|
+
* (`people.pack.disabled`, settings §6.1): soft-off, instantly reversible.
|
|
42
|
+
*/
|
|
43
|
+
updateMetadata(slug: string, patch: {
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
metadata?: Record<string, unknown>;
|
|
46
|
+
}): Promise<Record<string, unknown>>;
|
|
47
|
+
/** `GET /packs/{slug}/conflicts` — git-vs-DB drift per artifact. */
|
|
48
|
+
conflicts(slug: string): Promise<PeoplePackConflictEntry[]>;
|
|
49
|
+
/** `GET /packs/{slug}/conflicts/{artifact_id}/preview` — 3-way merge. */
|
|
50
|
+
conflictPreview(slug: string, artifactId: number): Promise<PeoplePackConflictPreview>;
|
|
51
|
+
/**
|
|
52
|
+
* `POST /packs/{slug}/conflicts/{conflict_id}/resolve` — human decision.
|
|
53
|
+
* `merge_manual` flags the artifact for human merge; neither side is
|
|
54
|
+
* force-overwritten (US6: conflict → surface for human).
|
|
55
|
+
*/
|
|
56
|
+
resolveConflict(slug: string, conflictId: number, resolution: 'git_wins' | 'db_wins' | 'merge_manual'): Promise<{
|
|
57
|
+
conflict_id: number;
|
|
58
|
+
resolution: string;
|
|
59
|
+
resolved: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
/** `GET /packs/{slug}/sync-log` — cursor-paginated sync history. */
|
|
62
|
+
syncLog(slug: string, query?: {
|
|
63
|
+
cursor?: string;
|
|
64
|
+
limit?: number;
|
|
65
|
+
}): Promise<PeoplePackSyncLog>;
|
|
66
|
+
/** `GET /packs/{slug}/sync-jobs/{job_id}` — one job's detail. */
|
|
67
|
+
syncJob(slug: string, jobId: string): Promise<Record<string, unknown>>;
|
|
68
|
+
}
|
|
69
|
+
export declare function createPeoplePackOpsService(opts: IPeoplePackOpsServiceOptions): IPeoplePackOpsService;
|
|
70
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/people/packops/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE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M,EAAE,OAAO,CAAC,CAAC,CAAC;CACxE;AAkBD,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,4BAA4B,GACjC,qBAAqB,CA+FvB"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* People Hub — FEAT-015 pack-operation projection reads (api_references §6.4).
|
|
3
|
+
*
|
|
4
|
+
* Four READ-ONLY endpoints the People pack mounts on the engine; every
|
|
5
|
+
* mutation (install/upgrade/rollback/disable/uninstall) stays on the engine
|
|
6
|
+
* pack API (`/api/v1/packs/*`). Responses are snake_case per the projection
|
|
7
|
+
* contract (they bypass the generic content casing — the engine mounts these
|
|
8
|
+
* routers verbatim), so keys are typed snake_case here and mapped at the
|
|
9
|
+
* consumer boundary.
|
|
10
|
+
*/
|
|
11
|
+
/** One CMS-registered pack row (`product_packs` projection). */
|
|
12
|
+
export interface PeoplePackOpsRegistryItem {
|
|
13
|
+
/** Pack uuid. */
|
|
14
|
+
id: string;
|
|
15
|
+
slug: string;
|
|
16
|
+
name?: string | null;
|
|
17
|
+
/** Credentials redacted server-side (`sourceRedacted` flags it). */
|
|
18
|
+
source: string | null;
|
|
19
|
+
sourceRedacted: boolean;
|
|
20
|
+
branch?: string | null;
|
|
21
|
+
version?: string | null;
|
|
22
|
+
/** CMS state: draft | active | archived (install states derive). */
|
|
23
|
+
state: string;
|
|
24
|
+
/** People convention: meta | template | generated. */
|
|
25
|
+
kind: 'meta' | 'template' | 'generated' | string;
|
|
26
|
+
cachePath?: string | null;
|
|
27
|
+
lastSyncedAt?: string | null;
|
|
28
|
+
lastSyncStatus?: string | null;
|
|
29
|
+
createdAt?: string | null;
|
|
30
|
+
updatedAt?: string | null;
|
|
31
|
+
[key: string]: unknown;
|
|
32
|
+
}
|
|
33
|
+
/** One available template from the registry seed manifest (D7 shape). */
|
|
34
|
+
export interface PeoplePackOpsCatalogEntry {
|
|
35
|
+
slug: string;
|
|
36
|
+
repo: string | null;
|
|
37
|
+
latestVersion: string | null;
|
|
38
|
+
baseCommit: string | null;
|
|
39
|
+
kind: 'template' | string;
|
|
40
|
+
installed: boolean;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
export interface PeoplePackOpsRegistry {
|
|
44
|
+
count: number;
|
|
45
|
+
items: PeoplePackOpsRegistryItem[];
|
|
46
|
+
catalogSource: 'registry_seed_manifest' | 'cms_product_packs' | string;
|
|
47
|
+
remoteCatalogAvailable: boolean;
|
|
48
|
+
registryRepo: string | null;
|
|
49
|
+
availableCatalog: PeoplePackOpsCatalogEntry[];
|
|
50
|
+
/** Degrade reasons (e.g. no registry_repo configured). */
|
|
51
|
+
limitations: string[];
|
|
52
|
+
}
|
|
53
|
+
export interface PeoplePackPreflightBlocker {
|
|
54
|
+
code: string;
|
|
55
|
+
detail?: string;
|
|
56
|
+
details?: Array<Record<string, unknown>>;
|
|
57
|
+
required?: string;
|
|
58
|
+
running?: string;
|
|
59
|
+
[key: string]: unknown;
|
|
60
|
+
}
|
|
61
|
+
/** Manifest summary shared by preflight / upgrade-check / impact. */
|
|
62
|
+
export interface PeoplePackManifestSummary {
|
|
63
|
+
slug: string;
|
|
64
|
+
displayName?: string | null;
|
|
65
|
+
version?: string | null;
|
|
66
|
+
minCmsVersion?: string | null;
|
|
67
|
+
contentTypes: string[];
|
|
68
|
+
dependencies: Array<{
|
|
69
|
+
slug: string;
|
|
70
|
+
version: string | null;
|
|
71
|
+
}>;
|
|
72
|
+
migrationCount: number;
|
|
73
|
+
releaseNotes?: string | null;
|
|
74
|
+
}
|
|
75
|
+
export interface PeoplePackPreflight {
|
|
76
|
+
ok: boolean;
|
|
77
|
+
blockers: PeoplePackPreflightBlocker[];
|
|
78
|
+
warnings: Array<Record<string, unknown>>;
|
|
79
|
+
targetRef: string | null;
|
|
80
|
+
manifestSummary: PeoplePackManifestSummary | null;
|
|
81
|
+
}
|
|
82
|
+
export interface PeoplePackUpgradeCheck {
|
|
83
|
+
slug: string;
|
|
84
|
+
upgradeAvailable: boolean;
|
|
85
|
+
currentRef: string | null;
|
|
86
|
+
targetRef: string | null;
|
|
87
|
+
currentVersion: string | null;
|
|
88
|
+
targetVersion: string | null;
|
|
89
|
+
diffSummary: {
|
|
90
|
+
available: boolean;
|
|
91
|
+
changedCount: number;
|
|
92
|
+
changedFiles: string[];
|
|
93
|
+
};
|
|
94
|
+
manifestSummary: PeoplePackManifestSummary | null;
|
|
95
|
+
}
|
|
96
|
+
/** A pending migration of the target ref. */
|
|
97
|
+
export interface PeoplePackPendingMigration {
|
|
98
|
+
name: string;
|
|
99
|
+
oneWay?: boolean;
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
}
|
|
102
|
+
export interface PeoplePackImpact {
|
|
103
|
+
slug: string;
|
|
104
|
+
currentRef: string | null;
|
|
105
|
+
targetRef: string | null;
|
|
106
|
+
currentVersion: string | null;
|
|
107
|
+
targetVersion: string | null;
|
|
108
|
+
majorUpgrade: boolean;
|
|
109
|
+
artifactDiff: {
|
|
110
|
+
available: boolean;
|
|
111
|
+
changedCount: number;
|
|
112
|
+
changedFiles: string[];
|
|
113
|
+
};
|
|
114
|
+
pendingMigrations: PeoplePackPendingMigration[];
|
|
115
|
+
/** One-way entries — rollback stops at the safe checkpoint. */
|
|
116
|
+
rollbackBlockers: Array<{
|
|
117
|
+
code: string;
|
|
118
|
+
migration: string;
|
|
119
|
+
}>;
|
|
120
|
+
contentImpact: {
|
|
121
|
+
basis: 'non_deleted_contents' | string;
|
|
122
|
+
countsByContentType: Record<string, number>;
|
|
123
|
+
};
|
|
124
|
+
collisions: Array<Record<string, unknown>>;
|
|
125
|
+
manifestSummary: PeoplePackManifestSummary | null;
|
|
126
|
+
}
|
|
127
|
+
/** `GET /api/v1/packs/audit-log` row — the install/upgrade/rollback/
|
|
128
|
+
* disable/uninstall trail (US7; survives uninstall). */
|
|
129
|
+
export interface PeoplePackAuditEntry {
|
|
130
|
+
id?: number;
|
|
131
|
+
action: string;
|
|
132
|
+
resourceType?: string;
|
|
133
|
+
resourceId?: string;
|
|
134
|
+
actorId?: number | null;
|
|
135
|
+
details?: Record<string, unknown>;
|
|
136
|
+
ipAddress?: string | null;
|
|
137
|
+
success?: boolean;
|
|
138
|
+
errorMessage?: string | null;
|
|
139
|
+
createdAt?: string;
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
}
|
|
142
|
+
/** Query for the pack audit log read. */
|
|
143
|
+
export interface PeoplePackAuditQuery {
|
|
144
|
+
action?: string;
|
|
145
|
+
resourceId?: string;
|
|
146
|
+
actorId?: number;
|
|
147
|
+
limit?: number;
|
|
148
|
+
}
|
|
149
|
+
/** Query for `GET /people/pack-ops/preflight`. */
|
|
150
|
+
export interface PeoplePackPreflightQuery {
|
|
151
|
+
slug: string;
|
|
152
|
+
source: string;
|
|
153
|
+
/** Defaults to `main`. */
|
|
154
|
+
ref?: string;
|
|
155
|
+
}
|
|
156
|
+
/** One detected git-vs-DB conflict (`GET /packs/{slug}/conflicts`). */
|
|
157
|
+
export interface PeoplePackConflictEntry {
|
|
158
|
+
id: number;
|
|
159
|
+
artifact_id: number;
|
|
160
|
+
conflict_type: string;
|
|
161
|
+
git_hash: string | null;
|
|
162
|
+
db_hash: string | null;
|
|
163
|
+
detected_at: string | null;
|
|
164
|
+
resolved: boolean;
|
|
165
|
+
}
|
|
166
|
+
/** 3-way merge preview (`GET /packs/{slug}/conflicts/{artifact_id}/preview`). */
|
|
167
|
+
export interface PeoplePackConflictPreview {
|
|
168
|
+
artifact_name: string;
|
|
169
|
+
base_content: string | null;
|
|
170
|
+
git_content: string | null;
|
|
171
|
+
db_content: string | null;
|
|
172
|
+
git_changes: string | null;
|
|
173
|
+
db_changes: string | null;
|
|
174
|
+
auto_resolvable: boolean;
|
|
175
|
+
}
|
|
176
|
+
/** Cursor-paginated sync history (`GET /packs/{slug}/sync-log`). */
|
|
177
|
+
export interface PeoplePackSyncLog {
|
|
178
|
+
items: Array<Record<string, unknown>>;
|
|
179
|
+
total?: number;
|
|
180
|
+
cursor?: string | null;
|
|
181
|
+
next_cursor?: string | null;
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=packops.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packops.type.d.ts","sourceRoot":"","sources":["../../../../src/services/people/packops/packops.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,gEAAgE;AAChE,MAAM,WAAW,yBAAyB;IACxC,iBAAiB;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,oEAAoE;IACpE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,MAAM,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,yEAAyE;AACzE,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,UAAU,GAAG,MAAM,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AE,MAAM,CAAC;CACd;AAID,uEAAuE;AACvE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,iFAAiF;AACjF,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,oEAAoE;AACpE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { ActionResponse } from '../../content/content.type';
|
|
2
|
+
import { PeopleActionOpts } from '../shared.types';
|
|
3
|
+
import { InvokeDeps } from '../_invoke';
|
|
4
|
+
/** `validate_revision` — runs publish guards; writes `validationResult`. */
|
|
5
|
+
export interface PeopleValidateRevisionOutput {
|
|
6
|
+
valid: boolean;
|
|
7
|
+
errors: unknown[];
|
|
8
|
+
checkedAt: string;
|
|
9
|
+
}
|
|
10
|
+
/** `fork_draft` (factory on catalog_revision). Duplicate `revisionLabel`
|
|
11
|
+
* ⇒ `revision_label_conflict`. */
|
|
12
|
+
export interface PeopleForkDraftParams {
|
|
13
|
+
revisionLabel: string;
|
|
14
|
+
forkedFrom?: string;
|
|
15
|
+
}
|
|
16
|
+
/** `seed_merge` (factory on catalog_revision) — merges SETTING
|
|
17
|
+
* `people.permissionSets` into a draft; idempotent by key, NEVER auto-publishes. */
|
|
18
|
+
export interface PeopleSeedMergeParams {
|
|
19
|
+
permissionSets?: string[];
|
|
20
|
+
draftUuid?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface PeopleSeedMergeOutput {
|
|
23
|
+
draftUuid: string;
|
|
24
|
+
noOp: boolean;
|
|
25
|
+
added: Array<{
|
|
26
|
+
key: string;
|
|
27
|
+
}>;
|
|
28
|
+
unchanged: Array<{
|
|
29
|
+
key: string;
|
|
30
|
+
}>;
|
|
31
|
+
seedDrift: Array<{
|
|
32
|
+
key: string;
|
|
33
|
+
expected: unknown;
|
|
34
|
+
actual: unknown;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
/** `publish_revision` (row on catalog_revision) — guard + atomic publish +
|
|
38
|
+
* supersede previous in one execution; failure ⇒ `PEOPLE_CAT_DRAFT_MISMATCH`. */
|
|
39
|
+
export interface PeoplePublishRevisionOutput {
|
|
40
|
+
revisionLabel: string;
|
|
41
|
+
superseded: string[];
|
|
42
|
+
events: Array<{
|
|
43
|
+
type: string;
|
|
44
|
+
payload?: Record<string, unknown>;
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
/** `grant_exception` (factory on scope_exception). Creates directly `active`,
|
|
48
|
+
* `origin: 'admin'`. Open-ended windows rejected. Grants only widen data-scope. */
|
|
49
|
+
export interface PeopleGrantExceptionParams {
|
|
50
|
+
subjectRef: string;
|
|
51
|
+
scopeKey: string;
|
|
52
|
+
effect?: 'grant' | 'deny';
|
|
53
|
+
window: {
|
|
54
|
+
effectiveFrom: string;
|
|
55
|
+
effectiveTo: string;
|
|
56
|
+
};
|
|
57
|
+
justification: string;
|
|
58
|
+
employmentRef?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface PeopleGrantExceptionOutput {
|
|
61
|
+
exceptionUuid: string;
|
|
62
|
+
subjectRef: string;
|
|
63
|
+
scopeKey: string;
|
|
64
|
+
effect: 'grant' | 'deny';
|
|
65
|
+
origin: 'admin';
|
|
66
|
+
state: 'active';
|
|
67
|
+
}
|
|
68
|
+
/** `amend_exception_window` — only the window is mutable; effect/scopeKey/
|
|
69
|
+
* justification are locked to their original values. */
|
|
70
|
+
export interface PeopleAmendExceptionWindowParams {
|
|
71
|
+
window: {
|
|
72
|
+
effectiveFrom: string;
|
|
73
|
+
effectiveTo: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/** `grant` guard order: RA11 context → catalog resolve → acting triple →
|
|
77
|
+
* duplicate/idempotency NO_OP → SoD warn (never blocking) → write + inline
|
|
78
|
+
* `user_roles` reflect. `accessContextState` is the eaera-hr projection
|
|
79
|
+
* read the guard keys on: ended ⇒ PEOPLE_RA_CONTEXT_ENDED; scheduled ⇒ the
|
|
80
|
+
* row starts `prepared` (no enforcement until the sweep activates it). */
|
|
81
|
+
export interface PeopleGrantParams {
|
|
82
|
+
subjectRef: string;
|
|
83
|
+
roleKey: string;
|
|
84
|
+
accessContextRef: string;
|
|
85
|
+
assignmentType: 'manual' | 'birthright' | 'requested' | 'emergency';
|
|
86
|
+
accessContextState: 'active' | 'scheduled' | 'ended';
|
|
87
|
+
purpose?: 'standard' | 'acting';
|
|
88
|
+
effectiveFrom?: string;
|
|
89
|
+
effectiveTo?: string;
|
|
90
|
+
justification?: string;
|
|
91
|
+
ticketRef?: string;
|
|
92
|
+
idempotencyKey?: string;
|
|
93
|
+
sodWarnPatterns?: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface PeopleGrantOutput {
|
|
96
|
+
assignmentUuid: string;
|
|
97
|
+
state: 'prepared' | 'active';
|
|
98
|
+
sodWarnings: Array<{
|
|
99
|
+
pattern: string;
|
|
100
|
+
detail?: string;
|
|
101
|
+
}>;
|
|
102
|
+
noOp?: boolean;
|
|
103
|
+
}
|
|
104
|
+
/** `revoke` — reason required; birthright rows additionally write
|
|
105
|
+
* `manual_override` (blocks re-grant until the rule republishes). */
|
|
106
|
+
export interface PeopleRevokeParams {
|
|
107
|
+
reason: string;
|
|
108
|
+
}
|
|
109
|
+
/** `amend_window` — active rows only; never resurrects inactive rows
|
|
110
|
+
* (renewal = a new grant). Early acting stop = effectiveTo = now. */
|
|
111
|
+
export interface PeopleAmendWindowParams {
|
|
112
|
+
effectiveTo: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PeopleValidateRuleOutput {
|
|
115
|
+
valid: boolean;
|
|
116
|
+
errors: unknown[];
|
|
117
|
+
checkedAt: string;
|
|
118
|
+
}
|
|
119
|
+
/** `publish_rule` — guard re-run + supersede of the previous published
|
|
120
|
+
* version of the same rule_key in ONE execution; conflict ⇒
|
|
121
|
+
* PEOPLE_RA_RULE_CONFLICT. Emits the RA5 bulk re-evaluation event. */
|
|
122
|
+
export interface PeoplePublishRuleOutput {
|
|
123
|
+
state: 'published';
|
|
124
|
+
version: number;
|
|
125
|
+
supersededUuid?: string;
|
|
126
|
+
events: Array<{
|
|
127
|
+
type: string;
|
|
128
|
+
payload?: Record<string, unknown>;
|
|
129
|
+
}>;
|
|
130
|
+
}
|
|
131
|
+
/** `record_decision` — revoke requires a reason and invokes assignment
|
|
132
|
+
* `revoke` inline on every assignmentRefs item (RA9); `revoked` carries
|
|
133
|
+
* the per-outcome result. */
|
|
134
|
+
export interface PeopleRecordDecisionParams {
|
|
135
|
+
memberRef: string;
|
|
136
|
+
decision: 'keep' | 'revoke';
|
|
137
|
+
reason?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PeopleRecordDecisionOutput {
|
|
140
|
+
decision: 'keep' | 'revoke';
|
|
141
|
+
revoked: Array<{
|
|
142
|
+
assignmentUuid: string;
|
|
143
|
+
ok: boolean;
|
|
144
|
+
result?: unknown;
|
|
145
|
+
}>;
|
|
146
|
+
}
|
|
147
|
+
/** `generate` — builds items from a caller-supplied reporting line (the
|
|
148
|
+
* eaera-hr projection supplies it, OQ-5). Idempotent per cycle: an
|
|
149
|
+
* already-active campaign is a NO_OP; members without a resolvable manager
|
|
150
|
+
* are created directly `escalated` (fail-soft). */
|
|
151
|
+
export interface PeopleGenerateParams {
|
|
152
|
+
cycleConfig?: Record<string, unknown>;
|
|
153
|
+
deadlineAt: string;
|
|
154
|
+
reportingLine: Array<{
|
|
155
|
+
managerRef: string;
|
|
156
|
+
members: Array<{
|
|
157
|
+
memberRef: string;
|
|
158
|
+
assignmentRefs: string[];
|
|
159
|
+
}>;
|
|
160
|
+
}>;
|
|
161
|
+
}
|
|
162
|
+
export interface PeopleGenerateOutput {
|
|
163
|
+
campaignUuid: string;
|
|
164
|
+
itemCount: number;
|
|
165
|
+
deadlineAt: string;
|
|
166
|
+
}
|
|
167
|
+
/** `remind` — bookkeeping count of still-pending items (RA8). */
|
|
168
|
+
export interface PeopleRemindOutput {
|
|
169
|
+
reminded: number;
|
|
170
|
+
}
|
|
171
|
+
/** `escalate_review` — pending items past 2× the review window escalate to
|
|
172
|
+
* the HR admin; NEVER auto-revokes (PM 2026-08-17). */
|
|
173
|
+
export interface PeopleEscalateReviewOutput {
|
|
174
|
+
escalated: number;
|
|
175
|
+
escalatedTo?: string;
|
|
176
|
+
}
|
|
177
|
+
/** `complete` — writes the US6 TC4 compliance evidence. */
|
|
178
|
+
export interface PeopleCompleteOutput {
|
|
179
|
+
completionReport: {
|
|
180
|
+
completedAt: string;
|
|
181
|
+
totalItems: number;
|
|
182
|
+
kept: number;
|
|
183
|
+
revoked: number;
|
|
184
|
+
escalated: number;
|
|
185
|
+
reviews: unknown[];
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export interface PermsActions {
|
|
189
|
+
validateRevision(revisionUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
190
|
+
publishRevision(revisionUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
191
|
+
forkDraft(params: PeopleForkDraftParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
192
|
+
discardDraft(revisionUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
193
|
+
seedMerge(params?: PeopleSeedMergeParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
194
|
+
recordSeedAck(revisionUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
195
|
+
grantException(params: PeopleGrantExceptionParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
196
|
+
revokeException(exceptionUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
197
|
+
amendExceptionWindow(exceptionUuid: string, window: {
|
|
198
|
+
effectiveFrom: string;
|
|
199
|
+
effectiveTo: string;
|
|
200
|
+
}, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
201
|
+
grant(assignmentUuid: string, params: PeopleGrantParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
202
|
+
revoke(assignmentUuid: string, params: PeopleRevokeParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
203
|
+
amendWindow(assignmentUuid: string, params: PeopleAmendWindowParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
204
|
+
validateRule(ruleUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
205
|
+
publishRule(ruleUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
206
|
+
discardRule(ruleUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
207
|
+
recordDecision(campaignUuid: string, params: PeopleRecordDecisionParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
208
|
+
generate(campaignUuid: string, params: PeopleGenerateParams, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
209
|
+
remind(campaignUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
210
|
+
escalateReview(campaignUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
211
|
+
complete(campaignUuid: string, opts?: PeopleActionOpts): Promise<ActionResponse>;
|
|
212
|
+
}
|
|
213
|
+
export declare function buildPermsActions(deps: InvokeDeps): PermsActions;
|
|
214
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/services/people/perms/actions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAA0C,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAUrF,4EAA4E;AAC5E,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;mCACmC;AACnC,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;qFACqF;AACrF,MAAM,WAAW,qBAAqB;IACpC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClC,SAAS,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CA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
/** `catalog_revision` — bundle CT. ONE row = ONE atomic revision of the
|
|
3
|
+
* whole access catalog. DS1: published-immutable + atomic publish+supersede.
|
|
4
|
+
* ✅ */
|
|
5
|
+
export interface PeopleCatalogRevisionData {
|
|
6
|
+
revisionLabel: string;
|
|
7
|
+
forkedFrom?: string | null;
|
|
8
|
+
roles: Array<{
|
|
9
|
+
key: string;
|
|
10
|
+
displayName?: string;
|
|
11
|
+
permissions: string[];
|
|
12
|
+
scopeRefs: string[];
|
|
13
|
+
}>;
|
|
14
|
+
permissions: Array<{
|
|
15
|
+
key: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
seedDomain?: string;
|
|
18
|
+
configurable?: boolean;
|
|
19
|
+
}>;
|
|
20
|
+
scopeRules: Array<{
|
|
21
|
+
key: string;
|
|
22
|
+
level: 'own' | 'team' | 'department' | 'all';
|
|
23
|
+
orgMapping?: unknown;
|
|
24
|
+
}>;
|
|
25
|
+
fieldAccessPolicies: Array<{
|
|
26
|
+
fieldGroup: 'identity' | 'contact' | 'employment' | 'contract' | 'finance-salary' | 'time-attendance';
|
|
27
|
+
view: {
|
|
28
|
+
roleKeys: string[];
|
|
29
|
+
maskLevel: 'hidden' | 'partial' | 'full';
|
|
30
|
+
scopeRefs: string[];
|
|
31
|
+
};
|
|
32
|
+
approveLevel: 'L1' | 'L2' | 'L3' | 'L4';
|
|
33
|
+
l4Floor: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
changelog?: string;
|
|
36
|
+
validationResult?: {
|
|
37
|
+
valid?: boolean;
|
|
38
|
+
errors?: unknown[];
|
|
39
|
+
checkedAt?: string;
|
|
40
|
+
};
|
|
41
|
+
state: 'draft' | 'published' | 'superseded' | 'discarded';
|
|
42
|
+
}
|
|
43
|
+
export type PeopleCatalogRevision = ContentItem<PeopleCatalogRevisionData>;
|
|
44
|
+
/** `scope_exception` — subject-scoped (much higher change cadence than the
|
|
45
|
+
* bundle). Created by the factory only (`grant_exception`) — see api_references
|
|
46
|
+
* §3.4 + data-design §3.7b: `POST /content` for scope_exception starts a row
|
|
47
|
+
* in `draft` with no activation API; the factory is the only admin path.
|
|
48
|
+
* ✅ */
|
|
49
|
+
export interface PeopleScopeExceptionData {
|
|
50
|
+
subjectRef: string;
|
|
51
|
+
employmentRef?: string | null;
|
|
52
|
+
effect: 'grant' | 'deny';
|
|
53
|
+
scopeKey: string;
|
|
54
|
+
window: {
|
|
55
|
+
effectiveFrom: string;
|
|
56
|
+
effectiveTo: string;
|
|
57
|
+
};
|
|
58
|
+
justification?: string;
|
|
59
|
+
origin: 'admin' | 'system';
|
|
60
|
+
errorCode?: string | null;
|
|
61
|
+
state: 'draft' | 'active' | 'expired' | 'revoked';
|
|
62
|
+
}
|
|
63
|
+
export type PeopleScopeException = ContentItem<PeopleScopeExceptionData>;
|
|
64
|
+
/** Manual-override marker — manual removal beats birthright (D2). */
|
|
65
|
+
export interface PeopleManualOverride {
|
|
66
|
+
blockedRuleKey?: string;
|
|
67
|
+
ruleVersionAtOverride?: number;
|
|
68
|
+
clearedBy?: string;
|
|
69
|
+
}
|
|
70
|
+
/** `role_assignment` row payload (registry §3.21). */
|
|
71
|
+
export interface PeopleRoleAssignmentData {
|
|
72
|
+
subjectRef: string;
|
|
73
|
+
roleKey: string;
|
|
74
|
+
/** Employment content ref (eaera-hr CT) — identity triple element. */
|
|
75
|
+
accessContextRef: string;
|
|
76
|
+
assignmentType: 'manual' | 'birthright' | 'requested' | 'emergency';
|
|
77
|
+
purpose?: 'standard' | 'acting';
|
|
78
|
+
effectiveFrom?: string;
|
|
79
|
+
effectiveTo?: string | null;
|
|
80
|
+
justification?: string;
|
|
81
|
+
/** Emergency only. */
|
|
82
|
+
ticketRef?: string;
|
|
83
|
+
/** Birthright provenance. */
|
|
84
|
+
originRuleRef?: string;
|
|
85
|
+
originRuleVersion?: number;
|
|
86
|
+
manualOverride?: PeopleManualOverride | null;
|
|
87
|
+
/** Event dedupe — NO_OP audit PEOPLE_IDEM_DUPLICATE. */
|
|
88
|
+
idempotencyKey?: string;
|
|
89
|
+
sodWarnings?: unknown[];
|
|
90
|
+
/** Lifecycle timestamps (engine-written). */
|
|
91
|
+
activatedAt?: string;
|
|
92
|
+
revokedAt?: string | null;
|
|
93
|
+
amendedAt?: string | null;
|
|
94
|
+
revokeReason?: string | null;
|
|
95
|
+
state: 'prepared' | 'active' | 'inactive' | 'revoked' | 'archived';
|
|
96
|
+
}
|
|
97
|
+
export type PeopleRoleAssignment = ContentItem<PeopleRoleAssignmentData>;
|
|
98
|
+
/** `assignment_rule` row payload (registry §3.22). */
|
|
99
|
+
export interface PeopleAssignmentRuleData {
|
|
100
|
+
ruleKey: string;
|
|
101
|
+
version?: number;
|
|
102
|
+
match?: {
|
|
103
|
+
positions?: string[];
|
|
104
|
+
orgUnits?: string[];
|
|
105
|
+
legalEntities?: string[];
|
|
106
|
+
};
|
|
107
|
+
actions?: Array<{
|
|
108
|
+
effect: 'grant' | 'remove';
|
|
109
|
+
roleKey: string;
|
|
110
|
+
}>;
|
|
111
|
+
lastValidated?: string;
|
|
112
|
+
evaluationStats?: {
|
|
113
|
+
assignmentsGenerated?: number;
|
|
114
|
+
lastRunAt?: string;
|
|
115
|
+
};
|
|
116
|
+
state: 'draft' | 'published' | 'superseded' | 'discarded';
|
|
117
|
+
}
|
|
118
|
+
export type PeopleAssignmentRule = ContentItem<PeopleAssignmentRuleData>;
|
|
119
|
+
/** One structured review item inside a campaign (no own workflow). */
|
|
120
|
+
export interface PeopleReviewCampaignItem {
|
|
121
|
+
managerRef: string;
|
|
122
|
+
memberRef: string;
|
|
123
|
+
assignmentRefs: string[];
|
|
124
|
+
decision?: 'keep' | 'revoke' | null;
|
|
125
|
+
reason?: string | null;
|
|
126
|
+
reviewedAt?: string | null;
|
|
127
|
+
reviewedBy?: string | null;
|
|
128
|
+
status: 'pending' | 'done' | 'escalated';
|
|
129
|
+
}
|
|
130
|
+
/** `access_review_campaign` row payload (registry §3.23). */
|
|
131
|
+
export interface PeopleAccessReviewCampaignData {
|
|
132
|
+
cycleConfig?: Record<string, unknown>;
|
|
133
|
+
deadlineAt: string;
|
|
134
|
+
items?: PeopleReviewCampaignItem[];
|
|
135
|
+
escalatedTo?: string;
|
|
136
|
+
completionReport?: Record<string, unknown> | null;
|
|
137
|
+
state: 'draft' | 'active' | 'completed' | 'cancelled';
|
|
138
|
+
}
|
|
139
|
+
export type PeopleAccessReviewCampaign = ContentItem<PeopleAccessReviewCampaignData>;
|
|
140
|
+
//# sourceMappingURL=ct.types.d.ts.map
|