@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.
- package/dist/approval/approval.contracts.d.ts +534 -0
- package/dist/approval/approval.enum.d.ts +13 -0
- package/dist/approval/approval.event.d.ts +130 -0
- package/dist/approval/approval.handler.d.ts +22 -0
- package/dist/approval/approval.schema.d.ts +99 -0
- package/dist/approval/index.d.ts +5 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/workflow-system.docblock.d.ts +1 -0
- package/dist/entities/approval.d.ts +57 -0
- package/dist/entities/index.d.ts +138 -0
- package/dist/entities/instance.d.ts +68 -0
- package/dist/entities/step.d.ts +49 -0
- package/dist/entities/workflow.d.ts +40 -0
- package/dist/example.d.ts +39 -0
- package/dist/index.d.ts +19 -0
- package/dist/instance/index.d.ts +5 -0
- package/dist/instance/instance.contracts.d.ts +1023 -0
- package/dist/instance/instance.enum.d.ts +9 -0
- package/dist/instance/instance.event.d.ts +355 -0
- package/dist/instance/instance.handler.d.ts +26 -0
- package/dist/instance/instance.schema.d.ts +222 -0
- package/dist/presentations/index.d.ts +63 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/mock-data.d.ts +18 -0
- package/dist/shared/types.d.ts +80 -0
- package/dist/state-machine/index.d.ts +147 -0
- package/dist/workflow/index.d.ts +5 -0
- package/dist/workflow/workflow.contracts.d.ts +1010 -0
- package/dist/workflow/workflow.enum.d.ts +21 -0
- package/dist/workflow/workflow.event.d.ts +134 -0
- package/dist/workflow/workflow.handler.d.ts +28 -0
- package/dist/workflow/workflow.schema.d.ts +264 -0
- package/dist/workflow-system.feature.d.ts +11 -0
- package/package.json +44 -44
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as _lssm_lib_schema861 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/workflow/workflow.enum.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Workflow status enum.
|
|
6
|
+
*/
|
|
7
|
+
declare const WorkflowStatusEnum: _lssm_lib_schema861.EnumType<[string, string, string, string]>;
|
|
8
|
+
/**
|
|
9
|
+
* Trigger type enum.
|
|
10
|
+
*/
|
|
11
|
+
declare const TriggerTypeEnum: _lssm_lib_schema861.EnumType<[string, string, string, string]>;
|
|
12
|
+
/**
|
|
13
|
+
* Step type enum.
|
|
14
|
+
*/
|
|
15
|
+
declare const StepTypeEnum: _lssm_lib_schema861.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
16
|
+
/**
|
|
17
|
+
* Approval mode enum.
|
|
18
|
+
*/
|
|
19
|
+
declare const ApprovalModeEnum: _lssm_lib_schema861.EnumType<[string, string, string, string]>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ApprovalModeEnum, StepTypeEnum, TriggerTypeEnum, WorkflowStatusEnum };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import * as _lssm_lib_schema1148 from "@lssm/lib.schema";
|
|
2
|
+
import * as _lssm_lib_contracts30 from "@lssm/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/workflow/workflow.event.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* WorkflowCreatedEvent - A new workflow definition has been created.
|
|
7
|
+
*/
|
|
8
|
+
declare const WorkflowCreatedEvent: _lssm_lib_contracts30.EventSpec<_lssm_lib_schema1148.SchemaModel<{
|
|
9
|
+
workflowId: {
|
|
10
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
key: {
|
|
14
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
name: {
|
|
18
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
version: {
|
|
22
|
+
type: _lssm_lib_schema1148.FieldType<number, number>;
|
|
23
|
+
isOptional: false;
|
|
24
|
+
};
|
|
25
|
+
organizationId: {
|
|
26
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
createdBy: {
|
|
30
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
timestamp: {
|
|
34
|
+
type: _lssm_lib_schema1148.FieldType<Date, string>;
|
|
35
|
+
isOptional: false;
|
|
36
|
+
};
|
|
37
|
+
}>>;
|
|
38
|
+
/**
|
|
39
|
+
* WorkflowUpdatedEvent - A workflow definition has been updated.
|
|
40
|
+
*/
|
|
41
|
+
declare const WorkflowUpdatedEvent: _lssm_lib_contracts30.EventSpec<_lssm_lib_schema1148.SchemaModel<{
|
|
42
|
+
workflowId: {
|
|
43
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
key: {
|
|
47
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
48
|
+
isOptional: false;
|
|
49
|
+
};
|
|
50
|
+
name: {
|
|
51
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
version: {
|
|
55
|
+
type: _lssm_lib_schema1148.FieldType<number, number>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
organizationId: {
|
|
59
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
createdBy: {
|
|
63
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
64
|
+
isOptional: false;
|
|
65
|
+
};
|
|
66
|
+
timestamp: {
|
|
67
|
+
type: _lssm_lib_schema1148.FieldType<Date, string>;
|
|
68
|
+
isOptional: false;
|
|
69
|
+
};
|
|
70
|
+
}>>;
|
|
71
|
+
/**
|
|
72
|
+
* WorkflowPublishedEvent - A workflow definition has been published.
|
|
73
|
+
*/
|
|
74
|
+
declare const WorkflowPublishedEvent: _lssm_lib_contracts30.EventSpec<_lssm_lib_schema1148.SchemaModel<{
|
|
75
|
+
workflowId: {
|
|
76
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
77
|
+
isOptional: false;
|
|
78
|
+
};
|
|
79
|
+
key: {
|
|
80
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
81
|
+
isOptional: false;
|
|
82
|
+
};
|
|
83
|
+
name: {
|
|
84
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
85
|
+
isOptional: false;
|
|
86
|
+
};
|
|
87
|
+
version: {
|
|
88
|
+
type: _lssm_lib_schema1148.FieldType<number, number>;
|
|
89
|
+
isOptional: false;
|
|
90
|
+
};
|
|
91
|
+
organizationId: {
|
|
92
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
93
|
+
isOptional: false;
|
|
94
|
+
};
|
|
95
|
+
createdBy: {
|
|
96
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
97
|
+
isOptional: false;
|
|
98
|
+
};
|
|
99
|
+
timestamp: {
|
|
100
|
+
type: _lssm_lib_schema1148.FieldType<Date, string>;
|
|
101
|
+
isOptional: false;
|
|
102
|
+
};
|
|
103
|
+
}>>;
|
|
104
|
+
/**
|
|
105
|
+
* StepAddedEvent - A step has been added to a workflow definition.
|
|
106
|
+
*/
|
|
107
|
+
declare const StepAddedEvent: _lssm_lib_contracts30.EventSpec<_lssm_lib_schema1148.SchemaModel<{
|
|
108
|
+
stepId: {
|
|
109
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
110
|
+
isOptional: false;
|
|
111
|
+
};
|
|
112
|
+
workflowId: {
|
|
113
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
114
|
+
isOptional: false;
|
|
115
|
+
};
|
|
116
|
+
stepKey: {
|
|
117
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
118
|
+
isOptional: false;
|
|
119
|
+
};
|
|
120
|
+
stepType: {
|
|
121
|
+
type: _lssm_lib_schema1148.FieldType<string, string>;
|
|
122
|
+
isOptional: false;
|
|
123
|
+
};
|
|
124
|
+
position: {
|
|
125
|
+
type: _lssm_lib_schema1148.FieldType<number, number>;
|
|
126
|
+
isOptional: false;
|
|
127
|
+
};
|
|
128
|
+
timestamp: {
|
|
129
|
+
type: _lssm_lib_schema1148.FieldType<Date, string>;
|
|
130
|
+
isOptional: false;
|
|
131
|
+
};
|
|
132
|
+
}>>;
|
|
133
|
+
//#endregion
|
|
134
|
+
export { StepAddedEvent, WorkflowCreatedEvent, WorkflowPublishedEvent, WorkflowUpdatedEvent };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HandlerContext, WorkflowDefinitionRecord, WorkflowStepRecord } from "../shared/types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/workflow/workflow.handler.d.ts
|
|
4
|
+
|
|
5
|
+
declare function handleCreateWorkflow(input: {
|
|
6
|
+
name: string;
|
|
7
|
+
key: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
triggerType?: 'MANUAL' | 'EVENT' | 'SCHEDULED' | 'API';
|
|
10
|
+
featureFlagKey?: string;
|
|
11
|
+
}, context: HandlerContext): Promise<WorkflowDefinitionRecord>;
|
|
12
|
+
declare function handleAddStep(input: {
|
|
13
|
+
workflowId: string;
|
|
14
|
+
key: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
type: 'START' | 'APPROVAL' | 'TASK' | 'CONDITION' | 'PARALLEL' | 'WAIT' | 'ACTION' | 'END';
|
|
18
|
+
position?: number;
|
|
19
|
+
transitions: Record<string, string>;
|
|
20
|
+
approvalMode?: 'ANY' | 'ALL' | 'MAJORITY' | 'SEQUENTIAL';
|
|
21
|
+
approverRoles?: string[];
|
|
22
|
+
timeoutSeconds?: number;
|
|
23
|
+
}, _context: HandlerContext): Promise<WorkflowStepRecord>;
|
|
24
|
+
declare function handlePublishWorkflow(input: {
|
|
25
|
+
workflowId: string;
|
|
26
|
+
}, _context: HandlerContext): Promise<WorkflowDefinitionRecord>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { handleAddStep, handleCreateWorkflow, handlePublishWorkflow };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import * as _lssm_lib_schema216 from "@lssm/lib.schema";
|
|
2
|
+
|
|
3
|
+
//#region src/workflow/workflow.schema.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A step in a workflow definition.
|
|
6
|
+
*/
|
|
7
|
+
declare const WorkflowStepModel: _lssm_lib_schema216.SchemaModel<{
|
|
8
|
+
id: {
|
|
9
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
10
|
+
isOptional: false;
|
|
11
|
+
};
|
|
12
|
+
key: {
|
|
13
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
14
|
+
isOptional: false;
|
|
15
|
+
};
|
|
16
|
+
name: {
|
|
17
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
18
|
+
isOptional: false;
|
|
19
|
+
};
|
|
20
|
+
description: {
|
|
21
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
22
|
+
isOptional: true;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
26
|
+
isOptional: false;
|
|
27
|
+
};
|
|
28
|
+
position: {
|
|
29
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
30
|
+
isOptional: false;
|
|
31
|
+
};
|
|
32
|
+
transitions: {
|
|
33
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
34
|
+
isOptional: false;
|
|
35
|
+
};
|
|
36
|
+
approvalMode: {
|
|
37
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
38
|
+
isOptional: true;
|
|
39
|
+
};
|
|
40
|
+
approverRoles: {
|
|
41
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
42
|
+
isArray: true;
|
|
43
|
+
isOptional: true;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* A workflow definition.
|
|
48
|
+
*/
|
|
49
|
+
declare const WorkflowDefinitionModel: _lssm_lib_schema216.SchemaModel<{
|
|
50
|
+
id: {
|
|
51
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
52
|
+
isOptional: false;
|
|
53
|
+
};
|
|
54
|
+
name: {
|
|
55
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
56
|
+
isOptional: false;
|
|
57
|
+
};
|
|
58
|
+
key: {
|
|
59
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
60
|
+
isOptional: false;
|
|
61
|
+
};
|
|
62
|
+
description: {
|
|
63
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
64
|
+
isOptional: true;
|
|
65
|
+
};
|
|
66
|
+
version: {
|
|
67
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
68
|
+
isOptional: false;
|
|
69
|
+
};
|
|
70
|
+
status: {
|
|
71
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
72
|
+
isOptional: false;
|
|
73
|
+
};
|
|
74
|
+
triggerType: {
|
|
75
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
76
|
+
isOptional: false;
|
|
77
|
+
};
|
|
78
|
+
initialStepId: {
|
|
79
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
80
|
+
isOptional: true;
|
|
81
|
+
};
|
|
82
|
+
featureFlagKey: {
|
|
83
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
84
|
+
isOptional: true;
|
|
85
|
+
};
|
|
86
|
+
organizationId: {
|
|
87
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
88
|
+
isOptional: false;
|
|
89
|
+
};
|
|
90
|
+
createdAt: {
|
|
91
|
+
type: _lssm_lib_schema216.FieldType<Date, string>;
|
|
92
|
+
isOptional: false;
|
|
93
|
+
};
|
|
94
|
+
updatedAt: {
|
|
95
|
+
type: _lssm_lib_schema216.FieldType<Date, string>;
|
|
96
|
+
isOptional: false;
|
|
97
|
+
};
|
|
98
|
+
steps: {
|
|
99
|
+
type: _lssm_lib_schema216.SchemaModel<{
|
|
100
|
+
id: {
|
|
101
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
102
|
+
isOptional: false;
|
|
103
|
+
};
|
|
104
|
+
key: {
|
|
105
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
106
|
+
isOptional: false;
|
|
107
|
+
};
|
|
108
|
+
name: {
|
|
109
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
110
|
+
isOptional: false;
|
|
111
|
+
};
|
|
112
|
+
description: {
|
|
113
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
114
|
+
isOptional: true;
|
|
115
|
+
};
|
|
116
|
+
type: {
|
|
117
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
118
|
+
isOptional: false;
|
|
119
|
+
};
|
|
120
|
+
position: {
|
|
121
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
122
|
+
isOptional: false;
|
|
123
|
+
};
|
|
124
|
+
transitions: {
|
|
125
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
126
|
+
isOptional: false;
|
|
127
|
+
};
|
|
128
|
+
approvalMode: {
|
|
129
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
130
|
+
isOptional: true;
|
|
131
|
+
};
|
|
132
|
+
approverRoles: {
|
|
133
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
134
|
+
isArray: true;
|
|
135
|
+
isOptional: true;
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
isArray: true;
|
|
139
|
+
isOptional: true;
|
|
140
|
+
};
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* Input for creating a workflow definition.
|
|
144
|
+
*/
|
|
145
|
+
declare const CreateWorkflowInputModel: _lssm_lib_schema216.SchemaModel<{
|
|
146
|
+
name: {
|
|
147
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
148
|
+
isOptional: false;
|
|
149
|
+
};
|
|
150
|
+
key: {
|
|
151
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
152
|
+
isOptional: false;
|
|
153
|
+
};
|
|
154
|
+
description: {
|
|
155
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
156
|
+
isOptional: true;
|
|
157
|
+
};
|
|
158
|
+
triggerType: {
|
|
159
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
160
|
+
isOptional: true;
|
|
161
|
+
};
|
|
162
|
+
triggerConfig: {
|
|
163
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
164
|
+
isOptional: true;
|
|
165
|
+
};
|
|
166
|
+
featureFlagKey: {
|
|
167
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
168
|
+
isOptional: true;
|
|
169
|
+
};
|
|
170
|
+
settings: {
|
|
171
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
172
|
+
isOptional: true;
|
|
173
|
+
};
|
|
174
|
+
}>;
|
|
175
|
+
/**
|
|
176
|
+
* Input for updating a workflow definition.
|
|
177
|
+
*/
|
|
178
|
+
declare const UpdateWorkflowInputModel: _lssm_lib_schema216.SchemaModel<{
|
|
179
|
+
workflowId: {
|
|
180
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
181
|
+
isOptional: false;
|
|
182
|
+
};
|
|
183
|
+
name: {
|
|
184
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
185
|
+
isOptional: true;
|
|
186
|
+
};
|
|
187
|
+
description: {
|
|
188
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
189
|
+
isOptional: true;
|
|
190
|
+
};
|
|
191
|
+
triggerType: {
|
|
192
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
193
|
+
isOptional: true;
|
|
194
|
+
};
|
|
195
|
+
triggerConfig: {
|
|
196
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
197
|
+
isOptional: true;
|
|
198
|
+
};
|
|
199
|
+
featureFlagKey: {
|
|
200
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
201
|
+
isOptional: true;
|
|
202
|
+
};
|
|
203
|
+
settings: {
|
|
204
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
205
|
+
isOptional: true;
|
|
206
|
+
};
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* Input for adding a step to a workflow.
|
|
210
|
+
*/
|
|
211
|
+
declare const AddStepInputModel: _lssm_lib_schema216.SchemaModel<{
|
|
212
|
+
workflowId: {
|
|
213
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
214
|
+
isOptional: false;
|
|
215
|
+
};
|
|
216
|
+
key: {
|
|
217
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
218
|
+
isOptional: false;
|
|
219
|
+
};
|
|
220
|
+
name: {
|
|
221
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
222
|
+
isOptional: false;
|
|
223
|
+
};
|
|
224
|
+
description: {
|
|
225
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
226
|
+
isOptional: true;
|
|
227
|
+
};
|
|
228
|
+
type: {
|
|
229
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
230
|
+
isOptional: false;
|
|
231
|
+
};
|
|
232
|
+
position: {
|
|
233
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
234
|
+
isOptional: true;
|
|
235
|
+
};
|
|
236
|
+
transitions: {
|
|
237
|
+
type: _lssm_lib_schema216.FieldType<unknown, unknown>;
|
|
238
|
+
isOptional: false;
|
|
239
|
+
};
|
|
240
|
+
approvalMode: {
|
|
241
|
+
type: _lssm_lib_schema216.EnumType<[string, string, string, string]>;
|
|
242
|
+
isOptional: true;
|
|
243
|
+
};
|
|
244
|
+
approverRoles: {
|
|
245
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
246
|
+
isArray: true;
|
|
247
|
+
isOptional: true;
|
|
248
|
+
};
|
|
249
|
+
approverUserIds: {
|
|
250
|
+
type: _lssm_lib_schema216.FieldType<string, string>;
|
|
251
|
+
isArray: true;
|
|
252
|
+
isOptional: true;
|
|
253
|
+
};
|
|
254
|
+
timeoutSeconds: {
|
|
255
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
256
|
+
isOptional: true;
|
|
257
|
+
};
|
|
258
|
+
slaSeconds: {
|
|
259
|
+
type: _lssm_lib_schema216.FieldType<number, number>;
|
|
260
|
+
isOptional: true;
|
|
261
|
+
};
|
|
262
|
+
}>;
|
|
263
|
+
//#endregion
|
|
264
|
+
export { AddStepInputModel, CreateWorkflowInputModel, UpdateWorkflowInputModel, WorkflowDefinitionModel, WorkflowStepModel };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FeatureModuleSpec } from "@lssm/lib.contracts";
|
|
2
|
+
|
|
3
|
+
//#region src/workflow-system.feature.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Workflow System feature module that bundles workflow definition,
|
|
7
|
+
* instance management, and approval handling into an installable feature.
|
|
8
|
+
*/
|
|
9
|
+
declare const WorkflowSystemFeature: FeatureModuleSpec;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { WorkflowSystemFeature };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lssm/example.workflow-system",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20251217060433",
|
|
4
4
|
"description": "Workflow and approval system example for ContractSpec - State machine with role-based transitions",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -18,55 +18,55 @@
|
|
|
18
18
|
"lint:check": "eslint src"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@lssm/lib.schema": "0.0.0-canary-
|
|
22
|
-
"@lssm/lib.contracts": "0.0.0-canary-
|
|
23
|
-
"@lssm/lib.bus": "0.0.0-canary-
|
|
24
|
-
"@lssm/lib.identity-rbac": "0.0.0-canary-
|
|
25
|
-
"@lssm/lib.feature-flags": "0.0.0-canary-
|
|
26
|
-
"@lssm/lib.jobs": "0.0.0-canary-
|
|
27
|
-
"@lssm/module.audit-trail": "0.0.0-canary-
|
|
28
|
-
"@lssm/module.notifications": "0.0.0-canary-
|
|
21
|
+
"@lssm/lib.schema": "0.0.0-canary-20251217060433",
|
|
22
|
+
"@lssm/lib.contracts": "0.0.0-canary-20251217060433",
|
|
23
|
+
"@lssm/lib.bus": "0.0.0-canary-20251217060433",
|
|
24
|
+
"@lssm/lib.identity-rbac": "0.0.0-canary-20251217060433",
|
|
25
|
+
"@lssm/lib.feature-flags": "0.0.0-canary-20251217060433",
|
|
26
|
+
"@lssm/lib.jobs": "0.0.0-canary-20251217060433",
|
|
27
|
+
"@lssm/module.audit-trail": "0.0.0-canary-20251217060433",
|
|
28
|
+
"@lssm/module.notifications": "0.0.0-canary-20251217060433",
|
|
29
29
|
"zod": "^4.1.13"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@lssm/tool.typescript": "0.0.0-canary-
|
|
33
|
-
"@lssm/tool.tsdown": "0.0.0-canary-
|
|
32
|
+
"@lssm/tool.typescript": "0.0.0-canary-20251217060433",
|
|
33
|
+
"@lssm/tool.tsdown": "0.0.0-canary-20251217060433",
|
|
34
34
|
"typescript": "^5.9.3"
|
|
35
35
|
},
|
|
36
36
|
"exports": {
|
|
37
|
-
".": "./
|
|
38
|
-
"./approval": "./
|
|
39
|
-
"./approval/approval.contracts": "./
|
|
40
|
-
"./approval/approval.enum": "./
|
|
41
|
-
"./approval/approval.event": "./
|
|
42
|
-
"./approval/approval.handler": "./
|
|
43
|
-
"./approval/approval.schema": "./
|
|
44
|
-
"./docs": "./
|
|
45
|
-
"./docs/workflow-system.docblock": "./
|
|
46
|
-
"./entities": "./
|
|
47
|
-
"./entities/approval": "./
|
|
48
|
-
"./entities/instance": "./
|
|
49
|
-
"./entities/step": "./
|
|
50
|
-
"./entities/workflow": "./
|
|
51
|
-
"./example": "./
|
|
52
|
-
"./instance": "./
|
|
53
|
-
"./instance/instance.contracts": "./
|
|
54
|
-
"./instance/instance.enum": "./
|
|
55
|
-
"./instance/instance.event": "./
|
|
56
|
-
"./instance/instance.handler": "./
|
|
57
|
-
"./instance/instance.schema": "./
|
|
58
|
-
"./presentations": "./
|
|
59
|
-
"./shared": "./
|
|
60
|
-
"./shared/mock-data": "./
|
|
61
|
-
"./shared/types": "./
|
|
62
|
-
"./state-machine": "./
|
|
63
|
-
"./workflow": "./
|
|
64
|
-
"./workflow-system.feature": "./
|
|
65
|
-
"./workflow/workflow.contracts": "./
|
|
66
|
-
"./workflow/workflow.enum": "./
|
|
67
|
-
"./workflow/workflow.event": "./
|
|
68
|
-
"./workflow/workflow.handler": "./
|
|
69
|
-
"./workflow/workflow.schema": "./
|
|
37
|
+
".": "./dist/index.js",
|
|
38
|
+
"./approval": "./dist/approval/index.js",
|
|
39
|
+
"./approval/approval.contracts": "./dist/approval/approval.contracts.js",
|
|
40
|
+
"./approval/approval.enum": "./dist/approval/approval.enum.js",
|
|
41
|
+
"./approval/approval.event": "./dist/approval/approval.event.js",
|
|
42
|
+
"./approval/approval.handler": "./dist/approval/approval.handler.js",
|
|
43
|
+
"./approval/approval.schema": "./dist/approval/approval.schema.js",
|
|
44
|
+
"./docs": "./dist/docs/index.js",
|
|
45
|
+
"./docs/workflow-system.docblock": "./dist/docs/workflow-system.docblock.js",
|
|
46
|
+
"./entities": "./dist/entities/index.js",
|
|
47
|
+
"./entities/approval": "./dist/entities/approval.js",
|
|
48
|
+
"./entities/instance": "./dist/entities/instance.js",
|
|
49
|
+
"./entities/step": "./dist/entities/step.js",
|
|
50
|
+
"./entities/workflow": "./dist/entities/workflow.js",
|
|
51
|
+
"./example": "./dist/example.js",
|
|
52
|
+
"./instance": "./dist/instance/index.js",
|
|
53
|
+
"./instance/instance.contracts": "./dist/instance/instance.contracts.js",
|
|
54
|
+
"./instance/instance.enum": "./dist/instance/instance.enum.js",
|
|
55
|
+
"./instance/instance.event": "./dist/instance/instance.event.js",
|
|
56
|
+
"./instance/instance.handler": "./dist/instance/instance.handler.js",
|
|
57
|
+
"./instance/instance.schema": "./dist/instance/instance.schema.js",
|
|
58
|
+
"./presentations": "./dist/presentations/index.js",
|
|
59
|
+
"./shared": "./dist/shared/index.js",
|
|
60
|
+
"./shared/mock-data": "./dist/shared/mock-data.js",
|
|
61
|
+
"./shared/types": "./dist/shared/types.js",
|
|
62
|
+
"./state-machine": "./dist/state-machine/index.js",
|
|
63
|
+
"./workflow": "./dist/workflow/index.js",
|
|
64
|
+
"./workflow-system.feature": "./dist/workflow-system.feature.js",
|
|
65
|
+
"./workflow/workflow.contracts": "./dist/workflow/workflow.contracts.js",
|
|
66
|
+
"./workflow/workflow.enum": "./dist/workflow/workflow.enum.js",
|
|
67
|
+
"./workflow/workflow.event": "./dist/workflow/workflow.event.js",
|
|
68
|
+
"./workflow/workflow.handler": "./dist/workflow/workflow.handler.js",
|
|
69
|
+
"./workflow/workflow.schema": "./dist/workflow/workflow.schema.js",
|
|
70
70
|
"./*": "./*"
|
|
71
71
|
},
|
|
72
72
|
"module": "./dist/index.js",
|