@things-factory/worklist 10.1.4 → 10.1.6

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 (71) hide show
  1. package/dist-client/components/activity-approval-ribon.js +17 -2
  2. package/dist-client/components/activity-approval-ribon.js.map +1 -1
  3. package/dist-client/components/decision-slots.d.ts +89 -0
  4. package/dist-client/components/decision-slots.js +111 -0
  5. package/dist-client/components/decision-slots.js.map +1 -0
  6. package/dist-client/pages/activity-approval/activity-approval-page.d.ts +72 -0
  7. package/dist-client/pages/activity-approval/activity-approval-page.js +425 -43
  8. package/dist-client/pages/activity-approval/activity-approval-page.js.map +1 -1
  9. package/dist-client/pages/activity-catalog/activity-catalog-page.d.ts +24 -0
  10. package/dist-client/pages/activity-catalog/activity-catalog-page.js +101 -6
  11. package/dist-client/pages/activity-catalog/activity-catalog-page.js.map +1 -1
  12. package/dist-client/pages/installable-activity/installable-activity-list-page.d.ts +27 -0
  13. package/dist-client/pages/installable-activity/installable-activity-list-page.js +70 -11
  14. package/dist-client/pages/installable-activity/installable-activity-list-page.js.map +1 -1
  15. package/dist-client/route.d.ts +1 -1
  16. package/dist-client/tsconfig.tsbuildinfo +1 -1
  17. package/dist-server/controllers/activity-approval/approval-line.d.ts +32 -0
  18. package/dist-server/controllers/activity-approval/approval-line.js +35 -0
  19. package/dist-server/controllers/activity-approval/approval-line.js.map +1 -1
  20. package/dist-server/controllers/activity-approval/approve.js +17 -0
  21. package/dist-server/controllers/activity-approval/approve.js.map +1 -1
  22. package/dist-server/controllers/activity-approval/reject.js +21 -1
  23. package/dist-server/controllers/activity-approval/reject.js.map +1 -1
  24. package/dist-server/controllers/activity-installation/activity-installation-controller.js +5 -9
  25. package/dist-server/controllers/activity-installation/activity-installation-controller.js.map +1 -1
  26. package/dist-server/controllers/activity-installation/installable-to-activity.d.ts +49 -0
  27. package/dist-server/controllers/activity-installation/installable-to-activity.js +40 -0
  28. package/dist-server/controllers/activity-installation/installable-to-activity.js.map +1 -0
  29. package/dist-server/controllers/activity-installation/registry-conflict.d.ts +32 -0
  30. package/dist-server/controllers/activity-installation/registry-conflict.js +21 -0
  31. package/dist-server/controllers/activity-installation/registry-conflict.js.map +1 -0
  32. package/dist-server/service/activity/activity-decision-key-item-type.d.ts +160 -0
  33. package/dist-server/service/activity/activity-decision-key-item-type.js +176 -0
  34. package/dist-server/service/activity/activity-decision-key-item-type.js.map +1 -0
  35. package/dist-server/service/activity/activity-type.d.ts +3 -0
  36. package/dist-server/service/activity/activity-type.js +8 -0
  37. package/dist-server/service/activity/activity-type.js.map +1 -1
  38. package/dist-server/service/activity/activity.d.ts +30 -0
  39. package/dist-server/service/activity/activity.js +14 -0
  40. package/dist-server/service/activity/activity.js.map +1 -1
  41. package/dist-server/service/activity/decision-key-declaration.d.ts +33 -0
  42. package/dist-server/service/activity/decision-key-declaration.js +67 -0
  43. package/dist-server/service/activity/decision-key-declaration.js.map +1 -0
  44. package/dist-server/service/activity/{credential-guard-subscriber.d.ts → declaration-guard-subscriber.d.ts} +6 -1
  45. package/dist-server/service/activity/declaration-guard-subscriber.js +46 -0
  46. package/dist-server/service/activity/declaration-guard-subscriber.js.map +1 -0
  47. package/dist-server/service/activity/index.d.ts +3 -3
  48. package/dist-server/service/activity/index.js +2 -2
  49. package/dist-server/service/activity/index.js.map +1 -1
  50. package/dist-server/service/activity/search-key-declaration.d.ts +38 -0
  51. package/dist-server/service/activity/search-key-declaration.js +49 -0
  52. package/dist-server/service/activity/search-key-declaration.js.map +1 -0
  53. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
  54. package/dist-server/service/activity-instance/index.d.ts +1 -1
  55. package/dist-server/service/activity-template/index.d.ts +1 -1
  56. package/dist-server/service/activity-thread/index.d.ts +1 -1
  57. package/dist-server/service/index.d.ts +3 -3
  58. package/dist-server/service/installable-activity/installable-activity-mutation.js +24 -0
  59. package/dist-server/service/installable-activity/installable-activity-mutation.js.map +1 -1
  60. package/dist-server/service/installable-activity/installable-activity.d.ts +9 -0
  61. package/dist-server/service/installable-activity/installable-activity.js +5 -0
  62. package/dist-server/service/installable-activity/installable-activity.js.map +1 -1
  63. package/dist-server/tsconfig.tsbuildinfo +1 -1
  64. package/package.json +9 -9
  65. package/translations/en.json +28 -6
  66. package/translations/ja.json +22 -0
  67. package/translations/ko.json +28 -6
  68. package/translations/ms.json +22 -0
  69. package/translations/zh.json +22 -0
  70. package/dist-server/service/activity/credential-guard-subscriber.js +0 -35
  71. package/dist-server/service/activity/credential-guard-subscriber.js.map +0 -1
@@ -0,0 +1,160 @@
1
+ /**
2
+ * The part an input value plays on the approval screen.
3
+ *
4
+ * ── The shape of the set: three tenses, and five others ───────────────────
5
+ * Three of the eight say something about the subject at a point in time, and the other five do not:
6
+ *
7
+ * past evidence what the decision was made from (may repeat)
8
+ * present currentState how things stand right now
9
+ * future consequence what approving would change (may repeat)
10
+ *
11
+ * subject what this is about
12
+ * reason what a person wrote
13
+ * policy why it came up for approval at all
14
+ * headline one sentence built from the values
15
+ * reversibility whether approving can be undone
16
+ *
17
+ * Every mis-slotting found so far was the same mistake in that column: currentState under
18
+ * consequence read the present as the future, and evidence under currentState read the past as the
19
+ * present. So when a ninth role is asked for, the first question is whether the value is the
20
+ * subject's past, present or future — if it is, one of those three already holds it. If it is not,
21
+ * whoever asks should be able to say what it is instead. (2026-09-10, architect's ruling)
22
+ *
23
+ * ── Why the keys and the values are spelled the same ──────────────────────
24
+ * type-graphql publishes an enum by its **keys** when the field names the enum type, and by its
25
+ * **values** when the field leaves the type off. One word in a @Field decorator therefore decides
26
+ * what a client receives, and a schema-improving edit far away can flip it. That has already cost
27
+ * this repository twice: ApprovalLineItem.participation arrives as `Reference` and was compared
28
+ * against `reference`, false every time; the catalog page read `NotWorklist` where its selector,
29
+ * i18n key and stage list all said `notworklist`.
30
+ *
31
+ * Writing each key as its own value takes the choice away — either spelling produces the same
32
+ * string. ActivityModelItemInoutType and ActivityModelItemType are written the same way.
33
+ *
34
+ * ── The set is closed, and widening it is the architect's call ────────────
35
+ * Left open as a free string, a convention becomes suffix-appending: every lane invents its own
36
+ * word for the same slot and the screen ends up switching on a dozen spellings, printing the
37
+ * unmatched ones. Adding a role here is an architecture decision, not a lane's. (2026-09-09,
38
+ * architect's ruling)
39
+ */
40
+ export declare enum ActivityDecisionRole {
41
+ /** One sentence built from the values: 「폐기 30 EA」, 「3에서 1로 올림」. */
42
+ headline = "headline",
43
+ /** What the decision is about — one identifier. */
44
+ subject = "subject",
45
+ /** What the person who raised it wrote. Absent, the screen says so rather than leaving a gap. */
46
+ reason = "reason",
47
+ /**
48
+ * What changes on approval: 「주문 넷이 뒤로 밀린다」. The only role that may appear more than once.
49
+ *
50
+ * Named consequence rather than effect because TwinCommand.effect already means the opposite in
51
+ * time: { status, at, seen }, what the source reported back after the command was dispatched.
52
+ * That one is an observation and past; this one is a prediction and future. Using a real term for
53
+ * the wrong meaning is worse than coining one, and plant already writes .consequence for exactly
54
+ * this sense in its stop-reason dialog. (2026-09-10, architect's ruling)
55
+ */
56
+ consequence = "consequence",
57
+ /** Why this came up for approval at all: 「폐기는 100 이상이면 결재」. */
58
+ policy = "policy",
59
+ /**
60
+ * What is measured to be true right now — about the world, not about the request.
61
+ *
62
+ * The other roles all describe what is being asked for. This one does not, and putting it under
63
+ * consequence made the screen say the opposite of the truth: the twin's current readings would
64
+ * have read as things the approval causes.
65
+ *
66
+ * Not named observed: ops-contract already has observedBy for which observation backs a declared
67
+ * property, and TwinCommand.effect is an observation too, so observed would sit in the most
68
+ * confusable spot between them. (2026-09-10, architect's ruling) plant never needed it because the subject's present state
69
+ * went into the headline (「폐기 30 EA」); the twin's instruction and its current state are two
70
+ * separate things, and holding them side by side is what this screen is for.
71
+ */
72
+ currentState = "currentState",
73
+ /**
74
+ * Whether approving can be undone. Drawn in the frame rather than in the body.
75
+ *
76
+ * Not a separate role for want of a place — it fits consequence well enough — but for want of
77
+ * weight. Listed among the consequences it reads with the same force as "four orders get pushed
78
+ * back", and on
79
+ * the twin actuation, where approving moves equipment, it is the heaviest line on the screen.
80
+ *
81
+ * ── Not the same as rejectionIsFinal ──────────────────────────────────
82
+ * Two "cannot be undone" facts attach to opposite actions, and the twin actuation carries both,
83
+ * which is what makes them look like one:
84
+ *
85
+ * reversibility whether **approving** can be undone (this role, read from the input)
86
+ * rejectionIsFinal whether **rejecting** ends the case (a column on Activity)
87
+ *
88
+ * Merging them in a screen sentence tells the reader that rejection can be taken back.
89
+ */
90
+ reversibility = "reversibility",
91
+ /**
92
+ * What the decision was made from — which inspection, against which spec, decided when.
93
+ *
94
+ * Neither consequence nor currentState: consequence is the opposite direction in time, and under
95
+ * currentState a past finding reads as the present state of the subject. plant's disposition
96
+ * approval kept its own screen for exactly these three values, and it survived the comparison not
97
+ * because a slot could not hold them but because no slot existed — those are different reasons,
98
+ * and only the second one means the set is short.
99
+ *
100
+ * plant's case for it: someone approving a concession in a regulated plant who cannot see which
101
+ * inspection produced the finding is approving without grounds.
102
+ *
103
+ * Repeats, because grounds come in several — there were three.
104
+ */
105
+ evidence = "evidence"
106
+ }
107
+ /**
108
+ * One value the approver reads, and the part it plays.
109
+ *
110
+ * ── Why this points at input rather than at a model item ──────────────────
111
+ * inputPath names a value inside the instance's input and does not go through the activity's model.
112
+ * That is the whole reason it is a separate array: the values an approver most needs are computed by
113
+ * the registering module and put on the input, not declared as model items — plant's `policy` and
114
+ * its `shift.passes` / `shift.passedBy` are exactly that. A role hung on a model item could not
115
+ * reach them.
116
+ *
117
+ * ── inputPath, not inputKey ───────────────────────────────────────────────
118
+ * ActivitySearchKeyItem.inputKey names one top-level key, because its value goes into a searchable
119
+ * column and a path into a list is not something that can be indexed. This field takes a path,
120
+ * because it points at a value to draw. The two do different work, so they carry different names —
121
+ * one word with two meanings would make the wrong one silent, and a name that does not exist is
122
+ * read as a mistake instead. (2026-09-09, architect's ruling)
123
+ *
124
+ * 'policy' → input.policy
125
+ * 'shift.passes' → input.shift.passes
126
+ *
127
+ * Dots only. No array index — drawing a list is the slot's job, not the path's — and no wildcard. A
128
+ * path that leads nowhere resolves to undefined and is not folded into an empty value: a `reason`
129
+ * that is missing and a `reason` someone left blank are different facts, and the screen draws them
130
+ * differently.
131
+ *
132
+ * The two declarations also address different readers. model declares the boxes a performer fills;
133
+ * this declares what an approver reads. Putting both on one item leaves "is this an input or
134
+ * something to judge by" unanswerable.
135
+ *
136
+ * Order matters. plant wrote four of these screens by hand and all four laid the slots out in the
137
+ * same order, which makes the order the screen's hierarchy rather than a preference — so this is an
138
+ * ordered array and not an object keyed by role.
139
+ */
140
+ export declare class ActivityDecisionKeyItem {
141
+ role: ActivityDecisionRole;
142
+ inputPath: string;
143
+ name?: string;
144
+ tKey?: string;
145
+ /**
146
+ * Unit to print after the value, when the activity fixes the unit.
147
+ *
148
+ * Declared once, so it holds for every instance of the activity — 「30 건」 works, and a unit that
149
+ * varies per record does not: plant's disposition carries the unit alongside the quantity, so the
150
+ * same activity produces 「3 EA」 and 「12.5 KG」. Writing one of them here would attach the wrong
151
+ * unit to the other records, with nothing to catch it.
152
+ *
153
+ * A unit that varies belongs in the headline sentence the module builds, which is what plant did:
154
+ * 「LOT-A 3 EA 를 폐기합니다」. Leave this empty then.
155
+ *
156
+ * Delete this field if no activity ever turns out to fix a unit. A field nobody writes stays
157
+ * forever and the next person reads a meaning into it. (2026-09-10, architect's ruling)
158
+ */
159
+ unit?: string;
160
+ }
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActivityDecisionKeyItem = exports.ActivityDecisionRole = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const type_graphql_1 = require("type-graphql");
6
+ /**
7
+ * The part an input value plays on the approval screen.
8
+ *
9
+ * ── The shape of the set: three tenses, and five others ───────────────────
10
+ * Three of the eight say something about the subject at a point in time, and the other five do not:
11
+ *
12
+ * past evidence what the decision was made from (may repeat)
13
+ * present currentState how things stand right now
14
+ * future consequence what approving would change (may repeat)
15
+ *
16
+ * subject what this is about
17
+ * reason what a person wrote
18
+ * policy why it came up for approval at all
19
+ * headline one sentence built from the values
20
+ * reversibility whether approving can be undone
21
+ *
22
+ * Every mis-slotting found so far was the same mistake in that column: currentState under
23
+ * consequence read the present as the future, and evidence under currentState read the past as the
24
+ * present. So when a ninth role is asked for, the first question is whether the value is the
25
+ * subject's past, present or future — if it is, one of those three already holds it. If it is not,
26
+ * whoever asks should be able to say what it is instead. (2026-09-10, architect's ruling)
27
+ *
28
+ * ── Why the keys and the values are spelled the same ──────────────────────
29
+ * type-graphql publishes an enum by its **keys** when the field names the enum type, and by its
30
+ * **values** when the field leaves the type off. One word in a @Field decorator therefore decides
31
+ * what a client receives, and a schema-improving edit far away can flip it. That has already cost
32
+ * this repository twice: ApprovalLineItem.participation arrives as `Reference` and was compared
33
+ * against `reference`, false every time; the catalog page read `NotWorklist` where its selector,
34
+ * i18n key and stage list all said `notworklist`.
35
+ *
36
+ * Writing each key as its own value takes the choice away — either spelling produces the same
37
+ * string. ActivityModelItemInoutType and ActivityModelItemType are written the same way.
38
+ *
39
+ * ── The set is closed, and widening it is the architect's call ────────────
40
+ * Left open as a free string, a convention becomes suffix-appending: every lane invents its own
41
+ * word for the same slot and the screen ends up switching on a dozen spellings, printing the
42
+ * unmatched ones. Adding a role here is an architecture decision, not a lane's. (2026-09-09,
43
+ * architect's ruling)
44
+ */
45
+ var ActivityDecisionRole;
46
+ (function (ActivityDecisionRole) {
47
+ /** One sentence built from the values: 「폐기 30 EA」, 「3에서 1로 올림」. */
48
+ ActivityDecisionRole["headline"] = "headline";
49
+ /** What the decision is about — one identifier. */
50
+ ActivityDecisionRole["subject"] = "subject";
51
+ /** What the person who raised it wrote. Absent, the screen says so rather than leaving a gap. */
52
+ ActivityDecisionRole["reason"] = "reason";
53
+ /**
54
+ * What changes on approval: 「주문 넷이 뒤로 밀린다」. The only role that may appear more than once.
55
+ *
56
+ * Named consequence rather than effect because TwinCommand.effect already means the opposite in
57
+ * time: { status, at, seen }, what the source reported back after the command was dispatched.
58
+ * That one is an observation and past; this one is a prediction and future. Using a real term for
59
+ * the wrong meaning is worse than coining one, and plant already writes .consequence for exactly
60
+ * this sense in its stop-reason dialog. (2026-09-10, architect's ruling)
61
+ */
62
+ ActivityDecisionRole["consequence"] = "consequence";
63
+ /** Why this came up for approval at all: 「폐기는 100 이상이면 결재」. */
64
+ ActivityDecisionRole["policy"] = "policy";
65
+ /**
66
+ * What is measured to be true right now — about the world, not about the request.
67
+ *
68
+ * The other roles all describe what is being asked for. This one does not, and putting it under
69
+ * consequence made the screen say the opposite of the truth: the twin's current readings would
70
+ * have read as things the approval causes.
71
+ *
72
+ * Not named observed: ops-contract already has observedBy for which observation backs a declared
73
+ * property, and TwinCommand.effect is an observation too, so observed would sit in the most
74
+ * confusable spot between them. (2026-09-10, architect's ruling) plant never needed it because the subject's present state
75
+ * went into the headline (「폐기 30 EA」); the twin's instruction and its current state are two
76
+ * separate things, and holding them side by side is what this screen is for.
77
+ */
78
+ ActivityDecisionRole["currentState"] = "currentState";
79
+ /**
80
+ * Whether approving can be undone. Drawn in the frame rather than in the body.
81
+ *
82
+ * Not a separate role for want of a place — it fits consequence well enough — but for want of
83
+ * weight. Listed among the consequences it reads with the same force as "four orders get pushed
84
+ * back", and on
85
+ * the twin actuation, where approving moves equipment, it is the heaviest line on the screen.
86
+ *
87
+ * ── Not the same as rejectionIsFinal ──────────────────────────────────
88
+ * Two "cannot be undone" facts attach to opposite actions, and the twin actuation carries both,
89
+ * which is what makes them look like one:
90
+ *
91
+ * reversibility whether **approving** can be undone (this role, read from the input)
92
+ * rejectionIsFinal whether **rejecting** ends the case (a column on Activity)
93
+ *
94
+ * Merging them in a screen sentence tells the reader that rejection can be taken back.
95
+ */
96
+ ActivityDecisionRole["reversibility"] = "reversibility";
97
+ /**
98
+ * What the decision was made from — which inspection, against which spec, decided when.
99
+ *
100
+ * Neither consequence nor currentState: consequence is the opposite direction in time, and under
101
+ * currentState a past finding reads as the present state of the subject. plant's disposition
102
+ * approval kept its own screen for exactly these three values, and it survived the comparison not
103
+ * because a slot could not hold them but because no slot existed — those are different reasons,
104
+ * and only the second one means the set is short.
105
+ *
106
+ * plant's case for it: someone approving a concession in a regulated plant who cannot see which
107
+ * inspection produced the finding is approving without grounds.
108
+ *
109
+ * Repeats, because grounds come in several — there were three.
110
+ */
111
+ ActivityDecisionRole["evidence"] = "evidence";
112
+ })(ActivityDecisionRole || (exports.ActivityDecisionRole = ActivityDecisionRole = {}));
113
+ (0, type_graphql_1.registerEnumType)(ActivityDecisionRole, {
114
+ name: 'ActivityDecisionRole',
115
+ description: 'the part an input value plays on the approval screen'
116
+ });
117
+ /**
118
+ * One value the approver reads, and the part it plays.
119
+ *
120
+ * ── Why this points at input rather than at a model item ──────────────────
121
+ * inputPath names a value inside the instance's input and does not go through the activity's model.
122
+ * That is the whole reason it is a separate array: the values an approver most needs are computed by
123
+ * the registering module and put on the input, not declared as model items — plant's `policy` and
124
+ * its `shift.passes` / `shift.passedBy` are exactly that. A role hung on a model item could not
125
+ * reach them.
126
+ *
127
+ * ── inputPath, not inputKey ───────────────────────────────────────────────
128
+ * ActivitySearchKeyItem.inputKey names one top-level key, because its value goes into a searchable
129
+ * column and a path into a list is not something that can be indexed. This field takes a path,
130
+ * because it points at a value to draw. The two do different work, so they carry different names —
131
+ * one word with two meanings would make the wrong one silent, and a name that does not exist is
132
+ * read as a mistake instead. (2026-09-09, architect's ruling)
133
+ *
134
+ * 'policy' → input.policy
135
+ * 'shift.passes' → input.shift.passes
136
+ *
137
+ * Dots only. No array index — drawing a list is the slot's job, not the path's — and no wildcard. A
138
+ * path that leads nowhere resolves to undefined and is not folded into an empty value: a `reason`
139
+ * that is missing and a `reason` someone left blank are different facts, and the screen draws them
140
+ * differently.
141
+ *
142
+ * The two declarations also address different readers. model declares the boxes a performer fills;
143
+ * this declares what an approver reads. Putting both on one item leaves "is this an input or
144
+ * something to judge by" unanswerable.
145
+ *
146
+ * Order matters. plant wrote four of these screens by hand and all four laid the slots out in the
147
+ * same order, which makes the order the screen's hierarchy rather than a preference — so this is an
148
+ * ordered array and not an object keyed by role.
149
+ */
150
+ let ActivityDecisionKeyItem = class ActivityDecisionKeyItem {
151
+ };
152
+ exports.ActivityDecisionKeyItem = ActivityDecisionKeyItem;
153
+ tslib_1.__decorate([
154
+ (0, type_graphql_1.Field)(type => ActivityDecisionRole),
155
+ tslib_1.__metadata("design:type", String)
156
+ ], ActivityDecisionKeyItem.prototype, "role", void 0);
157
+ tslib_1.__decorate([
158
+ (0, type_graphql_1.Field)({ description: "Dotted path to the value inside the instance's input, e.g. 'shift.passes'" }),
159
+ tslib_1.__metadata("design:type", String)
160
+ ], ActivityDecisionKeyItem.prototype, "inputPath", void 0);
161
+ tslib_1.__decorate([
162
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Developer-facing note. Never shown on a screen.' }),
163
+ tslib_1.__metadata("design:type", String)
164
+ ], ActivityDecisionKeyItem.prototype, "name", void 0);
165
+ tslib_1.__decorate([
166
+ (0, type_graphql_1.Field)({ nullable: true, description: 'i18n key for the label. Without it the screen shows no label.' }),
167
+ tslib_1.__metadata("design:type", String)
168
+ ], ActivityDecisionKeyItem.prototype, "tKey", void 0);
169
+ tslib_1.__decorate([
170
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Unit to print after the value, when the activity fixes the unit' }),
171
+ tslib_1.__metadata("design:type", String)
172
+ ], ActivityDecisionKeyItem.prototype, "unit", void 0);
173
+ exports.ActivityDecisionKeyItem = ActivityDecisionKeyItem = tslib_1.__decorate([
174
+ (0, type_graphql_1.ObjectType)({ description: 'Entity for ActivityDecisionKeyItem' })
175
+ ], ActivityDecisionKeyItem);
176
+ //# sourceMappingURL=activity-decision-key-item-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-decision-key-item-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-decision-key-item-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAkE;AAElE;;;;;;;;;;;;;;;;;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GACrD,uBAAuB,CA6BnC","sourcesContent":["import { Field, ObjectType, registerEnumType } from 'type-graphql'\n\n/**\n * The part an input value plays on the approval screen.\n *\n * ── The shape of the set: three tenses, and five others ───────────────────\n * Three of the eight say something about the subject at a point in time, and the other five do not:\n *\n * past evidence what the decision was made from (may repeat)\n * present currentState how things stand right now\n * future consequence what approving would change (may repeat)\n *\n * subject what this is about\n * reason what a person wrote\n * policy why it came up for approval at all\n * headline one sentence built from the values\n * reversibility whether approving can be undone\n *\n * Every mis-slotting found so far was the same mistake in that column: currentState under\n * consequence read the present as the future, and evidence under currentState read the past as the\n * present. So when a ninth role is asked for, the first question is whether the value is the\n * subject's past, present or future — if it is, one of those three already holds it. If it is not,\n * whoever asks should be able to say what it is instead. (2026-09-10, architect's ruling)\n *\n * ── Why the keys and the values are spelled the same ──────────────────────\n * type-graphql publishes an enum by its **keys** when the field names the enum type, and by its\n * **values** when the field leaves the type off. One word in a @Field decorator therefore decides\n * what a client receives, and a schema-improving edit far away can flip it. That has already cost\n * this repository twice: ApprovalLineItem.participation arrives as `Reference` and was compared\n * against `reference`, false every time; the catalog page read `NotWorklist` where its selector,\n * i18n key and stage list all said `notworklist`.\n *\n * Writing each key as its own value takes the choice away — either spelling produces the same\n * string. ActivityModelItemInoutType and ActivityModelItemType are written the same way.\n *\n * ── The set is closed, and widening it is the architect's call ────────────\n * Left open as a free string, a convention becomes suffix-appending: every lane invents its own\n * word for the same slot and the screen ends up switching on a dozen spellings, printing the\n * unmatched ones. Adding a role here is an architecture decision, not a lane's. (2026-09-09,\n * architect's ruling)\n */\nexport enum ActivityDecisionRole {\n /** One sentence built from the values: 「폐기 30 EA」, 「3에서 1로 올림」. */\n headline = 'headline',\n /** What the decision is about — one identifier. */\n subject = 'subject',\n /** What the person who raised it wrote. Absent, the screen says so rather than leaving a gap. */\n reason = 'reason',\n /**\n * What changes on approval: 「주문 넷이 뒤로 밀린다」. The only role that may appear more than once.\n *\n * Named consequence rather than effect because TwinCommand.effect already means the opposite in\n * time: { status, at, seen }, what the source reported back after the command was dispatched.\n * That one is an observation and past; this one is a prediction and future. Using a real term for\n * the wrong meaning is worse than coining one, and plant already writes .consequence for exactly\n * this sense in its stop-reason dialog. (2026-09-10, architect's ruling)\n */\n consequence = 'consequence',\n /** Why this came up for approval at all: 「폐기는 100 이상이면 결재」. */\n policy = 'policy',\n /**\n * What is measured to be true right now — about the world, not about the request.\n *\n * The other roles all describe what is being asked for. This one does not, and putting it under\n * consequence made the screen say the opposite of the truth: the twin's current readings would\n * have read as things the approval causes.\n *\n * Not named observed: ops-contract already has observedBy for which observation backs a declared\n * property, and TwinCommand.effect is an observation too, so observed would sit in the most\n * confusable spot between them. (2026-09-10, architect's ruling) plant never needed it because the subject's present state\n * went into the headline (「폐기 30 EA」); the twin's instruction and its current state are two\n * separate things, and holding them side by side is what this screen is for.\n */\n currentState = 'currentState',\n /**\n * Whether approving can be undone. Drawn in the frame rather than in the body.\n *\n * Not a separate role for want of a place — it fits consequence well enough — but for want of\n * weight. Listed among the consequences it reads with the same force as \"four orders get pushed\n * back\", and on\n * the twin actuation, where approving moves equipment, it is the heaviest line on the screen.\n *\n * ── Not the same as rejectionIsFinal ──────────────────────────────────\n * Two \"cannot be undone\" facts attach to opposite actions, and the twin actuation carries both,\n * which is what makes them look like one:\n *\n * reversibility whether **approving** can be undone (this role, read from the input)\n * rejectionIsFinal whether **rejecting** ends the case (a column on Activity)\n *\n * Merging them in a screen sentence tells the reader that rejection can be taken back.\n */\n reversibility = 'reversibility',\n /**\n * What the decision was made from — which inspection, against which spec, decided when.\n *\n * Neither consequence nor currentState: consequence is the opposite direction in time, and under\n * currentState a past finding reads as the present state of the subject. plant's disposition\n * approval kept its own screen for exactly these three values, and it survived the comparison not\n * because a slot could not hold them but because no slot existed — those are different reasons,\n * and only the second one means the set is short.\n *\n * plant's case for it: someone approving a concession in a regulated plant who cannot see which\n * inspection produced the finding is approving without grounds.\n *\n * Repeats, because grounds come in several — there were three.\n */\n evidence = 'evidence'\n}\n\nregisterEnumType(ActivityDecisionRole, {\n name: 'ActivityDecisionRole',\n description: 'the part an input value plays on the approval screen'\n})\n\n/**\n * One value the approver reads, and the part it plays.\n *\n * ── Why this points at input rather than at a model item ──────────────────\n * inputPath names a value inside the instance's input and does not go through the activity's model.\n * That is the whole reason it is a separate array: the values an approver most needs are computed by\n * the registering module and put on the input, not declared as model items — plant's `policy` and\n * its `shift.passes` / `shift.passedBy` are exactly that. A role hung on a model item could not\n * reach them.\n *\n * ── inputPath, not inputKey ───────────────────────────────────────────────\n * ActivitySearchKeyItem.inputKey names one top-level key, because its value goes into a searchable\n * column and a path into a list is not something that can be indexed. This field takes a path,\n * because it points at a value to draw. The two do different work, so they carry different names —\n * one word with two meanings would make the wrong one silent, and a name that does not exist is\n * read as a mistake instead. (2026-09-09, architect's ruling)\n *\n * 'policy' → input.policy\n * 'shift.passes' → input.shift.passes\n *\n * Dots only. No array index — drawing a list is the slot's job, not the path's — and no wildcard. A\n * path that leads nowhere resolves to undefined and is not folded into an empty value: a `reason`\n * that is missing and a `reason` someone left blank are different facts, and the screen draws them\n * differently.\n *\n * The two declarations also address different readers. model declares the boxes a performer fills;\n * this declares what an approver reads. Putting both on one item leaves \"is this an input or\n * something to judge by\" unanswerable.\n *\n * Order matters. plant wrote four of these screens by hand and all four laid the slots out in the\n * same order, which makes the order the screen's hierarchy rather than a preference — so this is an\n * ordered array and not an object keyed by role.\n */\n@ObjectType({ description: 'Entity for ActivityDecisionKeyItem' })\nexport class ActivityDecisionKeyItem {\n @Field(type => ActivityDecisionRole)\n role: ActivityDecisionRole\n\n @Field({ description: \"Dotted path to the value inside the instance's input, e.g. 'shift.passes'\" })\n inputPath: string\n\n @Field({ nullable: true, description: 'Developer-facing note. Never shown on a screen.' })\n name?: string\n\n @Field({ nullable: true, description: 'i18n key for the label. Without it the screen shows no label.' })\n tKey?: string\n\n /**\n * Unit to print after the value, when the activity fixes the unit.\n *\n * Declared once, so it holds for every instance of the activity — 「30 건」 works, and a unit that\n * varies per record does not: plant's disposition carries the unit alongside the quantity, so the\n * same activity produces 「3 EA」 and 「12.5 KG」. Writing one of them here would attach the wrong\n * unit to the other records, with nothing to catch it.\n *\n * A unit that varies belongs in the headline sentence the module builds, which is what plant did:\n * 「LOT-A 3 EA 를 폐기합니다」. Leave this empty then.\n *\n * Delete this field if no activity ever turns out to fix a unit. A field nobody writes stays\n * forever and the next person reads a meaning into it. (2026-09-10, architect's ruling)\n */\n @Field({ nullable: true, description: 'Unit to print after the value, when the activity fixes the unit' })\n unit?: string\n}\n"]}
@@ -4,11 +4,13 @@ import { ApprovalLineItem } from '@things-factory/organization';
4
4
  import { Activity, ActivityStartingType, ActivityStatus, ActivityType, ActivityUIType, AssigneeItem, MultipleInstanceType } from './activity.js';
5
5
  import { ActivityModelItem } from './activity-model-type.js';
6
6
  import { ActivitySearchKeyItem } from './activity-search-key-item-type.js';
7
+ import { ActivityDecisionKeyItem } from './activity-decision-key-item-type.js';
7
8
  export declare class NewActivity {
8
9
  name: string;
9
10
  description?: string;
10
11
  activityType?: ActivityType;
11
12
  searchKeys?: ActivitySearchKeyItem[];
13
+ decisionKeys?: ActivityDecisionKeyItem[];
12
14
  state?: ActivityStatus;
13
15
  model?: ActivityModelItem[];
14
16
  priority?: number;
@@ -45,6 +47,7 @@ export declare class ActivityPatch {
45
47
  description?: string;
46
48
  activityType?: ActivityType;
47
49
  searchKeys?: ActivitySearchKeyItem[];
50
+ decisionKeys?: ActivityDecisionKeyItem[];
48
51
  state?: ActivityStatus;
49
52
  model?: ActivityModelItem[];
50
53
  priority?: number;
@@ -25,6 +25,10 @@ tslib_1.__decorate([
25
25
  (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
26
26
  tslib_1.__metadata("design:type", Array)
27
27
  ], NewActivity.prototype, "searchKeys", void 0);
28
+ tslib_1.__decorate([
29
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
30
+ tslib_1.__metadata("design:type", Array)
31
+ ], NewActivity.prototype, "decisionKeys", void 0);
28
32
  tslib_1.__decorate([
29
33
  (0, type_graphql_1.Field)({ nullable: true }),
30
34
  tslib_1.__metadata("design:type", String)
@@ -143,6 +147,10 @@ tslib_1.__decorate([
143
147
  (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
144
148
  tslib_1.__metadata("design:type", Array)
145
149
  ], ActivityPatch.prototype, "searchKeys", void 0);
150
+ tslib_1.__decorate([
151
+ (0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
152
+ tslib_1.__metadata("design:type", Array)
153
+ ], ActivityPatch.prototype, "decisionKeys", void 0);
146
154
  tslib_1.__decorate([
147
155
  (0, type_graphql_1.Field)({ nullable: true }),
148
156
  tslib_1.__metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"activity-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,iDAA+D;AAG/D,+CAQsB;AAKf,IAAM,WAAW,GAAjB,MAAM,WAAW;CAuFvB,CAAA;AAvFY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACC;AAG3B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACZ;AAGpC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACJ;AAGtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACrB;AAG3B;IADC,IAAA,oBAAK,EAAC,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graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport {\n Activity,\n ActivityStartingType,\n ActivityStatus,\n ActivityType,\n ActivityUIType,\n AssigneeItem,\n MultipleInstanceType\n} from './activity.js'\nimport { ActivityModelItem } from './activity-model-type.js'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type.js'\n\n@InputType()\nexport class NewActivity {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({ nullable: true })\n multiple?: MultipleInstanceType\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n scheduleId?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * 반려하면 끝인가 — 참이면 되살릴 수 없다.\n *\n * 되돌릴 수 없는 판정을 다루는 업무(부적합 처분·트윈 조치)는 반려되는 순간 대상이 닫힌다. 그때 결재를\n * 되살리면 사람은 승인할 것이 있다고 보는데 승인에 효력이 없다.\n */\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class ActivityPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({ nullable: true })\n multiple?: MultipleInstanceType\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n scheduleId?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * 반려하면 끝인가 — 참이면 되살릴 수 없다.\n *\n * 되돌릴 수 없는 판정을 다루는 업무(부적합 처분·트윈 조치)는 반려되는 순간 대상이 닫힌다. 그때 결재를\n * 되살리면 사람은 승인할 것이 있다고 보는데 승인에 효력이 없다.\n */\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ActivityList {\n @Field(type => [Activity])\n items: Activity[]\n\n @Field(type => Int)\n total: number\n}\n"]}
1
+ {"version":3,"file":"activity-type.js","sourceRoot":"","sources":["../../../server/service/activity/activity-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAoE;AAEpE,iDAA+D;AAG/D,+CAQsB;AAMf,IAAM,WAAW,GAAjB,MAAM,WAAW;CA0FvB,CAAA;AA1FY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACC;AAG3B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACZ;AAGpC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACR;AAGxC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACJ;AAGtB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACrB;AAG3B;IADC,IAAA,oBAAK,EAAC,EAA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Y;IADxB,IAAA,yBAAU,GAAE;GACA,YAAY,CAMxB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\nimport { ApprovalLineItem } from '@things-factory/organization'\n\nimport {\n Activity,\n ActivityStartingType,\n ActivityStatus,\n ActivityType,\n ActivityUIType,\n AssigneeItem,\n MultipleInstanceType\n} from './activity.js'\nimport { ActivityModelItem } from './activity-model-type.js'\nimport { ActivitySearchKeyItem } from './activity-search-key-item-type.js'\nimport { ActivityDecisionKeyItem } from './activity-decision-key-item-type.js'\n\n@InputType()\nexport class NewActivity {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n decisionKeys?: ActivityDecisionKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({ nullable: true })\n multiple?: MultipleInstanceType\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n scheduleId?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * 반려하면 끝인가 — 참이면 되살릴 수 없다.\n *\n * 되돌릴 수 없는 판정을 다루는 업무(부적합 처분·트윈 조치)는 반려되는 순간 대상이 닫힌다. 그때 결재를\n * 되살리면 사람은 승인할 것이 있다고 보는데 승인에 효력이 없다.\n */\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n}\n\n@InputType()\nexport class ActivityPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n activityType?: ActivityType\n\n @Field(type => ScalarObject, { nullable: true })\n searchKeys?: ActivitySearchKeyItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n decisionKeys?: ActivityDecisionKeyItem[]\n\n @Field({ nullable: true })\n state?: ActivityStatus\n\n @Field(type => ScalarObject, { nullable: true })\n model?: ActivityModelItem[]\n\n @Field({ nullable: true })\n priority?: number\n\n @Field({ nullable: true })\n startingType?: ActivityStartingType\n\n @Field({ nullable: true })\n multiple?: MultipleInstanceType\n\n @Field({ nullable: true })\n schedule?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n scheduleId?: string\n\n @Field({ nullable: true })\n standardTime?: number\n\n @Field(type => ObjectRef, { nullable: true })\n issuerRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n assigneeRole?: ObjectRef\n\n @Field(type => ObjectRef, { nullable: true })\n supervisoryRole?: ObjectRef\n\n @Field(type => ScalarObject, { nullable: true })\n assignees?: AssigneeItem[]\n\n @Field(type => ScalarObject, { nullable: true })\n approvalLine?: ApprovalLineItem[]\n\n /**\n * 반려하면 끝인가 — 참이면 되살릴 수 없다.\n *\n * 되돌릴 수 없는 판정을 다루는 업무(부적합 처분·트윈 조치)는 반려되는 순간 대상이 닫힌다. 그때 결재를\n * 되살리면 사람은 승인할 것이 있다고 보는데 승인에 효력이 없다.\n */\n @Field({ nullable: true, description: 'true when a rejection closes the case for good — it cannot be restarted' })\n rejectionIsFinal?: boolean\n\n @Field({ nullable: true })\n uiType?: ActivityUIType\n\n @Field({ nullable: true })\n uiSource?: string\n\n @Field({ nullable: true })\n viewType?: ActivityUIType\n\n @Field({ nullable: true })\n viewSource?: string\n\n @Field({ nullable: true })\n reportType?: ActivityUIType\n\n @Field({ nullable: true })\n reportSource?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true })\n cuFlag?: string\n}\n\n@ObjectType()\nexport class ActivityList {\n @Field(type => [Activity])\n items: Activity[]\n\n @Field(type => Int)\n total: number\n}\n"]}
@@ -3,6 +3,7 @@ import { Domain } from '@things-factory/shell';
3
3
  import { OrgMemberTargetType, OrgMemberTarget, ApprovalLineItem } from '@things-factory/organization';
4
4
  import { ActivityModelItem } from './activity-model-type.js';
5
5
  import { ActivitySearchKeyItem } from './activity-search-key-item-type.js';
6
+ import { ActivityDecisionKeyItem } from './activity-decision-key-item-type.js';
6
7
  export declare enum ActivityStatus {
7
8
  Draft = "draft",
8
9
  Released = "released",
@@ -49,10 +50,39 @@ export declare class Activity {
49
50
  domain?: Domain;
50
51
  domainId?: string;
51
52
  name?: string;
53
+ /**
54
+ * The display name a person reads. `name` is the callback key and renaming it breaks callbacks.
55
+ *
56
+ * ── Why this is a column ──────────────────────────────────────────────────
57
+ * It was declared on InstallableActivity only, and installActivity spread the template onto this
58
+ * row, so a field with no column here was dropped and the save reported success. The result was
59
+ * that 「부적합 처분 승인」 reached exactly one screen — the catalog, which reads the template
60
+ * registry directly — while every screen that reads this row showed the instance name and the
61
+ * instance description instead. The activity's own name appeared nowhere on the approval screen.
62
+ */
63
+ label?: string;
52
64
  description?: string;
53
65
  activityType?: ActivityType;
54
66
  state?: ActivityStatus;
55
67
  searchKeys?: ActivitySearchKeyItem[];
68
+ /**
69
+ * What an approver reads, and the part each value plays.
70
+ *
71
+ * The approval screen has one frame for every activity — ribbon, content, timeline, comment — and
72
+ * the content is drawn by whichever of the six ui types the activity names. Five of the six point
73
+ * at something built by hand; the sixth, `generated`, draws the model as a list of name and value
74
+ * pairs. A list of pairs answers "what are the values" and not "what happens if I approve", which
75
+ * is the only question this screen exists for, so every activity that needed the second answer
76
+ * left `generated` and shipped a custom element. plant wrote four of them and all four laid out
77
+ * the same five slots in the same order.
78
+ *
79
+ * Declaring the slots lets `generated` draw a decision. It also reaches the activity with no
80
+ * screen at all: the twin actuation approval, whose ten values arrive as a flat list today and
81
+ * whose approval is the one that actually moves equipment.
82
+ *
83
+ * Empty means nobody has declared it, and `generated` falls back to the model as before.
84
+ */
85
+ decisionKeys?: ActivityDecisionKeyItem[];
56
86
  model?: ActivityModelItem[];
57
87
  priority?: number;
58
88
  startingType?: ActivityStartingType;
@@ -9,6 +9,7 @@ const shell_1 = require("@things-factory/shell");
9
9
  const organization_1 = require("@things-factory/organization");
10
10
  const activity_model_type_js_1 = require("./activity-model-type.js");
11
11
  const activity_search_key_item_type_js_1 = require("./activity-search-key-item-type.js");
12
+ const activity_decision_key_item_type_js_1 = require("./activity-decision-key-item-type.js");
12
13
  var ActivityStatus;
13
14
  (function (ActivityStatus) {
14
15
  ActivityStatus["Draft"] = "draft";
@@ -118,6 +119,11 @@ tslib_1.__decorate([
118
119
  (0, type_graphql_1.Field)({ nullable: true }),
119
120
  tslib_1.__metadata("design:type", String)
120
121
  ], Activity.prototype, "name", void 0);
122
+ tslib_1.__decorate([
123
+ (0, typeorm_1.Column)({ nullable: true }),
124
+ (0, type_graphql_1.Field)({ nullable: true, description: 'Display name for a person. `name` is the callback key.' }),
125
+ tslib_1.__metadata("design:type", String)
126
+ ], Activity.prototype, "label", void 0);
121
127
  tslib_1.__decorate([
122
128
  (0, typeorm_1.Column)({ nullable: true }),
123
129
  (0, type_graphql_1.Field)({ nullable: true }),
@@ -138,6 +144,14 @@ tslib_1.__decorate([
138
144
  (0, type_graphql_1.Field)(type => [activity_search_key_item_type_js_1.ActivitySearchKeyItem], { nullable: true }),
139
145
  tslib_1.__metadata("design:type", Array)
140
146
  ], Activity.prototype, "searchKeys", void 0);
147
+ tslib_1.__decorate([
148
+ (0, typeorm_1.Column)('simple-json', { nullable: true }),
149
+ (0, type_graphql_1.Field)(type => [activity_decision_key_item_type_js_1.ActivityDecisionKeyItem], {
150
+ nullable: true,
151
+ description: 'Which input values an approver judges by, and the part each one plays'
152
+ }),
153
+ tslib_1.__metadata("design:type", Array)
154
+ ], Activity.prototype, "decisionKeys", void 0);
141
155
  tslib_1.__decorate([
142
156
  (0, typeorm_1.Column)('simple-json', { nullable: true }),
143
157
  (0, type_graphql_1.Field)(type => [activity_model_type_js_1.ActivityModelItem], { nullable: true }),