@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.
Files changed (157) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/dist/approval/approval.enum.d.ts +14 -0
  4. package/dist/approval/approval.enum.d.ts.map +1 -0
  5. package/dist/approval/approval.enum.js +29 -0
  6. package/dist/approval/approval.enum.js.map +1 -0
  7. package/dist/approval/approval.event.d.ts +131 -0
  8. package/dist/approval/approval.event.d.ts.map +1 -0
  9. package/dist/approval/approval.event.js +220 -0
  10. package/dist/approval/approval.event.js.map +1 -0
  11. package/dist/approval/approval.handler.d.ts +23 -0
  12. package/dist/approval/approval.handler.d.ts.map +1 -0
  13. package/dist/approval/approval.handler.js +72 -0
  14. package/dist/approval/approval.handler.js.map +1 -0
  15. package/dist/approval/approval.operations.d.ts +535 -0
  16. package/dist/approval/approval.operations.d.ts.map +1 -0
  17. package/dist/approval/approval.operations.js +345 -0
  18. package/dist/approval/approval.operations.js.map +1 -0
  19. package/dist/approval/approval.schema.d.ts +100 -0
  20. package/dist/approval/approval.schema.d.ts.map +1 -0
  21. package/dist/approval/approval.schema.js +110 -0
  22. package/dist/approval/approval.schema.js.map +1 -0
  23. package/dist/approval/index.d.ts +5 -0
  24. package/dist/approval/index.js +6 -0
  25. package/dist/docs/index.d.ts +1 -0
  26. package/dist/docs/index.js +1 -0
  27. package/dist/docs/workflow-system.docblock.d.ts +1 -0
  28. package/dist/docs/workflow-system.docblock.js +115 -0
  29. package/dist/docs/workflow-system.docblock.js.map +1 -0
  30. package/dist/entities/approval.d.ts +58 -0
  31. package/dist/entities/approval.d.ts.map +1 -0
  32. package/dist/entities/approval.js +128 -0
  33. package/dist/entities/approval.js.map +1 -0
  34. package/dist/entities/index.d.ts +139 -0
  35. package/dist/entities/index.d.ts.map +1 -0
  36. package/dist/entities/index.js +32 -0
  37. package/dist/entities/index.js.map +1 -0
  38. package/dist/entities/instance.d.ts +69 -0
  39. package/dist/entities/instance.d.ts.map +1 -0
  40. package/dist/entities/instance.js +168 -0
  41. package/dist/entities/instance.js.map +1 -0
  42. package/dist/entities/step.d.ts +50 -0
  43. package/dist/entities/step.d.ts.map +1 -0
  44. package/dist/entities/step.js +135 -0
  45. package/dist/entities/step.js.map +1 -0
  46. package/dist/entities/workflow.d.ts +41 -0
  47. package/dist/entities/workflow.d.ts.map +1 -0
  48. package/dist/entities/workflow.js +102 -0
  49. package/dist/entities/workflow.js.map +1 -0
  50. package/dist/example.d.ts +7 -0
  51. package/dist/example.d.ts.map +1 -0
  52. package/dist/example.js +58 -0
  53. package/dist/example.js.map +1 -0
  54. package/dist/handlers/index.d.ts +2 -0
  55. package/dist/handlers/index.js +3 -0
  56. package/dist/handlers/workflow.handlers.d.ts +122 -0
  57. package/dist/handlers/workflow.handlers.d.ts.map +1 -0
  58. package/dist/handlers/workflow.handlers.js +263 -0
  59. package/dist/handlers/workflow.handlers.js.map +1 -0
  60. package/dist/index.d.ts +26 -0
  61. package/dist/index.js +26 -0
  62. package/dist/instance/index.d.ts +5 -0
  63. package/dist/instance/index.js +6 -0
  64. package/dist/instance/instance.enum.d.ts +10 -0
  65. package/dist/instance/instance.enum.d.ts.map +1 -0
  66. package/dist/instance/instance.enum.js +20 -0
  67. package/dist/instance/instance.enum.js.map +1 -0
  68. package/dist/instance/instance.event.d.ts +356 -0
  69. package/dist/instance/instance.event.d.ts.map +1 -0
  70. package/dist/instance/instance.event.js +293 -0
  71. package/dist/instance/instance.event.js.map +1 -0
  72. package/dist/instance/instance.handler.d.ts +27 -0
  73. package/dist/instance/instance.handler.d.ts.map +1 -0
  74. package/dist/instance/instance.handler.js +94 -0
  75. package/dist/instance/instance.handler.js.map +1 -0
  76. package/dist/instance/instance.operations.d.ts +1024 -0
  77. package/dist/instance/instance.operations.d.ts.map +1 -0
  78. package/dist/instance/instance.operations.js +464 -0
  79. package/dist/instance/instance.operations.js.map +1 -0
  80. package/dist/instance/instance.schema.d.ts +223 -0
  81. package/dist/instance/instance.schema.d.ts.map +1 -0
  82. package/dist/instance/instance.schema.js +172 -0
  83. package/dist/instance/instance.schema.js.map +1 -0
  84. package/dist/presentations/index.d.ts +63 -0
  85. package/dist/presentations/index.d.ts.map +1 -0
  86. package/dist/presentations/index.js +340 -0
  87. package/dist/presentations/index.js.map +1 -0
  88. package/dist/seeders/index.d.ts +10 -0
  89. package/dist/seeders/index.d.ts.map +1 -0
  90. package/dist/seeders/index.js +19 -0
  91. package/dist/seeders/index.js.map +1 -0
  92. package/dist/shared/index.d.ts +3 -0
  93. package/dist/shared/index.js +3 -0
  94. package/dist/shared/mock-data.d.ts +19 -0
  95. package/dist/shared/mock-data.d.ts.map +1 -0
  96. package/dist/shared/mock-data.js +12 -0
  97. package/dist/shared/mock-data.js.map +1 -0
  98. package/dist/shared/types.d.ts +81 -0
  99. package/dist/shared/types.d.ts.map +1 -0
  100. package/dist/shared/types.js +0 -0
  101. package/dist/state-machine/index.d.ts +148 -0
  102. package/dist/state-machine/index.d.ts.map +1 -0
  103. package/dist/state-machine/index.js +158 -0
  104. package/dist/state-machine/index.js.map +1 -0
  105. package/dist/tests/operations.test-spec.d.ts +10 -0
  106. package/dist/tests/operations.test-spec.d.ts.map +1 -0
  107. package/dist/tests/operations.test-spec.js +123 -0
  108. package/dist/tests/operations.test-spec.js.map +1 -0
  109. package/dist/ui/WorkflowDashboard.d.ts +7 -0
  110. package/dist/ui/WorkflowDashboard.d.ts.map +1 -0
  111. package/dist/ui/WorkflowDashboard.js +223 -0
  112. package/dist/ui/WorkflowDashboard.js.map +1 -0
  113. package/dist/ui/hooks/index.d.ts +2 -0
  114. package/dist/ui/hooks/index.js +5 -0
  115. package/dist/ui/hooks/useWorkflowList.d.ts +22 -0
  116. package/dist/ui/hooks/useWorkflowList.d.ts.map +1 -0
  117. package/dist/ui/hooks/useWorkflowList.js +55 -0
  118. package/dist/ui/hooks/useWorkflowList.js.map +1 -0
  119. package/dist/ui/index.d.ts +6 -0
  120. package/dist/ui/index.js +6 -0
  121. package/dist/ui/renderers/index.d.ts +2 -0
  122. package/dist/ui/renderers/index.js +3 -0
  123. package/dist/ui/renderers/workflow.markdown.d.ts +28 -0
  124. package/dist/ui/renderers/workflow.markdown.d.ts.map +1 -0
  125. package/dist/ui/renderers/workflow.markdown.js +234 -0
  126. package/dist/ui/renderers/workflow.markdown.js.map +1 -0
  127. package/dist/workflow/index.d.ts +5 -0
  128. package/dist/workflow/index.js +6 -0
  129. package/dist/workflow/workflow.enum.d.ts +22 -0
  130. package/dist/workflow/workflow.enum.d.ts.map +1 -0
  131. package/dist/workflow/workflow.enum.js +47 -0
  132. package/dist/workflow/workflow.enum.js.map +1 -0
  133. package/dist/workflow/workflow.event.d.ts +135 -0
  134. package/dist/workflow/workflow.event.d.ts.map +1 -0
  135. package/dist/workflow/workflow.event.js +150 -0
  136. package/dist/workflow/workflow.event.js.map +1 -0
  137. package/dist/workflow/workflow.handler.d.ts +29 -0
  138. package/dist/workflow/workflow.handler.d.ts.map +1 -0
  139. package/dist/workflow/workflow.handler.js +66 -0
  140. package/dist/workflow/workflow.handler.js.map +1 -0
  141. package/dist/workflow/workflow.operations.d.ts +1011 -0
  142. package/dist/workflow/workflow.operations.d.ts.map +1 -0
  143. package/dist/workflow/workflow.operations.js +345 -0
  144. package/dist/workflow/workflow.operations.js.map +1 -0
  145. package/dist/workflow/workflow.schema.d.ts +265 -0
  146. package/dist/workflow/workflow.schema.d.ts.map +1 -0
  147. package/dist/workflow/workflow.schema.js +249 -0
  148. package/dist/workflow/workflow.schema.js.map +1 -0
  149. package/dist/workflow-system.capability.d.ts +9 -0
  150. package/dist/workflow-system.capability.d.ts.map +1 -0
  151. package/dist/workflow-system.capability.js +34 -0
  152. package/dist/workflow-system.capability.js.map +1 -0
  153. package/dist/workflow-system.feature.d.ts +12 -0
  154. package/dist/workflow-system.feature.d.ts.map +1 -0
  155. package/dist/workflow-system.feature.js +346 -0
  156. package/dist/workflow-system.feature.js.map +1 -0
  157. package/package.json +133 -0
@@ -0,0 +1,356 @@
1
+ import * as _contractspec_lib_contracts13 from "@contractspec/lib.contracts";
2
+ import * as _contractspec_lib_schema447 from "@contractspec/lib.schema";
3
+
4
+ //#region src/instance/instance.event.d.ts
5
+ /**
6
+ * InstanceStartedEvent - A new workflow instance has been started.
7
+ */
8
+ declare const InstanceStartedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
9
+ instanceId: {
10
+ type: _contractspec_lib_schema447.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ workflowId: {
14
+ type: _contractspec_lib_schema447.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ workflowKey: {
18
+ type: _contractspec_lib_schema447.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ status: {
22
+ type: _contractspec_lib_schema447.FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ referenceId: {
26
+ type: _contractspec_lib_schema447.FieldType<string, string>;
27
+ isOptional: true;
28
+ };
29
+ referenceType: {
30
+ type: _contractspec_lib_schema447.FieldType<string, string>;
31
+ isOptional: true;
32
+ };
33
+ triggeredBy: {
34
+ type: _contractspec_lib_schema447.FieldType<string, string>;
35
+ isOptional: false;
36
+ };
37
+ organizationId: {
38
+ type: _contractspec_lib_schema447.FieldType<string, string>;
39
+ isOptional: false;
40
+ };
41
+ timestamp: {
42
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
43
+ isOptional: false;
44
+ };
45
+ }>>;
46
+ /**
47
+ * StepEnteredEvent - A workflow instance has entered a new step.
48
+ */
49
+ declare const StepEnteredEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
50
+ instanceId: {
51
+ type: _contractspec_lib_schema447.FieldType<string, string>;
52
+ isOptional: false;
53
+ };
54
+ workflowId: {
55
+ type: _contractspec_lib_schema447.FieldType<string, string>;
56
+ isOptional: false;
57
+ };
58
+ fromStepKey: {
59
+ type: _contractspec_lib_schema447.FieldType<string, string>;
60
+ isOptional: true;
61
+ };
62
+ toStepKey: {
63
+ type: _contractspec_lib_schema447.FieldType<string, string>;
64
+ isOptional: false;
65
+ };
66
+ action: {
67
+ type: _contractspec_lib_schema447.FieldType<string, string>;
68
+ isOptional: true;
69
+ };
70
+ executedBy: {
71
+ type: _contractspec_lib_schema447.FieldType<string, string>;
72
+ isOptional: false;
73
+ };
74
+ timestamp: {
75
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
76
+ isOptional: false;
77
+ };
78
+ }>>;
79
+ /**
80
+ * StepExitedEvent - A workflow instance has exited a step.
81
+ */
82
+ declare const StepExitedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
83
+ instanceId: {
84
+ type: _contractspec_lib_schema447.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ workflowId: {
88
+ type: _contractspec_lib_schema447.FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ fromStepKey: {
92
+ type: _contractspec_lib_schema447.FieldType<string, string>;
93
+ isOptional: true;
94
+ };
95
+ toStepKey: {
96
+ type: _contractspec_lib_schema447.FieldType<string, string>;
97
+ isOptional: false;
98
+ };
99
+ action: {
100
+ type: _contractspec_lib_schema447.FieldType<string, string>;
101
+ isOptional: true;
102
+ };
103
+ executedBy: {
104
+ type: _contractspec_lib_schema447.FieldType<string, string>;
105
+ isOptional: false;
106
+ };
107
+ timestamp: {
108
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
109
+ isOptional: false;
110
+ };
111
+ }>>;
112
+ /**
113
+ * InstanceCompletedEvent - A workflow instance has completed.
114
+ */
115
+ declare const InstanceCompletedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
116
+ instanceId: {
117
+ type: _contractspec_lib_schema447.FieldType<string, string>;
118
+ isOptional: false;
119
+ };
120
+ workflowId: {
121
+ type: _contractspec_lib_schema447.FieldType<string, string>;
122
+ isOptional: false;
123
+ };
124
+ workflowKey: {
125
+ type: _contractspec_lib_schema447.FieldType<string, string>;
126
+ isOptional: false;
127
+ };
128
+ outcome: {
129
+ type: _contractspec_lib_schema447.FieldType<string, string>;
130
+ isOptional: false;
131
+ };
132
+ referenceId: {
133
+ type: _contractspec_lib_schema447.FieldType<string, string>;
134
+ isOptional: true;
135
+ };
136
+ referenceType: {
137
+ type: _contractspec_lib_schema447.FieldType<string, string>;
138
+ isOptional: true;
139
+ };
140
+ duration: {
141
+ type: _contractspec_lib_schema447.FieldType<number, number>;
142
+ isOptional: false;
143
+ };
144
+ timestamp: {
145
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
146
+ isOptional: false;
147
+ };
148
+ }>>;
149
+ /**
150
+ * InstanceCancelledEvent - A workflow instance has been cancelled.
151
+ */
152
+ declare const InstanceCancelledEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
153
+ instanceId: {
154
+ type: _contractspec_lib_schema447.FieldType<string, string>;
155
+ isOptional: false;
156
+ };
157
+ workflowId: {
158
+ type: _contractspec_lib_schema447.FieldType<string, string>;
159
+ isOptional: false;
160
+ };
161
+ workflowKey: {
162
+ type: _contractspec_lib_schema447.FieldType<string, string>;
163
+ isOptional: false;
164
+ };
165
+ status: {
166
+ type: _contractspec_lib_schema447.FieldType<string, string>;
167
+ isOptional: false;
168
+ };
169
+ referenceId: {
170
+ type: _contractspec_lib_schema447.FieldType<string, string>;
171
+ isOptional: true;
172
+ };
173
+ referenceType: {
174
+ type: _contractspec_lib_schema447.FieldType<string, string>;
175
+ isOptional: true;
176
+ };
177
+ triggeredBy: {
178
+ type: _contractspec_lib_schema447.FieldType<string, string>;
179
+ isOptional: false;
180
+ };
181
+ organizationId: {
182
+ type: _contractspec_lib_schema447.FieldType<string, string>;
183
+ isOptional: false;
184
+ };
185
+ timestamp: {
186
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
187
+ isOptional: false;
188
+ };
189
+ }>>;
190
+ /**
191
+ * InstancePausedEvent - A workflow instance has been paused.
192
+ */
193
+ declare const InstancePausedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
194
+ instanceId: {
195
+ type: _contractspec_lib_schema447.FieldType<string, string>;
196
+ isOptional: false;
197
+ };
198
+ workflowId: {
199
+ type: _contractspec_lib_schema447.FieldType<string, string>;
200
+ isOptional: false;
201
+ };
202
+ workflowKey: {
203
+ type: _contractspec_lib_schema447.FieldType<string, string>;
204
+ isOptional: false;
205
+ };
206
+ status: {
207
+ type: _contractspec_lib_schema447.FieldType<string, string>;
208
+ isOptional: false;
209
+ };
210
+ referenceId: {
211
+ type: _contractspec_lib_schema447.FieldType<string, string>;
212
+ isOptional: true;
213
+ };
214
+ referenceType: {
215
+ type: _contractspec_lib_schema447.FieldType<string, string>;
216
+ isOptional: true;
217
+ };
218
+ triggeredBy: {
219
+ type: _contractspec_lib_schema447.FieldType<string, string>;
220
+ isOptional: false;
221
+ };
222
+ organizationId: {
223
+ type: _contractspec_lib_schema447.FieldType<string, string>;
224
+ isOptional: false;
225
+ };
226
+ timestamp: {
227
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
228
+ isOptional: false;
229
+ };
230
+ }>>;
231
+ /**
232
+ * InstanceResumedEvent - A workflow instance has been resumed.
233
+ */
234
+ declare const InstanceResumedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
235
+ instanceId: {
236
+ type: _contractspec_lib_schema447.FieldType<string, string>;
237
+ isOptional: false;
238
+ };
239
+ workflowId: {
240
+ type: _contractspec_lib_schema447.FieldType<string, string>;
241
+ isOptional: false;
242
+ };
243
+ workflowKey: {
244
+ type: _contractspec_lib_schema447.FieldType<string, string>;
245
+ isOptional: false;
246
+ };
247
+ status: {
248
+ type: _contractspec_lib_schema447.FieldType<string, string>;
249
+ isOptional: false;
250
+ };
251
+ referenceId: {
252
+ type: _contractspec_lib_schema447.FieldType<string, string>;
253
+ isOptional: true;
254
+ };
255
+ referenceType: {
256
+ type: _contractspec_lib_schema447.FieldType<string, string>;
257
+ isOptional: true;
258
+ };
259
+ triggeredBy: {
260
+ type: _contractspec_lib_schema447.FieldType<string, string>;
261
+ isOptional: false;
262
+ };
263
+ organizationId: {
264
+ type: _contractspec_lib_schema447.FieldType<string, string>;
265
+ isOptional: false;
266
+ };
267
+ timestamp: {
268
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
269
+ isOptional: false;
270
+ };
271
+ }>>;
272
+ /**
273
+ * InstanceFailedEvent - A workflow instance has failed.
274
+ */
275
+ declare const InstanceFailedEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
276
+ instanceId: {
277
+ type: _contractspec_lib_schema447.FieldType<string, string>;
278
+ isOptional: false;
279
+ };
280
+ workflowId: {
281
+ type: _contractspec_lib_schema447.FieldType<string, string>;
282
+ isOptional: false;
283
+ };
284
+ workflowKey: {
285
+ type: _contractspec_lib_schema447.FieldType<string, string>;
286
+ isOptional: false;
287
+ };
288
+ status: {
289
+ type: _contractspec_lib_schema447.FieldType<string, string>;
290
+ isOptional: false;
291
+ };
292
+ referenceId: {
293
+ type: _contractspec_lib_schema447.FieldType<string, string>;
294
+ isOptional: true;
295
+ };
296
+ referenceType: {
297
+ type: _contractspec_lib_schema447.FieldType<string, string>;
298
+ isOptional: true;
299
+ };
300
+ triggeredBy: {
301
+ type: _contractspec_lib_schema447.FieldType<string, string>;
302
+ isOptional: false;
303
+ };
304
+ organizationId: {
305
+ type: _contractspec_lib_schema447.FieldType<string, string>;
306
+ isOptional: false;
307
+ };
308
+ timestamp: {
309
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
310
+ isOptional: false;
311
+ };
312
+ }>>;
313
+ /**
314
+ * InstanceTimedOutEvent - A workflow instance has timed out.
315
+ */
316
+ declare const InstanceTimedOutEvent: _contractspec_lib_contracts13.EventSpec<_contractspec_lib_schema447.SchemaModel<{
317
+ instanceId: {
318
+ type: _contractspec_lib_schema447.FieldType<string, string>;
319
+ isOptional: false;
320
+ };
321
+ workflowId: {
322
+ type: _contractspec_lib_schema447.FieldType<string, string>;
323
+ isOptional: false;
324
+ };
325
+ workflowKey: {
326
+ type: _contractspec_lib_schema447.FieldType<string, string>;
327
+ isOptional: false;
328
+ };
329
+ status: {
330
+ type: _contractspec_lib_schema447.FieldType<string, string>;
331
+ isOptional: false;
332
+ };
333
+ referenceId: {
334
+ type: _contractspec_lib_schema447.FieldType<string, string>;
335
+ isOptional: true;
336
+ };
337
+ referenceType: {
338
+ type: _contractspec_lib_schema447.FieldType<string, string>;
339
+ isOptional: true;
340
+ };
341
+ triggeredBy: {
342
+ type: _contractspec_lib_schema447.FieldType<string, string>;
343
+ isOptional: false;
344
+ };
345
+ organizationId: {
346
+ type: _contractspec_lib_schema447.FieldType<string, string>;
347
+ isOptional: false;
348
+ };
349
+ timestamp: {
350
+ type: _contractspec_lib_schema447.FieldType<Date, string>;
351
+ isOptional: false;
352
+ };
353
+ }>>;
354
+ //#endregion
355
+ export { InstanceCancelledEvent, InstanceCompletedEvent, InstanceFailedEvent, InstancePausedEvent, InstanceResumedEvent, InstanceStartedEvent, InstanceTimedOutEvent, StepEnteredEvent, StepExitedEvent };
356
+ //# sourceMappingURL=instance.event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.event.d.ts","names":[],"sources":["../../src/instance/instance.event.ts"],"sourcesContent":[],"mappings":";;;;;;;cAqEa,sBAAoB,6BAAA,CAAA,sCAAA;EAApB,UAAA,EAAA;IAUX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;EAV+B,MAAA,EAAA;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAepB,UAAA,EAAA,KAUX;EAAA,CAAA;;;;;;;;;EAV2B,WAAA,EAAA;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IAehB,UAAA,EAAA,KAU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;;;;;;;;;;;;;;;cAKW,qBAAmB,6BAAA,CAAA,sCAAA;;UAU9B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAKW,uBAAqB,6BAAA,CAAA,sCAAA;;UAUhC,2BAAA,CAAA"}
@@ -0,0 +1,293 @@
1
+ import { defineEvent, defineSchemaModel } from "@contractspec/lib.contracts";
2
+ import { ScalarTypeEnum } from "@contractspec/lib.schema";
3
+
4
+ //#region src/instance/instance.event.ts
5
+ /**
6
+ * Base payload for instance events.
7
+ */
8
+ const InstanceEventPayload = defineSchemaModel({
9
+ name: "InstanceEventPayload",
10
+ description: "Base payload for instance events",
11
+ fields: {
12
+ instanceId: {
13
+ type: ScalarTypeEnum.String_unsecure(),
14
+ isOptional: false
15
+ },
16
+ workflowId: {
17
+ type: ScalarTypeEnum.String_unsecure(),
18
+ isOptional: false
19
+ },
20
+ workflowKey: {
21
+ type: ScalarTypeEnum.String_unsecure(),
22
+ isOptional: false
23
+ },
24
+ status: {
25
+ type: ScalarTypeEnum.String_unsecure(),
26
+ isOptional: false
27
+ },
28
+ referenceId: {
29
+ type: ScalarTypeEnum.String_unsecure(),
30
+ isOptional: true
31
+ },
32
+ referenceType: {
33
+ type: ScalarTypeEnum.String_unsecure(),
34
+ isOptional: true
35
+ },
36
+ triggeredBy: {
37
+ type: ScalarTypeEnum.String_unsecure(),
38
+ isOptional: false
39
+ },
40
+ organizationId: {
41
+ type: ScalarTypeEnum.String_unsecure(),
42
+ isOptional: false
43
+ },
44
+ timestamp: {
45
+ type: ScalarTypeEnum.DateTime(),
46
+ isOptional: false
47
+ }
48
+ }
49
+ });
50
+ /**
51
+ * Payload for step transition events.
52
+ */
53
+ const StepTransitionPayload = defineSchemaModel({
54
+ name: "StepTransitionEventPayload",
55
+ description: "Payload for step transition events",
56
+ fields: {
57
+ instanceId: {
58
+ type: ScalarTypeEnum.String_unsecure(),
59
+ isOptional: false
60
+ },
61
+ workflowId: {
62
+ type: ScalarTypeEnum.String_unsecure(),
63
+ isOptional: false
64
+ },
65
+ fromStepKey: {
66
+ type: ScalarTypeEnum.String_unsecure(),
67
+ isOptional: true
68
+ },
69
+ toStepKey: {
70
+ type: ScalarTypeEnum.String_unsecure(),
71
+ isOptional: false
72
+ },
73
+ action: {
74
+ type: ScalarTypeEnum.String_unsecure(),
75
+ isOptional: true
76
+ },
77
+ executedBy: {
78
+ type: ScalarTypeEnum.String_unsecure(),
79
+ isOptional: false
80
+ },
81
+ timestamp: {
82
+ type: ScalarTypeEnum.DateTime(),
83
+ isOptional: false
84
+ }
85
+ }
86
+ });
87
+ /**
88
+ * Payload when instance completes.
89
+ */
90
+ const InstanceCompletedPayload = defineSchemaModel({
91
+ name: "InstanceCompletedEventPayload",
92
+ description: "Payload when instance completes",
93
+ fields: {
94
+ instanceId: {
95
+ type: ScalarTypeEnum.String_unsecure(),
96
+ isOptional: false
97
+ },
98
+ workflowId: {
99
+ type: ScalarTypeEnum.String_unsecure(),
100
+ isOptional: false
101
+ },
102
+ workflowKey: {
103
+ type: ScalarTypeEnum.String_unsecure(),
104
+ isOptional: false
105
+ },
106
+ outcome: {
107
+ type: ScalarTypeEnum.String_unsecure(),
108
+ isOptional: false
109
+ },
110
+ referenceId: {
111
+ type: ScalarTypeEnum.String_unsecure(),
112
+ isOptional: true
113
+ },
114
+ referenceType: {
115
+ type: ScalarTypeEnum.String_unsecure(),
116
+ isOptional: true
117
+ },
118
+ duration: {
119
+ type: ScalarTypeEnum.Int_unsecure(),
120
+ isOptional: false
121
+ },
122
+ timestamp: {
123
+ type: ScalarTypeEnum.DateTime(),
124
+ isOptional: false
125
+ }
126
+ }
127
+ });
128
+ /**
129
+ * InstanceStartedEvent - A new workflow instance has been started.
130
+ */
131
+ const InstanceStartedEvent = defineEvent({
132
+ meta: {
133
+ key: "workflow.instance.started",
134
+ version: "1.0.0",
135
+ description: "A new workflow instance has been started.",
136
+ stability: "stable",
137
+ owners: ["@workflow-team"],
138
+ tags: [
139
+ "workflow",
140
+ "instance",
141
+ "started"
142
+ ]
143
+ },
144
+ payload: InstanceEventPayload
145
+ });
146
+ /**
147
+ * StepEnteredEvent - A workflow instance has entered a new step.
148
+ */
149
+ const StepEnteredEvent = defineEvent({
150
+ meta: {
151
+ key: "workflow.step.entered",
152
+ version: "1.0.0",
153
+ description: "A workflow instance has entered a new step.",
154
+ stability: "stable",
155
+ owners: ["@workflow-team"],
156
+ tags: [
157
+ "workflow",
158
+ "step",
159
+ "entered"
160
+ ]
161
+ },
162
+ payload: StepTransitionPayload
163
+ });
164
+ /**
165
+ * StepExitedEvent - A workflow instance has exited a step.
166
+ */
167
+ const StepExitedEvent = defineEvent({
168
+ meta: {
169
+ key: "workflow.step.exited",
170
+ version: "1.0.0",
171
+ description: "A workflow instance has exited a step.",
172
+ stability: "stable",
173
+ owners: ["@workflow-team"],
174
+ tags: [
175
+ "workflow",
176
+ "step",
177
+ "exited"
178
+ ]
179
+ },
180
+ payload: StepTransitionPayload
181
+ });
182
+ /**
183
+ * InstanceCompletedEvent - A workflow instance has completed.
184
+ */
185
+ const InstanceCompletedEvent = defineEvent({
186
+ meta: {
187
+ key: "workflow.instance.completed",
188
+ version: "1.0.0",
189
+ description: "A workflow instance has completed.",
190
+ stability: "stable",
191
+ owners: ["@workflow-team"],
192
+ tags: [
193
+ "workflow",
194
+ "instance",
195
+ "completed"
196
+ ]
197
+ },
198
+ payload: InstanceCompletedPayload
199
+ });
200
+ /**
201
+ * InstanceCancelledEvent - A workflow instance has been cancelled.
202
+ */
203
+ const InstanceCancelledEvent = defineEvent({
204
+ meta: {
205
+ key: "workflow.instance.cancelled",
206
+ version: "1.0.0",
207
+ description: "A workflow instance has been cancelled.",
208
+ stability: "stable",
209
+ owners: ["@workflow-team"],
210
+ tags: [
211
+ "workflow",
212
+ "instance",
213
+ "cancelled"
214
+ ]
215
+ },
216
+ payload: InstanceEventPayload
217
+ });
218
+ /**
219
+ * InstancePausedEvent - A workflow instance has been paused.
220
+ */
221
+ const InstancePausedEvent = defineEvent({
222
+ meta: {
223
+ key: "workflow.instance.paused",
224
+ version: "1.0.0",
225
+ description: "A workflow instance has been paused.",
226
+ stability: "stable",
227
+ owners: ["@workflow-team"],
228
+ tags: [
229
+ "workflow",
230
+ "instance",
231
+ "paused"
232
+ ]
233
+ },
234
+ payload: InstanceEventPayload
235
+ });
236
+ /**
237
+ * InstanceResumedEvent - A workflow instance has been resumed.
238
+ */
239
+ const InstanceResumedEvent = defineEvent({
240
+ meta: {
241
+ key: "workflow.instance.resumed",
242
+ version: "1.0.0",
243
+ description: "A workflow instance has been resumed.",
244
+ stability: "stable",
245
+ owners: ["@workflow-team"],
246
+ tags: [
247
+ "workflow",
248
+ "instance",
249
+ "resumed"
250
+ ]
251
+ },
252
+ payload: InstanceEventPayload
253
+ });
254
+ /**
255
+ * InstanceFailedEvent - A workflow instance has failed.
256
+ */
257
+ const InstanceFailedEvent = defineEvent({
258
+ meta: {
259
+ key: "workflow.instance.failed",
260
+ version: "1.0.0",
261
+ description: "A workflow instance has failed.",
262
+ stability: "stable",
263
+ owners: ["@workflow-team"],
264
+ tags: [
265
+ "workflow",
266
+ "instance",
267
+ "failed"
268
+ ]
269
+ },
270
+ payload: InstanceEventPayload
271
+ });
272
+ /**
273
+ * InstanceTimedOutEvent - A workflow instance has timed out.
274
+ */
275
+ const InstanceTimedOutEvent = defineEvent({
276
+ meta: {
277
+ key: "workflow.instance.timedOut",
278
+ version: "1.0.0",
279
+ description: "A workflow instance has timed out.",
280
+ stability: "stable",
281
+ owners: ["@workflow-team"],
282
+ tags: [
283
+ "workflow",
284
+ "instance",
285
+ "timeout"
286
+ ]
287
+ },
288
+ payload: InstanceEventPayload
289
+ });
290
+
291
+ //#endregion
292
+ export { InstanceCancelledEvent, InstanceCompletedEvent, InstanceFailedEvent, InstancePausedEvent, InstanceResumedEvent, InstanceStartedEvent, InstanceTimedOutEvent, StepEnteredEvent, StepExitedEvent };
293
+ //# sourceMappingURL=instance.event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.event.js","names":[],"sources":["../../src/instance/instance.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@contractspec/lib.contracts';\nimport { ScalarTypeEnum } from '@contractspec/lib.schema';\n\n/**\n * Base payload for instance events.\n */\nconst InstanceEventPayload = defineSchemaModel({\n name: 'InstanceEventPayload',\n description: 'Base payload for instance events',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n referenceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n triggeredBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload for step transition events.\n */\nconst StepTransitionPayload = defineSchemaModel({\n name: 'StepTransitionEventPayload',\n description: 'Payload for step transition events',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n fromStepKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n toStepKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n action: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n executedBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * Payload when instance completes.\n */\nconst InstanceCompletedPayload = defineSchemaModel({\n name: 'InstanceCompletedEventPayload',\n description: 'Payload when instance completes',\n fields: {\n instanceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n workflowKey: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n outcome: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n referenceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n duration: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * InstanceStartedEvent - A new workflow instance has been started.\n */\nexport const InstanceStartedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.started',\n version: '1.0.0',\n description: 'A new workflow instance has been started.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'started'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * StepEnteredEvent - A workflow instance has entered a new step.\n */\nexport const StepEnteredEvent = defineEvent({\n meta: {\n key: 'workflow.step.entered',\n version: '1.0.0',\n description: 'A workflow instance has entered a new step.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'step', 'entered'],\n },\n payload: StepTransitionPayload,\n});\n\n/**\n * StepExitedEvent - A workflow instance has exited a step.\n */\nexport const StepExitedEvent = defineEvent({\n meta: {\n key: 'workflow.step.exited',\n version: '1.0.0',\n description: 'A workflow instance has exited a step.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'step', 'exited'],\n },\n payload: StepTransitionPayload,\n});\n\n/**\n * InstanceCompletedEvent - A workflow instance has completed.\n */\nexport const InstanceCompletedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.completed',\n version: '1.0.0',\n description: 'A workflow instance has completed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'completed'],\n },\n payload: InstanceCompletedPayload,\n});\n\n/**\n * InstanceCancelledEvent - A workflow instance has been cancelled.\n */\nexport const InstanceCancelledEvent = defineEvent({\n meta: {\n key: 'workflow.instance.cancelled',\n version: '1.0.0',\n description: 'A workflow instance has been cancelled.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'cancelled'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstancePausedEvent - A workflow instance has been paused.\n */\nexport const InstancePausedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.paused',\n version: '1.0.0',\n description: 'A workflow instance has been paused.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'paused'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceResumedEvent - A workflow instance has been resumed.\n */\nexport const InstanceResumedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.resumed',\n version: '1.0.0',\n description: 'A workflow instance has been resumed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'resumed'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceFailedEvent - A workflow instance has failed.\n */\nexport const InstanceFailedEvent = defineEvent({\n meta: {\n key: 'workflow.instance.failed',\n version: '1.0.0',\n description: 'A workflow instance has failed.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'failed'],\n },\n payload: InstanceEventPayload,\n});\n\n/**\n * InstanceTimedOutEvent - A workflow instance has timed out.\n */\nexport const InstanceTimedOutEvent = defineEvent({\n meta: {\n key: 'workflow.instance.timedOut',\n version: '1.0.0',\n description: 'A workflow instance has timed out.',\n stability: 'stable',\n owners: ['@workflow-team'],\n tags: ['workflow', 'instance', 'timeout'],\n },\n payload: InstanceEventPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,uBAAuB,kBAAkB;CAC7C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,YAAY;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACzE,aAAa;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;E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Y;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAU;EAC1C;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAS;EACzC;CACD,SAAS;CACV,CAAC;;;;AAKF,MAAa,wBAAwB,YAAY;CAC/C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,aAAa;EACb,WAAW;EACX,QAAQ,CAAC,iBAAiB;EAC1B,MAAM;GAAC;GAAY;GAAY;GAAU;EAC1C;CACD,SAAS;CACV,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { HandlerContext, WorkflowInstanceRecord } from "../shared/types.js";
2
+
3
+ //#region src/instance/instance.handler.d.ts
4
+
5
+ declare function handleStartWorkflow(input: {
6
+ workflowKey: string;
7
+ contextData?: Record<string, unknown>;
8
+ referenceId?: string;
9
+ referenceType?: string;
10
+ priority?: number;
11
+ dueAt?: Date;
12
+ }, context: HandlerContext): Promise<WorkflowInstanceRecord>;
13
+ declare function handleTransitionWorkflow(input: {
14
+ instanceId: string;
15
+ action: string;
16
+ data?: Record<string, unknown>;
17
+ comment?: string;
18
+ }, context: HandlerContext): Promise<{
19
+ success: boolean;
20
+ instance: WorkflowInstanceRecord;
21
+ previousStepKey?: string;
22
+ currentStepKey?: string;
23
+ message?: string;
24
+ }>;
25
+ //#endregion
26
+ export { handleStartWorkflow, handleTransitionWorkflow };
27
+ //# sourceMappingURL=instance.handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"instance.handler.d.ts","names":[],"sources":["../../src/instance/instance.handler.ts"],"sourcesContent":[],"mappings":";;;;AAgBkB,iBAHI,mBAAA,CAGJ,KAAA,EAAA;EAIN,WAAA,EAAA,MAAA;EAED,WAAA,CAAA,EANO,MAMP,CAAA,MAAA,EAAA,OAAA,CAAA;EACA,WAAA,CAAA,EAAA,MAAA;EAAR,aAAA,CAAA,EAAA,MAAA;EAAO,QAAA,CAAA,EAAA,MAAA;EA+CY,KAAA,CAAA,EAlDV,IAkDU;CAIX,EAAA,OAAA,EApDA,cAoDA,CAAA,EAnDR,OAmDQ,CAnDA,sBAmDA,CAAA;AAGA,iBAPW,wBAAA,CAOX,KAAA,EAAA;EAGC,UAAA,EAAA,MAAA;EAFT,MAAA,EAAA,MAAA;EAAO,IAAA,CAAA,EAJC,MAID,CAAA,MAAA,EAAA,OAAA,CAAA;;YADC,iBACR;;YAES"}