@lssm/example.workflow-system 0.0.0-canary-20251217060834 → 0.0.0-canary-20251217072406
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 +134 -134
- package/dist/approval/approval.contracts.js +250 -1
- package/dist/approval/approval.enum.d.ts +3 -3
- package/dist/approval/approval.enum.js +29 -1
- package/dist/approval/approval.event.d.ts +32 -32
- package/dist/approval/approval.event.js +186 -1
- package/dist/approval/approval.handler.js +71 -1
- package/dist/approval/approval.schema.d.ts +24 -24
- package/dist/approval/approval.schema.js +111 -1
- package/dist/approval/index.js +6 -1
- package/dist/docs/index.js +1 -1
- package/dist/docs/workflow-system.docblock.js +61 -5
- package/dist/entities/approval.d.ts +36 -36
- package/dist/entities/approval.js +128 -1
- package/dist/entities/index.d.ts +127 -127
- package/dist/entities/index.js +31 -1
- package/dist/entities/instance.d.ts +47 -47
- package/dist/entities/instance.js +168 -1
- package/dist/entities/step.d.ts +32 -32
- package/dist/entities/step.js +135 -1
- package/dist/entities/workflow.d.ts +23 -23
- package/dist/entities/workflow.js +102 -1
- package/dist/example.js +50 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.js +19 -1
- package/dist/instance/index.js +6 -1
- package/dist/instance/instance.contracts.d.ts +256 -256
- package/dist/instance/instance.contracts.js +334 -1
- package/dist/instance/instance.enum.d.ts +2 -2
- package/dist/instance/instance.enum.js +20 -1
- package/dist/instance/instance.event.d.ts +87 -87
- package/dist/instance/instance.event.js +214 -1
- package/dist/instance/instance.handler.js +93 -1
- package/dist/instance/instance.schema.d.ts +54 -54
- package/dist/instance/instance.schema.js +173 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -0
- package/dist/libs/contracts/dist/client/index.js +5 -0
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -0
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -0
- package/dist/libs/contracts/dist/client/react/index.js +4 -0
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -0
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -0
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/index.js +29 -0
- package/dist/libs/contracts/dist/docs/presentations.js +71 -0
- package/dist/libs/contracts/dist/docs/registry.js +44 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +80 -0
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +57 -0
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +357 -0
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -0
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -0
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -0
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +79 -0
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +84 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +45 -0
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -0
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +40 -0
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +69 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -0
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +62 -0
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +155 -0
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -0
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +101 -0
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -0
- package/dist/libs/contracts/dist/events.js +10 -0
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -0
- package/dist/libs/contracts/dist/index.js +71 -0
- package/dist/libs/contracts/dist/install.js +2 -0
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -0
- package/dist/libs/contracts/dist/integrations/index.js +18 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -0
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -0
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -0
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -0
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -0
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -0
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -0
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -0
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -0
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -0
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -0
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -0
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -0
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -0
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -0
- package/dist/libs/contracts/dist/jsonschema.js +1 -0
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -0
- package/dist/libs/contracts/dist/knowledge/index.js +7 -0
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -0
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -0
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -0
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -0
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -0
- package/dist/libs/contracts/dist/llm/exporters.js +19 -0
- package/dist/libs/contracts/dist/llm/index.js +2 -0
- package/dist/libs/contracts/dist/llm/prompts.js +1 -0
- package/dist/libs/contracts/dist/onboarding-base.js +196 -0
- package/dist/libs/contracts/dist/openapi.js +1 -0
- package/dist/libs/contracts/dist/ownership.js +21 -0
- package/dist/libs/contracts/dist/presentations.js +1 -0
- package/dist/libs/contracts/dist/presentations.v2.js +11 -0
- package/dist/libs/contracts/dist/prompt.js +1 -0
- package/dist/libs/contracts/dist/promptRegistry.js +1 -0
- package/dist/libs/contracts/dist/regenerator/index.js +1 -0
- package/dist/libs/contracts/dist/regenerator/service.js +6 -0
- package/dist/libs/contracts/dist/registry.js +2 -0
- package/dist/libs/contracts/dist/resources.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -0
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -0
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -0
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -0
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -0
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -0
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -0
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -0
- package/dist/libs/contracts/dist/server/index.js +8 -0
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -0
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -0
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -0
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -0
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -0
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -0
- package/dist/libs/contracts/dist/server/rest-express.js +1 -0
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -0
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -0
- package/dist/libs/contracts/dist/spec.js +34 -0
- package/dist/libs/contracts/dist/telemetry/index.js +1 -0
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -0
- package/dist/libs/contracts/dist/tests/index.js +1 -0
- package/dist/libs/contracts/dist/tests/runner.js +2 -0
- package/dist/libs/contracts/dist/workflow/index.js +1 -0
- package/dist/libs/contracts/dist/workflow/runner.js +1 -0
- package/dist/libs/schema/dist/EnumType.js +56 -0
- package/dist/libs/schema/dist/FieldType.js +49 -0
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -0
- package/dist/libs/schema/dist/SchemaModel.js +39 -0
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -0
- package/dist/libs/schema/dist/entity/index.js +2 -0
- package/dist/libs/schema/dist/entity/types.js +1 -0
- package/dist/libs/schema/dist/index.js +6 -0
- package/dist/presentations/index.js +291 -1
- package/dist/shared/index.js +3 -1
- package/dist/shared/mock-data.js +11 -1
- package/dist/state-machine/index.js +157 -1
- package/dist/workflow/index.js +6 -1
- package/dist/workflow/workflow.contracts.d.ts +245 -245
- package/dist/workflow/workflow.contracts.js +239 -1
- package/dist/workflow/workflow.enum.js +47 -1
- package/dist/workflow/workflow.event.d.ts +32 -32
- package/dist/workflow/workflow.event.js +116 -1
- package/dist/workflow/workflow.handler.js +65 -1
- package/dist/workflow/workflow.schema.js +250 -1
- package/dist/workflow-system.feature.js +337 -1
- package/package.json +11 -11
|
@@ -1 +1,334 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
3
|
+
import "../libs/schema/dist/index.js";
|
|
4
|
+
import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
|
|
5
|
+
import { InstanceStatusEnum } from "./instance.enum.js";
|
|
6
|
+
import { StartWorkflowInputModel, TransitionInputModel, TransitionResultModel, WorkflowInstanceModel } from "./instance.schema.js";
|
|
7
|
+
|
|
8
|
+
//#region src/instance/instance.contracts.ts
|
|
9
|
+
const OWNERS = ["@example.workflow-system"];
|
|
10
|
+
/**
|
|
11
|
+
* Start a new workflow instance.
|
|
12
|
+
*/
|
|
13
|
+
const StartWorkflowContract = defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "workflow.instance.start",
|
|
16
|
+
version: 1,
|
|
17
|
+
stability: "stable",
|
|
18
|
+
owners: [...OWNERS],
|
|
19
|
+
tags: [
|
|
20
|
+
"workflow",
|
|
21
|
+
"instance",
|
|
22
|
+
"start"
|
|
23
|
+
],
|
|
24
|
+
description: "Start a new workflow instance.",
|
|
25
|
+
goal: "Initiate a workflow for a business process.",
|
|
26
|
+
context: "Order creation, request submission, etc."
|
|
27
|
+
},
|
|
28
|
+
io: {
|
|
29
|
+
input: StartWorkflowInputModel,
|
|
30
|
+
output: WorkflowInstanceModel
|
|
31
|
+
},
|
|
32
|
+
policy: { auth: "user" },
|
|
33
|
+
sideEffects: {
|
|
34
|
+
emits: [{
|
|
35
|
+
name: "workflow.instance.started",
|
|
36
|
+
version: 1,
|
|
37
|
+
when: "Workflow starts",
|
|
38
|
+
payload: WorkflowInstanceModel
|
|
39
|
+
}, {
|
|
40
|
+
name: "workflow.step.entered",
|
|
41
|
+
version: 1,
|
|
42
|
+
when: "First step entered",
|
|
43
|
+
payload: WorkflowInstanceModel
|
|
44
|
+
}],
|
|
45
|
+
audit: ["workflow.instance.started"]
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Transition workflow to next step.
|
|
50
|
+
*/
|
|
51
|
+
const TransitionWorkflowContract = defineCommand({
|
|
52
|
+
meta: {
|
|
53
|
+
name: "workflow.instance.transition",
|
|
54
|
+
version: 1,
|
|
55
|
+
stability: "stable",
|
|
56
|
+
owners: [...OWNERS],
|
|
57
|
+
tags: [
|
|
58
|
+
"workflow",
|
|
59
|
+
"instance",
|
|
60
|
+
"transition",
|
|
61
|
+
"state-machine"
|
|
62
|
+
],
|
|
63
|
+
description: "Transition a workflow instance to the next step.",
|
|
64
|
+
goal: "Move workflow forward based on action.",
|
|
65
|
+
context: "Task completion, approval decisions."
|
|
66
|
+
},
|
|
67
|
+
io: {
|
|
68
|
+
input: TransitionInputModel,
|
|
69
|
+
output: TransitionResultModel
|
|
70
|
+
},
|
|
71
|
+
policy: { auth: "user" },
|
|
72
|
+
sideEffects: {
|
|
73
|
+
emits: [
|
|
74
|
+
{
|
|
75
|
+
name: "workflow.step.exited",
|
|
76
|
+
version: 1,
|
|
77
|
+
when: "Step is exited",
|
|
78
|
+
payload: WorkflowInstanceModel
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "workflow.step.entered",
|
|
82
|
+
version: 1,
|
|
83
|
+
when: "New step is entered",
|
|
84
|
+
payload: WorkflowInstanceModel
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "workflow.instance.completed",
|
|
88
|
+
version: 1,
|
|
89
|
+
when: "Workflow reaches end",
|
|
90
|
+
payload: WorkflowInstanceModel
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
audit: ["workflow.instance.transitioned"]
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Pause a running workflow.
|
|
98
|
+
*/
|
|
99
|
+
const PauseWorkflowContract = defineCommand({
|
|
100
|
+
meta: {
|
|
101
|
+
name: "workflow.instance.pause",
|
|
102
|
+
version: 1,
|
|
103
|
+
stability: "stable",
|
|
104
|
+
owners: [...OWNERS],
|
|
105
|
+
tags: [
|
|
106
|
+
"workflow",
|
|
107
|
+
"instance",
|
|
108
|
+
"pause"
|
|
109
|
+
],
|
|
110
|
+
description: "Pause a running workflow instance.",
|
|
111
|
+
goal: "Temporarily halt workflow execution.",
|
|
112
|
+
context: "Administrative action, emergency stop."
|
|
113
|
+
},
|
|
114
|
+
io: {
|
|
115
|
+
input: defineSchemaModel({
|
|
116
|
+
name: "PauseResumeInput",
|
|
117
|
+
fields: {
|
|
118
|
+
instanceId: {
|
|
119
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
120
|
+
isOptional: false
|
|
121
|
+
},
|
|
122
|
+
reason: {
|
|
123
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
124
|
+
isOptional: true
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
output: WorkflowInstanceModel
|
|
129
|
+
},
|
|
130
|
+
policy: { auth: "user" },
|
|
131
|
+
sideEffects: {
|
|
132
|
+
emits: [{
|
|
133
|
+
name: "workflow.instance.paused",
|
|
134
|
+
version: 1,
|
|
135
|
+
when: "Workflow is paused",
|
|
136
|
+
payload: WorkflowInstanceModel
|
|
137
|
+
}],
|
|
138
|
+
audit: ["workflow.instance.paused"]
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
/**
|
|
142
|
+
* Resume a paused workflow.
|
|
143
|
+
*/
|
|
144
|
+
const ResumeWorkflowContract = defineCommand({
|
|
145
|
+
meta: {
|
|
146
|
+
name: "workflow.instance.resume",
|
|
147
|
+
version: 1,
|
|
148
|
+
stability: "stable",
|
|
149
|
+
owners: [...OWNERS],
|
|
150
|
+
tags: [
|
|
151
|
+
"workflow",
|
|
152
|
+
"instance",
|
|
153
|
+
"resume"
|
|
154
|
+
],
|
|
155
|
+
description: "Resume a paused workflow instance.",
|
|
156
|
+
goal: "Continue workflow execution.",
|
|
157
|
+
context: "Administrative action."
|
|
158
|
+
},
|
|
159
|
+
io: {
|
|
160
|
+
input: defineSchemaModel({
|
|
161
|
+
name: "PauseResumeInput",
|
|
162
|
+
fields: {
|
|
163
|
+
instanceId: {
|
|
164
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
165
|
+
isOptional: false
|
|
166
|
+
},
|
|
167
|
+
reason: {
|
|
168
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
169
|
+
isOptional: true
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}),
|
|
173
|
+
output: WorkflowInstanceModel
|
|
174
|
+
},
|
|
175
|
+
policy: { auth: "user" },
|
|
176
|
+
sideEffects: {
|
|
177
|
+
emits: [{
|
|
178
|
+
name: "workflow.instance.resumed",
|
|
179
|
+
version: 1,
|
|
180
|
+
when: "Workflow is resumed",
|
|
181
|
+
payload: WorkflowInstanceModel
|
|
182
|
+
}],
|
|
183
|
+
audit: ["workflow.instance.resumed"]
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
/**
|
|
187
|
+
* Cancel a workflow instance.
|
|
188
|
+
*/
|
|
189
|
+
const CancelWorkflowContract = defineCommand({
|
|
190
|
+
meta: {
|
|
191
|
+
name: "workflow.instance.cancel",
|
|
192
|
+
version: 1,
|
|
193
|
+
stability: "stable",
|
|
194
|
+
owners: [...OWNERS],
|
|
195
|
+
tags: [
|
|
196
|
+
"workflow",
|
|
197
|
+
"instance",
|
|
198
|
+
"cancel"
|
|
199
|
+
],
|
|
200
|
+
description: "Cancel a workflow instance.",
|
|
201
|
+
goal: "Terminate workflow without completion.",
|
|
202
|
+
context: "User request, system cancellation."
|
|
203
|
+
},
|
|
204
|
+
io: {
|
|
205
|
+
input: defineSchemaModel({
|
|
206
|
+
name: "CancelWorkflowInput",
|
|
207
|
+
fields: {
|
|
208
|
+
instanceId: {
|
|
209
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
210
|
+
isOptional: false
|
|
211
|
+
},
|
|
212
|
+
reason: {
|
|
213
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
214
|
+
isOptional: false
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}),
|
|
218
|
+
output: WorkflowInstanceModel
|
|
219
|
+
},
|
|
220
|
+
policy: { auth: "user" },
|
|
221
|
+
sideEffects: {
|
|
222
|
+
emits: [{
|
|
223
|
+
name: "workflow.instance.cancelled",
|
|
224
|
+
version: 1,
|
|
225
|
+
when: "Workflow is cancelled",
|
|
226
|
+
payload: WorkflowInstanceModel
|
|
227
|
+
}],
|
|
228
|
+
audit: ["workflow.instance.cancelled"]
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
/**
|
|
232
|
+
* List workflow instances.
|
|
233
|
+
*/
|
|
234
|
+
const ListInstancesContract = defineQuery({
|
|
235
|
+
meta: {
|
|
236
|
+
name: "workflow.instance.list",
|
|
237
|
+
version: 1,
|
|
238
|
+
stability: "stable",
|
|
239
|
+
owners: [...OWNERS],
|
|
240
|
+
tags: [
|
|
241
|
+
"workflow",
|
|
242
|
+
"instance",
|
|
243
|
+
"list"
|
|
244
|
+
],
|
|
245
|
+
description: "List workflow instances with filtering.",
|
|
246
|
+
goal: "Browse and search running workflows.",
|
|
247
|
+
context: "Dashboard, monitoring."
|
|
248
|
+
},
|
|
249
|
+
io: {
|
|
250
|
+
input: defineSchemaModel({
|
|
251
|
+
name: "ListInstancesInput",
|
|
252
|
+
fields: {
|
|
253
|
+
workflowKey: {
|
|
254
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
255
|
+
isOptional: true
|
|
256
|
+
},
|
|
257
|
+
status: {
|
|
258
|
+
type: InstanceStatusEnum,
|
|
259
|
+
isOptional: true
|
|
260
|
+
},
|
|
261
|
+
referenceType: {
|
|
262
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
263
|
+
isOptional: true
|
|
264
|
+
},
|
|
265
|
+
referenceId: {
|
|
266
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
267
|
+
isOptional: true
|
|
268
|
+
},
|
|
269
|
+
triggeredBy: {
|
|
270
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
271
|
+
isOptional: true
|
|
272
|
+
},
|
|
273
|
+
limit: {
|
|
274
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
275
|
+
isOptional: true,
|
|
276
|
+
defaultValue: 20
|
|
277
|
+
},
|
|
278
|
+
offset: {
|
|
279
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
280
|
+
isOptional: true,
|
|
281
|
+
defaultValue: 0
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}),
|
|
285
|
+
output: defineSchemaModel({
|
|
286
|
+
name: "ListInstancesOutput",
|
|
287
|
+
fields: {
|
|
288
|
+
instances: {
|
|
289
|
+
type: WorkflowInstanceModel,
|
|
290
|
+
isArray: true,
|
|
291
|
+
isOptional: false
|
|
292
|
+
},
|
|
293
|
+
total: {
|
|
294
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
295
|
+
isOptional: false
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
})
|
|
299
|
+
},
|
|
300
|
+
policy: { auth: "user" }
|
|
301
|
+
});
|
|
302
|
+
/**
|
|
303
|
+
* Get a single workflow instance.
|
|
304
|
+
*/
|
|
305
|
+
const GetInstanceContract = defineQuery({
|
|
306
|
+
meta: {
|
|
307
|
+
name: "workflow.instance.get",
|
|
308
|
+
version: 1,
|
|
309
|
+
stability: "stable",
|
|
310
|
+
owners: [...OWNERS],
|
|
311
|
+
tags: [
|
|
312
|
+
"workflow",
|
|
313
|
+
"instance",
|
|
314
|
+
"get"
|
|
315
|
+
],
|
|
316
|
+
description: "Get a workflow instance with details.",
|
|
317
|
+
goal: "View workflow instance details.",
|
|
318
|
+
context: "Instance detail view."
|
|
319
|
+
},
|
|
320
|
+
io: {
|
|
321
|
+
input: defineSchemaModel({
|
|
322
|
+
name: "GetInstanceInput",
|
|
323
|
+
fields: { instanceId: {
|
|
324
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
325
|
+
isOptional: false
|
|
326
|
+
} }
|
|
327
|
+
}),
|
|
328
|
+
output: WorkflowInstanceModel
|
|
329
|
+
},
|
|
330
|
+
policy: { auth: "user" }
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
//#endregion
|
|
334
|
+
export { CancelWorkflowContract, GetInstanceContract, ListInstancesContract, PauseWorkflowContract, ResumeWorkflowContract, StartWorkflowContract, TransitionWorkflowContract };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema508 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/instance/instance.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Instance status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const InstanceStatusEnum:
|
|
7
|
+
declare const InstanceStatusEnum: _lssm_lib_schema508.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { InstanceStatusEnum };
|
|
@@ -1 +1,20 @@
|
|
|
1
|
-
import{defineEnum
|
|
1
|
+
import { defineEnum } from "../libs/schema/dist/EnumType.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/instance/instance.enum.ts
|
|
5
|
+
/**
|
|
6
|
+
* Instance status enum.
|
|
7
|
+
*/
|
|
8
|
+
const InstanceStatusEnum = defineEnum("InstanceStatus", [
|
|
9
|
+
"PENDING",
|
|
10
|
+
"RUNNING",
|
|
11
|
+
"WAITING",
|
|
12
|
+
"PAUSED",
|
|
13
|
+
"COMPLETED",
|
|
14
|
+
"CANCELLED",
|
|
15
|
+
"FAILED",
|
|
16
|
+
"TIMEOUT"
|
|
17
|
+
]);
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { InstanceStatusEnum };
|