@things-factory/ops-master 10.1.141 → 10.1.142

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.
Files changed (50) hide show
  1. package/dist-client/bootstrap.js +21 -3
  2. package/dist-client/bootstrap.js.map +1 -1
  3. package/dist-client/index.d.ts +1 -0
  4. package/dist-client/index.js +1 -0
  5. package/dist-client/index.js.map +1 -1
  6. package/dist-client/master-change-policy-axes.d.ts +0 -6
  7. package/dist-client/master-change-policy-axes.js +0 -6
  8. package/dist-client/master-change-policy-axes.js.map +1 -1
  9. package/dist-client/master-change-policy-panel.js +3 -1
  10. package/dist-client/master-change-policy-panel.js.map +1 -1
  11. package/dist-client/master-change-providers.d.ts +4 -0
  12. package/dist-client/master-change-providers.js +91 -0
  13. package/dist-client/master-change-providers.js.map +1 -0
  14. package/dist-client/tsconfig.tsbuildinfo +1 -1
  15. package/dist-server/service/asset/index.d.ts +2 -2
  16. package/dist-server/service/equipment/index.d.ts +2 -2
  17. package/dist-server/service/index.d.ts +3 -2
  18. package/dist-server/service/index.js +3 -0
  19. package/dist-server/service/index.js.map +1 -1
  20. package/dist-server/service/location/index.d.ts +1 -1
  21. package/dist-server/service/master-change-approval/builtin-axes.d.ts +4 -0
  22. package/dist-server/service/master-change-approval/builtin-axes.js +96 -0
  23. package/dist-server/service/master-change-approval/builtin-axes.js.map +1 -0
  24. package/dist-server/service/master-change-approval/index.d.ts +13 -0
  25. package/dist-server/service/master-change-approval/index.js +36 -0
  26. package/dist-server/service/master-change-approval/index.js.map +1 -0
  27. package/dist-server/service/master-change-approval/master-change-axis.d.ts +54 -0
  28. package/dist-server/service/master-change-approval/master-change-axis.js +17 -0
  29. package/dist-server/service/master-change-approval/master-change-axis.js.map +1 -0
  30. package/dist-server/service/master-change-approval/master-change-flow.d.ts +65 -0
  31. package/dist-server/service/master-change-approval/master-change-flow.js +125 -0
  32. package/dist-server/service/master-change-approval/master-change-flow.js.map +1 -0
  33. package/dist-server/service/master-change-approval/master-change-resolver.d.ts +18 -0
  34. package/dist-server/service/master-change-approval/master-change-resolver.js +58 -0
  35. package/dist-server/service/master-change-approval/master-change-resolver.js.map +1 -0
  36. package/dist-server/service/material/index.d.ts +2 -2
  37. package/dist-server/service/material/material-revision.d.ts +1 -1
  38. package/dist-server/service/operation/index.d.ts +1 -1
  39. package/dist-server/service/personnel/index.d.ts +2 -2
  40. package/dist-server/service/recipe/index.d.ts +2 -2
  41. package/dist-server/service/recipe/recipe-revision.d.ts +1 -1
  42. package/dist-server/service/test-spec/index.d.ts +2 -2
  43. package/dist-server/service/test-spec/test-spec-revision.d.ts +1 -1
  44. package/dist-server/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +5 -4
  46. package/translations/en.json +16 -1
  47. package/translations/ja.json +16 -1
  48. package/translations/ko.json +16 -1
  49. package/translations/ms.json +16 -1
  50. package/translations/zh.json +16 -1
@@ -2,5 +2,5 @@ import { AssetQuery } from './asset-query';
2
2
  import { PhysicalAsset } from './physical-asset';
3
3
  import { PhysicalAssetClass } from './physical-asset-class';
4
4
  import { PhysicalAssetClassResolver, PhysicalAssetResolver } from './asset-master-resolver';
5
- export declare const entities: (typeof PhysicalAsset | typeof PhysicalAssetClass)[];
6
- export declare const resolvers: (typeof PhysicalAssetClassResolver | typeof PhysicalAssetResolver | typeof AssetQuery)[];
5
+ export declare const entities: (typeof PhysicalAssetClass | typeof PhysicalAsset)[];
6
+ export declare const resolvers: (typeof AssetQuery | typeof PhysicalAssetClassResolver | typeof PhysicalAssetResolver)[];
@@ -4,5 +4,5 @@ import { EquipmentQuery } from './equipment-query';
4
4
  import { StopReason } from './stop-reason';
5
5
  import { StopReasonQuery } from './stop-reason-query';
6
6
  import { EquipmentClassResolver, EquipmentResolver, StopReasonResolver } from './equipment-master-resolver';
7
- export declare const entities: (typeof Equipment | typeof EquipmentClass | typeof StopReason)[];
8
- export declare const resolvers: (typeof EquipmentClassResolver | typeof EquipmentResolver | typeof StopReasonResolver | typeof EquipmentQuery | typeof StopReasonQuery)[];
7
+ export declare const entities: (typeof EquipmentClass | typeof Equipment | typeof StopReason)[];
8
+ export declare const resolvers: (typeof StopReasonQuery | typeof EquipmentQuery | typeof EquipmentClassResolver | typeof EquipmentResolver | typeof StopReasonResolver)[];
@@ -12,6 +12,7 @@ export * from './master-axis';
12
12
  export * from './master-change-policy';
13
13
  export * from './revision-baseline';
14
14
  export * from './approval-route';
15
+ export * from './master-change-approval';
15
16
  export * from './master-conformance';
16
17
  export * from './master-conformance-resolver';
17
18
  export * from './master-list';
@@ -70,9 +71,9 @@ export * from './quality/nonconformance-cause';
70
71
  import { MasterConformanceResolver } from './master-conformance-resolver';
71
72
  import { MasterChangePolicy, MasterChangePolicyResolver } from './master-change-policy';
72
73
  import { MasterValueClaim } from './assignment/master-value-claim';
73
- export declare const entities: (typeof import("./equipment/equipment").Equipment | typeof import("./equipment/equipment-class").EquipmentClass | typeof import("./quality/nonconformance-cause").NonconformanceCause | typeof import("./material/material-definition").MaterialDefinition | typeof import("./operation/operation-definition").OperationDefinition | typeof import("./location/operational-location").OperationalLocation | typeof import("./personnel/person").Person | typeof import("./asset/physical-asset").PhysicalAsset | typeof import("./recipe").RecipeDefinition | typeof import("./recipe").RouteDefinition | typeof import("./test-spec/test-specification").TestSpecification | typeof MasterChangePolicy | typeof import("./material/material-revision").MaterialDefinitionRevision | typeof import("./material/material-revision").MaterialDefinitionPlan | typeof import("./material/material-revision").MaterialDefinitionSegment | typeof import("./material/material-revision").MaterialDefinitionBasis | typeof import("./recipe/recipe-revision").RecipeRevision | typeof import("./recipe/recipe-revision-line").RecipeRevisionOutput | typeof import("./recipe/recipe-revision").RecipePlan | typeof import("./recipe/recipe-revision").RecipeSegment | typeof import("./recipe/recipe-revision").RecipeBasis | typeof import("./test-spec/test-spec-revision").TestSpecificationRevision | typeof import("./test-spec/test-spec-revision").TestSpecificationPlan | typeof import("./test-spec/test-spec-revision").TestSpecificationSegment | typeof import("./test-spec/test-spec-revision").TestSpecificationBasis | typeof MasterValueClaim)[];
74
+ export declare const entities: (typeof import("./test-spec/test-spec-revision").TestSpecificationPlan | typeof import("./test-spec/test-spec-revision").TestSpecificationRevision | typeof import("./test-spec/test-specification").TestSpecification | typeof MasterChangePolicy | typeof import("./test-spec/test-spec-revision").TestSpecificationSegment | typeof import("./recipe/recipe-revision").RecipePlan | typeof import("./recipe/recipe-revision").RecipeRevision | typeof import("./recipe").RecipeDefinition | typeof import("./recipe/recipe-revision").RecipeSegment | typeof import("./material/material-definition").MaterialDefinition | typeof import("./recipe").RouteDefinition | typeof import("./material/material-revision").MaterialDefinitionPlan | typeof import("./material/material-revision").MaterialDefinitionRevision | typeof import("./material/material-revision").MaterialDefinitionSegment | typeof MasterValueClaim | typeof import("./personnel/personnel-class").PersonnelClass | typeof import("./personnel/person").Person | typeof import("./quality/nonconformance-cause").NonconformanceCause | typeof import("./equipment/equipment").Equipment | typeof import("./asset/physical-asset").PhysicalAsset | typeof import("./location/operational-location").OperationalLocation | typeof import("./material/material-revision").MaterialDefinitionBasis | typeof import("./operation/operation-definition").OperationDefinition | typeof import("./recipe/recipe-revision").RecipeBasis | typeof import("./recipe/recipe-revision-line").RecipeRevisionOutput | typeof import("./test-spec/test-spec-revision").TestSpecificationBasis)[];
74
75
  export declare const schema: {
75
- resolverClasses: (typeof MasterChangePolicyResolver | typeof import("./personnel/personnel-master-resolver").PersonnelClassResolver | typeof import("./personnel/personnel-master-resolver").PersonResolver | typeof import("./equipment/equipment-master-resolver").EquipmentClassResolver | typeof import("./equipment/equipment-master-resolver").EquipmentResolver | typeof import("./equipment/equipment-master-resolver").StopReasonResolver | typeof import("./asset/asset-master-resolver").PhysicalAssetClassResolver | typeof import("./asset/asset-master-resolver").PhysicalAssetResolver | typeof import("./material/material-master-resolver").MaterialClassResolver | typeof import("./material/material-master-resolver").MaterialDefinitionResolver | typeof import("./location/location-master-resolver").OperationalLocationResolver | typeof import("./operation/operation-master-resolver").OperationDefinitionResolver | typeof import("./recipe/recipe-master-resolver").RecipeDefinitionResolver | typeof import("./recipe/recipe-master-resolver").RouteDefinitionResolver | typeof import("./test-spec/test-spec-master-resolver").TestSpecificationResolver | typeof MasterConformanceResolver | typeof import("./personnel/personnel-query").PersonnelQuery | typeof import("./equipment/equipment-query").EquipmentQuery | typeof import("./asset/asset-query").AssetQuery | typeof import("./location/location-query").LocationQuery | typeof import("./material/material-revision-resolver").MaterialDefinitionRevisionResolver | typeof import("./material/material-query").MaterialQuery | typeof import("./operation/operation-query").OperationQuery | typeof import("./operation/operation-readiness-resolver").OperationReadinessResolver | typeof import("./recipe/recipe-revision-resolver").RecipeRevisionResolver | typeof import("./recipe/recipe-query").RecipeQuery | typeof import("./test-spec/test-spec-revision-resolver").TestSpecificationRevisionResolver | typeof import("./test-spec/test-spec-query").TestSpecificationQuery | typeof import("./status/master-status").OpsMasterStatusQuery | typeof import("./equipment/stop-reason-query").StopReasonQuery | typeof import("./quality/nonconformance-cause-resolver").NonconformanceCauseResolver)[];
76
+ resolverClasses: (typeof import("./quality/nonconformance-cause-resolver").NonconformanceCauseResolver | typeof import("./equipment/stop-reason-query").StopReasonQuery | typeof import("./status/master-status").OpsMasterStatusQuery | typeof import("./test-spec/test-spec-query").TestSpecificationQuery | typeof import("./test-spec/test-spec-revision-resolver").TestSpecificationRevisionResolver | typeof import("./recipe/recipe-query").RecipeQuery | typeof import("./recipe/recipe-revision-resolver").RecipeRevisionResolver | typeof import("./operation/operation-readiness-resolver").OperationReadinessResolver | typeof import("./operation/operation-query").OperationQuery | typeof import("./material/material-query").MaterialQuery | typeof import("./material/material-revision-resolver").MaterialDefinitionRevisionResolver | typeof import("./location/location-query").LocationQuery | typeof import("./asset/asset-query").AssetQuery | typeof import("./equipment/equipment-query").EquipmentQuery | typeof import("./personnel/personnel-query").PersonnelQuery | typeof MasterConformanceResolver | typeof import("./master-change-approval").MasterChangeApprovalResolver | typeof MasterChangePolicyResolver | typeof import("./personnel/personnel-master-resolver").PersonnelClassResolver | typeof import("./personnel/personnel-master-resolver").PersonResolver | typeof import("./equipment/equipment-master-resolver").EquipmentClassResolver | typeof import("./equipment/equipment-master-resolver").EquipmentResolver | typeof import("./equipment/equipment-master-resolver").StopReasonResolver | typeof import("./asset/asset-master-resolver").PhysicalAssetClassResolver | typeof import("./asset/asset-master-resolver").PhysicalAssetResolver | typeof import("./location/location-master-resolver").OperationalLocationResolver | typeof import("./material/material-master-resolver").MaterialClassResolver | typeof import("./material/material-master-resolver").MaterialDefinitionResolver | typeof import("./operation/operation-master-resolver").OperationDefinitionResolver | typeof import("./recipe/recipe-master-resolver").RecipeDefinitionResolver | typeof import("./recipe/recipe-master-resolver").RouteDefinitionResolver | typeof import("./test-spec/test-spec-master-resolver").TestSpecificationResolver)[];
76
77
  };
77
78
  export * from './assignment/master-value-claim';
78
79
  export * from './assignment/assignment-history';
@@ -17,6 +17,7 @@ tslib_1.__exportStar(require("./master-axis"), exports);
17
17
  tslib_1.__exportStar(require("./master-change-policy"), exports);
18
18
  tslib_1.__exportStar(require("./revision-baseline"), exports);
19
19
  tslib_1.__exportStar(require("./approval-route"), exports);
20
+ tslib_1.__exportStar(require("./master-change-approval"), exports);
20
21
  tslib_1.__exportStar(require("./master-conformance"), exports);
21
22
  tslib_1.__exportStar(require("./master-conformance-resolver"), exports);
22
23
  tslib_1.__exportStar(require("./master-list"), exports);
@@ -88,6 +89,7 @@ const master_conformance_resolver_1 = require("./master-conformance-resolver");
88
89
  const master_change_policy_1 = require("./master-change-policy");
89
90
  const master_value_claim_1 = require("./assignment/master-value-claim");
90
91
  const test_spec_1 = require("./test-spec");
92
+ const master_change_approval_1 = require("./master-change-approval");
91
93
  exports.entities = [
92
94
  /* ENTITIES */
93
95
  master_change_policy_1.MasterChangePolicy,
@@ -110,6 +112,7 @@ exports.schema = {
110
112
  resolverClasses: [
111
113
  /* RESOLVER CLASSES */
112
114
  master_change_policy_1.MasterChangePolicyResolver,
115
+ ...master_change_approval_1.resolvers,
113
116
  ...personnel_1.resolvers,
114
117
  ...quality_1.resolvers,
115
118
  ...equipment_1.resolvers,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,oEAAyC;AACzC,gFAAqD;AACrD,gFAAqD;AACrD,wEAA6C;AAC7C,8EAAmD;AACnD,8EAAmD;AACnD,gFAAqD;AACrD,0EAA+C;AAC/C,gFAAqD;AACrD,wDAA6B;AAC7B,wDAA6B;AAC7B,iEAAsC;AACtC,8DAAmC;AACnC,2DAAgC;AAChC,+DAAoC;AACpC,wEAA6C;AAC7C,wDAA6B;AAC7B,6DAAkC;AAClC,sEAA2C;AAC3C,uEAA4C;AAC5C,sEAA2C;AAC3C,oEAAyC;AACzC,gEAAqC;AACrC,sEAA2C;AAC3C,yEAA8C;AAC9C,kEAAuC;AACvC,uEAA4C;AAC5C,sEAA2C;AAC3C,kEAAuC;AACvC,iEAAsC;AACtC,uEAA4C;AAC5C,+DAAoC;AACpC,8DAAmC;AACnC,0EAA+C;AAC/C,qEAA0C;AAC1C,oEAAyC;AACzC,oEAAyC;AACzC,yEAA8C;AAC9C,uEAA4C;AAC5C,+EAAoD;AACpD,gFAAqD;AACrD,6EAAkD;AAClD,qEAA0C;AAC1C,oEAAyC;AACzC,2EAAgD;AAChD,uEAA4C;AAC5C,sEAA2C;AAC3C,0EAA+C;AAC/C,mFAAwD;AACxD,qEAA0C;AAC1C,mEAAwC;AACxC,wEAA6C;AAC7C,2EAAgD;AAChD,2EAAgD;AAChD,4EAAiD;AACjD,yEAA8C;AAC9C,oEAAyC;AACzC,iEAAsC;AACtC,gEAAqC;AACrC,yEAA8C;AAC9C,yEAA8C;AAC9C,iFAAsD;AACtD,kFAAuD;AACvD,+EAAoD;AACpD,uEAA4C;AAC5C,sEAA2C;AAC3C,8DAAmC;AACnC,iEAAsC;AACtC,yEAA8C;AAE9C,mCAAmC;AACnC,mCAAgF;AAChF,2CAA4F;AAC5F,yCAAyF;AACzF,yCAAyF;AACzF,2CAA4F;AAC5F,2CAA4F;AAC5F,uCAAsF;AACtF,wEAAwE;AACxE,qCAAmF;AACnF,qCAAuD;AACvD,uCAAuC;AACvC,+EAAyE;AACzE,iEAAuF;AACvF,wEAAkE;AAClE,2CAA0F;AAE7E,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,yCAAkB;IAClB;;;OAGG;IACH,qCAAgB;IAChB,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,oBAAgB;CACpB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,iDAA0B;QAC1B,GAAG,qBAAkB;QACrB,GAAG,mBAAgB;QACnB,GAAG,qBAAkB;QACrB,GAAG,iBAAc;QACjB,GAAG,oBAAiB;QACpB,GAAG,oBAAiB;QACpB,GAAG,qBAAkB;QACrB,GAAG,kBAAe;QAClB,GAAG,qBAAiB;QACpB,GAAG,kBAAe;QAElB;;;WAGG;QACH,uDAAyB;KAC1B;CACF,CAAA;AACD,0EAA+C;AAC/C,0EAA+C;AAC/C,wEAA6C;AAE7C,sGAAsG;AACtG,wEAMwC;AALtC,6HAAA,qBAAqB,OAAA;AACrB,8HAAA,sBAAsB,OAAA;AACtB,8HAAA,sBAAsB,OAAA;AAIxB,oEASsC;AARpC,2HAAA,qBAAqB,OAAA;AACrB,uHAAA,iBAAiB,OAAA;AACjB,4HAAA,sBAAsB,OAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './resource/resource-class'\nexport * from './personnel/personnel-master-resolver'\nexport * from './equipment/equipment-master-resolver'\nexport * from './asset/asset-master-resolver'\nexport * from './material/material-master-resolver'\nexport * from './location/location-master-resolver'\nexport * from './operation/operation-master-resolver'\nexport * from './recipe/recipe-master-resolver'\nexport * from './test-spec/test-spec-master-resolver'\nexport * from './master-crud'\nexport * from './master-axis'\nexport * from './master-change-policy'\nexport * from './revision-baseline'\nexport * from './approval-route'\nexport * from './master-conformance'\nexport * from './master-conformance-resolver'\nexport * from './master-list'\nexport * from './personnel/person'\nexport * from './personnel/personnel-class'\nexport * from './personnel/personnel-master'\nexport * from './personnel/personnel-query'\nexport * from './personnel/qualification'\nexport * from './equipment/equipment'\nexport * from './equipment/equipment-class'\nexport * from './equipment/state-period-rules'\nexport * from './equipment/stop-reason'\nexport * from './equipment/equipment-master'\nexport * from './equipment/equipment-query'\nexport * from './asset/asset-lifecycle'\nexport * from './asset/physical-asset'\nexport * from './asset/physical-asset-class'\nexport * from './asset/asset-master'\nexport * from './asset/asset-query'\nexport * from './location/operational-location'\nexport * from './location/location-master'\nexport * from './location/location-query'\nexport * from './material/material-class'\nexport * from './material/material-definition'\nexport * from './material/material-revision'\nexport * from './material/material-revision-service'\nexport * from './material/material-revision-resolver'\nexport * from './material/material-effective-list'\nexport * from './material/material-master'\nexport * from './material/material-query'\nexport * from './operation/operation-definition'\nexport * from './operation/operation-master'\nexport * from './operation/operation-query'\nexport * from './operation/operation-readiness'\nexport * from './operation/operation-readiness-resolver'\nexport * from './recipe/recipe-definition'\nexport * from './recipe/recipe-revision'\nexport * from './recipe/recipe-revision-line'\nexport * from './recipe/recipe-revision-content'\nexport * from './recipe/recipe-revision-service'\nexport * from './recipe/recipe-revision-resolver'\nexport * from './recipe/recipe-effective-list'\nexport * from './recipe/route-definition'\nexport * from './recipe/recipe-master'\nexport * from './recipe/recipe-query'\nexport * from './test-spec/test-specification'\nexport * from './test-spec/test-spec-revision'\nexport * from './test-spec/test-spec-revision-service'\nexport * from './test-spec/test-spec-revision-resolver'\nexport * from './test-spec/test-spec-effective-list'\nexport * from './test-spec/test-spec-master'\nexport * from './test-spec/test-spec-query'\nexport * from './status/axis-stamp'\nexport * from './status/master-status'\nexport * from './quality/nonconformance-cause'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as AssetEntities, resolvers as AssetResolvers } from './asset'\nimport { entities as EquipmentEntities, resolvers as EquipmentResolvers } from './equipment'\nimport { entities as LocationEntities, resolvers as LocationResolvers } from './location'\nimport { entities as MaterialEntities, resolvers as MaterialResolvers } from './material'\nimport { entities as OperationEntities, resolvers as OperationResolvers } from './operation'\nimport { entities as PersonnelEntities, resolvers as PersonnelResolvers } from './personnel'\nimport { entities as QualityEntities, resolvers as QualityResolvers } from './quality'\n/* 라우팅·레시피 — 품목→지시서를 이으려면 그 사이에 이 둘이 있어야 한다(§`recipe-definition.ts`). */\nimport { entities as RecipeEntities, resolvers as RecipeResolvers } from './recipe'\nimport { resolvers as StatusResolvers } from './status'\n/* 마스터 정합성 — 축을 가로지르므로 어느 축에도 안 속한다. */\nimport { MasterConformanceResolver } from './master-conformance-resolver'\nimport { MasterChangePolicy, MasterChangePolicyResolver } from './master-change-policy'\nimport { MasterValueClaim } from './assignment/master-value-claim'\nimport { entities as TestSpecEntities, resolvers as TestSpecResolvers } from './test-spec'\n\nexport const entities = [\n /* ENTITIES */\n MasterChangePolicy,\n /*\n * 배정 이력. **등록이 빠져 있었다**(2026-09-23 확인) — 표가 안 서니 이력을 쓰는 길이 실제\n * 설치본에는 없었다. 시험 하네스가 자기 목록에 직접 넣어서 초록이었다.\n */\n MasterValueClaim,\n ...PersonnelEntities,\n ...QualityEntities,\n ...EquipmentEntities,\n ...AssetEntities,\n ...LocationEntities,\n ...MaterialEntities,\n ...OperationEntities,\n ...RecipeEntities,\n ...TestSpecEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n MasterChangePolicyResolver,\n ...PersonnelResolvers,\n ...QualityResolvers,\n ...EquipmentResolvers,\n ...AssetResolvers,\n ...LocationResolvers,\n ...MaterialResolvers,\n ...OperationResolvers,\n ...RecipeResolvers,\n ...TestSpecResolvers,\n ...StatusResolvers,\n\n /*\n * **파일을 export 하는 것만으로는 스키마에 안 올라온다.** 여기 적어야 한다 — 처음에 그것을\n * 빠뜨려 `masterConformance` 가 「Cannot query field」로 나왔다. [확인함] 2026-09-04\n */\n MasterConformanceResolver\n ]\n}\nexport * from './assignment/master-value-claim'\nexport * from './assignment/assignment-history'\nexport * from './assignment/assignment-write'\n\n/* AI 입력 — the master records an application's assistant may enter (`registerEntryTarget` on each). */\nexport {\n opsMasterEntryTargets,\n opsMasterEntryTargetOf,\n OPS_MASTER_ENTRY_SPECS,\n type OpsMasterEntryAxisSpec,\n type OpsMasterEntryOptions\n} from './ai-entry/master-entry-targets'\nexport {\n OPS_MASTER_ENTRY_AXES,\n opsMasterEntryKey,\n opsMasterEntryLabelKey,\n type OpsMasterEntryAxis,\n type OpsMasterEntryField,\n type OpsMasterEntryIssue,\n type OpsMasterEntryRow,\n type OpsMasterEntryTarget\n} from './ai-entry/master-entry-rules'\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,yBAAyB;AACzB,oEAAyC;AACzC,gFAAqD;AACrD,gFAAqD;AACrD,wEAA6C;AAC7C,8EAAmD;AACnD,8EAAmD;AACnD,gFAAqD;AACrD,0EAA+C;AAC/C,gFAAqD;AACrD,wDAA6B;AAC7B,wDAA6B;AAC7B,iEAAsC;AACtC,8DAAmC;AACnC,2DAAgC;AAChC,mEAAwC;AACxC,+DAAoC;AACpC,wEAA6C;AAC7C,wDAA6B;AAC7B,6DAAkC;AAClC,sEAA2C;AAC3C,uEAA4C;AAC5C,sEAA2C;AAC3C,oEAAyC;AACzC,gEAAqC;AACrC,sEAA2C;AAC3C,yEAA8C;AAC9C,kEAAuC;AACvC,uEAA4C;AAC5C,sEAA2C;AAC3C,kEAAuC;AACvC,iEAAsC;AACtC,uEAA4C;AAC5C,+DAAoC;AACpC,8DAAmC;AACnC,0EAA+C;AAC/C,qEAA0C;AAC1C,oEAAyC;AACzC,oEAAyC;AACzC,yEAA8C;AAC9C,uEAA4C;AAC5C,+EAAoD;AACpD,gFAAqD;AACrD,6EAAkD;AAClD,qEAA0C;AAC1C,oEAAyC;AACzC,2EAAgD;AAChD,uEAA4C;AAC5C,sEAA2C;AAC3C,0EAA+C;AAC/C,mFAAwD;AACxD,qEAA0C;AAC1C,mEAAwC;AACxC,wEAA6C;AAC7C,2EAAgD;AAChD,2EAAgD;AAChD,4EAAiD;AACjD,yEAA8C;AAC9C,oEAAyC;AACzC,iEAAsC;AACtC,gEAAqC;AACrC,yEAA8C;AAC9C,yEAA8C;AAC9C,iFAAsD;AACtD,kFAAuD;AACvD,+EAAoD;AACpD,uEAA4C;AAC5C,sEAA2C;AAC3C,8DAAmC;AACnC,iEAAsC;AACtC,yEAA8C;AAE9C,mCAAmC;AACnC,mCAAgF;AAChF,2CAA4F;AAC5F,yCAAyF;AACzF,yCAAyF;AACzF,2CAA4F;AAC5F,2CAA4F;AAC5F,uCAAsF;AACtF,wEAAwE;AACxE,qCAAmF;AACnF,qCAAuD;AACvD,uCAAuC;AACvC,+EAAyE;AACzE,iEAAuF;AACvF,wEAAkE;AAClE,2CAA0F;AAC1F,qEAAqF;AAExE,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,yCAAkB;IAClB;;;OAGG;IACH,qCAAgB;IAChB,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,oBAAgB;CACpB,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;QACf,sBAAsB;QACtB,iDAA0B;QAC1B,GAAG,kCAA6B;QAChC,GAAG,qBAAkB;QACrB,GAAG,mBAAgB;QACnB,GAAG,qBAAkB;QACrB,GAAG,iBAAc;QACjB,GAAG,oBAAiB;QACpB,GAAG,oBAAiB;QACpB,GAAG,qBAAkB;QACrB,GAAG,kBAAe;QAClB,GAAG,qBAAiB;QACpB,GAAG,kBAAe;QAElB;;;WAGG;QACH,uDAAyB;KAC1B;CACF,CAAA;AACD,0EAA+C;AAC/C,0EAA+C;AAC/C,wEAA6C;AAE7C,sGAAsG;AACtG,wEAMwC;AALtC,6HAAA,qBAAqB,OAAA;AACrB,8HAAA,sBAAsB,OAAA;AACtB,8HAAA,sBAAsB,OAAA;AAIxB,oEASsC;AARpC,2HAAA,qBAAqB,OAAA;AACrB,uHAAA,iBAAiB,OAAA;AACjB,4HAAA,sBAAsB,OAAA","sourcesContent":["/* EXPORT ENTITY TYPES */\nexport * from './resource/resource-class'\nexport * from './personnel/personnel-master-resolver'\nexport * from './equipment/equipment-master-resolver'\nexport * from './asset/asset-master-resolver'\nexport * from './material/material-master-resolver'\nexport * from './location/location-master-resolver'\nexport * from './operation/operation-master-resolver'\nexport * from './recipe/recipe-master-resolver'\nexport * from './test-spec/test-spec-master-resolver'\nexport * from './master-crud'\nexport * from './master-axis'\nexport * from './master-change-policy'\nexport * from './revision-baseline'\nexport * from './approval-route'\nexport * from './master-change-approval'\nexport * from './master-conformance'\nexport * from './master-conformance-resolver'\nexport * from './master-list'\nexport * from './personnel/person'\nexport * from './personnel/personnel-class'\nexport * from './personnel/personnel-master'\nexport * from './personnel/personnel-query'\nexport * from './personnel/qualification'\nexport * from './equipment/equipment'\nexport * from './equipment/equipment-class'\nexport * from './equipment/state-period-rules'\nexport * from './equipment/stop-reason'\nexport * from './equipment/equipment-master'\nexport * from './equipment/equipment-query'\nexport * from './asset/asset-lifecycle'\nexport * from './asset/physical-asset'\nexport * from './asset/physical-asset-class'\nexport * from './asset/asset-master'\nexport * from './asset/asset-query'\nexport * from './location/operational-location'\nexport * from './location/location-master'\nexport * from './location/location-query'\nexport * from './material/material-class'\nexport * from './material/material-definition'\nexport * from './material/material-revision'\nexport * from './material/material-revision-service'\nexport * from './material/material-revision-resolver'\nexport * from './material/material-effective-list'\nexport * from './material/material-master'\nexport * from './material/material-query'\nexport * from './operation/operation-definition'\nexport * from './operation/operation-master'\nexport * from './operation/operation-query'\nexport * from './operation/operation-readiness'\nexport * from './operation/operation-readiness-resolver'\nexport * from './recipe/recipe-definition'\nexport * from './recipe/recipe-revision'\nexport * from './recipe/recipe-revision-line'\nexport * from './recipe/recipe-revision-content'\nexport * from './recipe/recipe-revision-service'\nexport * from './recipe/recipe-revision-resolver'\nexport * from './recipe/recipe-effective-list'\nexport * from './recipe/route-definition'\nexport * from './recipe/recipe-master'\nexport * from './recipe/recipe-query'\nexport * from './test-spec/test-specification'\nexport * from './test-spec/test-spec-revision'\nexport * from './test-spec/test-spec-revision-service'\nexport * from './test-spec/test-spec-revision-resolver'\nexport * from './test-spec/test-spec-effective-list'\nexport * from './test-spec/test-spec-master'\nexport * from './test-spec/test-spec-query'\nexport * from './status/axis-stamp'\nexport * from './status/master-status'\nexport * from './quality/nonconformance-cause'\n\n/* IMPORT ENTITIES AND RESOLVERS */\nimport { entities as AssetEntities, resolvers as AssetResolvers } from './asset'\nimport { entities as EquipmentEntities, resolvers as EquipmentResolvers } from './equipment'\nimport { entities as LocationEntities, resolvers as LocationResolvers } from './location'\nimport { entities as MaterialEntities, resolvers as MaterialResolvers } from './material'\nimport { entities as OperationEntities, resolvers as OperationResolvers } from './operation'\nimport { entities as PersonnelEntities, resolvers as PersonnelResolvers } from './personnel'\nimport { entities as QualityEntities, resolvers as QualityResolvers } from './quality'\n/* 라우팅·레시피 — 품목→지시서를 이으려면 그 사이에 이 둘이 있어야 한다(§`recipe-definition.ts`). */\nimport { entities as RecipeEntities, resolvers as RecipeResolvers } from './recipe'\nimport { resolvers as StatusResolvers } from './status'\n/* 마스터 정합성 — 축을 가로지르므로 어느 축에도 안 속한다. */\nimport { MasterConformanceResolver } from './master-conformance-resolver'\nimport { MasterChangePolicy, MasterChangePolicyResolver } from './master-change-policy'\nimport { MasterValueClaim } from './assignment/master-value-claim'\nimport { entities as TestSpecEntities, resolvers as TestSpecResolvers } from './test-spec'\nimport { resolvers as MasterChangeApprovalResolvers } from './master-change-approval'\n\nexport const entities = [\n /* ENTITIES */\n MasterChangePolicy,\n /*\n * 배정 이력. **등록이 빠져 있었다**(2026-09-23 확인) — 표가 안 서니 이력을 쓰는 길이 실제\n * 설치본에는 없었다. 시험 하네스가 자기 목록에 직접 넣어서 초록이었다.\n */\n MasterValueClaim,\n ...PersonnelEntities,\n ...QualityEntities,\n ...EquipmentEntities,\n ...AssetEntities,\n ...LocationEntities,\n ...MaterialEntities,\n ...OperationEntities,\n ...RecipeEntities,\n ...TestSpecEntities\n]\n\nexport const schema = {\n resolverClasses: [\n /* RESOLVER CLASSES */\n MasterChangePolicyResolver,\n ...MasterChangeApprovalResolvers,\n ...PersonnelResolvers,\n ...QualityResolvers,\n ...EquipmentResolvers,\n ...AssetResolvers,\n ...LocationResolvers,\n ...MaterialResolvers,\n ...OperationResolvers,\n ...RecipeResolvers,\n ...TestSpecResolvers,\n ...StatusResolvers,\n\n /*\n * **파일을 export 하는 것만으로는 스키마에 안 올라온다.** 여기 적어야 한다 — 처음에 그것을\n * 빠뜨려 `masterConformance` 가 「Cannot query field」로 나왔다. [확인함] 2026-09-04\n */\n MasterConformanceResolver\n ]\n}\nexport * from './assignment/master-value-claim'\nexport * from './assignment/assignment-history'\nexport * from './assignment/assignment-write'\n\n/* AI 입력 — the master records an application's assistant may enter (`registerEntryTarget` on each). */\nexport {\n opsMasterEntryTargets,\n opsMasterEntryTargetOf,\n OPS_MASTER_ENTRY_SPECS,\n type OpsMasterEntryAxisSpec,\n type OpsMasterEntryOptions\n} from './ai-entry/master-entry-targets'\nexport {\n OPS_MASTER_ENTRY_AXES,\n opsMasterEntryKey,\n opsMasterEntryLabelKey,\n type OpsMasterEntryAxis,\n type OpsMasterEntryField,\n type OpsMasterEntryIssue,\n type OpsMasterEntryRow,\n type OpsMasterEntryTarget\n} from './ai-entry/master-entry-rules'\n"]}
@@ -2,4 +2,4 @@ import { LocationQuery } from './location-query';
2
2
  import { OperationalLocation } from './operational-location';
3
3
  import { OperationalLocationResolver } from './location-master-resolver';
4
4
  export declare const entities: (typeof OperationalLocation)[];
5
- export declare const resolvers: (typeof OperationalLocationResolver | typeof LocationQuery)[];
5
+ export declare const resolvers: (typeof LocationQuery | typeof OperationalLocationResolver)[];
@@ -0,0 +1,4 @@
1
+ import type { MasterChangeAxis } from './master-change-axis';
2
+ export declare const TEST_SPECIFICATION_CHANGE: MasterChangeAxis;
3
+ export declare const RECIPE_CHANGE: MasterChangeAxis;
4
+ export declare const MATERIAL_DEFINITION_CHANGE: MasterChangeAxis;
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MATERIAL_DEFINITION_CHANGE = exports.RECIPE_CHANGE = exports.TEST_SPECIFICATION_CHANGE = void 0;
4
+ const material_revision_service_1 = require("../material/material-revision-service");
5
+ const recipe_revision_service_1 = require("../recipe/recipe-revision-service");
6
+ const test_spec_revision_service_1 = require("../test-spec/test-spec-revision-service");
7
+ /*
8
+ * The three axes whose revisions live in ops-master. Words are plant's, which carried all five languages.
9
+ */
10
+ const NOT_SELF = 'An empty approval line refuses submission. The author cannot approve their own change.';
11
+ const POLICY_NOTE = 'Declared regulated axes require this approval. Non-regulated publication records its policy and publisher.';
12
+ exports.TEST_SPECIFICATION_CHANGE = {
13
+ axis: 'testSpecification',
14
+ activity: 'TestSpecificationChangeApproval',
15
+ label: 'test specification change approval',
16
+ description: 'Approve a frozen test specification and its effective date',
17
+ category: 'quality',
18
+ guide: [
19
+ 'Compare the previous and proposed criteria and check when the new criteria will apply.',
20
+ 'Approval publishes this exact revision. It does not change inspections already recorded.',
21
+ NOT_SELF
22
+ ],
23
+ readiness: {
24
+ stage: 'partial',
25
+ tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],
26
+ gaps: ['Multi-specification atomic submission is not implemented in this single-specification slice.'],
27
+ notes: `${POLICY_NOTE} Recorded inspections keep their exact revision.`
28
+ },
29
+ before: 'previous criteria',
30
+ after: 'proposed criteria',
31
+ issuedAs: '검사 명세 변경',
32
+ caveat: 'The signed revision stays. Correct it with another approved revision; recorded inspections keep their basis.',
33
+ Refusal: test_spec_revision_service_1.TestSpecificationRefusal,
34
+ freeze: test_spec_revision_service_1.freezeTestSpecificationDraft,
35
+ approvalInput: test_spec_revision_service_1.testSpecificationApprovalInput,
36
+ bind: test_spec_revision_service_1.bindTestSpecificationApproval,
37
+ assertApprovalInput: test_spec_revision_service_1.assertTestSpecificationApprovalInput,
38
+ publish: test_spec_revision_service_1.publishTestSpecificationRevision
39
+ };
40
+ exports.RECIPE_CHANGE = {
41
+ axis: 'recipeDefinition',
42
+ activity: 'RecipeChangeApproval',
43
+ label: 'recipe change approval',
44
+ description: 'Approve a frozen recipe and its effective date',
45
+ category: 'production',
46
+ guide: [
47
+ 'Compare the previous and proposed composition and check when the new composition will apply.',
48
+ 'Approval publishes this exact revision. It does not change executions already recorded.',
49
+ NOT_SELF
50
+ ],
51
+ readiness: {
52
+ stage: 'partial',
53
+ tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],
54
+ gaps: ['Multi-recipe atomic submission is not implemented in this single-recipe slice.'],
55
+ notes: `${POLICY_NOTE} Recorded executions keep their exact revision.`
56
+ },
57
+ before: 'previous composition',
58
+ after: 'proposed composition',
59
+ issuedAs: '레시피 변경',
60
+ caveat: 'The signed revision stays. Correct it with another approved revision; recorded executions keep their basis.',
61
+ Refusal: recipe_revision_service_1.RecipeRefusal,
62
+ freeze: recipe_revision_service_1.freezeRecipeDraft,
63
+ approvalInput: recipe_revision_service_1.recipeApprovalInput,
64
+ bind: recipe_revision_service_1.bindRecipeApproval,
65
+ assertApprovalInput: recipe_revision_service_1.assertRecipeApprovalInput,
66
+ publish: recipe_revision_service_1.publishRecipeRevision
67
+ };
68
+ exports.MATERIAL_DEFINITION_CHANGE = {
69
+ axis: 'materialDefinition',
70
+ activity: 'MaterialDefinitionChangeApproval',
71
+ label: 'material change approval',
72
+ description: 'Approve a frozen material and its effective date',
73
+ category: 'production',
74
+ guide: [
75
+ 'Compare the previous and proposed definition and check when the new definition will apply.',
76
+ 'Approval publishes this exact revision. It does not change executions already recorded.',
77
+ NOT_SELF
78
+ ],
79
+ readiness: {
80
+ stage: 'partial',
81
+ tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],
82
+ gaps: ['Multi-material atomic submission is not implemented in this single-material slice.'],
83
+ notes: `${POLICY_NOTE} Recorded executions keep their exact revision.`
84
+ },
85
+ before: 'previous definition',
86
+ after: 'proposed definition',
87
+ issuedAs: '품목 변경',
88
+ caveat: 'The signed revision stays. Correct it with another approved revision; recorded executions keep their basis.',
89
+ Refusal: material_revision_service_1.MaterialDefinitionRefusal,
90
+ freeze: material_revision_service_1.freezeMaterialDefinitionDraft,
91
+ approvalInput: material_revision_service_1.materialDefinitionApprovalInput,
92
+ bind: material_revision_service_1.bindMaterialDefinitionApproval,
93
+ assertApprovalInput: material_revision_service_1.assertMaterialDefinitionApprovalInput,
94
+ publish: material_revision_service_1.publishMaterialDefinitionRevision
95
+ };
96
+ //# sourceMappingURL=builtin-axes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtin-axes.js","sourceRoot":"","sources":["../../../server/service/master-change-approval/builtin-axes.ts"],"names":[],"mappings":";;;AAAA,qFAO8C;AAC9C,+EAO0C;AAC1C,wFAOgD;AAGhD;;GAEG;AACH,MAAM,QAAQ,GAAG,wFAAwF,CAAA;AACzG,MAAM,WAAW,GAAG,4GAA4G,CAAA;AAEnH,QAAA,yBAAyB,GAAqB;IACzD,IAAI,EAAE,mBAAmB;IACzB,QAAQ,EAAE,iCAAiC;IAC3C,KAAK,EAAE,oCAAoC;IAC3C,WAAW,EAAE,4DAA4D;IACzE,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE;QACL,wFAAwF;QACxF,0FAA0F;QAC1F,QAAQ;KACT;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC,4EAA4E,CAAC;QACrF,IAAI,EAAE,CAAC,8FAA8F,CAAC;QACtG,KAAK,EAAE,GAAG,WAAW,kDAAkD;KACxE;IACD,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,8GAA8G;IACtH,OAAO,EAAE,qDAA+B;IACxC,MAAM,EAAE,yDAAmC;IAC3C,aAAa,EAAE,2DAAqC;IACpD,IAAI,EAAE,0DAAoC;IAC1C,mBAAmB,EAAE,iEAA2C;IAChE,OAAO,EAAE,6DAAuC;CACjD,CAAA;AAEY,QAAA,aAAa,GAAqB;IAC7C,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,sBAAsB;IAChC,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE;QACL,8FAA8F;QAC9F,yFAAyF;QACzF,QAAQ;KACT;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC,4EAA4E,CAAC;QACrF,IAAI,EAAE,CAAC,gFAAgF,CAAC;QACxF,KAAK,EAAE,GAAG,WAAW,iDAAiD;KACvE;IACD,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,6GAA6G;IACrH,OAAO,EAAE,uCAAoB;IAC7B,MAAM,EAAE,2CAAwB;IAChC,aAAa,EAAE,6CAA0B;IACzC,IAAI,EAAE,4CAAyB;IAC/B,mBAAmB,EAAE,mDAAgC;IACrD,OAAO,EAAE,+CAA4B;CACtC,CAAA;AAEY,QAAA,0BAA0B,GAAqB;IAC1D,IAAI,EAAE,oBAAoB;IAC1B,QAAQ,EAAE,kCAAkC;IAC5C,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,kDAAkD;IAC/D,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE;QACL,4FAA4F;QAC5F,yFAAyF;QACzF,QAAQ;KACT;IACD,SAAS,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,KAAK,EAAE,CAAC,4EAA4E,CAAC;QACrF,IAAI,EAAE,CAAC,oFAAoF,CAAC;QAC5F,KAAK,EAAE,GAAG,WAAW,iDAAiD;KACvE;IACD,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,OAAO;IACjB,MAAM,EAAE,6GAA6G;IACrH,OAAO,EAAE,qDAAgC;IACzC,MAAM,EAAE,yDAAoC;IAC5C,aAAa,EAAE,2DAAsC;IACrD,IAAI,EAAE,0DAAqC;IAC3C,mBAAmB,EAAE,iEAA4C;IACjE,OAAO,EAAE,6DAAwC;CAClD,CAAA","sourcesContent":["import {\n assertMaterialDefinitionApprovalInput,\n bindMaterialDefinitionApproval,\n freezeMaterialDefinitionDraft,\n materialDefinitionApprovalInput,\n MaterialDefinitionRefusal,\n publishMaterialDefinitionRevision\n} from '../material/material-revision-service'\nimport {\n assertRecipeApprovalInput,\n bindRecipeApproval,\n freezeRecipeDraft,\n publishRecipeRevision,\n recipeApprovalInput,\n RecipeRefusal\n} from '../recipe/recipe-revision-service'\nimport {\n assertTestSpecificationApprovalInput,\n bindTestSpecificationApproval,\n freezeTestSpecificationDraft,\n publishTestSpecificationRevision,\n testSpecificationApprovalInput,\n TestSpecificationRefusal\n} from '../test-spec/test-spec-revision-service'\nimport type { MasterChangeAxis } from './master-change-axis'\n\n/*\n * The three axes whose revisions live in ops-master. Words are plant's, which carried all five languages.\n */\nconst NOT_SELF = 'An empty approval line refuses submission. The author cannot approve their own change.'\nconst POLICY_NOTE = 'Declared regulated axes require this approval. Non-regulated publication records its policy and publisher.'\n\nexport const TEST_SPECIFICATION_CHANGE: MasterChangeAxis = {\n axis: 'testSpecification',\n activity: 'TestSpecificationChangeApproval',\n label: 'test specification change approval',\n description: 'Approve a frozen test specification and its effective date',\n category: 'quality',\n guide: [\n 'Compare the previous and proposed criteria and check when the new criteria will apply.',\n 'Approval publishes this exact revision. It does not change inspections already recorded.',\n NOT_SELF\n ],\n readiness: {\n stage: 'partial',\n tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],\n gaps: ['Multi-specification atomic submission is not implemented in this single-specification slice.'],\n notes: `${POLICY_NOTE} Recorded inspections keep their exact revision.`\n },\n before: 'previous criteria',\n after: 'proposed criteria',\n issuedAs: '검사 명세 변경',\n caveat: 'The signed revision stays. Correct it with another approved revision; recorded inspections keep their basis.',\n Refusal: TestSpecificationRefusal as any,\n freeze: freezeTestSpecificationDraft as any,\n approvalInput: testSpecificationApprovalInput as any,\n bind: bindTestSpecificationApproval as any,\n assertApprovalInput: assertTestSpecificationApprovalInput as any,\n publish: publishTestSpecificationRevision as any\n}\n\nexport const RECIPE_CHANGE: MasterChangeAxis = {\n axis: 'recipeDefinition',\n activity: 'RecipeChangeApproval',\n label: 'recipe change approval',\n description: 'Approve a frozen recipe and its effective date',\n category: 'production',\n guide: [\n 'Compare the previous and proposed composition and check when the new composition will apply.',\n 'Approval publishes this exact revision. It does not change executions already recorded.',\n NOT_SELF\n ],\n readiness: {\n stage: 'partial',\n tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],\n gaps: ['Multi-recipe atomic submission is not implemented in this single-recipe slice.'],\n notes: `${POLICY_NOTE} Recorded executions keep their exact revision.`\n },\n before: 'previous composition',\n after: 'proposed composition',\n issuedAs: '레시피 변경',\n caveat: 'The signed revision stays. Correct it with another approved revision; recorded executions keep their basis.',\n Refusal: RecipeRefusal as any,\n freeze: freezeRecipeDraft as any,\n approvalInput: recipeApprovalInput as any,\n bind: bindRecipeApproval as any,\n assertApprovalInput: assertRecipeApprovalInput as any,\n publish: publishRecipeRevision as any\n}\n\nexport const MATERIAL_DEFINITION_CHANGE: MasterChangeAxis = {\n axis: 'materialDefinition',\n activity: 'MaterialDefinitionChangeApproval',\n label: 'material change approval',\n description: 'Approve a frozen material and its effective date',\n category: 'production',\n guide: [\n 'Compare the previous and proposed definition and check when the new definition will apply.',\n 'Approval publishes this exact revision. It does not change executions already recorded.',\n NOT_SELF\n ],\n readiness: {\n stage: 'partial',\n tests: ['things-factory/packages/ops-master/test/master-change-approval.db.test.cjs'],\n gaps: ['Multi-material atomic submission is not implemented in this single-material slice.'],\n notes: `${POLICY_NOTE} Recorded executions keep their exact revision.`\n },\n before: 'previous definition',\n after: 'proposed definition',\n issuedAs: '품목 변경',\n caveat: 'The signed revision stays. Correct it with another approved revision; recorded executions keep their basis.',\n Refusal: MaterialDefinitionRefusal as any,\n freeze: freezeMaterialDefinitionDraft as any,\n approvalInput: materialDefinitionApprovalInput as any,\n bind: bindMaterialDefinitionApproval as any,\n assertApprovalInput: assertMaterialDefinitionApprovalInput as any,\n publish: publishMaterialDefinitionRevision as any\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import { type MasterChangeAxis } from './master-change-axis';
2
+ import { MasterChangeApprovalResolver } from './master-change-resolver';
3
+ export * from './master-change-axis';
4
+ export * from './master-change-flow';
5
+ export * from './builtin-axes';
6
+ export * from './master-change-resolver';
7
+ /**
8
+ * Puts an axis on the approval flow: its activity template, and its door — submitting is the act, so an
9
+ * empty approval line refuses (ADR-0077 `approval-is-the-act`). Registration is at module import; the
10
+ * bootstrap hook runs after the schema is built, which is too late.
11
+ */
12
+ export declare function installMasterChangeAxis(axis: MasterChangeAxis, module?: string): void;
13
+ export declare const resolvers: (typeof MasterChangeApprovalResolver)[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolvers = void 0;
4
+ exports.installMasterChangeAxis = installMasterChangeAxis;
5
+ const tslib_1 = require("tslib");
6
+ const worklist_1 = require("@things-factory/worklist");
7
+ const approval_route_1 = require("../approval-route");
8
+ const builtin_axes_1 = require("./builtin-axes");
9
+ const master_change_axis_1 = require("./master-change-axis");
10
+ const master_change_flow_1 = require("./master-change-flow");
11
+ const master_change_resolver_1 = require("./master-change-resolver");
12
+ tslib_1.__exportStar(require("./master-change-axis"), exports);
13
+ tslib_1.__exportStar(require("./master-change-flow"), exports);
14
+ tslib_1.__exportStar(require("./builtin-axes"), exports);
15
+ tslib_1.__exportStar(require("./master-change-resolver"), exports);
16
+ /**
17
+ * Puts an axis on the approval flow: its activity template, and its door — submitting is the act, so an
18
+ * empty approval line refuses (ADR-0077 `approval-is-the-act`). Registration is at module import; the
19
+ * bootstrap hook runs after the schema is built, which is too late.
20
+ */
21
+ function installMasterChangeAxis(axis, module = 'ops-master') {
22
+ (0, master_change_axis_1.registerMasterChangeAxis)(axis);
23
+ worklist_1.ActivityInstallations.installActivityTemplate((0, master_change_flow_1.masterChangeActivity)(axis));
24
+ doorsOf.set(module, [...(doorsOf.get(module) ?? []).filter(name => name !== axis.activity), axis.activity]);
25
+ (0, worklist_1.registerWorkDoors)({
26
+ module,
27
+ doors: doorsOf.get(module).map(name => ({ name, kind: 'approval', whenNoLine: 'refuse', because: 'approval-is-the-act' }))
28
+ });
29
+ }
30
+ const doorsOf = new Map();
31
+ for (const axis of [builtin_axes_1.TEST_SPECIFICATION_CHANGE, builtin_axes_1.RECIPE_CHANGE, builtin_axes_1.MATERIAL_DEFINITION_CHANGE])
32
+ installMasterChangeAxis(axis);
33
+ /* Raising an axis to approval asks whether its activity has someone who approves. */
34
+ (0, approval_route_1.registerApprovalRouteInspector)(master_change_flow_1.inspectMasterChangeRoute);
35
+ exports.resolvers = [master_change_resolver_1.MasterChangeApprovalResolver];
36
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/master-change-approval/index.ts"],"names":[],"mappings":";;;AAkBA,0DAQC;;AA1BD,uDAAmF;AAEnF,sDAAkE;AAClE,iDAAqG;AACrG,6DAAsF;AACtF,6DAAqF;AACrF,qEAAuE;AAEvE,+DAAoC;AACpC,+DAAoC;AACpC,yDAA8B;AAC9B,mEAAwC;AAExC;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,IAAsB,EAAE,MAAM,GAAG,YAAY;IACnF,IAAA,6CAAwB,EAAC,IAAI,CAAC,CAAA;IAC9B,gCAAqB,CAAC,uBAAuB,CAAC,IAAA,yCAAoB,EAAC,IAAI,CAAQ,CAAC,CAAA;IAChF,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,IAAI,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAA;IAC3G,IAAA,4BAAiB,EAAC;QAChB,MAAM;QACN,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,qBAAqB,EAAE,CAAU,CAAC;KACrI,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,GAAG,EAAoB,CAAA;AAE3C,KAAK,MAAM,IAAI,IAAI,CAAC,wCAAyB,EAAE,4BAAa,EAAE,yCAA0B,CAAC;IAAE,uBAAuB,CAAC,IAAI,CAAC,CAAA;AAExH,qFAAqF;AACrF,IAAA,+CAA8B,EAAC,6CAAwB,CAAC,CAAA;AAE3C,QAAA,SAAS,GAAG,CAAC,qDAA4B,CAAC,CAAA","sourcesContent":["import { ActivityInstallations, registerWorkDoors } from '@things-factory/worklist'\n\nimport { registerApprovalRouteInspector } from '../approval-route'\nimport { MATERIAL_DEFINITION_CHANGE, RECIPE_CHANGE, TEST_SPECIFICATION_CHANGE } from './builtin-axes'\nimport { registerMasterChangeAxis, type MasterChangeAxis } from './master-change-axis'\nimport { inspectMasterChangeRoute, masterChangeActivity } from './master-change-flow'\nimport { MasterChangeApprovalResolver } from './master-change-resolver'\n\nexport * from './master-change-axis'\nexport * from './master-change-flow'\nexport * from './builtin-axes'\nexport * from './master-change-resolver'\n\n/**\n * Puts an axis on the approval flow: its activity template, and its door — submitting is the act, so an\n * empty approval line refuses (ADR-0077 `approval-is-the-act`). Registration is at module import; the\n * bootstrap hook runs after the schema is built, which is too late.\n */\nexport function installMasterChangeAxis(axis: MasterChangeAxis, module = 'ops-master'): void {\n registerMasterChangeAxis(axis)\n ActivityInstallations.installActivityTemplate(masterChangeActivity(axis) as any)\n doorsOf.set(module, [...(doorsOf.get(module) ?? []).filter(name => name !== axis.activity), axis.activity])\n registerWorkDoors({\n module,\n doors: doorsOf.get(module)!.map(name => ({ name, kind: 'approval', whenNoLine: 'refuse', because: 'approval-is-the-act' }) as const)\n })\n}\n\nconst doorsOf = new Map<string, string[]>()\n\nfor (const axis of [TEST_SPECIFICATION_CHANGE, RECIPE_CHANGE, MATERIAL_DEFINITION_CHANGE]) installMasterChangeAxis(axis)\n\n/* Raising an axis to approval asks whether its activity has someone who approves. */\nregisterApprovalRouteInspector(inspectMasterChangeRoute)\n\nexport const resolvers = [MasterChangeApprovalResolver]\n"]}
@@ -0,0 +1,54 @@
1
+ import type { EntityManager } from 'typeorm';
2
+ /**
3
+ * One master axis whose changes pass an approval (ADR-0086 decision 1, amended 2026-10-10).
4
+ *
5
+ * ops-master owns the whole flow: the activity template, what the approval publishes, the submit door, the
6
+ * work-door declaration and the readiness check. An axis brings only what is its own — the revision
7
+ * steps and its words. ops-master registers recipe, material definition and test specification; a module
8
+ * whose axis lives elsewhere (work-shift) registers its own with `registerMasterChangeAxis`.
9
+ *
10
+ * The names stay what plant and warehouse used, so activities already installed at a site, and the
11
+ * approval lines set on them, keep working.
12
+ */
13
+ export interface MasterChangeAxis {
14
+ /** The policy axis (`ops_master_change_policy.axis`). */
15
+ axis: string;
16
+ /** The activity name the approval runs under. */
17
+ activity: string;
18
+ label: string;
19
+ description: string;
20
+ category: string;
21
+ guide: string[];
22
+ readiness: {
23
+ stage: string;
24
+ tests: string[];
25
+ gaps: string[];
26
+ notes: string;
27
+ };
28
+ /** Decision-key names for the before/after columns, in this axis's words. */
29
+ before: string;
30
+ after: string;
31
+ /** The work item's name, before the headline. */
32
+ issuedAs: string;
33
+ /** How a signed revision is corrected, for the approver. */
34
+ caveat: string;
35
+ /** The axis's refusal, so a refused submission speaks the axis's codes. */
36
+ Refusal: new (code: string, detail?: string) => Error;
37
+ freeze(manager: EntityManager, domainId: string, userId: string, revisionId: string, editGeneration: number): Promise<{
38
+ id: string;
39
+ reason?: string;
40
+ contentHash?: string;
41
+ }>;
42
+ approvalInput(manager: EntityManager, domainId: string, revisionId: string): Promise<any>;
43
+ bind(manager: EntityManager, domainId: string, revisionId: string, activityInstanceId: string): Promise<unknown>;
44
+ assertApprovalInput(manager: EntityManager, domainId: string, input: unknown): Promise<unknown>;
45
+ publish(manager: EntityManager, domainId: string, revisionId: string, signed: {
46
+ activityInstanceId: string;
47
+ approverId: string;
48
+ submissionHash: string;
49
+ }): Promise<unknown>;
50
+ }
51
+ /** Adds an axis to the approval flow. Called at module import, before the schema is built. */
52
+ export declare function registerMasterChangeAxis(axis: MasterChangeAxis): void;
53
+ export declare function masterChangeAxis(axis: string): MasterChangeAxis | undefined;
54
+ export declare function masterChangeAxes(): MasterChangeAxis[];
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerMasterChangeAxis = registerMasterChangeAxis;
4
+ exports.masterChangeAxis = masterChangeAxis;
5
+ exports.masterChangeAxes = masterChangeAxes;
6
+ const axes = new Map();
7
+ /** Adds an axis to the approval flow. Called at module import, before the schema is built. */
8
+ function registerMasterChangeAxis(axis) {
9
+ axes.set(axis.axis, axis);
10
+ }
11
+ function masterChangeAxis(axis) {
12
+ return axes.get(axis);
13
+ }
14
+ function masterChangeAxes() {
15
+ return [...axes.values()];
16
+ }
17
+ //# sourceMappingURL=master-change-axis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"master-change-axis.js","sourceRoot":"","sources":["../../../server/service/master-change-approval/master-change-axis.ts"],"names":[],"mappings":";;AAgDA,4DAEC;AAED,4CAEC;AAED,4CAEC;AAbD,MAAM,IAAI,GAAG,IAAI,GAAG,EAA4B,CAAA;AAEhD,8FAA8F;AAC9F,SAAgB,wBAAwB,CAAC,IAAsB;IAC7D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AAC3B,CAAC;AAED,SAAgB,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACvB,CAAC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;AAC3B,CAAC","sourcesContent":["import type { EntityManager } from 'typeorm'\n\n/**\n * One master axis whose changes pass an approval (ADR-0086 decision 1, amended 2026-10-10).\n *\n * ops-master owns the whole flow: the activity template, what the approval publishes, the submit door, the\n * work-door declaration and the readiness check. An axis brings only what is its own — the revision\n * steps and its words. ops-master registers recipe, material definition and test specification; a module\n * whose axis lives elsewhere (work-shift) registers its own with `registerMasterChangeAxis`.\n *\n * The names stay what plant and warehouse used, so activities already installed at a site, and the\n * approval lines set on them, keep working.\n */\nexport interface MasterChangeAxis {\n /** The policy axis (`ops_master_change_policy.axis`). */\n axis: string\n /** The activity name the approval runs under. */\n activity: string\n label: string\n description: string\n category: string\n guide: string[]\n readiness: { stage: string; tests: string[]; gaps: string[]; notes: string }\n /** Decision-key names for the before/after columns, in this axis's words. */\n before: string\n after: string\n /** The work item's name, before the headline. */\n issuedAs: string\n /** How a signed revision is corrected, for the approver. */\n caveat: string\n /** The axis's refusal, so a refused submission speaks the axis's codes. */\n Refusal: new (code: string, detail?: string) => Error\n\n freeze(manager: EntityManager, domainId: string, userId: string, revisionId: string, editGeneration: number): Promise<{ id: string; reason?: string; contentHash?: string }>\n approvalInput(manager: EntityManager, domainId: string, revisionId: string): Promise<any>\n bind(manager: EntityManager, domainId: string, revisionId: string, activityInstanceId: string): Promise<unknown>\n assertApprovalInput(manager: EntityManager, domainId: string, input: unknown): Promise<unknown>\n publish(\n manager: EntityManager,\n domainId: string,\n revisionId: string,\n signed: { activityInstanceId: string; approverId: string; submissionHash: string }\n ): Promise<unknown>\n}\n\nconst axes = new Map<string, MasterChangeAxis>()\n\n/** Adds an axis to the approval flow. Called at module import, before the schema is built. */\nexport function registerMasterChangeAxis(axis: MasterChangeAxis): void {\n axes.set(axis.axis, axis)\n}\n\nexport function masterChangeAxis(axis: string): MasterChangeAxis | undefined {\n return axes.get(axis)\n}\n\nexport function masterChangeAxes(): MasterChangeAxis[] {\n return [...axes.values()]\n}\n"]}
@@ -0,0 +1,65 @@
1
+ import { type MasterChangeAxis } from './master-change-axis';
2
+ /**
3
+ * The activity template for an axis, with the callback that publishes the signed revision when the
4
+ * approval ends. The approver reviews in `ops-master-revision-review`.
5
+ */
6
+ export declare function masterChangeActivity(axis: MasterChangeAxis): {
7
+ name: string;
8
+ label: string;
9
+ description: string;
10
+ guide: string[];
11
+ release: string;
12
+ provider: string;
13
+ category: string;
14
+ activityType: string;
15
+ priority: number;
16
+ readiness: {
17
+ stage: string;
18
+ tests: string[];
19
+ gaps: string[];
20
+ notes: string;
21
+ };
22
+ startingType: string;
23
+ multiple: string;
24
+ viewType: string;
25
+ viewSource: string;
26
+ decisionKeys: {
27
+ role: string;
28
+ inputPath: string;
29
+ name: string;
30
+ }[];
31
+ model: {
32
+ name: string;
33
+ tag: string;
34
+ description: string;
35
+ hidden: boolean;
36
+ mandatory: boolean;
37
+ inout: string;
38
+ type: string;
39
+ options: {};
40
+ unit: any;
41
+ quantifier: number[];
42
+ spec: {};
43
+ }[];
44
+ standardTime: number;
45
+ callback: (instance: any, addendum: any, context: any) => Promise<void>;
46
+ };
47
+ /**
48
+ * Submits a draft for approval: the axis must be regulated here and its approval line must stand, then
49
+ * the draft is frozen, the work item issued with what the approver sees, and the two bound.
50
+ */
51
+ export declare function submitMasterChangeDraft(axisName: string, revisionId: string, editGeneration: number, context: ResolverContext): Promise<{
52
+ revisionId: string;
53
+ activityInstanceId: string;
54
+ contentHash?: string;
55
+ }>;
56
+ /**
57
+ * Whether an axis can be made regulated: its activity must have someone who approves. Counted with
58
+ * `isApprovalStep`, because a reference-only line approves nothing and would read as ready by length.
59
+ * An axis with no registered flow gets no report and is not blocked here — `declareMasterChangePolicy`
60
+ * refuses axes without revisions on its own.
61
+ */
62
+ export declare function inspectMasterChangeRoute(manager: any, domainId: string, axisName: string): Promise<{
63
+ ready: boolean;
64
+ activity: string;
65
+ }>;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.masterChangeActivity = masterChangeActivity;
4
+ exports.submitMasterChangeDraft = submitMasterChangeDraft;
5
+ exports.inspectMasterChangeRoute = inspectMasterChangeRoute;
6
+ const shell_1 = require("@things-factory/shell");
7
+ const worklist_1 = require("@things-factory/worklist");
8
+ const master_change_policy_1 = require("../master-change-policy");
9
+ const master_change_axis_1 = require("./master-change-axis");
10
+ const REVISION_MODEL = [
11
+ {
12
+ name: 'revision',
13
+ tag: 'revision',
14
+ description: 'Frozen revision identity and digest',
15
+ hidden: true,
16
+ mandatory: true,
17
+ inout: 'in',
18
+ type: 'object',
19
+ options: {},
20
+ unit: null,
21
+ quantifier: [1],
22
+ spec: {}
23
+ }
24
+ ];
25
+ /**
26
+ * The activity template for an axis, with the callback that publishes the signed revision when the
27
+ * approval ends. The approver reviews in `ops-master-revision-review`.
28
+ */
29
+ function masterChangeActivity(axis) {
30
+ return {
31
+ name: axis.activity,
32
+ label: axis.label,
33
+ description: axis.description,
34
+ guide: axis.guide,
35
+ release: '1.0.0',
36
+ provider: 'hatiolab.com',
37
+ category: axis.category,
38
+ activityType: 'user',
39
+ priority: 1,
40
+ readiness: axis.readiness,
41
+ startingType: 'post',
42
+ multiple: 'single',
43
+ viewType: 'custom-element',
44
+ viewSource: 'ops-master-revision-review',
45
+ decisionKeys: [
46
+ { role: 'headline', inputPath: 'headline', name: 'specification' },
47
+ { role: 'reason', inputPath: 'reason', name: 'reason for change' },
48
+ { role: 'currentState', inputPath: 'before', name: axis.before },
49
+ { role: 'consequence', inputPath: 'after', name: axis.after },
50
+ { role: 'reversibility', inputPath: 'reversibility', name: 'how a signed revision is corrected' },
51
+ { role: 'consequence', inputPath: 'effectiveFrom', name: 'effective from' }
52
+ ],
53
+ model: REVISION_MODEL,
54
+ standardTime: 24 * 60 * 60,
55
+ callback: (0, shell_1.speaksRefusals)(async (instance, _addendum, context) => {
56
+ if (instance.state !== worklist_1.ActivityInstanceStatus.Ended)
57
+ return;
58
+ const carried = instance.input?.revision;
59
+ if (typeof carried?.revisionId !== 'string' || typeof carried?.hash !== 'string') {
60
+ throw new axis.Refusal('INVALID_SUBMISSION');
61
+ }
62
+ const { tx, domain, user } = context.state;
63
+ await axis.assertApprovalInput(tx, domain.id, instance.input);
64
+ await axis.publish(tx, domain.id, carried.revisionId, {
65
+ activityInstanceId: instance.id,
66
+ approverId: user.id,
67
+ submissionHash: carried.hash
68
+ });
69
+ })
70
+ };
71
+ }
72
+ /**
73
+ * Submits a draft for approval: the axis must be regulated here and its approval line must stand, then
74
+ * the draft is frozen, the work item issued with what the approver sees, and the two bound.
75
+ */
76
+ async function submitMasterChangeDraft(axisName, revisionId, editGeneration, context) {
77
+ const axis = (0, master_change_axis_1.masterChangeAxis)(axisName);
78
+ if (!axis)
79
+ throw new Error(`submitMasterChangeDraft: no approval flow is registered for the axis "${axisName}"`);
80
+ const { tx, domain, user } = context.state;
81
+ const policy = await (0, master_change_policy_1.masterChangePolicy)(tx, domain.id, axis.axis);
82
+ if (!policy.approvalRequired) {
83
+ throw new axis.Refusal('APPROVAL_NOT_REQUIRED', 'Publish this draft under the declared non-regulated policy.');
84
+ }
85
+ const activity = await (0, worklist_1.activityNamed)(axis.activity, context);
86
+ if ((await (0, worklist_1.approvalLineStanding)(activity, context)).refusal)
87
+ throw new axis.Refusal('APPROVAL_LINE_REQUIRED');
88
+ const draft = await axis.freeze(tx, domain.id, user.id, revisionId, editGeneration);
89
+ const snapshot = await axis.approvalInput(tx, domain.id, draft.id);
90
+ const instance = await (0, worklist_1.issue)({
91
+ name: `${axis.issuedAs} ${snapshot.headline}`,
92
+ description: draft.reason,
93
+ activityId: activity.id,
94
+ approvalLine: activity.approvalLine,
95
+ input: {
96
+ headline: snapshot.headline,
97
+ reason: snapshot.reason,
98
+ before: snapshot.before,
99
+ after: snapshot.after,
100
+ effectiveFrom: snapshot.effectiveFrom,
101
+ revision: snapshot.revision,
102
+ reversibility: { reversible: false, kind: 'compensable', caveat: axis.caveat }
103
+ },
104
+ threadsMin: 1,
105
+ threadsMax: 1,
106
+ requireApproval: true
107
+ }, context);
108
+ await axis.bind(tx, domain.id, draft.id, instance.id);
109
+ return { revisionId: draft.id, activityInstanceId: instance.id, contentHash: draft.contentHash };
110
+ }
111
+ /**
112
+ * Whether an axis can be made regulated: its activity must have someone who approves. Counted with
113
+ * `isApprovalStep`, because a reference-only line approves nothing and would read as ready by length.
114
+ * An axis with no registered flow gets no report and is not blocked here — `declareMasterChangePolicy`
115
+ * refuses axes without revisions on its own.
116
+ */
117
+ async function inspectMasterChangeRoute(manager, domainId, axisName) {
118
+ const axis = (0, master_change_axis_1.masterChangeAxis)(axisName);
119
+ if (!axis)
120
+ return undefined;
121
+ const activity = await manager.findOneBy(worklist_1.Activity, { domain: { id: domainId }, name: axis.activity });
122
+ const steps = (activity?.approvalLine || []).filter(worklist_1.isApprovalStep).length;
123
+ return { ready: steps > 0, activity: axis.activity };
124
+ }
125
+ //# sourceMappingURL=master-change-flow.js.map