@contractspec/example.workflow-system 0.0.0-canary-20260113170453
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +124 -0
- package/dist/approval/approval.enum.d.ts +14 -0
- package/dist/approval/approval.enum.d.ts.map +1 -0
- package/dist/approval/approval.enum.js +29 -0
- package/dist/approval/approval.enum.js.map +1 -0
- package/dist/approval/approval.event.d.ts +131 -0
- package/dist/approval/approval.event.d.ts.map +1 -0
- package/dist/approval/approval.event.js +220 -0
- package/dist/approval/approval.event.js.map +1 -0
- package/dist/approval/approval.handler.d.ts +23 -0
- package/dist/approval/approval.handler.d.ts.map +1 -0
- package/dist/approval/approval.handler.js +72 -0
- package/dist/approval/approval.handler.js.map +1 -0
- package/dist/approval/approval.operations.d.ts +535 -0
- package/dist/approval/approval.operations.d.ts.map +1 -0
- package/dist/approval/approval.operations.js +345 -0
- package/dist/approval/approval.operations.js.map +1 -0
- package/dist/approval/approval.schema.d.ts +100 -0
- package/dist/approval/approval.schema.d.ts.map +1 -0
- package/dist/approval/approval.schema.js +110 -0
- package/dist/approval/approval.schema.js.map +1 -0
- package/dist/approval/index.d.ts +5 -0
- package/dist/approval/index.js +6 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/docs/workflow-system.docblock.d.ts +1 -0
- package/dist/docs/workflow-system.docblock.js +115 -0
- package/dist/docs/workflow-system.docblock.js.map +1 -0
- package/dist/entities/approval.d.ts +58 -0
- package/dist/entities/approval.d.ts.map +1 -0
- package/dist/entities/approval.js +128 -0
- package/dist/entities/approval.js.map +1 -0
- package/dist/entities/index.d.ts +139 -0
- package/dist/entities/index.d.ts.map +1 -0
- package/dist/entities/index.js +32 -0
- package/dist/entities/index.js.map +1 -0
- package/dist/entities/instance.d.ts +69 -0
- package/dist/entities/instance.d.ts.map +1 -0
- package/dist/entities/instance.js +168 -0
- package/dist/entities/instance.js.map +1 -0
- package/dist/entities/step.d.ts +50 -0
- package/dist/entities/step.d.ts.map +1 -0
- package/dist/entities/step.js +135 -0
- package/dist/entities/step.js.map +1 -0
- package/dist/entities/workflow.d.ts +41 -0
- package/dist/entities/workflow.d.ts.map +1 -0
- package/dist/entities/workflow.js +102 -0
- package/dist/entities/workflow.js.map +1 -0
- package/dist/example.d.ts +7 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +58 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +2 -0
- package/dist/handlers/index.js +3 -0
- package/dist/handlers/workflow.handlers.d.ts +122 -0
- package/dist/handlers/workflow.handlers.d.ts.map +1 -0
- package/dist/handlers/workflow.handlers.js +263 -0
- package/dist/handlers/workflow.handlers.js.map +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +26 -0
- package/dist/instance/index.d.ts +5 -0
- package/dist/instance/index.js +6 -0
- package/dist/instance/instance.enum.d.ts +10 -0
- package/dist/instance/instance.enum.d.ts.map +1 -0
- package/dist/instance/instance.enum.js +20 -0
- package/dist/instance/instance.enum.js.map +1 -0
- package/dist/instance/instance.event.d.ts +356 -0
- package/dist/instance/instance.event.d.ts.map +1 -0
- package/dist/instance/instance.event.js +293 -0
- package/dist/instance/instance.event.js.map +1 -0
- package/dist/instance/instance.handler.d.ts +27 -0
- package/dist/instance/instance.handler.d.ts.map +1 -0
- package/dist/instance/instance.handler.js +94 -0
- package/dist/instance/instance.handler.js.map +1 -0
- package/dist/instance/instance.operations.d.ts +1024 -0
- package/dist/instance/instance.operations.d.ts.map +1 -0
- package/dist/instance/instance.operations.js +464 -0
- package/dist/instance/instance.operations.js.map +1 -0
- package/dist/instance/instance.schema.d.ts +223 -0
- package/dist/instance/instance.schema.d.ts.map +1 -0
- package/dist/instance/instance.schema.js +172 -0
- package/dist/instance/instance.schema.js.map +1 -0
- package/dist/presentations/index.d.ts +63 -0
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +340 -0
- package/dist/presentations/index.js.map +1 -0
- package/dist/seeders/index.d.ts +10 -0
- package/dist/seeders/index.d.ts.map +1 -0
- package/dist/seeders/index.js +19 -0
- package/dist/seeders/index.js.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/shared/mock-data.d.ts +19 -0
- package/dist/shared/mock-data.d.ts.map +1 -0
- package/dist/shared/mock-data.js +12 -0
- package/dist/shared/mock-data.js.map +1 -0
- package/dist/shared/types.d.ts +81 -0
- package/dist/shared/types.d.ts.map +1 -0
- package/dist/shared/types.js +0 -0
- package/dist/state-machine/index.d.ts +148 -0
- package/dist/state-machine/index.d.ts.map +1 -0
- package/dist/state-machine/index.js +158 -0
- package/dist/state-machine/index.js.map +1 -0
- package/dist/tests/operations.test-spec.d.ts +10 -0
- package/dist/tests/operations.test-spec.d.ts.map +1 -0
- package/dist/tests/operations.test-spec.js +123 -0
- package/dist/tests/operations.test-spec.js.map +1 -0
- package/dist/ui/WorkflowDashboard.d.ts +7 -0
- package/dist/ui/WorkflowDashboard.d.ts.map +1 -0
- package/dist/ui/WorkflowDashboard.js +223 -0
- package/dist/ui/WorkflowDashboard.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +2 -0
- package/dist/ui/hooks/index.js +5 -0
- package/dist/ui/hooks/useWorkflowList.d.ts +22 -0
- package/dist/ui/hooks/useWorkflowList.d.ts.map +1 -0
- package/dist/ui/hooks/useWorkflowList.js +55 -0
- package/dist/ui/hooks/useWorkflowList.js.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +6 -0
- package/dist/ui/renderers/index.d.ts +2 -0
- package/dist/ui/renderers/index.js +3 -0
- package/dist/ui/renderers/workflow.markdown.d.ts +28 -0
- package/dist/ui/renderers/workflow.markdown.d.ts.map +1 -0
- package/dist/ui/renderers/workflow.markdown.js +234 -0
- package/dist/ui/renderers/workflow.markdown.js.map +1 -0
- package/dist/workflow/index.d.ts +5 -0
- package/dist/workflow/index.js +6 -0
- package/dist/workflow/workflow.enum.d.ts +22 -0
- package/dist/workflow/workflow.enum.d.ts.map +1 -0
- package/dist/workflow/workflow.enum.js +47 -0
- package/dist/workflow/workflow.enum.js.map +1 -0
- package/dist/workflow/workflow.event.d.ts +135 -0
- package/dist/workflow/workflow.event.d.ts.map +1 -0
- package/dist/workflow/workflow.event.js +150 -0
- package/dist/workflow/workflow.event.js.map +1 -0
- package/dist/workflow/workflow.handler.d.ts +29 -0
- package/dist/workflow/workflow.handler.d.ts.map +1 -0
- package/dist/workflow/workflow.handler.js +66 -0
- package/dist/workflow/workflow.handler.js.map +1 -0
- package/dist/workflow/workflow.operations.d.ts +1011 -0
- package/dist/workflow/workflow.operations.d.ts.map +1 -0
- package/dist/workflow/workflow.operations.js +345 -0
- package/dist/workflow/workflow.operations.js.map +1 -0
- package/dist/workflow/workflow.schema.d.ts +265 -0
- package/dist/workflow/workflow.schema.d.ts.map +1 -0
- package/dist/workflow/workflow.schema.js +249 -0
- package/dist/workflow/workflow.schema.js.map +1 -0
- package/dist/workflow-system.capability.d.ts +9 -0
- package/dist/workflow-system.capability.d.ts.map +1 -0
- package/dist/workflow-system.capability.js +34 -0
- package/dist/workflow-system.capability.js.map +1 -0
- package/dist/workflow-system.feature.d.ts +12 -0
- package/dist/workflow-system.feature.d.ts.map +1 -0
- package/dist/workflow-system.feature.js +346 -0
- package/dist/workflow-system.feature.js.map +1 -0
- package/package.json +133 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.operations.d.ts","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAkBa,qDAAqB,0CAAA;EAArB,WAAA,EAAA;IAqDX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;IArDgC,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;UAAA,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;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;;UAzC8B,2BAAA,CAAA"}
|
|
@@ -0,0 +1,464 @@
|
|
|
1
|
+
import { InstanceStatusEnum } from "./instance.enum.js";
|
|
2
|
+
import { StartWorkflowInputModel, TransitionInputModel, TransitionResultModel, WorkflowInstanceModel } from "./instance.schema.js";
|
|
3
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
4
|
+
import { defineCommand, defineQuery } from "@contractspec/lib.contracts/operations";
|
|
5
|
+
|
|
6
|
+
//#region src/instance/instance.operations.ts
|
|
7
|
+
const OWNERS = ["@example.workflow-system"];
|
|
8
|
+
/**
|
|
9
|
+
* Start a new workflow instance.
|
|
10
|
+
*/
|
|
11
|
+
const StartWorkflowContract = defineCommand({
|
|
12
|
+
meta: {
|
|
13
|
+
key: "workflow.instance.start",
|
|
14
|
+
version: "1.0.0",
|
|
15
|
+
stability: "stable",
|
|
16
|
+
owners: [...OWNERS],
|
|
17
|
+
tags: [
|
|
18
|
+
"workflow",
|
|
19
|
+
"instance",
|
|
20
|
+
"start"
|
|
21
|
+
],
|
|
22
|
+
description: "Start a new workflow instance.",
|
|
23
|
+
goal: "Initiate a workflow for a business process.",
|
|
24
|
+
context: "Order creation, request submission, etc."
|
|
25
|
+
},
|
|
26
|
+
io: {
|
|
27
|
+
input: StartWorkflowInputModel,
|
|
28
|
+
output: WorkflowInstanceModel
|
|
29
|
+
},
|
|
30
|
+
policy: { auth: "user" },
|
|
31
|
+
sideEffects: {
|
|
32
|
+
emits: [{
|
|
33
|
+
key: "workflow.instance.started",
|
|
34
|
+
version: "1.0.0",
|
|
35
|
+
when: "Workflow starts",
|
|
36
|
+
payload: WorkflowInstanceModel
|
|
37
|
+
}, {
|
|
38
|
+
key: "workflow.step.entered",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
when: "First step entered",
|
|
41
|
+
payload: WorkflowInstanceModel
|
|
42
|
+
}],
|
|
43
|
+
audit: ["workflow.instance.started"]
|
|
44
|
+
},
|
|
45
|
+
acceptance: {
|
|
46
|
+
scenarios: [{
|
|
47
|
+
key: "start-workflow-happy-path",
|
|
48
|
+
given: ["Workflow definition exists"],
|
|
49
|
+
when: ["User starts workflow"],
|
|
50
|
+
then: ["Instance is created and started"]
|
|
51
|
+
}],
|
|
52
|
+
examples: [{
|
|
53
|
+
key: "start-onboarding",
|
|
54
|
+
input: {
|
|
55
|
+
workflowKey: "onboarding-v1",
|
|
56
|
+
context: { employeeId: "emp-123" }
|
|
57
|
+
},
|
|
58
|
+
output: {
|
|
59
|
+
id: "inst-456",
|
|
60
|
+
status: "running"
|
|
61
|
+
}
|
|
62
|
+
}]
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Transition workflow to next step.
|
|
67
|
+
*/
|
|
68
|
+
const TransitionWorkflowContract = defineCommand({
|
|
69
|
+
meta: {
|
|
70
|
+
key: "workflow.instance.transition",
|
|
71
|
+
version: "1.0.0",
|
|
72
|
+
stability: "stable",
|
|
73
|
+
owners: [...OWNERS],
|
|
74
|
+
tags: [
|
|
75
|
+
"workflow",
|
|
76
|
+
"instance",
|
|
77
|
+
"transition",
|
|
78
|
+
"state-machine"
|
|
79
|
+
],
|
|
80
|
+
description: "Transition a workflow instance to the next step.",
|
|
81
|
+
goal: "Move workflow forward based on action.",
|
|
82
|
+
context: "Task completion, approval decisions."
|
|
83
|
+
},
|
|
84
|
+
io: {
|
|
85
|
+
input: TransitionInputModel,
|
|
86
|
+
output: TransitionResultModel
|
|
87
|
+
},
|
|
88
|
+
policy: { auth: "user" },
|
|
89
|
+
sideEffects: {
|
|
90
|
+
emits: [
|
|
91
|
+
{
|
|
92
|
+
key: "workflow.step.exited",
|
|
93
|
+
version: "1.0.0",
|
|
94
|
+
when: "Step is exited",
|
|
95
|
+
payload: WorkflowInstanceModel
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
key: "workflow.step.entered",
|
|
99
|
+
version: "1.0.0",
|
|
100
|
+
when: "New step is entered",
|
|
101
|
+
payload: WorkflowInstanceModel
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
key: "workflow.instance.completed",
|
|
105
|
+
version: "1.0.0",
|
|
106
|
+
when: "Workflow reaches end",
|
|
107
|
+
payload: WorkflowInstanceModel
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
audit: ["workflow.instance.transitioned"]
|
|
111
|
+
},
|
|
112
|
+
acceptance: {
|
|
113
|
+
scenarios: [{
|
|
114
|
+
key: "transition-workflow-happy-path",
|
|
115
|
+
given: ["Workflow instance is waiting at step"],
|
|
116
|
+
when: ["User provides input"],
|
|
117
|
+
then: ["Instance moves to next step"]
|
|
118
|
+
}],
|
|
119
|
+
examples: [{
|
|
120
|
+
key: "complete-task",
|
|
121
|
+
input: {
|
|
122
|
+
instanceId: "inst-456",
|
|
123
|
+
action: "complete",
|
|
124
|
+
data: { approved: true }
|
|
125
|
+
},
|
|
126
|
+
output: {
|
|
127
|
+
success: true,
|
|
128
|
+
nextStep: "notify-hr"
|
|
129
|
+
}
|
|
130
|
+
}]
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
/**
|
|
134
|
+
* Pause a running workflow.
|
|
135
|
+
*/
|
|
136
|
+
const PauseWorkflowContract = defineCommand({
|
|
137
|
+
meta: {
|
|
138
|
+
key: "workflow.instance.pause",
|
|
139
|
+
version: "1.0.0",
|
|
140
|
+
stability: "stable",
|
|
141
|
+
owners: [...OWNERS],
|
|
142
|
+
tags: [
|
|
143
|
+
"workflow",
|
|
144
|
+
"instance",
|
|
145
|
+
"pause"
|
|
146
|
+
],
|
|
147
|
+
description: "Pause a running workflow instance.",
|
|
148
|
+
goal: "Temporarily halt workflow execution.",
|
|
149
|
+
context: "Administrative action, emergency stop."
|
|
150
|
+
},
|
|
151
|
+
io: {
|
|
152
|
+
input: defineSchemaModel({
|
|
153
|
+
name: "PauseResumeInput",
|
|
154
|
+
fields: {
|
|
155
|
+
instanceId: {
|
|
156
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
157
|
+
isOptional: false
|
|
158
|
+
},
|
|
159
|
+
reason: {
|
|
160
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
161
|
+
isOptional: true
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}),
|
|
165
|
+
output: WorkflowInstanceModel
|
|
166
|
+
},
|
|
167
|
+
policy: { auth: "user" },
|
|
168
|
+
sideEffects: {
|
|
169
|
+
emits: [{
|
|
170
|
+
key: "workflow.instance.paused",
|
|
171
|
+
version: "1.0.0",
|
|
172
|
+
when: "Workflow is paused",
|
|
173
|
+
payload: WorkflowInstanceModel
|
|
174
|
+
}],
|
|
175
|
+
audit: ["workflow.instance.paused"]
|
|
176
|
+
},
|
|
177
|
+
acceptance: {
|
|
178
|
+
scenarios: [{
|
|
179
|
+
key: "pause-workflow-happy-path",
|
|
180
|
+
given: ["Workflow is running"],
|
|
181
|
+
when: ["Admin pauses workflow"],
|
|
182
|
+
then: ["Instance status becomes PAUSED"]
|
|
183
|
+
}],
|
|
184
|
+
examples: [{
|
|
185
|
+
key: "pause-maintenance",
|
|
186
|
+
input: {
|
|
187
|
+
instanceId: "inst-456",
|
|
188
|
+
reason: "System maintenance"
|
|
189
|
+
},
|
|
190
|
+
output: {
|
|
191
|
+
id: "inst-456",
|
|
192
|
+
status: "paused"
|
|
193
|
+
}
|
|
194
|
+
}]
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
/**
|
|
198
|
+
* Resume a paused workflow.
|
|
199
|
+
*/
|
|
200
|
+
const ResumeWorkflowContract = defineCommand({
|
|
201
|
+
meta: {
|
|
202
|
+
key: "workflow.instance.resume",
|
|
203
|
+
version: "1.0.0",
|
|
204
|
+
stability: "stable",
|
|
205
|
+
owners: [...OWNERS],
|
|
206
|
+
tags: [
|
|
207
|
+
"workflow",
|
|
208
|
+
"instance",
|
|
209
|
+
"resume"
|
|
210
|
+
],
|
|
211
|
+
description: "Resume a paused workflow instance.",
|
|
212
|
+
goal: "Continue workflow execution.",
|
|
213
|
+
context: "Administrative action."
|
|
214
|
+
},
|
|
215
|
+
io: {
|
|
216
|
+
input: defineSchemaModel({
|
|
217
|
+
name: "PauseResumeInput",
|
|
218
|
+
fields: {
|
|
219
|
+
instanceId: {
|
|
220
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
221
|
+
isOptional: false
|
|
222
|
+
},
|
|
223
|
+
reason: {
|
|
224
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
225
|
+
isOptional: true
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}),
|
|
229
|
+
output: WorkflowInstanceModel
|
|
230
|
+
},
|
|
231
|
+
policy: { auth: "user" },
|
|
232
|
+
sideEffects: {
|
|
233
|
+
emits: [{
|
|
234
|
+
key: "workflow.instance.resumed",
|
|
235
|
+
version: "1.0.0",
|
|
236
|
+
when: "Workflow is resumed",
|
|
237
|
+
payload: WorkflowInstanceModel
|
|
238
|
+
}],
|
|
239
|
+
audit: ["workflow.instance.resumed"]
|
|
240
|
+
},
|
|
241
|
+
acceptance: {
|
|
242
|
+
scenarios: [{
|
|
243
|
+
key: "resume-workflow-happy-path",
|
|
244
|
+
given: ["Workflow is paused"],
|
|
245
|
+
when: ["Admin resumes workflow"],
|
|
246
|
+
then: ["Instance status becomes RUNNING"]
|
|
247
|
+
}],
|
|
248
|
+
examples: [{
|
|
249
|
+
key: "resume-normal",
|
|
250
|
+
input: {
|
|
251
|
+
instanceId: "inst-456",
|
|
252
|
+
reason: "Issue resolved"
|
|
253
|
+
},
|
|
254
|
+
output: {
|
|
255
|
+
id: "inst-456",
|
|
256
|
+
status: "running"
|
|
257
|
+
}
|
|
258
|
+
}]
|
|
259
|
+
}
|
|
260
|
+
});
|
|
261
|
+
/**
|
|
262
|
+
* Cancel a workflow instance.
|
|
263
|
+
*/
|
|
264
|
+
const CancelWorkflowContract = defineCommand({
|
|
265
|
+
meta: {
|
|
266
|
+
key: "workflow.instance.cancel",
|
|
267
|
+
version: "1.0.0",
|
|
268
|
+
stability: "stable",
|
|
269
|
+
owners: [...OWNERS],
|
|
270
|
+
tags: [
|
|
271
|
+
"workflow",
|
|
272
|
+
"instance",
|
|
273
|
+
"cancel"
|
|
274
|
+
],
|
|
275
|
+
description: "Cancel a workflow instance.",
|
|
276
|
+
goal: "Terminate workflow without completion.",
|
|
277
|
+
context: "User request, system cancellation."
|
|
278
|
+
},
|
|
279
|
+
io: {
|
|
280
|
+
input: defineSchemaModel({
|
|
281
|
+
name: "CancelWorkflowInput",
|
|
282
|
+
fields: {
|
|
283
|
+
instanceId: {
|
|
284
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
285
|
+
isOptional: false
|
|
286
|
+
},
|
|
287
|
+
reason: {
|
|
288
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
289
|
+
isOptional: false
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}),
|
|
293
|
+
output: WorkflowInstanceModel
|
|
294
|
+
},
|
|
295
|
+
policy: { auth: "user" },
|
|
296
|
+
sideEffects: {
|
|
297
|
+
emits: [{
|
|
298
|
+
key: "workflow.instance.cancelled",
|
|
299
|
+
version: "1.0.0",
|
|
300
|
+
when: "Workflow is cancelled",
|
|
301
|
+
payload: WorkflowInstanceModel
|
|
302
|
+
}],
|
|
303
|
+
audit: ["workflow.instance.cancelled"]
|
|
304
|
+
},
|
|
305
|
+
acceptance: {
|
|
306
|
+
scenarios: [{
|
|
307
|
+
key: "cancel-workflow-happy-path",
|
|
308
|
+
given: ["Workflow is running"],
|
|
309
|
+
when: ["User cancels workflow"],
|
|
310
|
+
then: ["Instance status becomes CANCELLED"]
|
|
311
|
+
}],
|
|
312
|
+
examples: [{
|
|
313
|
+
key: "cancel-mistake",
|
|
314
|
+
input: {
|
|
315
|
+
instanceId: "inst-456",
|
|
316
|
+
reason: "Created by mistake"
|
|
317
|
+
},
|
|
318
|
+
output: {
|
|
319
|
+
id: "inst-456",
|
|
320
|
+
status: "cancelled"
|
|
321
|
+
}
|
|
322
|
+
}]
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
/**
|
|
326
|
+
* List workflow instances.
|
|
327
|
+
*/
|
|
328
|
+
const ListInstancesContract = defineQuery({
|
|
329
|
+
meta: {
|
|
330
|
+
key: "workflow.instance.list",
|
|
331
|
+
version: "1.0.0",
|
|
332
|
+
stability: "stable",
|
|
333
|
+
owners: [...OWNERS],
|
|
334
|
+
tags: [
|
|
335
|
+
"workflow",
|
|
336
|
+
"instance",
|
|
337
|
+
"list"
|
|
338
|
+
],
|
|
339
|
+
description: "List workflow instances with filtering.",
|
|
340
|
+
goal: "Browse and search running workflows.",
|
|
341
|
+
context: "Dashboard, monitoring."
|
|
342
|
+
},
|
|
343
|
+
io: {
|
|
344
|
+
input: defineSchemaModel({
|
|
345
|
+
name: "ListInstancesInput",
|
|
346
|
+
fields: {
|
|
347
|
+
workflowKey: {
|
|
348
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
349
|
+
isOptional: true
|
|
350
|
+
},
|
|
351
|
+
status: {
|
|
352
|
+
type: InstanceStatusEnum,
|
|
353
|
+
isOptional: true
|
|
354
|
+
},
|
|
355
|
+
referenceType: {
|
|
356
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
357
|
+
isOptional: true
|
|
358
|
+
},
|
|
359
|
+
referenceId: {
|
|
360
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
361
|
+
isOptional: true
|
|
362
|
+
},
|
|
363
|
+
triggeredBy: {
|
|
364
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
365
|
+
isOptional: true
|
|
366
|
+
},
|
|
367
|
+
limit: {
|
|
368
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
369
|
+
isOptional: true,
|
|
370
|
+
defaultValue: 20
|
|
371
|
+
},
|
|
372
|
+
offset: {
|
|
373
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
374
|
+
isOptional: true,
|
|
375
|
+
defaultValue: 0
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}),
|
|
379
|
+
output: defineSchemaModel({
|
|
380
|
+
name: "ListInstancesOutput",
|
|
381
|
+
fields: {
|
|
382
|
+
instances: {
|
|
383
|
+
type: WorkflowInstanceModel,
|
|
384
|
+
isArray: true,
|
|
385
|
+
isOptional: false
|
|
386
|
+
},
|
|
387
|
+
total: {
|
|
388
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
389
|
+
isOptional: false
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
})
|
|
393
|
+
},
|
|
394
|
+
policy: { auth: "user" },
|
|
395
|
+
acceptance: {
|
|
396
|
+
scenarios: [{
|
|
397
|
+
key: "list-instances-happy-path",
|
|
398
|
+
given: ["Workflow instances exist"],
|
|
399
|
+
when: ["User lists instances"],
|
|
400
|
+
then: ["List of instances is returned"]
|
|
401
|
+
}],
|
|
402
|
+
examples: [{
|
|
403
|
+
key: "list-running",
|
|
404
|
+
input: {
|
|
405
|
+
status: "running",
|
|
406
|
+
limit: 10
|
|
407
|
+
},
|
|
408
|
+
output: {
|
|
409
|
+
instances: [],
|
|
410
|
+
total: 5
|
|
411
|
+
}
|
|
412
|
+
}]
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
/**
|
|
416
|
+
* Get a single workflow instance.
|
|
417
|
+
*/
|
|
418
|
+
const GetInstanceContract = defineQuery({
|
|
419
|
+
meta: {
|
|
420
|
+
key: "workflow.instance.get",
|
|
421
|
+
version: "1.0.0",
|
|
422
|
+
stability: "stable",
|
|
423
|
+
owners: [...OWNERS],
|
|
424
|
+
tags: [
|
|
425
|
+
"workflow",
|
|
426
|
+
"instance",
|
|
427
|
+
"get"
|
|
428
|
+
],
|
|
429
|
+
description: "Get a workflow instance with details.",
|
|
430
|
+
goal: "View workflow instance details.",
|
|
431
|
+
context: "Instance detail view."
|
|
432
|
+
},
|
|
433
|
+
io: {
|
|
434
|
+
input: defineSchemaModel({
|
|
435
|
+
name: "GetInstanceInput",
|
|
436
|
+
fields: { instanceId: {
|
|
437
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
438
|
+
isOptional: false
|
|
439
|
+
} }
|
|
440
|
+
}),
|
|
441
|
+
output: WorkflowInstanceModel
|
|
442
|
+
},
|
|
443
|
+
policy: { auth: "user" },
|
|
444
|
+
acceptance: {
|
|
445
|
+
scenarios: [{
|
|
446
|
+
key: "get-instance-happy-path",
|
|
447
|
+
given: ["Instance exists"],
|
|
448
|
+
when: ["User requests instance details"],
|
|
449
|
+
then: ["Instance details are returned"]
|
|
450
|
+
}],
|
|
451
|
+
examples: [{
|
|
452
|
+
key: "get-details",
|
|
453
|
+
input: { instanceId: "inst-456" },
|
|
454
|
+
output: {
|
|
455
|
+
id: "inst-456",
|
|
456
|
+
workflowKey: "onboarding-v1"
|
|
457
|
+
}
|
|
458
|
+
}]
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
//#endregion
|
|
463
|
+
export { CancelWorkflowContract, GetInstanceContract, ListInstancesContract, PauseWorkflowContract, ResumeWorkflowContract, StartWorkflowContract, TransitionWorkflowContract };
|
|
464
|
+
//# sourceMappingURL=instance.operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instance.operations.js","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { InstanceStatusEnum } from './instance.enum';\nimport {\n StartWorkflowInputModel,\n TransitionInputModel,\n TransitionResultModel,\n WorkflowInstanceModel,\n} from './instance.schema';\n\nconst OWNERS = ['@example.workflow-system'] as const;\n\n/**\n * Start a new workflow instance.\n */\nexport const StartWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.start',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'start'],\n description: 'Start a new workflow instance.',\n goal: 'Initiate a workflow for a business process.',\n context: 'Order creation, request submission, etc.',\n },\n io: {\n input: StartWorkflowInputModel,\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.started',\n version: '1.0.0',\n when: 'Workflow starts',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: '1.0.0',\n when: 'First step entered',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.started'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'start-workflow-happy-path',\n given: ['Workflow definition exists'],\n when: ['User starts workflow'],\n then: ['Instance is created and started'],\n },\n ],\n examples: [\n {\n key: 'start-onboarding',\n input: {\n workflowKey: 'onboarding-v1',\n context: { employeeId: 'emp-123' },\n },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Transition workflow to next step.\n */\nexport const TransitionWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.transition',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'transition', 'state-machine'],\n description: 'Transition a workflow instance to the next step.',\n goal: 'Move workflow forward based on action.',\n context: 'Task completion, approval decisions.',\n },\n io: {\n input: TransitionInputModel,\n output: TransitionResultModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.step.exited',\n version: '1.0.0',\n when: 'Step is exited',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: '1.0.0',\n when: 'New step is entered',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.instance.completed',\n version: '1.0.0',\n when: 'Workflow reaches end',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.transitioned'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'transition-workflow-happy-path',\n given: ['Workflow instance is waiting at step'],\n when: ['User provides input'],\n then: ['Instance moves to next step'],\n },\n ],\n examples: [\n {\n key: 'complete-task',\n input: {\n instanceId: 'inst-456',\n action: 'complete',\n data: { approved: true },\n },\n output: { success: true, nextStep: 'notify-hr' },\n },\n ],\n },\n});\n\n/**\n * Pause a running workflow.\n */\nexport const PauseWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.pause',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'pause'],\n description: 'Pause a running workflow instance.',\n goal: 'Temporarily halt workflow execution.',\n context: 'Administrative action, emergency stop.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.paused',\n version: '1.0.0',\n when: 'Workflow is paused',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.paused'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'pause-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['Admin pauses workflow'],\n then: ['Instance status becomes PAUSED'],\n },\n ],\n examples: [\n {\n key: 'pause-maintenance',\n input: { instanceId: 'inst-456', reason: 'System maintenance' },\n output: { id: 'inst-456', status: 'paused' },\n },\n ],\n },\n});\n\n/**\n * Resume a paused workflow.\n */\nexport const ResumeWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.resume',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'resume'],\n description: 'Resume a paused workflow instance.',\n goal: 'Continue workflow execution.',\n context: 'Administrative action.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.resumed',\n version: '1.0.0',\n when: 'Workflow is resumed',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.resumed'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'resume-workflow-happy-path',\n given: ['Workflow is paused'],\n when: ['Admin resumes workflow'],\n then: ['Instance status becomes RUNNING'],\n },\n ],\n examples: [\n {\n key: 'resume-normal',\n input: { instanceId: 'inst-456', reason: 'Issue resolved' },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Cancel a workflow instance.\n */\nexport const CancelWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.cancel',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'cancel'],\n description: 'Cancel a workflow instance.',\n goal: 'Terminate workflow without completion.',\n context: 'User request, system cancellation.',\n },\n io: {\n input: defineSchemaModel({\n name: 'CancelWorkflowInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.cancelled',\n version: '1.0.0',\n when: 'Workflow is cancelled',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.cancelled'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'cancel-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['User cancels workflow'],\n then: ['Instance status becomes CANCELLED'],\n },\n ],\n examples: [\n {\n key: 'cancel-mistake',\n input: { instanceId: 'inst-456', reason: 'Created by mistake' },\n output: { id: 'inst-456', status: 'cancelled' },\n },\n ],\n },\n});\n\n/**\n * List workflow instances.\n */\nexport const ListInstancesContract = defineQuery({\n meta: {\n key: 'workflow.instance.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'list'],\n description: 'List workflow instances with filtering.',\n goal: 'Browse and search running workflows.',\n context: 'Dashboard, monitoring.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListInstancesInput',\n fields: {\n workflowKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n status: { type: InstanceStatusEnum, isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n referenceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n triggeredBy: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListInstancesOutput',\n fields: {\n instances: {\n type: WorkflowInstanceModel,\n isArray: true,\n isOptional: false,\n },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-instances-happy-path',\n given: ['Workflow instances exist'],\n when: ['User lists instances'],\n then: ['List of instances is returned'],\n },\n ],\n examples: [\n {\n key: 'list-running',\n input: { status: 'running', limit: 10 },\n output: { instances: [], total: 5 },\n },\n ],\n },\n});\n\n/**\n * Get a single workflow instance.\n */\nexport const GetInstanceContract = defineQuery({\n meta: {\n key: 'workflow.instance.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'get'],\n description: 'Get a workflow instance with details.',\n goal: 'View workflow instance details.',\n context: 'Instance detail view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetInstanceInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'get-instance-happy-path',\n given: ['Instance exists'],\n when: ['User requests instance details'],\n then: ['Instance details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-details',\n input: { instanceId: 'inst-456' },\n output: { id: 'inst-456', workflowKey: 'onboarding-v1' },\n },\n ],\n },\n});\n"],"mappings":";;;;;;AAaA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAY;GAAQ;EACvC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,EACD;GACE,KAAK;GACL,SAAS;GACT,MAAM;GACN,SAAS;GACV,CACF;EACD,OAAO,CAAC,4BAA4B;EACrC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,6BAA6B;GACrC,MAAM,CAAC,uBAAuB;GAC9B,MAAM,CAAC,kCAAkC;GAC1C,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IACL,aAAa;IACb,SAAS,EAAE,YAAY,WAAW;IACnC;GACD,QAAQ;IAAE,IAAI;IAAY,QAAQ;IAAW;GAC9C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,6BAA6B,cAAc;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAY;GAAc;GAAgB;EAC7D,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO;GACL;IACE,KAAK;IACL,S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