@things-factory/ops-master 10.1.248 → 10.1.249
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/dist-client/bootstrap.d.ts +19 -0
- package/dist-client/bootstrap.js +66 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +17 -0
- package/dist-client/index.js +21 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/master-change-approval.d.ts +14 -0
- package/dist-client/master-change-approval.js +36 -0
- package/dist-client/master-change-approval.js.map +1 -0
- package/dist-client/master-change-policy-axes.d.ts +37 -0
- package/dist-client/master-change-policy-axes.js +29 -0
- package/dist-client/master-change-policy-axes.js.map +1 -0
- package/dist-client/master-change-policy-panel.d.ts +59 -0
- package/dist-client/master-change-policy-panel.js +454 -0
- package/dist-client/master-change-policy-panel.js.map +1 -0
- package/dist-client/master-change-providers.d.ts +4 -0
- package/dist-client/master-change-providers.js +91 -0
- package/dist-client/master-change-providers.js.map +1 -0
- package/dist-client/pages/master/applied-when-dialog.d.ts +48 -0
- package/dist-client/pages/master/applied-when-dialog.js +137 -0
- package/dist-client/pages/master/applied-when-dialog.js.map +1 -0
- package/dist-client/pages/master/assignment-fields.d.ts +27 -0
- package/dist-client/pages/master/assignment-fields.js +62 -0
- package/dist-client/pages/master/assignment-fields.js.map +1 -0
- package/dist-client/pages/master/equipment-class.d.ts +12 -0
- package/dist-client/pages/master/equipment-class.js +42 -0
- package/dist-client/pages/master/equipment-class.js.map +1 -0
- package/dist-client/pages/master/equipment.d.ts +12 -0
- package/dist-client/pages/master/equipment.js +58 -0
- package/dist-client/pages/master/equipment.js.map +1 -0
- package/dist-client/pages/master/grist-iso-duration.d.ts +20 -0
- package/dist-client/pages/master/grist-iso-duration.js +70 -0
- package/dist-client/pages/master/grist-iso-duration.js.map +1 -0
- package/dist-client/pages/master/grist-reference.d.ts +91 -0
- package/dist-client/pages/master/grist-reference.js +419 -0
- package/dist-client/pages/master/grist-reference.js.map +1 -0
- package/dist-client/pages/master/import-rows.d.ts +35 -0
- package/dist-client/pages/master/import-rows.js +66 -0
- package/dist-client/pages/master/import-rows.js.map +1 -0
- package/dist-client/pages/master/iso-duration.d.ts +34 -0
- package/dist-client/pages/master/iso-duration.js +76 -0
- package/dist-client/pages/master/iso-duration.js.map +1 -0
- package/dist-client/pages/master/master-options.d.ts +40 -0
- package/dist-client/pages/master/master-options.js +54 -0
- package/dist-client/pages/master/master-options.js.map +1 -0
- package/dist-client/pages/master/master-page-base.d.ts +369 -0
- package/dist-client/pages/master/master-page-base.js +657 -0
- package/dist-client/pages/master/master-page-base.js.map +1 -0
- package/dist-client/pages/master/material-class.d.ts +12 -0
- package/dist-client/pages/master/material-class.js +42 -0
- package/dist-client/pages/master/material-class.js.map +1 -0
- package/dist-client/pages/master/material-definition.d.ts +5 -0
- package/dist-client/pages/master/material-definition.js +14 -0
- package/dist-client/pages/master/material-definition.js.map +1 -0
- package/dist-client/pages/master/material-revision-fields.d.ts +2 -0
- package/dist-client/pages/master/material-revision-fields.js +43 -0
- package/dist-client/pages/master/material-revision-fields.js.map +1 -0
- package/dist-client/pages/master/operation-definition.d.ts +12 -0
- package/dist-client/pages/master/operation-definition.js +49 -0
- package/dist-client/pages/master/operation-definition.js.map +1 -0
- package/dist-client/pages/master/operational-location.d.ts +84 -0
- package/dist-client/pages/master/operational-location.js +432 -0
- package/dist-client/pages/master/operational-location.js.map +1 -0
- package/dist-client/pages/master/person.d.ts +12 -0
- package/dist-client/pages/master/person.js +41 -0
- package/dist-client/pages/master/person.js.map +1 -0
- package/dist-client/pages/master/personnel-class.d.ts +12 -0
- package/dist-client/pages/master/personnel-class.js +43 -0
- package/dist-client/pages/master/personnel-class.js.map +1 -0
- package/dist-client/pages/master/physical-asset-class.d.ts +12 -0
- package/dist-client/pages/master/physical-asset-class.js +40 -0
- package/dist-client/pages/master/physical-asset-class.js.map +1 -0
- package/dist-client/pages/master/physical-asset.d.ts +12 -0
- package/dist-client/pages/master/physical-asset.js +41 -0
- package/dist-client/pages/master/physical-asset.js.map +1 -0
- package/dist-client/pages/master/recipe-definition.d.ts +5 -0
- package/dist-client/pages/master/recipe-definition.js +14 -0
- package/dist-client/pages/master/recipe-definition.js.map +1 -0
- package/dist-client/pages/master/reference-targets.d.ts +42 -0
- package/dist-client/pages/master/reference-targets.js +82 -0
- package/dist-client/pages/master/reference-targets.js.map +1 -0
- package/dist-client/pages/master/revision-comparison.d.ts +49 -0
- package/dist-client/pages/master/revision-comparison.js +560 -0
- package/dist-client/pages/master/revision-comparison.js.map +1 -0
- package/dist-client/pages/master/revision-view.d.ts +34 -0
- package/dist-client/pages/master/revision-view.js +145 -0
- package/dist-client/pages/master/revision-view.js.map +1 -0
- package/dist-client/pages/master/revision-workspace.d.ts +50 -0
- package/dist-client/pages/master/revision-workspace.js +763 -0
- package/dist-client/pages/master/revision-workspace.js.map +1 -0
- package/dist-client/pages/master/route-definition.d.ts +19 -0
- package/dist-client/pages/master/route-definition.js +40 -0
- package/dist-client/pages/master/route-definition.js.map +1 -0
- package/dist-client/pages/master/stop-reason.d.ts +12 -0
- package/dist-client/pages/master/stop-reason.js +48 -0
- package/dist-client/pages/master/stop-reason.js.map +1 -0
- package/dist-client/pages/master/test-specification.d.ts +5 -0
- package/dist-client/pages/master/test-specification.js +14 -0
- package/dist-client/pages/master/test-specification.js.map +1 -0
- package/dist-client/pages/master-axes.d.ts +24 -0
- package/dist-client/pages/master-axes.js +39 -0
- package/dist-client/pages/master-axes.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +81 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +19 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/service/ai-entry/master-entry-rules.d.ts +175 -0
- package/dist-server/service/ai-entry/master-entry-rules.js +302 -0
- package/dist-server/service/ai-entry/master-entry-rules.js.map +1 -0
- package/dist-server/service/ai-entry/master-entry-targets.d.ts +23 -0
- package/dist-server/service/ai-entry/master-entry-targets.js +293 -0
- package/dist-server/service/ai-entry/master-entry-targets.js.map +1 -0
- package/dist-server/service/approval-route.d.ts +37 -0
- package/dist-server/service/approval-route.js +34 -0
- package/dist-server/service/approval-route.js.map +1 -0
- package/dist-server/service/asset/asset-lifecycle.d.ts +106 -0
- package/dist-server/service/asset/asset-lifecycle.js +126 -0
- package/dist-server/service/asset/asset-lifecycle.js.map +1 -0
- package/dist-server/service/asset/asset-master-resolver.d.ts +53 -0
- package/dist-server/service/asset/asset-master-resolver.js +185 -0
- package/dist-server/service/asset/asset-master-resolver.js.map +1 -0
- package/dist-server/service/asset/asset-master.d.ts +21 -0
- package/dist-server/service/asset/asset-master.js +25 -0
- package/dist-server/service/asset/asset-master.js.map +1 -0
- package/dist-server/service/asset/asset-query.d.ts +16 -0
- package/dist-server/service/asset/asset-query.js +72 -0
- package/dist-server/service/asset/asset-query.js.map +1 -0
- package/dist-server/service/asset/index.d.ts +6 -0
- package/dist-server/service/asset/index.js +10 -0
- package/dist-server/service/asset/index.js.map +1 -0
- package/dist-server/service/asset/physical-asset-class.d.ts +34 -0
- package/dist-server/service/asset/physical-asset-class.js +104 -0
- package/dist-server/service/asset/physical-asset-class.js.map +1 -0
- package/dist-server/service/asset/physical-asset.d.ts +66 -0
- package/dist-server/service/asset/physical-asset.js +123 -0
- package/dist-server/service/asset/physical-asset.js.map +1 -0
- package/dist-server/service/assignment/applied-when.d.ts +24 -0
- package/dist-server/service/assignment/applied-when.js +16 -0
- package/dist-server/service/assignment/applied-when.js.map +1 -0
- package/dist-server/service/assignment/assignment-history.d.ts +92 -0
- package/dist-server/service/assignment/assignment-history.js +289 -0
- package/dist-server/service/assignment/assignment-history.js.map +1 -0
- package/dist-server/service/assignment/assignment-write.d.ts +42 -0
- package/dist-server/service/assignment/assignment-write.js +101 -0
- package/dist-server/service/assignment/assignment-write.js.map +1 -0
- package/dist-server/service/assignment/master-value-claim.d.ts +135 -0
- package/dist-server/service/assignment/master-value-claim.js +174 -0
- package/dist-server/service/assignment/master-value-claim.js.map +1 -0
- package/dist-server/service/equipment/equipment-class.d.ts +34 -0
- package/dist-server/service/equipment/equipment-class.js +104 -0
- package/dist-server/service/equipment/equipment-class.js.map +1 -0
- package/dist-server/service/equipment/equipment-master-resolver.d.ts +77 -0
- package/dist-server/service/equipment/equipment-master-resolver.js +266 -0
- package/dist-server/service/equipment/equipment-master-resolver.js.map +1 -0
- package/dist-server/service/equipment/equipment-master.d.ts +30 -0
- package/dist-server/service/equipment/equipment-master.js +53 -0
- package/dist-server/service/equipment/equipment-master.js.map +1 -0
- package/dist-server/service/equipment/equipment-query.d.ts +16 -0
- package/dist-server/service/equipment/equipment-query.js +72 -0
- package/dist-server/service/equipment/equipment-query.js.map +1 -0
- package/dist-server/service/equipment/equipment.d.ts +71 -0
- package/dist-server/service/equipment/equipment.js +138 -0
- package/dist-server/service/equipment/equipment.js.map +1 -0
- package/dist-server/service/equipment/index.d.ts +8 -0
- package/dist-server/service/equipment/index.js +12 -0
- package/dist-server/service/equipment/index.js.map +1 -0
- package/dist-server/service/equipment/state-period-rules.d.ts +95 -0
- package/dist-server/service/equipment/state-period-rules.js +122 -0
- package/dist-server/service/equipment/state-period-rules.js.map +1 -0
- package/dist-server/service/equipment/stop-reason-query.d.ts +11 -0
- package/dist-server/service/equipment/stop-reason-query.js +39 -0
- package/dist-server/service/equipment/stop-reason-query.js.map +1 -0
- package/dist-server/service/equipment/stop-reason.d.ts +58 -0
- package/dist-server/service/equipment/stop-reason.js +114 -0
- package/dist-server/service/equipment/stop-reason.js.map +1 -0
- package/dist-server/service/index.d.ts +82 -0
- package/dist-server/service/index.js +145 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/location/index.d.ts +5 -0
- package/dist-server/service/location/index.js +9 -0
- package/dist-server/service/location/index.js.map +1 -0
- package/dist-server/service/location/location-master-resolver.d.ts +60 -0
- package/dist-server/service/location/location-master-resolver.js +313 -0
- package/dist-server/service/location/location-master-resolver.js.map +1 -0
- package/dist-server/service/location/location-master.d.ts +26 -0
- package/dist-server/service/location/location-master.js +28 -0
- package/dist-server/service/location/location-master.js.map +1 -0
- package/dist-server/service/location/location-query.d.ts +15 -0
- package/dist-server/service/location/location-query.js +56 -0
- package/dist-server/service/location/location-query.js.map +1 -0
- package/dist-server/service/location/operational-location.d.ts +116 -0
- package/dist-server/service/location/operational-location.js +157 -0
- package/dist-server/service/location/operational-location.js.map +1 -0
- package/dist-server/service/master-axis.d.ts +40 -0
- package/dist-server/service/master-axis.js +57 -0
- package/dist-server/service/master-axis.js.map +1 -0
- package/dist-server/service/master-change-approval/approval-input.d.ts +17 -0
- package/dist-server/service/master-change-approval/approval-input.js +35 -0
- package/dist-server/service/master-change-approval/approval-input.js.map +1 -0
- package/dist-server/service/master-change-approval/builtin-axes.d.ts +4 -0
- package/dist-server/service/master-change-approval/builtin-axes.js +96 -0
- package/dist-server/service/master-change-approval/builtin-axes.js.map +1 -0
- package/dist-server/service/master-change-approval/index.d.ts +14 -0
- package/dist-server/service/master-change-approval/index.js +37 -0
- package/dist-server/service/master-change-approval/index.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-axis.d.ts +54 -0
- package/dist-server/service/master-change-approval/master-change-axis.js +17 -0
- package/dist-server/service/master-change-approval/master-change-axis.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-flow.d.ts +65 -0
- package/dist-server/service/master-change-approval/master-change-flow.js +125 -0
- package/dist-server/service/master-change-approval/master-change-flow.js.map +1 -0
- package/dist-server/service/master-change-approval/master-change-resolver.d.ts +18 -0
- package/dist-server/service/master-change-approval/master-change-resolver.js +58 -0
- package/dist-server/service/master-change-approval/master-change-resolver.js.map +1 -0
- package/dist-server/service/master-change-policy.d.ts +122 -0
- package/dist-server/service/master-change-policy.js +304 -0
- package/dist-server/service/master-change-policy.js.map +1 -0
- package/dist-server/service/master-conformance-resolver.d.ts +34 -0
- package/dist-server/service/master-conformance-resolver.js +153 -0
- package/dist-server/service/master-conformance-resolver.js.map +1 -0
- package/dist-server/service/master-conformance.d.ts +80 -0
- package/dist-server/service/master-conformance.js +266 -0
- package/dist-server/service/master-conformance.js.map +1 -0
- package/dist-server/service/master-crud.d.ts +55 -0
- package/dist-server/service/master-crud.js +93 -0
- package/dist-server/service/master-crud.js.map +1 -0
- package/dist-server/service/master-list.d.ts +12 -0
- package/dist-server/service/master-list.js +30 -0
- package/dist-server/service/master-list.js.map +1 -0
- package/dist-server/service/master-page-query.d.ts +33 -0
- package/dist-server/service/master-page-query.js +55 -0
- package/dist-server/service/master-page-query.js.map +1 -0
- package/dist-server/service/master-page.d.ts +85 -0
- package/dist-server/service/master-page.js +104 -0
- package/dist-server/service/master-page.js.map +1 -0
- package/dist-server/service/material/index.d.ts +7 -0
- package/dist-server/service/material/index.js +12 -0
- package/dist-server/service/material/index.js.map +1 -0
- package/dist-server/service/material/material-axis-status.d.ts +8 -0
- package/dist-server/service/material/material-axis-status.js +19 -0
- package/dist-server/service/material/material-axis-status.js.map +1 -0
- package/dist-server/service/material/material-class.d.ts +34 -0
- package/dist-server/service/material/material-class.js +104 -0
- package/dist-server/service/material/material-class.js.map +1 -0
- package/dist-server/service/material/material-definition.d.ts +45 -0
- package/dist-server/service/material/material-definition.js +125 -0
- package/dist-server/service/material/material-definition.js.map +1 -0
- package/dist-server/service/material/material-effective-list.d.ts +39 -0
- package/dist-server/service/material/material-effective-list.js +54 -0
- package/dist-server/service/material/material-effective-list.js.map +1 -0
- package/dist-server/service/material/material-master-resolver.d.ts +106 -0
- package/dist-server/service/material/material-master-resolver.js +351 -0
- package/dist-server/service/material/material-master-resolver.js.map +1 -0
- package/dist-server/service/material/material-master.d.ts +9 -0
- package/dist-server/service/material/material-master.js +24 -0
- package/dist-server/service/material/material-master.js.map +1 -0
- package/dist-server/service/material/material-query.d.ts +16 -0
- package/dist-server/service/material/material-query.js +79 -0
- package/dist-server/service/material/material-query.js.map +1 -0
- package/dist-server/service/material/material-revision-content.d.ts +10 -0
- package/dist-server/service/material/material-revision-content.js +92 -0
- package/dist-server/service/material/material-revision-content.js.map +1 -0
- package/dist-server/service/material/material-revision-resolver.d.ts +60 -0
- package/dist-server/service/material/material-revision-resolver.js +96 -0
- package/dist-server/service/material/material-revision-resolver.js.map +1 -0
- package/dist-server/service/material/material-revision-service.d.ts +179 -0
- package/dist-server/service/material/material-revision-service.js +687 -0
- package/dist-server/service/material/material-revision-service.js.map +1 -0
- package/dist-server/service/material/material-revision.d.ts +86 -0
- package/dist-server/service/material/material-revision.js +339 -0
- package/dist-server/service/material/material-revision.js.map +1 -0
- package/dist-server/service/material/recipe-index.d.ts +23 -0
- package/dist-server/service/material/recipe-index.js +44 -0
- package/dist-server/service/material/recipe-index.js.map +1 -0
- package/dist-server/service/operation/index.d.ts +6 -0
- package/dist-server/service/operation/index.js +10 -0
- package/dist-server/service/operation/index.js.map +1 -0
- package/dist-server/service/operation/operation-definition.d.ts +52 -0
- package/dist-server/service/operation/operation-definition.js +143 -0
- package/dist-server/service/operation/operation-definition.js.map +1 -0
- package/dist-server/service/operation/operation-master-resolver.d.ts +52 -0
- package/dist-server/service/operation/operation-master-resolver.js +187 -0
- package/dist-server/service/operation/operation-master-resolver.js.map +1 -0
- package/dist-server/service/operation/operation-master.d.ts +21 -0
- package/dist-server/service/operation/operation-master.js +28 -0
- package/dist-server/service/operation/operation-master.js.map +1 -0
- package/dist-server/service/operation/operation-query.d.ts +15 -0
- package/dist-server/service/operation/operation-query.js +56 -0
- package/dist-server/service/operation/operation-query.js.map +1 -0
- package/dist-server/service/operation/operation-readiness-resolver.d.ts +39 -0
- package/dist-server/service/operation/operation-readiness-resolver.js +111 -0
- package/dist-server/service/operation/operation-readiness-resolver.js.map +1 -0
- package/dist-server/service/operation/operation-readiness.d.ts +34 -0
- package/dist-server/service/operation/operation-readiness.js +133 -0
- package/dist-server/service/operation/operation-readiness.js.map +1 -0
- package/dist-server/service/personnel/index.d.ts +6 -0
- package/dist-server/service/personnel/index.js +10 -0
- package/dist-server/service/personnel/index.js.map +1 -0
- package/dist-server/service/personnel/person.d.ts +51 -0
- package/dist-server/service/personnel/person.js +119 -0
- package/dist-server/service/personnel/person.js.map +1 -0
- package/dist-server/service/personnel/personnel-class-readiness.d.ts +22 -0
- package/dist-server/service/personnel/personnel-class-readiness.js +98 -0
- package/dist-server/service/personnel/personnel-class-readiness.js.map +1 -0
- package/dist-server/service/personnel/personnel-class.d.ts +54 -0
- package/dist-server/service/personnel/personnel-class.js +114 -0
- package/dist-server/service/personnel/personnel-class.js.map +1 -0
- package/dist-server/service/personnel/personnel-master-resolver.d.ts +53 -0
- package/dist-server/service/personnel/personnel-master-resolver.js +187 -0
- package/dist-server/service/personnel/personnel-master-resolver.js.map +1 -0
- package/dist-server/service/personnel/personnel-master.d.ts +39 -0
- package/dist-server/service/personnel/personnel-master.js +34 -0
- package/dist-server/service/personnel/personnel-master.js.map +1 -0
- package/dist-server/service/personnel/personnel-query.d.ts +29 -0
- package/dist-server/service/personnel/personnel-query.js +79 -0
- package/dist-server/service/personnel/personnel-query.js.map +1 -0
- package/dist-server/service/personnel/qualification.d.ts +104 -0
- package/dist-server/service/personnel/qualification.js +147 -0
- package/dist-server/service/personnel/qualification.js.map +1 -0
- package/dist-server/service/quality/index.d.ts +4 -0
- package/dist-server/service/quality/index.js +8 -0
- package/dist-server/service/quality/index.js.map +1 -0
- package/dist-server/service/quality/nonconformance-cause-resolver.d.ts +12 -0
- package/dist-server/service/quality/nonconformance-cause-resolver.js +60 -0
- package/dist-server/service/quality/nonconformance-cause-resolver.js.map +1 -0
- package/dist-server/service/quality/nonconformance-cause.d.ts +20 -0
- package/dist-server/service/quality/nonconformance-cause.js +90 -0
- package/dist-server/service/quality/nonconformance-cause.js.map +1 -0
- package/dist-server/service/recipe/index.d.ts +10 -0
- package/dist-server/service/recipe/index.js +16 -0
- package/dist-server/service/recipe/index.js.map +1 -0
- package/dist-server/service/recipe/recipe-definition.d.ts +75 -0
- package/dist-server/service/recipe/recipe-definition.js +143 -0
- package/dist-server/service/recipe/recipe-definition.js.map +1 -0
- package/dist-server/service/recipe/recipe-effective-list.d.ts +49 -0
- package/dist-server/service/recipe/recipe-effective-list.js +96 -0
- package/dist-server/service/recipe/recipe-effective-list.js.map +1 -0
- package/dist-server/service/recipe/recipe-master-resolver.d.ts +28 -0
- package/dist-server/service/recipe/recipe-master-resolver.js +128 -0
- package/dist-server/service/recipe/recipe-master-resolver.js.map +1 -0
- package/dist-server/service/recipe/recipe-master.d.ts +37 -0
- package/dist-server/service/recipe/recipe-master.js +47 -0
- package/dist-server/service/recipe/recipe-master.js.map +1 -0
- package/dist-server/service/recipe/recipe-query.d.ts +21 -0
- package/dist-server/service/recipe/recipe-query.js +82 -0
- package/dist-server/service/recipe/recipe-query.js.map +1 -0
- package/dist-server/service/recipe/recipe-revision-content.d.ts +32 -0
- package/dist-server/service/recipe/recipe-revision-content.js +70 -0
- package/dist-server/service/recipe/recipe-revision-content.js.map +1 -0
- package/dist-server/service/recipe/recipe-revision-line.d.ts +30 -0
- package/dist-server/service/recipe/recipe-revision-line.js +95 -0
- package/dist-server/service/recipe/recipe-revision-line.js.map +1 -0
- package/dist-server/service/recipe/recipe-revision-resolver.d.ts +65 -0
- package/dist-server/service/recipe/recipe-revision-resolver.js +96 -0
- package/dist-server/service/recipe/recipe-revision-resolver.js.map +1 -0
- package/dist-server/service/recipe/recipe-revision-service.d.ts +183 -0
- package/dist-server/service/recipe/recipe-revision-service.js +754 -0
- package/dist-server/service/recipe/recipe-revision-service.js.map +1 -0
- package/dist-server/service/recipe/recipe-revision.d.ts +102 -0
- package/dist-server/service/recipe/recipe-revision.js +373 -0
- package/dist-server/service/recipe/recipe-revision.js.map +1 -0
- package/dist-server/service/recipe/route-definition.d.ts +51 -0
- package/dist-server/service/recipe/route-definition.js +114 -0
- package/dist-server/service/recipe/route-definition.js.map +1 -0
- package/dist-server/service/resource/class-lineage.d.ts +46 -0
- package/dist-server/service/resource/class-lineage.js +80 -0
- package/dist-server/service/resource/class-lineage.js.map +1 -0
- package/dist-server/service/resource/class-members.d.ts +36 -0
- package/dist-server/service/resource/class-members.js +59 -0
- package/dist-server/service/resource/class-members.js.map +1 -0
- package/dist-server/service/resource/referrers.d.ts +54 -0
- package/dist-server/service/resource/referrers.js +99 -0
- package/dist-server/service/resource/referrers.js.map +1 -0
- package/dist-server/service/resource/resource-class.d.ts +25 -0
- package/dist-server/service/resource/resource-class.js +29 -0
- package/dist-server/service/resource/resource-class.js.map +1 -0
- package/dist-server/service/revision-baseline.d.ts +71 -0
- package/dist-server/service/revision-baseline.js +87 -0
- package/dist-server/service/revision-baseline.js.map +1 -0
- package/dist-server/service/row-lock.d.ts +22 -0
- package/dist-server/service/row-lock.js +31 -0
- package/dist-server/service/row-lock.js.map +1 -0
- package/dist-server/service/status/axis-stamp.d.ts +16 -0
- package/dist-server/service/status/axis-stamp.js +22 -0
- package/dist-server/service/status/axis-stamp.js.map +1 -0
- package/dist-server/service/status/index.d.ts +3 -0
- package/dist-server/service/status/index.js +7 -0
- package/dist-server/service/status/index.js.map +1 -0
- package/dist-server/service/status/master-status.d.ts +38 -0
- package/dist-server/service/status/master-status.js +129 -0
- package/dist-server/service/status/master-status.js.map +1 -0
- package/dist-server/service/test-spec/criteria-check.d.ts +53 -0
- package/dist-server/service/test-spec/criteria-check.js +142 -0
- package/dist-server/service/test-spec/criteria-check.js.map +1 -0
- package/dist-server/service/test-spec/criteria-rows.d.ts +89 -0
- package/dist-server/service/test-spec/criteria-rows.js +139 -0
- package/dist-server/service/test-spec/criteria-rows.js.map +1 -0
- package/dist-server/service/test-spec/index.d.ts +6 -0
- package/dist-server/service/test-spec/index.js +11 -0
- package/dist-server/service/test-spec/index.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-effective-list.d.ts +34 -0
- package/dist-server/service/test-spec/test-spec-effective-list.js +42 -0
- package/dist-server/service/test-spec/test-spec-effective-list.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-master-resolver.d.ts +44 -0
- package/dist-server/service/test-spec/test-spec-master-resolver.js +144 -0
- package/dist-server/service/test-spec/test-spec-master-resolver.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-master.d.ts +6 -0
- package/dist-server/service/test-spec/test-spec-master.js +18 -0
- package/dist-server/service/test-spec/test-spec-master.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-query.d.ts +15 -0
- package/dist-server/service/test-spec/test-spec-query.js +61 -0
- package/dist-server/service/test-spec/test-spec-query.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-revision-resolver.d.ts +59 -0
- package/dist-server/service/test-spec/test-spec-revision-resolver.js +96 -0
- package/dist-server/service/test-spec/test-spec-revision-resolver.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-revision-service.d.ts +178 -0
- package/dist-server/service/test-spec/test-spec-revision-service.js +685 -0
- package/dist-server/service/test-spec/test-spec-revision-service.js.map +1 -0
- package/dist-server/service/test-spec/test-spec-revision.d.ts +86 -0
- package/dist-server/service/test-spec/test-spec-revision.js +334 -0
- package/dist-server/service/test-spec/test-spec-revision.js.map +1 -0
- package/dist-server/service/test-spec/test-specification.d.ts +47 -0
- package/dist-server/service/test-spec/test-specification.js +119 -0
- package/dist-server/service/test-spec/test-specification.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RECIPE_REVISION_ENTITIES = exports.RecipeBasis = exports.RecipeSegment = exports.RecipePlan = exports.RecipeRevision = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const shell_1 = require("@things-factory/shell");
|
|
7
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
+
const master_change_policy_1 = require("../master-change-policy");
|
|
9
|
+
const recipe_revision_line_1 = require("./recipe-revision-line");
|
|
10
|
+
const typeorm_2 = require("typeorm");
|
|
11
|
+
// Relations own the columns and RelationId exposes read-only identifiers.
|
|
12
|
+
// Where a composite FK is declared, disable only the redundant single-column FK;
|
|
13
|
+
// the database still enforces existence, domain and recipe together.
|
|
14
|
+
/** Content and the proposed effective date freeze together. Worklist owns the decision. */
|
|
15
|
+
let RecipeRevision = class RecipeRevision {
|
|
16
|
+
};
|
|
17
|
+
exports.RecipeRevision = RecipeRevision;
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, typeorm_1.Column)('int'),
|
|
20
|
+
tslib_1.__metadata("design:type", Number)
|
|
21
|
+
], RecipeRevision.prototype, "revisionNumber", void 0);
|
|
22
|
+
tslib_1.__decorate([
|
|
23
|
+
(0, typeorm_1.ManyToOne)(() => master_change_policy_1.MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false }),
|
|
24
|
+
tslib_1.__metadata("design:type", master_change_policy_1.MasterChangePolicy)
|
|
25
|
+
], RecipeRevision.prototype, "policy", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, typeorm_1.RelationId)((row) => row.policy),
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
29
|
+
], RecipeRevision.prototype, "policyId", void 0);
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
32
|
+
tslib_1.__metadata("design:type", String)
|
|
33
|
+
], RecipeRevision.prototype, "id", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
|
|
36
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
37
|
+
], RecipeRevision.prototype, "domain", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, typeorm_1.RelationId)((row) => row.domain),
|
|
40
|
+
tslib_1.__metadata("design:type", String)
|
|
41
|
+
], RecipeRevision.prototype, "domainId", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.ManyToOne)('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false }),
|
|
44
|
+
tslib_1.__metadata("design:type", Function)
|
|
45
|
+
], RecipeRevision.prototype, "recipe", void 0);
|
|
46
|
+
tslib_1.__decorate([
|
|
47
|
+
(0, typeorm_1.RelationId)((row) => row.recipe),
|
|
48
|
+
tslib_1.__metadata("design:type", String)
|
|
49
|
+
], RecipeRevision.prototype, "recipeId", void 0);
|
|
50
|
+
tslib_1.__decorate([
|
|
51
|
+
(0, typeorm_1.ManyToOne)(() => RecipeRevision, { nullable: true, createForeignKeyConstraints: false }),
|
|
52
|
+
tslib_1.__metadata("design:type", RecipeRevision)
|
|
53
|
+
], RecipeRevision.prototype, "baseRevision", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, typeorm_1.RelationId)((row) => row.baseRevision),
|
|
56
|
+
tslib_1.__metadata("design:type", String)
|
|
57
|
+
], RecipeRevision.prototype, "baseRevisionId", void 0);
|
|
58
|
+
tslib_1.__decorate([
|
|
59
|
+
(0, typeorm_1.Column)('int'),
|
|
60
|
+
tslib_1.__metadata("design:type", Number)
|
|
61
|
+
], RecipeRevision.prototype, "baseGeneration", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, typeorm_1.Column)('int', { default: 0 }),
|
|
64
|
+
tslib_1.__metadata("design:type", Number)
|
|
65
|
+
], RecipeRevision.prototype, "editGeneration", void 0);
|
|
66
|
+
tslib_1.__decorate([
|
|
67
|
+
(0, typeorm_1.Column)('text', { nullable: true }),
|
|
68
|
+
tslib_1.__metadata("design:type", String)
|
|
69
|
+
], RecipeRevision.prototype, "description", void 0);
|
|
70
|
+
tslib_1.__decorate([
|
|
71
|
+
(0, typeorm_1.Column)('varchar'),
|
|
72
|
+
tslib_1.__metadata("design:type", String)
|
|
73
|
+
], RecipeRevision.prototype, "materialDefinitionName", void 0);
|
|
74
|
+
tslib_1.__decorate([
|
|
75
|
+
(0, typeorm_1.ManyToOne)('MaterialDefinition', { nullable: false, createForeignKeyConstraints: false }),
|
|
76
|
+
tslib_1.__metadata("design:type", Function)
|
|
77
|
+
], RecipeRevision.prototype, "primaryMaterial", void 0);
|
|
78
|
+
tslib_1.__decorate([
|
|
79
|
+
(0, typeorm_1.RelationId)((row) => row.primaryMaterial),
|
|
80
|
+
tslib_1.__metadata("design:type", String)
|
|
81
|
+
], RecipeRevision.prototype, "primaryMaterialId", void 0);
|
|
82
|
+
tslib_1.__decorate([
|
|
83
|
+
(0, typeorm_1.ManyToOne)('RouteDefinition', { nullable: true, createForeignKeyConstraints: false }),
|
|
84
|
+
tslib_1.__metadata("design:type", Function)
|
|
85
|
+
], RecipeRevision.prototype, "routeDefinition", void 0);
|
|
86
|
+
tslib_1.__decorate([
|
|
87
|
+
(0, typeorm_1.RelationId)((row) => row.routeDefinition),
|
|
88
|
+
tslib_1.__metadata("design:type", String)
|
|
89
|
+
], RecipeRevision.prototype, "routeDefinitionId", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, typeorm_1.Column)('varchar', { nullable: true }),
|
|
92
|
+
tslib_1.__metadata("design:type", String)
|
|
93
|
+
], RecipeRevision.prototype, "route", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, typeorm_2.OneToMany)(() => recipe_revision_line_1.RecipeRevisionInput, line => line.revision),
|
|
96
|
+
tslib_1.__metadata("design:type", Array)
|
|
97
|
+
], RecipeRevision.prototype, "inputs", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, typeorm_2.OneToMany)(() => recipe_revision_line_1.RecipeRevisionOutput, line => line.revision),
|
|
100
|
+
tslib_1.__metadata("design:type", Array)
|
|
101
|
+
], RecipeRevision.prototype, "outputs", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
104
|
+
tslib_1.__metadata("design:type", Date)
|
|
105
|
+
], RecipeRevision.prototype, "effectiveFrom", void 0);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, typeorm_1.Column)('text'),
|
|
108
|
+
tslib_1.__metadata("design:type", String)
|
|
109
|
+
], RecipeRevision.prototype, "reason", void 0);
|
|
110
|
+
tslib_1.__decorate([
|
|
111
|
+
(0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
|
|
112
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
113
|
+
], RecipeRevision.prototype, "creator", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, typeorm_1.RelationId)((row) => row.creator),
|
|
116
|
+
tslib_1.__metadata("design:type", String)
|
|
117
|
+
], RecipeRevision.prototype, "creatorId", void 0);
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
120
|
+
tslib_1.__metadata("design:type", Date)
|
|
121
|
+
], RecipeRevision.prototype, "createdAt", void 0);
|
|
122
|
+
tslib_1.__decorate([
|
|
123
|
+
(0, typeorm_1.Column)({ type: Date, nullable: true }),
|
|
124
|
+
tslib_1.__metadata("design:type", Date)
|
|
125
|
+
], RecipeRevision.prototype, "frozenAt", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, typeorm_1.Column)('varchar', { nullable: true }),
|
|
128
|
+
tslib_1.__metadata("design:type", String)
|
|
129
|
+
], RecipeRevision.prototype, "contentHash", void 0);
|
|
130
|
+
tslib_1.__decorate([
|
|
131
|
+
(0, typeorm_1.Column)('varchar', { nullable: true }),
|
|
132
|
+
tslib_1.__metadata("design:type", String)
|
|
133
|
+
], RecipeRevision.prototype, "activityInstanceId", void 0);
|
|
134
|
+
exports.RecipeRevision = RecipeRevision = tslib_1.__decorate([
|
|
135
|
+
(0, typeorm_1.Entity)('ops_recipe_revision'),
|
|
136
|
+
(0, typeorm_1.Index)('ix_recipe_revision_subject', ['domain', 'recipe', 'id'], { unique: true }),
|
|
137
|
+
(0, typeorm_1.Index)('ix_recipe_revision_list', ['domain', 'recipe', 'createdAt']),
|
|
138
|
+
(0, typeorm_1.ForeignKey)('MaterialDefinition', ['domain', 'primaryMaterial'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
139
|
+
(0, typeorm_1.ForeignKey)('RouteDefinition', ['domain', 'routeDefinition'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
140
|
+
(0, typeorm_1.ForeignKey)(() => master_change_policy_1.MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
141
|
+
(0, typeorm_1.ForeignKey)('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
142
|
+
(0, typeorm_1.ForeignKey)('RecipeRevision', ['domain', 'recipe', 'baseRevision'], ['domain', 'recipe', 'id'], {
|
|
143
|
+
onDelete: 'RESTRICT'
|
|
144
|
+
}),
|
|
145
|
+
(0, typeorm_1.Index)('ix_recipe_revision_number', ['domain', 'recipe', 'revisionNumber'], { unique: true })
|
|
146
|
+
], RecipeRevision);
|
|
147
|
+
/** An append-only generation of the complete schedule for one recipe. */
|
|
148
|
+
let RecipePlan = class RecipePlan {
|
|
149
|
+
};
|
|
150
|
+
exports.RecipePlan = RecipePlan;
|
|
151
|
+
tslib_1.__decorate([
|
|
152
|
+
(0, typeorm_1.ManyToOne)(() => master_change_policy_1.MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false }),
|
|
153
|
+
tslib_1.__metadata("design:type", master_change_policy_1.MasterChangePolicy)
|
|
154
|
+
], RecipePlan.prototype, "policy", void 0);
|
|
155
|
+
tslib_1.__decorate([
|
|
156
|
+
(0, typeorm_1.RelationId)((row) => row.policy),
|
|
157
|
+
tslib_1.__metadata("design:type", String)
|
|
158
|
+
], RecipePlan.prototype, "policyId", void 0);
|
|
159
|
+
tslib_1.__decorate([
|
|
160
|
+
(0, typeorm_1.ManyToOne)(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false }),
|
|
161
|
+
tslib_1.__metadata("design:type", RecipeRevision)
|
|
162
|
+
], RecipePlan.prototype, "publishedRevision", void 0);
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, typeorm_1.RelationId)((row) => row.publishedRevision),
|
|
165
|
+
tslib_1.__metadata("design:type", String)
|
|
166
|
+
], RecipePlan.prototype, "publishedRevisionId", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, typeorm_1.Column)('varchar'),
|
|
169
|
+
tslib_1.__metadata("design:type", String)
|
|
170
|
+
], RecipePlan.prototype, "releaseKind", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
|
|
173
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
174
|
+
], RecipePlan.prototype, "publisher", void 0);
|
|
175
|
+
tslib_1.__decorate([
|
|
176
|
+
(0, typeorm_1.RelationId)((row) => row.publisher),
|
|
177
|
+
tslib_1.__metadata("design:type", String)
|
|
178
|
+
], RecipePlan.prototype, "publisherId", void 0);
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
181
|
+
tslib_1.__metadata("design:type", String)
|
|
182
|
+
], RecipePlan.prototype, "id", void 0);
|
|
183
|
+
tslib_1.__decorate([
|
|
184
|
+
(0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
|
|
185
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
186
|
+
], RecipePlan.prototype, "domain", void 0);
|
|
187
|
+
tslib_1.__decorate([
|
|
188
|
+
(0, typeorm_1.RelationId)((row) => row.domain),
|
|
189
|
+
tslib_1.__metadata("design:type", String)
|
|
190
|
+
], RecipePlan.prototype, "domainId", void 0);
|
|
191
|
+
tslib_1.__decorate([
|
|
192
|
+
(0, typeorm_1.ManyToOne)('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false }),
|
|
193
|
+
tslib_1.__metadata("design:type", Function)
|
|
194
|
+
], RecipePlan.prototype, "recipe", void 0);
|
|
195
|
+
tslib_1.__decorate([
|
|
196
|
+
(0, typeorm_1.RelationId)((row) => row.recipe),
|
|
197
|
+
tslib_1.__metadata("design:type", String)
|
|
198
|
+
], RecipePlan.prototype, "recipeId", void 0);
|
|
199
|
+
tslib_1.__decorate([
|
|
200
|
+
(0, typeorm_1.Column)('int'),
|
|
201
|
+
tslib_1.__metadata("design:type", Number)
|
|
202
|
+
], RecipePlan.prototype, "generation", void 0);
|
|
203
|
+
tslib_1.__decorate([
|
|
204
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
205
|
+
tslib_1.__metadata("design:type", Date)
|
|
206
|
+
], RecipePlan.prototype, "recordedAt", void 0);
|
|
207
|
+
tslib_1.__decorate([
|
|
208
|
+
(0, typeorm_1.Column)('varchar', { nullable: true }),
|
|
209
|
+
tslib_1.__metadata("design:type", String)
|
|
210
|
+
], RecipePlan.prototype, "activityInstanceId", void 0);
|
|
211
|
+
tslib_1.__decorate([
|
|
212
|
+
(0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
|
|
213
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
214
|
+
], RecipePlan.prototype, "approver", void 0);
|
|
215
|
+
tslib_1.__decorate([
|
|
216
|
+
(0, typeorm_1.RelationId)((row) => row.approver),
|
|
217
|
+
tslib_1.__metadata("design:type", String)
|
|
218
|
+
], RecipePlan.prototype, "approverId", void 0);
|
|
219
|
+
tslib_1.__decorate([
|
|
220
|
+
(0, typeorm_1.Column)('varchar'),
|
|
221
|
+
tslib_1.__metadata("design:type", String)
|
|
222
|
+
], RecipePlan.prototype, "submissionHash", void 0);
|
|
223
|
+
exports.RecipePlan = RecipePlan = tslib_1.__decorate([
|
|
224
|
+
(0, typeorm_1.Entity)('ops_recipe_plan'),
|
|
225
|
+
(0, typeorm_1.Index)('ix_recipe_plan_generation', ['domain', 'recipe', 'generation'], { unique: true }),
|
|
226
|
+
(0, typeorm_1.Index)('ix_recipe_plan_identity', ['domain', 'recipe', 'id'], { unique: true }),
|
|
227
|
+
(0, typeorm_1.Index)('ix_recipe_plan_decision', ['activityInstanceId'], { unique: true }),
|
|
228
|
+
(0, typeorm_1.Index)('ix_recipe_plan_publication', ['publishedRevision'], { unique: true }),
|
|
229
|
+
(0, typeorm_1.ForeignKey)(() => master_change_policy_1.MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
230
|
+
(0, typeorm_1.ForeignKey)(() => RecipeRevision, ['domain', 'recipe', 'publishedRevision'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' }),
|
|
231
|
+
(0, typeorm_1.ForeignKey)('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' })
|
|
232
|
+
], RecipePlan);
|
|
233
|
+
let RecipeSegment = class RecipeSegment {
|
|
234
|
+
};
|
|
235
|
+
exports.RecipeSegment = RecipeSegment;
|
|
236
|
+
tslib_1.__decorate([
|
|
237
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
238
|
+
tslib_1.__metadata("design:type", String)
|
|
239
|
+
], RecipeSegment.prototype, "id", void 0);
|
|
240
|
+
tslib_1.__decorate([
|
|
241
|
+
(0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
|
|
242
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
243
|
+
], RecipeSegment.prototype, "domain", void 0);
|
|
244
|
+
tslib_1.__decorate([
|
|
245
|
+
(0, typeorm_1.RelationId)((row) => row.domain),
|
|
246
|
+
tslib_1.__metadata("design:type", String)
|
|
247
|
+
], RecipeSegment.prototype, "domainId", void 0);
|
|
248
|
+
tslib_1.__decorate([
|
|
249
|
+
(0, typeorm_1.ManyToOne)('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false }),
|
|
250
|
+
tslib_1.__metadata("design:type", Function)
|
|
251
|
+
], RecipeSegment.prototype, "recipe", void 0);
|
|
252
|
+
tslib_1.__decorate([
|
|
253
|
+
(0, typeorm_1.RelationId)((row) => row.recipe),
|
|
254
|
+
tslib_1.__metadata("design:type", String)
|
|
255
|
+
], RecipeSegment.prototype, "recipeId", void 0);
|
|
256
|
+
tslib_1.__decorate([
|
|
257
|
+
(0, typeorm_1.ManyToOne)(() => RecipePlan, { nullable: false, createForeignKeyConstraints: false }),
|
|
258
|
+
tslib_1.__metadata("design:type", RecipePlan)
|
|
259
|
+
], RecipeSegment.prototype, "plan", void 0);
|
|
260
|
+
tslib_1.__decorate([
|
|
261
|
+
(0, typeorm_1.RelationId)((row) => row.plan),
|
|
262
|
+
tslib_1.__metadata("design:type", String)
|
|
263
|
+
], RecipeSegment.prototype, "planId", void 0);
|
|
264
|
+
tslib_1.__decorate([
|
|
265
|
+
(0, typeorm_1.ManyToOne)(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false }),
|
|
266
|
+
tslib_1.__metadata("design:type", RecipeRevision)
|
|
267
|
+
], RecipeSegment.prototype, "revision", void 0);
|
|
268
|
+
tslib_1.__decorate([
|
|
269
|
+
(0, typeorm_1.RelationId)((row) => row.revision),
|
|
270
|
+
tslib_1.__metadata("design:type", String)
|
|
271
|
+
], RecipeSegment.prototype, "revisionId", void 0);
|
|
272
|
+
tslib_1.__decorate([
|
|
273
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
274
|
+
tslib_1.__metadata("design:type", Date)
|
|
275
|
+
], RecipeSegment.prototype, "validFrom", void 0);
|
|
276
|
+
tslib_1.__decorate([
|
|
277
|
+
(0, typeorm_1.Column)({ type: Date, nullable: true }),
|
|
278
|
+
tslib_1.__metadata("design:type", Date)
|
|
279
|
+
], RecipeSegment.prototype, "validTo", void 0);
|
|
280
|
+
exports.RecipeSegment = RecipeSegment = tslib_1.__decorate([
|
|
281
|
+
(0, typeorm_1.Entity)('ops_recipe_segment'),
|
|
282
|
+
(0, typeorm_1.Index)('ix_recipe_segment_lookup', ['domain', 'recipe', 'plan', 'validFrom']),
|
|
283
|
+
(0, typeorm_1.ForeignKey)('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
284
|
+
(0, typeorm_1.ForeignKey)(() => RecipePlan, ['domain', 'recipe', 'plan'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' }),
|
|
285
|
+
(0, typeorm_1.ForeignKey)(() => RecipeRevision, ['domain', 'recipe', 'revision'], ['domain', 'recipe', 'id'], {
|
|
286
|
+
onDelete: 'RESTRICT'
|
|
287
|
+
})
|
|
288
|
+
], RecipeSegment);
|
|
289
|
+
/** Permanent evidence of the selected revision, also the retroactivity interlock. */
|
|
290
|
+
let RecipeBasis = class RecipeBasis {
|
|
291
|
+
};
|
|
292
|
+
exports.RecipeBasis = RecipeBasis;
|
|
293
|
+
tslib_1.__decorate([
|
|
294
|
+
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
295
|
+
tslib_1.__metadata("design:type", Object)
|
|
296
|
+
], RecipeBasis.prototype, "routeSnapshot", void 0);
|
|
297
|
+
tslib_1.__decorate([
|
|
298
|
+
(0, typeorm_1.Column)('varchar', { nullable: true }),
|
|
299
|
+
tslib_1.__metadata("design:type", String)
|
|
300
|
+
], RecipeBasis.prototype, "routeHash", void 0);
|
|
301
|
+
tslib_1.__decorate([
|
|
302
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
303
|
+
tslib_1.__metadata("design:type", String)
|
|
304
|
+
], RecipeBasis.prototype, "id", void 0);
|
|
305
|
+
tslib_1.__decorate([
|
|
306
|
+
(0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
|
|
307
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
308
|
+
], RecipeBasis.prototype, "domain", void 0);
|
|
309
|
+
tslib_1.__decorate([
|
|
310
|
+
(0, typeorm_1.RelationId)((row) => row.domain),
|
|
311
|
+
tslib_1.__metadata("design:type", String)
|
|
312
|
+
], RecipeBasis.prototype, "domainId", void 0);
|
|
313
|
+
tslib_1.__decorate([
|
|
314
|
+
(0, typeorm_1.ManyToOne)('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false }),
|
|
315
|
+
tslib_1.__metadata("design:type", Function)
|
|
316
|
+
], RecipeBasis.prototype, "recipe", void 0);
|
|
317
|
+
tslib_1.__decorate([
|
|
318
|
+
(0, typeorm_1.RelationId)((row) => row.recipe),
|
|
319
|
+
tslib_1.__metadata("design:type", String)
|
|
320
|
+
], RecipeBasis.prototype, "recipeId", void 0);
|
|
321
|
+
tslib_1.__decorate([
|
|
322
|
+
(0, typeorm_1.Column)('varchar'),
|
|
323
|
+
tslib_1.__metadata("design:type", String)
|
|
324
|
+
], RecipeBasis.prototype, "recordKey", void 0);
|
|
325
|
+
tslib_1.__decorate([
|
|
326
|
+
(0, typeorm_1.ManyToOne)(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false }),
|
|
327
|
+
tslib_1.__metadata("design:type", RecipeRevision)
|
|
328
|
+
], RecipeBasis.prototype, "revision", void 0);
|
|
329
|
+
tslib_1.__decorate([
|
|
330
|
+
(0, typeorm_1.RelationId)((row) => row.revision),
|
|
331
|
+
tslib_1.__metadata("design:type", String)
|
|
332
|
+
], RecipeBasis.prototype, "revisionId", void 0);
|
|
333
|
+
tslib_1.__decorate([
|
|
334
|
+
(0, typeorm_1.ManyToOne)(() => RecipePlan, { nullable: false, createForeignKeyConstraints: false }),
|
|
335
|
+
tslib_1.__metadata("design:type", RecipePlan)
|
|
336
|
+
], RecipeBasis.prototype, "plan", void 0);
|
|
337
|
+
tslib_1.__decorate([
|
|
338
|
+
(0, typeorm_1.RelationId)((row) => row.plan),
|
|
339
|
+
tslib_1.__metadata("design:type", String)
|
|
340
|
+
], RecipeBasis.prototype, "planId", void 0);
|
|
341
|
+
tslib_1.__decorate([
|
|
342
|
+
(0, typeorm_1.Column)('varchar'),
|
|
343
|
+
tslib_1.__metadata("design:type", String)
|
|
344
|
+
], RecipeBasis.prototype, "contentHash", void 0);
|
|
345
|
+
tslib_1.__decorate([
|
|
346
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
347
|
+
tslib_1.__metadata("design:type", Date)
|
|
348
|
+
], RecipeBasis.prototype, "businessTime", void 0);
|
|
349
|
+
tslib_1.__decorate([
|
|
350
|
+
(0, typeorm_1.Column)({ type: Date }),
|
|
351
|
+
tslib_1.__metadata("design:type", Date)
|
|
352
|
+
], RecipeBasis.prototype, "resolvedAt", void 0);
|
|
353
|
+
exports.RecipeBasis = RecipeBasis = tslib_1.__decorate([
|
|
354
|
+
(0, typeorm_1.Entity)('ops_recipe_basis'),
|
|
355
|
+
(0, typeorm_1.Index)('ix_recipe_basis_domain_id', ['domain', 'id'], { unique: true }),
|
|
356
|
+
(0, typeorm_1.Index)('ix_recipe_basis_identity', ['domain', 'id', 'revision'], { unique: true }),
|
|
357
|
+
(0, typeorm_1.Index)('ix_recipe_basis_record', ['domain', 'recordKey'], { unique: true }),
|
|
358
|
+
(0, typeorm_1.Index)('ix_recipe_basis_time', ['domain', 'recipe', 'businessTime']),
|
|
359
|
+
(0, typeorm_1.ForeignKey)('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
|
|
360
|
+
(0, typeorm_1.ForeignKey)(() => RecipePlan, ['domain', 'recipe', 'plan'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' }),
|
|
361
|
+
(0, typeorm_1.ForeignKey)(() => RecipeRevision, ['domain', 'recipe', 'revision'], ['domain', 'recipe', 'id'], {
|
|
362
|
+
onDelete: 'RESTRICT'
|
|
363
|
+
})
|
|
364
|
+
], RecipeBasis);
|
|
365
|
+
exports.RECIPE_REVISION_ENTITIES = [
|
|
366
|
+
RecipeRevision,
|
|
367
|
+
RecipePlan,
|
|
368
|
+
RecipeSegment,
|
|
369
|
+
RecipeBasis,
|
|
370
|
+
recipe_revision_line_1.RecipeRevisionInput,
|
|
371
|
+
recipe_revision_line_1.RecipeRevisionOutput
|
|
372
|
+
];
|
|
373
|
+
//# sourceMappingURL=recipe-revision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recipe-revision.js","sourceRoot":"","sources":["../../../server/service/recipe/recipe-revision.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,iDAA8C;AAC9C,yDAAgD;AAEhD,kEAA4D;AAC5D,iEAAkF;AAClF,qCAAmC;AAInC,0EAA0E;AAC1E,iFAAiF;AACjF,qEAAqE;AAErE,2FAA2F;AAYpF,IAAM,cAAc,GAApB,MAAM,cAAc;CA6C1B,CAAA;AA7CY,wCAAc;AAEV;IAAd,IAAA,gBAAM,EAAC,KAAK,CAAC;;sDAAuB;AAErC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAkB,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,2BAA2B,EAAE,KAAK,EAAE,CAAC;sCACrF,yCAAkB;8CAAA;AAE1B;IADC,IAAA,oBAAU,EAAC,CAAC,GAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;gDAChC;AACgB;IAA/B,IAAA,gCAAsB,EAAC,MAAM,CAAC;;0CAAW;AAE1C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;sCACrC,cAAM;8CAAA;AAEd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;gDAChC;AAEhB;IADC,IAAA,mBAAS,EAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,2BAA2B,EAAE,KAAK,EAAE,CAAC;;8CAC/D;AAExB;IADC,IAAA,oBAAU,EAAC,CAAC,GAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;gDAChC;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,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjF,IAAA,eAAK,EAAC,wBAAwB,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1E,IAAA,eAAK,EAAC,sBAAsB,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC;IACnE,IAAA,oBAAU,EAAC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChG,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAChH,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC9F,QAAQ,EAAE,UAAU;KACrB,CAAC;GACW,WAAW,CA2BvB;AAEY,QAAA,wBAAwB,GAAG;IACtC,cAAc;IACd,UAAU;IACV,aAAa;IACb,WAAW;IACX,0CAAmB;IACnB,2CAAoB;CACrB,CAAA","sourcesContent":["import { Column, Entity, ForeignKey, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport type { RecipeDefinition } from './recipe-definition'\nimport { MasterChangePolicy } from '../master-change-policy'\nimport { RecipeRevisionInput, RecipeRevisionOutput } from './recipe-revision-line'\nimport { OneToMany } from 'typeorm'\nimport type { MaterialDefinition } from '../material/material-definition'\nimport type { RouteDefinition } from './route-definition'\n\n// Relations own the columns and RelationId exposes read-only identifiers.\n// Where a composite FK is declared, disable only the redundant single-column FK;\n// the database still enforces existence, domain and recipe together.\n\n/** Content and the proposed effective date freeze together. Worklist owns the decision. */\n@Entity('ops_recipe_revision')\n@Index('ix_recipe_revision_subject', ['domain', 'recipe', 'id'], { unique: true })\n@Index('ix_recipe_revision_list', ['domain', 'recipe', 'createdAt'])\n@ForeignKey('MaterialDefinition', ['domain', 'primaryMaterial'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('RouteDefinition', ['domain', 'routeDefinition'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('RecipeRevision', ['domain', 'recipe', 'baseRevision'], ['domain', 'recipe', 'id'], {\n onDelete: 'RESTRICT'\n})\n@Index('ix_recipe_revision_number', ['domain', 'recipe', 'revisionNumber'], { unique: true })\nexport class RecipeRevision {\n /** Human revision number within one identity; assigned once under the subject write lock. */\n @Column('int') revisionNumber: number\n @ManyToOne(() => MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false })\n policy: MasterChangePolicy\n @RelationId((row: RecipeRevision) => row.policy)\n policyId: string\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: RecipeRevision) => row.domain)\n domainId: string\n @ManyToOne('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false })\n recipe: RecipeDefinition\n @RelationId((row: RecipeRevision) => row.recipe)\n recipeId: string\n @ManyToOne(() => RecipeRevision, { nullable: true, createForeignKeyConstraints: false })\n baseRevision: RecipeRevision | null\n @RelationId((row: RecipeRevision) => row.baseRevision)\n baseRevisionId: string | null\n @Column('int') baseGeneration: number\n @Column('int', { default: 0 }) editGeneration: number\n @Column('text', { nullable: true }) description: string | null\n @Column('varchar') materialDefinitionName: string\n @ManyToOne('MaterialDefinition', { nullable: false, createForeignKeyConstraints: false }) primaryMaterial: MaterialDefinition\n @RelationId((row: RecipeRevision) => row.primaryMaterial) primaryMaterialId: string\n @ManyToOne('RouteDefinition', { nullable: true, createForeignKeyConstraints: false }) routeDefinition: RouteDefinition | null\n @RelationId((row: RecipeRevision) => row.routeDefinition) routeDefinitionId: string | null\n @Column('varchar', { nullable: true }) route: string | null\n @OneToMany(() => RecipeRevisionInput, line => line.revision)\n inputs: RecipeRevisionInput[]\n @OneToMany(() => RecipeRevisionOutput, line => line.revision)\n outputs: RecipeRevisionOutput[]\n @Column({ type: Date }) effectiveFrom: Date\n @Column('text') reason: string\n /** Empty only on a baseline: nobody wrote it, it records the row as it already stood. */\n @ManyToOne(() => User, { nullable: true })\n creator: User | null\n @RelationId((row: RecipeRevision) => row.creator)\n creatorId: string | null\n @Column({ type: Date }) createdAt: Date\n @Column({ type: Date, nullable: true }) frozenAt: Date | null\n @Column('varchar', { nullable: true }) contentHash: string | null\n /** Opaque product decision ID: the common master module does not depend on worklist. */\n @Column('varchar', { nullable: true }) activityInstanceId: string | null\n}\n\n/** An append-only generation of the complete schedule for one recipe. */\n@Entity('ops_recipe_plan')\n@Index('ix_recipe_plan_generation', ['domain', 'recipe', 'generation'], { unique: true })\n@Index('ix_recipe_plan_identity', ['domain', 'recipe', 'id'], { unique: true })\n@Index('ix_recipe_plan_decision', ['activityInstanceId'], { unique: true })\n@Index('ix_recipe_plan_publication', ['publishedRevision'], { unique: true })\n@ForeignKey(() => MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => RecipeRevision, ['domain', 'recipe', 'publishedRevision'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' })\nexport class RecipePlan {\n @ManyToOne(() => MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false })\n policy: MasterChangePolicy\n @RelationId((row: RecipePlan) => row.policy)\n policyId: string\n @ManyToOne(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false })\n publishedRevision: RecipeRevision\n @RelationId((row: RecipePlan) => row.publishedRevision)\n publishedRevisionId: string\n /** `baseline`: stood at boot from a row that predates revisions. No approver, no publisher. */\n @Column('varchar') releaseKind: 'approved' | 'policy' | 'baseline'\n @ManyToOne(() => User, { nullable: true }) publisher: User | null\n @RelationId((row: RecipePlan) => row.publisher) publisherId: string | null\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: RecipePlan) => row.domain)\n domainId: string\n @ManyToOne('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false })\n recipe: RecipeDefinition\n @RelationId((row: RecipePlan) => row.recipe)\n recipeId: string\n @Column('int') generation: number\n @Column({ type: Date }) recordedAt: Date\n @Column('varchar', { nullable: true }) activityInstanceId: string | null\n @ManyToOne(() => User, { nullable: true })\n approver: User\n @RelationId((row: RecipePlan) => row.approver)\n approverId: string\n @Column('varchar') submissionHash: string\n}\n\n@Entity('ops_recipe_segment')\n@Index('ix_recipe_segment_lookup', ['domain', 'recipe', 'plan', 'validFrom'])\n@ForeignKey('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => RecipePlan, ['domain', 'recipe', 'plan'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => RecipeRevision, ['domain', 'recipe', 'revision'], ['domain', 'recipe', 'id'], {\n onDelete: 'RESTRICT'\n})\nexport class RecipeSegment {\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: RecipeSegment) => row.domain)\n domainId: string\n @ManyToOne('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false })\n recipe: RecipeDefinition\n @RelationId((row: RecipeSegment) => row.recipe)\n recipeId: string\n @ManyToOne(() => RecipePlan, { nullable: false, createForeignKeyConstraints: false })\n plan: RecipePlan\n @RelationId((row: RecipeSegment) => row.plan)\n planId: string\n @ManyToOne(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false })\n revision: RecipeRevision\n @RelationId((row: RecipeSegment) => row.revision)\n revisionId: string\n @Column({ type: Date }) validFrom: Date\n @Column({ type: Date, nullable: true }) validTo: Date | null\n}\n\n/** Permanent evidence of the selected revision, also the retroactivity interlock. */\n@Entity('ops_recipe_basis')\n@Index('ix_recipe_basis_domain_id', ['domain', 'id'], { unique: true })\n@Index('ix_recipe_basis_identity', ['domain', 'id', 'revision'], { unique: true })\n@Index('ix_recipe_basis_record', ['domain', 'recordKey'], { unique: true })\n@Index('ix_recipe_basis_time', ['domain', 'recipe', 'businessTime'])\n@ForeignKey('RecipeDefinition', ['domain', 'recipe'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => RecipePlan, ['domain', 'recipe', 'plan'], ['domain', 'recipe', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => RecipeRevision, ['domain', 'recipe', 'revision'], ['domain', 'recipe', 'id'], {\n onDelete: 'RESTRICT'\n})\nexport class RecipeBasis {\n /** Execution snapshot of an independently owned route; not a route master revision. */\n @Column('simple-json', { nullable: true }) routeSnapshot: {\n id: string; name: string; steps: string[]; procedure: Record<string, unknown>[] | null\n } | null\n @Column('varchar', { nullable: true }) routeHash: string | null\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: RecipeBasis) => row.domain)\n domainId: string\n @ManyToOne('RecipeDefinition', { nullable: false, createForeignKeyConstraints: false })\n recipe: RecipeDefinition\n @RelationId((row: RecipeBasis) => row.recipe)\n recipeId: string\n @Column('varchar') recordKey: string\n @ManyToOne(() => RecipeRevision, { nullable: false, createForeignKeyConstraints: false })\n revision: RecipeRevision\n @RelationId((row: RecipeBasis) => row.revision)\n revisionId: string\n @ManyToOne(() => RecipePlan, { nullable: false, createForeignKeyConstraints: false })\n plan: RecipePlan\n @RelationId((row: RecipeBasis) => row.plan)\n planId: string\n @Column('varchar') contentHash: string\n @Column({ type: Date }) businessTime: Date\n @Column({ type: Date }) resolvedAt: Date\n}\n\nexport const RECIPE_REVISION_ENTITIES = [\n RecipeRevision,\n RecipePlan,\n RecipeSegment,\n RecipeBasis,\n RecipeRevisionInput,\n RecipeRevisionOutput\n]\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
/**
|
|
4
|
+
* 라우팅 — **공정을 지나는 순서**. 커널 `RouteDef` 와 같은 모양이다.
|
|
5
|
+
*
|
|
6
|
+
* ── 왜 마스터에 있나 (2026-08-31) ────────────────────────────────────────
|
|
7
|
+
* 커널에 `RouteDef` 가 있고 `JobOrder.routeKey` 가 그것을 가리키는데, **그 값이 가리킬 표가 없었다.**
|
|
8
|
+
* 사람이 문자열을 손으로 적는 상태였고, 그래서 MES 가 받은 작업지시에 라우팅을 자동으로 붙일 수 없었다.
|
|
9
|
+
*
|
|
10
|
+
* 트윈 모델 JSON 에 선언하는 길도 있었는데 그러지 않은 이유가 셋이다.
|
|
11
|
+
*
|
|
12
|
+
* · **유효기간을 담을 자리가 없다.** 라우팅은 개정된다. 모델에 두면 「언제부터 이 라우팅였나」가 없고,
|
|
13
|
+
* 그러면 지난 실적이 **어느 라우팅으로 만든 것인지** 잃는다. 정산과 추적이 그 위에 선다.
|
|
14
|
+
* · **MES 가 트윈 없이 배포된다.** 라우팅이 모델에 살면 MES 가 트윈을 세워야 자기 지시서를 만든다.
|
|
15
|
+
* · **표준이 그 자리에 둔다.** `OperationsDefinition` 은 Level 4·3 의 마스터이고 실행 모델이 아니다.
|
|
16
|
+
*
|
|
17
|
+
* ── 순서의 정본은 `steps` 다 ──────────────────────────────────────────────
|
|
18
|
+
* `procedure`(ISA-88 절차 계층)는 그 위에 이름을 붙이는 것이다. 트리를 따로 두면 두 곳이 어긋날 수
|
|
19
|
+
* 있고, 어긋났을 때 어느 쪽이 맞는지 말할 근거가 없다(§`RouteDef.procedure`).
|
|
20
|
+
*/
|
|
21
|
+
export declare class RouteDefinition {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
domain?: Domain;
|
|
24
|
+
domainId?: string;
|
|
25
|
+
/** 라우팅 키 — 레시피와 오더가 이 값을 가리킨다(커널 `RouteDef.key`). */
|
|
26
|
+
name: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
/**
|
|
29
|
+
* 지나는 공정의 **순서** — `OperationDefinition.name` 의 목록(커널 `RouteDef.steps`).
|
|
30
|
+
*
|
|
31
|
+
* 이름으로 가리킨다. 외래키로 묶지 않는 이유는, 공정이 유효기간으로 끝나도 그것을 지나간 지난 기록이
|
|
32
|
+
* 가리킬 것을 잃지 않아야 하기 때문이다 — 마스터의 다른 축도 같은 규율이다.
|
|
33
|
+
*/
|
|
34
|
+
steps: string[];
|
|
35
|
+
/** ISA-88 절차 계층 — 선언하지 않으면 `steps` 만으로 돈다(커널 `RouteDef.procedure`). */
|
|
36
|
+
procedure?: Record<string, unknown>[];
|
|
37
|
+
/** 언제부터 유효한가 — 표준 `EffectiveStartDate`. */
|
|
38
|
+
effectiveStart?: Date;
|
|
39
|
+
/**
|
|
40
|
+
* 언제까지 유효한가 — 표준 `EffectiveEndDate`.
|
|
41
|
+
*
|
|
42
|
+
* **없앨 때 행을 지우지 않고 이 칸을 채운다.** 지우면 그것으로 만든 지난 기록이 가리킬 것을 잃는다.
|
|
43
|
+
*/
|
|
44
|
+
effectiveEnd?: Date;
|
|
45
|
+
createdAt?: Date;
|
|
46
|
+
updatedAt?: Date;
|
|
47
|
+
creator?: User;
|
|
48
|
+
creatorId?: string;
|
|
49
|
+
updater?: User;
|
|
50
|
+
updaterId?: string;
|
|
51
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RouteDefinition = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
9
|
+
/**
|
|
10
|
+
* 라우팅 — **공정을 지나는 순서**. 커널 `RouteDef` 와 같은 모양이다.
|
|
11
|
+
*
|
|
12
|
+
* ── 왜 마스터에 있나 (2026-08-31) ────────────────────────────────────────
|
|
13
|
+
* 커널에 `RouteDef` 가 있고 `JobOrder.routeKey` 가 그것을 가리키는데, **그 값이 가리킬 표가 없었다.**
|
|
14
|
+
* 사람이 문자열을 손으로 적는 상태였고, 그래서 MES 가 받은 작업지시에 라우팅을 자동으로 붙일 수 없었다.
|
|
15
|
+
*
|
|
16
|
+
* 트윈 모델 JSON 에 선언하는 길도 있었는데 그러지 않은 이유가 셋이다.
|
|
17
|
+
*
|
|
18
|
+
* · **유효기간을 담을 자리가 없다.** 라우팅은 개정된다. 모델에 두면 「언제부터 이 라우팅였나」가 없고,
|
|
19
|
+
* 그러면 지난 실적이 **어느 라우팅으로 만든 것인지** 잃는다. 정산과 추적이 그 위에 선다.
|
|
20
|
+
* · **MES 가 트윈 없이 배포된다.** 라우팅이 모델에 살면 MES 가 트윈을 세워야 자기 지시서를 만든다.
|
|
21
|
+
* · **표준이 그 자리에 둔다.** `OperationsDefinition` 은 Level 4·3 의 마스터이고 실행 모델이 아니다.
|
|
22
|
+
*
|
|
23
|
+
* ── 순서의 정본은 `steps` 다 ──────────────────────────────────────────────
|
|
24
|
+
* `procedure`(ISA-88 절차 계층)는 그 위에 이름을 붙이는 것이다. 트리를 따로 두면 두 곳이 어긋날 수
|
|
25
|
+
* 있고, 어긋났을 때 어느 쪽이 맞는지 말할 근거가 없다(§`RouteDef.procedure`).
|
|
26
|
+
*/
|
|
27
|
+
let RouteDefinition = class RouteDefinition {
|
|
28
|
+
};
|
|
29
|
+
exports.RouteDefinition = RouteDefinition;
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
32
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
34
|
+
], RouteDefinition.prototype, "id", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
37
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
38
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
39
|
+
], RouteDefinition.prototype, "domain", void 0);
|
|
40
|
+
tslib_1.__decorate([
|
|
41
|
+
(0, typeorm_1.RelationId)((route) => route.domain),
|
|
42
|
+
tslib_1.__metadata("design:type", String)
|
|
43
|
+
], RouteDefinition.prototype, "domainId", void 0);
|
|
44
|
+
tslib_1.__decorate([
|
|
45
|
+
(0, typeorm_1.Column)(),
|
|
46
|
+
(0, type_graphql_1.Field)(),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], RouteDefinition.prototype, "name", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
51
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
52
|
+
tslib_1.__metadata("design:type", String)
|
|
53
|
+
], RouteDefinition.prototype, "description", void 0);
|
|
54
|
+
tslib_1.__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'simple-json' }),
|
|
56
|
+
(0, type_graphql_1.Field)(type => [String]),
|
|
57
|
+
tslib_1.__metadata("design:type", Array)
|
|
58
|
+
], RouteDefinition.prototype, "steps", void 0);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
61
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true, description: 'ProcedureElementDef[]' }),
|
|
62
|
+
tslib_1.__metadata("design:type", Array)
|
|
63
|
+
], RouteDefinition.prototype, "procedure", void 0);
|
|
64
|
+
tslib_1.__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
66
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
67
|
+
tslib_1.__metadata("design:type", Date
|
|
68
|
+
/**
|
|
69
|
+
* 언제까지 유효한가 — 표준 `EffectiveEndDate`.
|
|
70
|
+
*
|
|
71
|
+
* **없앨 때 행을 지우지 않고 이 칸을 채운다.** 지우면 그것으로 만든 지난 기록이 가리킬 것을 잃는다.
|
|
72
|
+
*/
|
|
73
|
+
)
|
|
74
|
+
], RouteDefinition.prototype, "effectiveStart", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
77
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
78
|
+
tslib_1.__metadata("design:type", Date)
|
|
79
|
+
], RouteDefinition.prototype, "effectiveEnd", void 0);
|
|
80
|
+
tslib_1.__decorate([
|
|
81
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
82
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
83
|
+
tslib_1.__metadata("design:type", Date)
|
|
84
|
+
], RouteDefinition.prototype, "createdAt", void 0);
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
87
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
88
|
+
tslib_1.__metadata("design:type", Date)
|
|
89
|
+
], RouteDefinition.prototype, "updatedAt", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
92
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
93
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
94
|
+
], RouteDefinition.prototype, "creator", void 0);
|
|
95
|
+
tslib_1.__decorate([
|
|
96
|
+
(0, typeorm_1.RelationId)((route) => route.creator),
|
|
97
|
+
tslib_1.__metadata("design:type", String)
|
|
98
|
+
], RouteDefinition.prototype, "creatorId", void 0);
|
|
99
|
+
tslib_1.__decorate([
|
|
100
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
101
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
102
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
103
|
+
], RouteDefinition.prototype, "updater", void 0);
|
|
104
|
+
tslib_1.__decorate([
|
|
105
|
+
(0, typeorm_1.RelationId)((route) => route.updater),
|
|
106
|
+
tslib_1.__metadata("design:type", String)
|
|
107
|
+
], RouteDefinition.prototype, "updaterId", void 0);
|
|
108
|
+
exports.RouteDefinition = RouteDefinition = tslib_1.__decorate([
|
|
109
|
+
(0, typeorm_1.Entity)({ name: 'ops_route_definition' }),
|
|
110
|
+
(0, typeorm_1.Index)('ix_ops_route_domain_identity', ['domain', 'id'], { unique: true }),
|
|
111
|
+
(0, typeorm_1.Index)('ix_ops_route_definition_0', (route) => [route.domain, route.name], { unique: true }),
|
|
112
|
+
(0, type_graphql_1.ObjectType)({ description: 'Route — the ordered operations a material passes through (kernel RouteDef).' })
|
|
113
|
+
], RouteDefinition);
|
|
114
|
+
//# sourceMappingURL=route-definition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-definition.js","sourceRoot":"","sources":["../../../server/service/recipe/route-definition.ts"],"names":[],"mappings":";;;;AAAA,qCAAkI;AAClI,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAEhD;;;;;;;;;;;;;;;;;GAiBG;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;CAuE3B,CAAA;AAvE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AAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC5G,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6EAA6E,EAAE,CAAC;GAC9F,eAAe,CAuE3B","sourcesContent":["import { Column, CreateDateColumn, Entity, Index, ManyToOne, PrimaryGeneratedColumn, RelationId, UpdateDateColumn } from 'typeorm'\nimport { Field, ID, ObjectType } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n/**\n * 라우팅 — **공정을 지나는 순서**. 커널 `RouteDef` 와 같은 모양이다.\n *\n * ── 왜 마스터에 있나 (2026-08-31) ────────────────────────────────────────\n * 커널에 `RouteDef` 가 있고 `JobOrder.routeKey` 가 그것을 가리키는데, **그 값이 가리킬 표가 없었다.**\n * 사람이 문자열을 손으로 적는 상태였고, 그래서 MES 가 받은 작업지시에 라우팅을 자동으로 붙일 수 없었다.\n *\n * 트윈 모델 JSON 에 선언하는 길도 있었는데 그러지 않은 이유가 셋이다.\n *\n * · **유효기간을 담을 자리가 없다.** 라우팅은 개정된다. 모델에 두면 「언제부터 이 라우팅였나」가 없고,\n * 그러면 지난 실적이 **어느 라우팅으로 만든 것인지** 잃는다. 정산과 추적이 그 위에 선다.\n * · **MES 가 트윈 없이 배포된다.** 라우팅이 모델에 살면 MES 가 트윈을 세워야 자기 지시서를 만든다.\n * · **표준이 그 자리에 둔다.** `OperationsDefinition` 은 Level 4·3 의 마스터이고 실행 모델이 아니다.\n *\n * ── 순서의 정본은 `steps` 다 ──────────────────────────────────────────────\n * `procedure`(ISA-88 절차 계층)는 그 위에 이름을 붙이는 것이다. 트리를 따로 두면 두 곳이 어긋날 수\n * 있고, 어긋났을 때 어느 쪽이 맞는지 말할 근거가 없다(§`RouteDef.procedure`).\n */\n@Entity({ name: 'ops_route_definition' })\n@Index('ix_ops_route_domain_identity', ['domain', 'id'], { unique: true })\n@Index('ix_ops_route_definition_0', (route: RouteDefinition) => [route.domain, route.name], { unique: true })\n@ObjectType({ description: 'Route — the ordered operations a material passes through (kernel RouteDef).' })\nexport class RouteDefinition {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((route: RouteDefinition) => route.domain)\n domainId?: string\n\n /** 라우팅 키 — 레시피와 오더가 이 값을 가리킨다(커널 `RouteDef.key`). */\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n /**\n * 지나는 공정의 **순서** — `OperationDefinition.name` 의 목록(커널 `RouteDef.steps`).\n *\n * 이름으로 가리킨다. 외래키로 묶지 않는 이유는, 공정이 유효기간으로 끝나도 그것을 지나간 지난 기록이\n * 가리킬 것을 잃지 않아야 하기 때문이다 — 마스터의 다른 축도 같은 규율이다.\n */\n @Column({ type: 'simple-json' })\n @Field(type => [String])\n steps: string[]\n\n /** ISA-88 절차 계층 — 선언하지 않으면 `steps` 만으로 돈다(커널 `RouteDef.procedure`). */\n @Column({ type: 'simple-json', nullable: true })\n @Field(type => ScalarObject, { nullable: true, description: 'ProcedureElementDef[]' })\n procedure?: Record<string, unknown>[]\n\n /** 언제부터 유효한가 — 표준 `EffectiveStartDate`. */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveStart?: Date\n\n /**\n * 언제까지 유효한가 — 표준 `EffectiveEndDate`.\n *\n * **없앨 때 행을 지우지 않고 이 칸을 채운다.** 지우면 그것으로 만든 지난 기록이 가리킬 것을 잃는다.\n */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveEnd?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((route: RouteDefinition) => route.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((route: RouteDefinition) => route.updater)\n updaterId?: string\n}\n"]}
|