@lssm/example.workflow-system 0.0.0-canary-20251217052941 → 0.0.0-canary-20251217060433

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 (34) hide show
  1. package/dist/approval/approval.contracts.d.ts +534 -0
  2. package/dist/approval/approval.enum.d.ts +13 -0
  3. package/dist/approval/approval.event.d.ts +130 -0
  4. package/dist/approval/approval.handler.d.ts +22 -0
  5. package/dist/approval/approval.schema.d.ts +99 -0
  6. package/dist/approval/index.d.ts +5 -0
  7. package/dist/docs/index.d.ts +1 -0
  8. package/dist/docs/workflow-system.docblock.d.ts +1 -0
  9. package/dist/entities/approval.d.ts +57 -0
  10. package/dist/entities/index.d.ts +138 -0
  11. package/dist/entities/instance.d.ts +68 -0
  12. package/dist/entities/step.d.ts +49 -0
  13. package/dist/entities/workflow.d.ts +40 -0
  14. package/dist/example.d.ts +39 -0
  15. package/dist/index.d.ts +19 -0
  16. package/dist/instance/index.d.ts +5 -0
  17. package/dist/instance/instance.contracts.d.ts +1023 -0
  18. package/dist/instance/instance.enum.d.ts +9 -0
  19. package/dist/instance/instance.event.d.ts +355 -0
  20. package/dist/instance/instance.handler.d.ts +26 -0
  21. package/dist/instance/instance.schema.d.ts +222 -0
  22. package/dist/presentations/index.d.ts +63 -0
  23. package/dist/shared/index.d.ts +3 -0
  24. package/dist/shared/mock-data.d.ts +18 -0
  25. package/dist/shared/types.d.ts +80 -0
  26. package/dist/state-machine/index.d.ts +147 -0
  27. package/dist/workflow/index.d.ts +5 -0
  28. package/dist/workflow/workflow.contracts.d.ts +1010 -0
  29. package/dist/workflow/workflow.enum.d.ts +21 -0
  30. package/dist/workflow/workflow.event.d.ts +134 -0
  31. package/dist/workflow/workflow.handler.d.ts +28 -0
  32. package/dist/workflow/workflow.schema.d.ts +264 -0
  33. package/dist/workflow-system.feature.d.ts +11 -0
  34. package/package.json +44 -44
@@ -0,0 +1,534 @@
1
+ import * as _lssm_lib_schema84 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts3 from "@lssm/lib.contracts";
3
+
4
+ //#region src/approval/approval.contracts.d.ts
5
+ /**
6
+ * Approve or reject an approval request.
7
+ */
8
+ declare const SubmitDecisionContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema84.SchemaModel<{
9
+ requestId: {
10
+ type: _lssm_lib_schema84.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ decision: {
14
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
15
+ isOptional: false;
16
+ };
17
+ comment: {
18
+ type: _lssm_lib_schema84.FieldType<string, string>;
19
+ isOptional: true;
20
+ };
21
+ data: {
22
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
23
+ isOptional: true;
24
+ };
25
+ }>, _lssm_lib_schema84.SchemaModel<{
26
+ id: {
27
+ type: _lssm_lib_schema84.FieldType<string, string>;
28
+ isOptional: false;
29
+ };
30
+ workflowInstanceId: {
31
+ type: _lssm_lib_schema84.FieldType<string, string>;
32
+ isOptional: false;
33
+ };
34
+ stepExecutionId: {
35
+ type: _lssm_lib_schema84.FieldType<string, string>;
36
+ isOptional: false;
37
+ };
38
+ approverId: {
39
+ type: _lssm_lib_schema84.FieldType<string, string>;
40
+ isOptional: false;
41
+ };
42
+ approverRole: {
43
+ type: _lssm_lib_schema84.FieldType<string, string>;
44
+ isOptional: true;
45
+ };
46
+ title: {
47
+ type: _lssm_lib_schema84.FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ description: {
51
+ type: _lssm_lib_schema84.FieldType<string, string>;
52
+ isOptional: true;
53
+ };
54
+ status: {
55
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
56
+ isOptional: false;
57
+ };
58
+ decision: {
59
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
60
+ isOptional: true;
61
+ };
62
+ decisionComment: {
63
+ type: _lssm_lib_schema84.FieldType<string, string>;
64
+ isOptional: true;
65
+ };
66
+ decidedAt: {
67
+ type: _lssm_lib_schema84.FieldType<Date, string>;
68
+ isOptional: true;
69
+ };
70
+ dueAt: {
71
+ type: _lssm_lib_schema84.FieldType<Date, string>;
72
+ isOptional: true;
73
+ };
74
+ contextSnapshot: {
75
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
76
+ isOptional: true;
77
+ };
78
+ sequenceOrder: {
79
+ type: _lssm_lib_schema84.FieldType<number, number>;
80
+ isOptional: false;
81
+ };
82
+ createdAt: {
83
+ type: _lssm_lib_schema84.FieldType<Date, string>;
84
+ isOptional: false;
85
+ };
86
+ }>, {
87
+ name: string;
88
+ version: number;
89
+ when: string;
90
+ payload: _lssm_lib_schema84.SchemaModel<{
91
+ id: {
92
+ type: _lssm_lib_schema84.FieldType<string, string>;
93
+ isOptional: false;
94
+ };
95
+ workflowInstanceId: {
96
+ type: _lssm_lib_schema84.FieldType<string, string>;
97
+ isOptional: false;
98
+ };
99
+ stepExecutionId: {
100
+ type: _lssm_lib_schema84.FieldType<string, string>;
101
+ isOptional: false;
102
+ };
103
+ approverId: {
104
+ type: _lssm_lib_schema84.FieldType<string, string>;
105
+ isOptional: false;
106
+ };
107
+ approverRole: {
108
+ type: _lssm_lib_schema84.FieldType<string, string>;
109
+ isOptional: true;
110
+ };
111
+ title: {
112
+ type: _lssm_lib_schema84.FieldType<string, string>;
113
+ isOptional: false;
114
+ };
115
+ description: {
116
+ type: _lssm_lib_schema84.FieldType<string, string>;
117
+ isOptional: true;
118
+ };
119
+ status: {
120
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
121
+ isOptional: false;
122
+ };
123
+ decision: {
124
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
125
+ isOptional: true;
126
+ };
127
+ decisionComment: {
128
+ type: _lssm_lib_schema84.FieldType<string, string>;
129
+ isOptional: true;
130
+ };
131
+ decidedAt: {
132
+ type: _lssm_lib_schema84.FieldType<Date, string>;
133
+ isOptional: true;
134
+ };
135
+ dueAt: {
136
+ type: _lssm_lib_schema84.FieldType<Date, string>;
137
+ isOptional: true;
138
+ };
139
+ contextSnapshot: {
140
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
141
+ isOptional: true;
142
+ };
143
+ sequenceOrder: {
144
+ type: _lssm_lib_schema84.FieldType<number, number>;
145
+ isOptional: false;
146
+ };
147
+ createdAt: {
148
+ type: _lssm_lib_schema84.FieldType<Date, string>;
149
+ isOptional: false;
150
+ };
151
+ }>;
152
+ }[]>;
153
+ /**
154
+ * Delegate an approval to another user.
155
+ */
156
+ declare const DelegateApprovalContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema84.SchemaModel<{
157
+ requestId: {
158
+ type: _lssm_lib_schema84.FieldType<string, string>;
159
+ isOptional: false;
160
+ };
161
+ delegateTo: {
162
+ type: _lssm_lib_schema84.FieldType<string, string>;
163
+ isOptional: false;
164
+ };
165
+ reason: {
166
+ type: _lssm_lib_schema84.FieldType<string, string>;
167
+ isOptional: true;
168
+ };
169
+ }>, _lssm_lib_schema84.SchemaModel<{
170
+ id: {
171
+ type: _lssm_lib_schema84.FieldType<string, string>;
172
+ isOptional: false;
173
+ };
174
+ workflowInstanceId: {
175
+ type: _lssm_lib_schema84.FieldType<string, string>;
176
+ isOptional: false;
177
+ };
178
+ stepExecutionId: {
179
+ type: _lssm_lib_schema84.FieldType<string, string>;
180
+ isOptional: false;
181
+ };
182
+ approverId: {
183
+ type: _lssm_lib_schema84.FieldType<string, string>;
184
+ isOptional: false;
185
+ };
186
+ approverRole: {
187
+ type: _lssm_lib_schema84.FieldType<string, string>;
188
+ isOptional: true;
189
+ };
190
+ title: {
191
+ type: _lssm_lib_schema84.FieldType<string, string>;
192
+ isOptional: false;
193
+ };
194
+ description: {
195
+ type: _lssm_lib_schema84.FieldType<string, string>;
196
+ isOptional: true;
197
+ };
198
+ status: {
199
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
200
+ isOptional: false;
201
+ };
202
+ decision: {
203
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
204
+ isOptional: true;
205
+ };
206
+ decisionComment: {
207
+ type: _lssm_lib_schema84.FieldType<string, string>;
208
+ isOptional: true;
209
+ };
210
+ decidedAt: {
211
+ type: _lssm_lib_schema84.FieldType<Date, string>;
212
+ isOptional: true;
213
+ };
214
+ dueAt: {
215
+ type: _lssm_lib_schema84.FieldType<Date, string>;
216
+ isOptional: true;
217
+ };
218
+ contextSnapshot: {
219
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
220
+ isOptional: true;
221
+ };
222
+ sequenceOrder: {
223
+ type: _lssm_lib_schema84.FieldType<number, number>;
224
+ isOptional: false;
225
+ };
226
+ createdAt: {
227
+ type: _lssm_lib_schema84.FieldType<Date, string>;
228
+ isOptional: false;
229
+ };
230
+ }>, {
231
+ name: string;
232
+ version: number;
233
+ when: string;
234
+ payload: _lssm_lib_schema84.SchemaModel<{
235
+ id: {
236
+ type: _lssm_lib_schema84.FieldType<string, string>;
237
+ isOptional: false;
238
+ };
239
+ workflowInstanceId: {
240
+ type: _lssm_lib_schema84.FieldType<string, string>;
241
+ isOptional: false;
242
+ };
243
+ stepExecutionId: {
244
+ type: _lssm_lib_schema84.FieldType<string, string>;
245
+ isOptional: false;
246
+ };
247
+ approverId: {
248
+ type: _lssm_lib_schema84.FieldType<string, string>;
249
+ isOptional: false;
250
+ };
251
+ approverRole: {
252
+ type: _lssm_lib_schema84.FieldType<string, string>;
253
+ isOptional: true;
254
+ };
255
+ title: {
256
+ type: _lssm_lib_schema84.FieldType<string, string>;
257
+ isOptional: false;
258
+ };
259
+ description: {
260
+ type: _lssm_lib_schema84.FieldType<string, string>;
261
+ isOptional: true;
262
+ };
263
+ status: {
264
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
265
+ isOptional: false;
266
+ };
267
+ decision: {
268
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
269
+ isOptional: true;
270
+ };
271
+ decisionComment: {
272
+ type: _lssm_lib_schema84.FieldType<string, string>;
273
+ isOptional: true;
274
+ };
275
+ decidedAt: {
276
+ type: _lssm_lib_schema84.FieldType<Date, string>;
277
+ isOptional: true;
278
+ };
279
+ dueAt: {
280
+ type: _lssm_lib_schema84.FieldType<Date, string>;
281
+ isOptional: true;
282
+ };
283
+ contextSnapshot: {
284
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
285
+ isOptional: true;
286
+ };
287
+ sequenceOrder: {
288
+ type: _lssm_lib_schema84.FieldType<number, number>;
289
+ isOptional: false;
290
+ };
291
+ createdAt: {
292
+ type: _lssm_lib_schema84.FieldType<Date, string>;
293
+ isOptional: false;
294
+ };
295
+ }>;
296
+ }[]>;
297
+ /**
298
+ * Add a comment to an approval request.
299
+ */
300
+ declare const AddApprovalCommentContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema84.SchemaModel<{
301
+ requestId: {
302
+ type: _lssm_lib_schema84.FieldType<string, string>;
303
+ isOptional: false;
304
+ };
305
+ content: {
306
+ type: _lssm_lib_schema84.FieldType<string, string>;
307
+ isOptional: false;
308
+ };
309
+ isInternal: {
310
+ type: _lssm_lib_schema84.FieldType<boolean, boolean>;
311
+ isOptional: true;
312
+ };
313
+ }>, _lssm_lib_schema84.SchemaModel<{
314
+ id: {
315
+ type: _lssm_lib_schema84.FieldType<string, string>;
316
+ isOptional: false;
317
+ };
318
+ approvalRequestId: {
319
+ type: _lssm_lib_schema84.FieldType<string, string>;
320
+ isOptional: false;
321
+ };
322
+ authorId: {
323
+ type: _lssm_lib_schema84.FieldType<string, string>;
324
+ isOptional: false;
325
+ };
326
+ content: {
327
+ type: _lssm_lib_schema84.FieldType<string, string>;
328
+ isOptional: false;
329
+ };
330
+ isInternal: {
331
+ type: _lssm_lib_schema84.FieldType<boolean, boolean>;
332
+ isOptional: false;
333
+ };
334
+ createdAt: {
335
+ type: _lssm_lib_schema84.FieldType<Date, string>;
336
+ isOptional: false;
337
+ };
338
+ }>, {
339
+ name: string;
340
+ version: number;
341
+ when: string;
342
+ payload: _lssm_lib_schema84.SchemaModel<{
343
+ id: {
344
+ type: _lssm_lib_schema84.FieldType<string, string>;
345
+ isOptional: false;
346
+ };
347
+ approvalRequestId: {
348
+ type: _lssm_lib_schema84.FieldType<string, string>;
349
+ isOptional: false;
350
+ };
351
+ authorId: {
352
+ type: _lssm_lib_schema84.FieldType<string, string>;
353
+ isOptional: false;
354
+ };
355
+ content: {
356
+ type: _lssm_lib_schema84.FieldType<string, string>;
357
+ isOptional: false;
358
+ };
359
+ isInternal: {
360
+ type: _lssm_lib_schema84.FieldType<boolean, boolean>;
361
+ isOptional: false;
362
+ };
363
+ createdAt: {
364
+ type: _lssm_lib_schema84.FieldType<Date, string>;
365
+ isOptional: false;
366
+ };
367
+ }>;
368
+ }[]>;
369
+ /**
370
+ * List approvals assigned to the current user.
371
+ */
372
+ declare const ListMyApprovalsContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema84.SchemaModel<{
373
+ status: {
374
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
375
+ isOptional: true;
376
+ };
377
+ limit: {
378
+ type: _lssm_lib_schema84.FieldType<number, number>;
379
+ isOptional: true;
380
+ defaultValue: number;
381
+ };
382
+ offset: {
383
+ type: _lssm_lib_schema84.FieldType<number, number>;
384
+ isOptional: true;
385
+ defaultValue: number;
386
+ };
387
+ }>, _lssm_lib_schema84.SchemaModel<{
388
+ requests: {
389
+ type: _lssm_lib_schema84.SchemaModel<{
390
+ id: {
391
+ type: _lssm_lib_schema84.FieldType<string, string>;
392
+ isOptional: false;
393
+ };
394
+ workflowInstanceId: {
395
+ type: _lssm_lib_schema84.FieldType<string, string>;
396
+ isOptional: false;
397
+ };
398
+ stepExecutionId: {
399
+ type: _lssm_lib_schema84.FieldType<string, string>;
400
+ isOptional: false;
401
+ };
402
+ approverId: {
403
+ type: _lssm_lib_schema84.FieldType<string, string>;
404
+ isOptional: false;
405
+ };
406
+ approverRole: {
407
+ type: _lssm_lib_schema84.FieldType<string, string>;
408
+ isOptional: true;
409
+ };
410
+ title: {
411
+ type: _lssm_lib_schema84.FieldType<string, string>;
412
+ isOptional: false;
413
+ };
414
+ description: {
415
+ type: _lssm_lib_schema84.FieldType<string, string>;
416
+ isOptional: true;
417
+ };
418
+ status: {
419
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
420
+ isOptional: false;
421
+ };
422
+ decision: {
423
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
424
+ isOptional: true;
425
+ };
426
+ decisionComment: {
427
+ type: _lssm_lib_schema84.FieldType<string, string>;
428
+ isOptional: true;
429
+ };
430
+ decidedAt: {
431
+ type: _lssm_lib_schema84.FieldType<Date, string>;
432
+ isOptional: true;
433
+ };
434
+ dueAt: {
435
+ type: _lssm_lib_schema84.FieldType<Date, string>;
436
+ isOptional: true;
437
+ };
438
+ contextSnapshot: {
439
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
440
+ isOptional: true;
441
+ };
442
+ sequenceOrder: {
443
+ type: _lssm_lib_schema84.FieldType<number, number>;
444
+ isOptional: false;
445
+ };
446
+ createdAt: {
447
+ type: _lssm_lib_schema84.FieldType<Date, string>;
448
+ isOptional: false;
449
+ };
450
+ }>;
451
+ isArray: true;
452
+ isOptional: false;
453
+ };
454
+ total: {
455
+ type: _lssm_lib_schema84.FieldType<number, number>;
456
+ isOptional: false;
457
+ };
458
+ pendingCount: {
459
+ type: _lssm_lib_schema84.FieldType<number, number>;
460
+ isOptional: false;
461
+ };
462
+ }>, undefined>;
463
+ /**
464
+ * Get a single approval request.
465
+ */
466
+ declare const GetApprovalContract: _lssm_lib_contracts3.ContractSpec<_lssm_lib_schema84.SchemaModel<{
467
+ requestId: {
468
+ type: _lssm_lib_schema84.FieldType<string, string>;
469
+ isOptional: false;
470
+ };
471
+ }>, _lssm_lib_schema84.SchemaModel<{
472
+ id: {
473
+ type: _lssm_lib_schema84.FieldType<string, string>;
474
+ isOptional: false;
475
+ };
476
+ workflowInstanceId: {
477
+ type: _lssm_lib_schema84.FieldType<string, string>;
478
+ isOptional: false;
479
+ };
480
+ stepExecutionId: {
481
+ type: _lssm_lib_schema84.FieldType<string, string>;
482
+ isOptional: false;
483
+ };
484
+ approverId: {
485
+ type: _lssm_lib_schema84.FieldType<string, string>;
486
+ isOptional: false;
487
+ };
488
+ approverRole: {
489
+ type: _lssm_lib_schema84.FieldType<string, string>;
490
+ isOptional: true;
491
+ };
492
+ title: {
493
+ type: _lssm_lib_schema84.FieldType<string, string>;
494
+ isOptional: false;
495
+ };
496
+ description: {
497
+ type: _lssm_lib_schema84.FieldType<string, string>;
498
+ isOptional: true;
499
+ };
500
+ status: {
501
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string, string, string]>;
502
+ isOptional: false;
503
+ };
504
+ decision: {
505
+ type: _lssm_lib_schema84.EnumType<[string, string, string, string, string]>;
506
+ isOptional: true;
507
+ };
508
+ decisionComment: {
509
+ type: _lssm_lib_schema84.FieldType<string, string>;
510
+ isOptional: true;
511
+ };
512
+ decidedAt: {
513
+ type: _lssm_lib_schema84.FieldType<Date, string>;
514
+ isOptional: true;
515
+ };
516
+ dueAt: {
517
+ type: _lssm_lib_schema84.FieldType<Date, string>;
518
+ isOptional: true;
519
+ };
520
+ contextSnapshot: {
521
+ type: _lssm_lib_schema84.FieldType<unknown, unknown>;
522
+ isOptional: true;
523
+ };
524
+ sequenceOrder: {
525
+ type: _lssm_lib_schema84.FieldType<number, number>;
526
+ isOptional: false;
527
+ };
528
+ createdAt: {
529
+ type: _lssm_lib_schema84.FieldType<Date, string>;
530
+ isOptional: false;
531
+ };
532
+ }>, undefined>;
533
+ //#endregion
534
+ export { AddApprovalCommentContract, DelegateApprovalContract, GetApprovalContract, ListMyApprovalsContract, SubmitDecisionContract };
@@ -0,0 +1,13 @@
1
+ import * as _lssm_lib_schema0 from "@lssm/lib.schema";
2
+
3
+ //#region src/approval/approval.enum.d.ts
4
+ /**
5
+ * Approval status enum.
6
+ */
7
+ declare const ApprovalStatusEnum: _lssm_lib_schema0.EnumType<[string, string, string, string, string, string, string]>;
8
+ /**
9
+ * Approval decision enum.
10
+ */
11
+ declare const ApprovalDecisionEnum: _lssm_lib_schema0.EnumType<[string, string, string, string, string]>;
12
+ //#endregion
13
+ export { ApprovalDecisionEnum, ApprovalStatusEnum };
@@ -0,0 +1,130 @@
1
+ import * as _lssm_lib_schema1 from "@lssm/lib.schema";
2
+ import * as _lssm_lib_contracts0 from "@lssm/lib.contracts";
3
+
4
+ //#region src/approval/approval.event.d.ts
5
+ /**
6
+ * ApprovalRequestedEvent - An approval has been requested.
7
+ */
8
+ declare const ApprovalRequestedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema1.SchemaModel<{
9
+ requestId: {
10
+ type: _lssm_lib_schema1.FieldType<string, string>;
11
+ isOptional: false;
12
+ };
13
+ instanceId: {
14
+ type: _lssm_lib_schema1.FieldType<string, string>;
15
+ isOptional: false;
16
+ };
17
+ workflowKey: {
18
+ type: _lssm_lib_schema1.FieldType<string, string>;
19
+ isOptional: false;
20
+ };
21
+ approverId: {
22
+ type: _lssm_lib_schema1.FieldType<string, string>;
23
+ isOptional: false;
24
+ };
25
+ approverRole: {
26
+ type: _lssm_lib_schema1.FieldType<string, string>;
27
+ isOptional: true;
28
+ };
29
+ title: {
30
+ type: _lssm_lib_schema1.FieldType<string, string>;
31
+ isOptional: false;
32
+ };
33
+ dueAt: {
34
+ type: _lssm_lib_schema1.FieldType<Date, string>;
35
+ isOptional: true;
36
+ };
37
+ timestamp: {
38
+ type: _lssm_lib_schema1.FieldType<Date, string>;
39
+ isOptional: false;
40
+ };
41
+ }>>;
42
+ /**
43
+ * ApprovalDecidedEvent - An approval decision has been made.
44
+ */
45
+ declare const ApprovalDecidedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema1.SchemaModel<{
46
+ requestId: {
47
+ type: _lssm_lib_schema1.FieldType<string, string>;
48
+ isOptional: false;
49
+ };
50
+ instanceId: {
51
+ type: _lssm_lib_schema1.FieldType<string, string>;
52
+ isOptional: false;
53
+ };
54
+ decision: {
55
+ type: _lssm_lib_schema1.FieldType<string, string>;
56
+ isOptional: false;
57
+ };
58
+ decidedBy: {
59
+ type: _lssm_lib_schema1.FieldType<string, string>;
60
+ isOptional: false;
61
+ };
62
+ comment: {
63
+ type: _lssm_lib_schema1.FieldType<string, string>;
64
+ isOptional: true;
65
+ };
66
+ timestamp: {
67
+ type: _lssm_lib_schema1.FieldType<Date, string>;
68
+ isOptional: false;
69
+ };
70
+ }>>;
71
+ /**
72
+ * ApprovalDelegatedEvent - An approval has been delegated.
73
+ */
74
+ declare const ApprovalDelegatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema1.SchemaModel<{
75
+ requestId: {
76
+ type: _lssm_lib_schema1.FieldType<string, string>;
77
+ isOptional: false;
78
+ };
79
+ instanceId: {
80
+ type: _lssm_lib_schema1.FieldType<string, string>;
81
+ isOptional: false;
82
+ };
83
+ fromUserId: {
84
+ type: _lssm_lib_schema1.FieldType<string, string>;
85
+ isOptional: false;
86
+ };
87
+ toUserId: {
88
+ type: _lssm_lib_schema1.FieldType<string, string>;
89
+ isOptional: false;
90
+ };
91
+ reason: {
92
+ type: _lssm_lib_schema1.FieldType<string, string>;
93
+ isOptional: true;
94
+ };
95
+ timestamp: {
96
+ type: _lssm_lib_schema1.FieldType<Date, string>;
97
+ isOptional: false;
98
+ };
99
+ }>>;
100
+ /**
101
+ * ApprovalEscalatedEvent - An approval has been escalated.
102
+ */
103
+ declare const ApprovalEscalatedEvent: _lssm_lib_contracts0.EventSpec<_lssm_lib_schema1.SchemaModel<{
104
+ requestId: {
105
+ type: _lssm_lib_schema1.FieldType<string, string>;
106
+ isOptional: false;
107
+ };
108
+ instanceId: {
109
+ type: _lssm_lib_schema1.FieldType<string, string>;
110
+ isOptional: false;
111
+ };
112
+ escalationLevel: {
113
+ type: _lssm_lib_schema1.FieldType<number, number>;
114
+ isOptional: false;
115
+ };
116
+ escalatedTo: {
117
+ type: _lssm_lib_schema1.FieldType<string, string>;
118
+ isOptional: false;
119
+ };
120
+ reason: {
121
+ type: _lssm_lib_schema1.FieldType<string, string>;
122
+ isOptional: false;
123
+ };
124
+ timestamp: {
125
+ type: _lssm_lib_schema1.FieldType<Date, string>;
126
+ isOptional: false;
127
+ };
128
+ }>>;
129
+ //#endregion
130
+ export { ApprovalDecidedEvent, ApprovalDelegatedEvent, ApprovalEscalatedEvent, ApprovalRequestedEvent };
@@ -0,0 +1,22 @@
1
+ import { ApprovalRequestRecord, HandlerContext, WorkflowInstanceRecord, WorkflowStepRecord } from "../shared/types.js";
2
+
3
+ //#region src/approval/approval.handler.d.ts
4
+
5
+ declare function createApprovalRequests(instance: WorkflowInstanceRecord, step: WorkflowStepRecord, _context: HandlerContext): Promise<void>;
6
+ declare function handleSubmitDecision(input: {
7
+ requestId: string;
8
+ decision: 'APPROVE' | 'REJECT' | 'REQUEST_CHANGES' | 'DELEGATE' | 'ABSTAIN';
9
+ comment?: string;
10
+ data?: Record<string, unknown>;
11
+ }, context: HandlerContext): Promise<ApprovalRequestRecord>;
12
+ declare function handleListMyApprovals(input: {
13
+ status?: 'PENDING' | 'APPROVED' | 'REJECTED' | 'DELEGATED' | 'ESCALATED' | 'WITHDRAWN' | 'EXPIRED';
14
+ limit?: number;
15
+ offset?: number;
16
+ }, context: HandlerContext): Promise<{
17
+ requests: ApprovalRequestRecord[];
18
+ total: number;
19
+ pendingCount: number;
20
+ }>;
21
+ //#endregion
22
+ export { createApprovalRequests, handleListMyApprovals, handleSubmitDecision };