@contractspec/example.workflow-system 1.44.1 → 1.45.1
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.enum.d.ts +3 -3
- package/dist/approval/approval.enum.d.ts.map +1 -1
- package/dist/approval/approval.event.d.ts +31 -31
- package/dist/approval/approval.event.js +4 -4
- package/dist/approval/approval.event.js.map +1 -1
- package/dist/approval/approval.operations.d.ts +136 -136
- package/dist/approval/approval.operations.js +8 -8
- package/dist/approval/approval.operations.js.map +1 -1
- package/dist/approval/approval.schema.d.ts +24 -24
- package/dist/entities/approval.d.ts +36 -36
- package/dist/entities/approval.d.ts.map +1 -1
- package/dist/entities/index.d.ts +127 -127
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/instance.d.ts +47 -47
- package/dist/entities/step.d.ts +32 -32
- package/dist/entities/workflow.d.ts +23 -23
- package/dist/entities/workflow.d.ts.map +1 -1
- package/dist/example.d.ts +3 -36
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +16 -11
- package/dist/example.js.map +1 -1
- package/dist/instance/instance.enum.d.ts +2 -2
- package/dist/instance/instance.event.d.ts +87 -87
- package/dist/instance/instance.event.d.ts.map +1 -1
- package/dist/instance/instance.event.js +9 -9
- package/dist/instance/instance.event.js.map +1 -1
- package/dist/instance/instance.operations.d.ts +261 -261
- package/dist/instance/instance.operations.d.ts.map +1 -1
- package/dist/instance/instance.operations.js +15 -15
- package/dist/instance/instance.operations.js.map +1 -1
- package/dist/instance/instance.schema.d.ts +54 -54
- package/dist/presentations/index.js +11 -11
- package/dist/presentations/index.js.map +1 -1
- package/dist/shared/types.d.ts +1 -1
- package/dist/state-machine/index.d.ts +2 -2
- package/dist/state-machine/index.js.map +1 -1
- package/dist/workflow/workflow.enum.d.ts +5 -5
- package/dist/workflow/workflow.event.d.ts +33 -33
- package/dist/workflow/workflow.event.d.ts.map +1 -1
- package/dist/workflow/workflow.event.js +5 -5
- package/dist/workflow/workflow.event.js.map +1 -1
- package/dist/workflow/workflow.handler.js +1 -1
- package/dist/workflow/workflow.handler.js.map +1 -1
- package/dist/workflow/workflow.operations.d.ts +250 -250
- package/dist/workflow/workflow.operations.js +10 -10
- package/dist/workflow/workflow.operations.js.map +1 -1
- package/dist/workflow/workflow.schema.d.ts +63 -63
- package/dist/workflow/workflow.schema.d.ts.map +1 -1
- package/dist/workflow/workflow.schema.js +1 -1
- package/dist/workflow/workflow.schema.js.map +1 -1
- package/dist/workflow-system.feature.js +71 -71
- package/dist/workflow-system.feature.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.operations.d.ts","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAkBa,
|
|
1
|
+
{"version":3,"file":"instance.operations.d.ts","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":[],"mappings":";;;;;;;cAkBa,qDAAqB,0CAAA;EAArB,WAAA,EAAA;IAqDX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;IArDgC,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;UAAA,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IA0DrB,UAAA,EAAA,KAAA;EA4DX,CAAA;;;;;EA5DqC,QAAA,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;MAiE1B,UAAA,EAAA,IAqDX;IAAA,CAAA;;gDArDgC,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;MAAA,UAAA,EAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0DrB,sDAAsB,0CAAA;;UAqDjC,2BAAA,CAAA;;;;;;;;;UArDiC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA0DtB,sDAAsB,0CAAA;;UAwDjC,2BAAA,CAAA;;;;;;;;;UAxDiC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6DtB,qDAAqB,0CAAA;;UA0EhC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA1EgC,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+ErB,mDAAmB,0CAAA;;UAyC9B,2BAAA,CAAA;;;;;UAzC8B,2BAAA,CAAA"}
|
|
@@ -11,7 +11,7 @@ const OWNERS = ["@example.workflow-system"];
|
|
|
11
11
|
const StartWorkflowContract = defineCommand({
|
|
12
12
|
meta: {
|
|
13
13
|
key: "workflow.instance.start",
|
|
14
|
-
version: 1,
|
|
14
|
+
version: "1.0.0",
|
|
15
15
|
stability: "stable",
|
|
16
16
|
owners: [...OWNERS],
|
|
17
17
|
tags: [
|
|
@@ -31,12 +31,12 @@ const StartWorkflowContract = defineCommand({
|
|
|
31
31
|
sideEffects: {
|
|
32
32
|
emits: [{
|
|
33
33
|
key: "workflow.instance.started",
|
|
34
|
-
version: 1,
|
|
34
|
+
version: "1.0.0",
|
|
35
35
|
when: "Workflow starts",
|
|
36
36
|
payload: WorkflowInstanceModel
|
|
37
37
|
}, {
|
|
38
38
|
key: "workflow.step.entered",
|
|
39
|
-
version: 1,
|
|
39
|
+
version: "1.0.0",
|
|
40
40
|
when: "First step entered",
|
|
41
41
|
payload: WorkflowInstanceModel
|
|
42
42
|
}],
|
|
@@ -68,7 +68,7 @@ const StartWorkflowContract = defineCommand({
|
|
|
68
68
|
const TransitionWorkflowContract = defineCommand({
|
|
69
69
|
meta: {
|
|
70
70
|
key: "workflow.instance.transition",
|
|
71
|
-
version: 1,
|
|
71
|
+
version: "1.0.0",
|
|
72
72
|
stability: "stable",
|
|
73
73
|
owners: [...OWNERS],
|
|
74
74
|
tags: [
|
|
@@ -90,19 +90,19 @@ const TransitionWorkflowContract = defineCommand({
|
|
|
90
90
|
emits: [
|
|
91
91
|
{
|
|
92
92
|
key: "workflow.step.exited",
|
|
93
|
-
version: 1,
|
|
93
|
+
version: "1.0.0",
|
|
94
94
|
when: "Step is exited",
|
|
95
95
|
payload: WorkflowInstanceModel
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
key: "workflow.step.entered",
|
|
99
|
-
version: 1,
|
|
99
|
+
version: "1.0.0",
|
|
100
100
|
when: "New step is entered",
|
|
101
101
|
payload: WorkflowInstanceModel
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
key: "workflow.instance.completed",
|
|
105
|
-
version: 1,
|
|
105
|
+
version: "1.0.0",
|
|
106
106
|
when: "Workflow reaches end",
|
|
107
107
|
payload: WorkflowInstanceModel
|
|
108
108
|
}
|
|
@@ -136,7 +136,7 @@ const TransitionWorkflowContract = defineCommand({
|
|
|
136
136
|
const PauseWorkflowContract = defineCommand({
|
|
137
137
|
meta: {
|
|
138
138
|
key: "workflow.instance.pause",
|
|
139
|
-
version: 1,
|
|
139
|
+
version: "1.0.0",
|
|
140
140
|
stability: "stable",
|
|
141
141
|
owners: [...OWNERS],
|
|
142
142
|
tags: [
|
|
@@ -168,7 +168,7 @@ const PauseWorkflowContract = defineCommand({
|
|
|
168
168
|
sideEffects: {
|
|
169
169
|
emits: [{
|
|
170
170
|
key: "workflow.instance.paused",
|
|
171
|
-
version: 1,
|
|
171
|
+
version: "1.0.0",
|
|
172
172
|
when: "Workflow is paused",
|
|
173
173
|
payload: WorkflowInstanceModel
|
|
174
174
|
}],
|
|
@@ -200,7 +200,7 @@ const PauseWorkflowContract = defineCommand({
|
|
|
200
200
|
const ResumeWorkflowContract = defineCommand({
|
|
201
201
|
meta: {
|
|
202
202
|
key: "workflow.instance.resume",
|
|
203
|
-
version: 1,
|
|
203
|
+
version: "1.0.0",
|
|
204
204
|
stability: "stable",
|
|
205
205
|
owners: [...OWNERS],
|
|
206
206
|
tags: [
|
|
@@ -232,7 +232,7 @@ const ResumeWorkflowContract = defineCommand({
|
|
|
232
232
|
sideEffects: {
|
|
233
233
|
emits: [{
|
|
234
234
|
key: "workflow.instance.resumed",
|
|
235
|
-
version: 1,
|
|
235
|
+
version: "1.0.0",
|
|
236
236
|
when: "Workflow is resumed",
|
|
237
237
|
payload: WorkflowInstanceModel
|
|
238
238
|
}],
|
|
@@ -264,7 +264,7 @@ const ResumeWorkflowContract = defineCommand({
|
|
|
264
264
|
const CancelWorkflowContract = defineCommand({
|
|
265
265
|
meta: {
|
|
266
266
|
key: "workflow.instance.cancel",
|
|
267
|
-
version: 1,
|
|
267
|
+
version: "1.0.0",
|
|
268
268
|
stability: "stable",
|
|
269
269
|
owners: [...OWNERS],
|
|
270
270
|
tags: [
|
|
@@ -296,7 +296,7 @@ const CancelWorkflowContract = defineCommand({
|
|
|
296
296
|
sideEffects: {
|
|
297
297
|
emits: [{
|
|
298
298
|
key: "workflow.instance.cancelled",
|
|
299
|
-
version: 1,
|
|
299
|
+
version: "1.0.0",
|
|
300
300
|
when: "Workflow is cancelled",
|
|
301
301
|
payload: WorkflowInstanceModel
|
|
302
302
|
}],
|
|
@@ -328,7 +328,7 @@ const CancelWorkflowContract = defineCommand({
|
|
|
328
328
|
const ListInstancesContract = defineQuery({
|
|
329
329
|
meta: {
|
|
330
330
|
key: "workflow.instance.list",
|
|
331
|
-
version: 1,
|
|
331
|
+
version: "1.0.0",
|
|
332
332
|
stability: "stable",
|
|
333
333
|
owners: [...OWNERS],
|
|
334
334
|
tags: [
|
|
@@ -418,7 +418,7 @@ const ListInstancesContract = defineQuery({
|
|
|
418
418
|
const GetInstanceContract = defineQuery({
|
|
419
419
|
meta: {
|
|
420
420
|
key: "workflow.instance.get",
|
|
421
|
-
version: 1,
|
|
421
|
+
version: "1.0.0",
|
|
422
422
|
stability: "stable",
|
|
423
423
|
owners: [...OWNERS],
|
|
424
424
|
tags: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance.operations.js","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { InstanceStatusEnum } from './instance.enum';\nimport {\n StartWorkflowInputModel,\n TransitionInputModel,\n TransitionResultModel,\n WorkflowInstanceModel,\n} from './instance.schema';\n\nconst OWNERS = ['@example.workflow-system'] as const;\n\n/**\n * Start a new workflow instance.\n */\nexport const StartWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.start',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'start'],\n description: 'Start a new workflow instance.',\n goal: 'Initiate a workflow for a business process.',\n context: 'Order creation, request submission, etc.',\n },\n io: {\n input: StartWorkflowInputModel,\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.started',\n version: 1,\n when: 'Workflow starts',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: 1,\n when: 'First step entered',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.started'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'start-workflow-happy-path',\n given: ['Workflow definition exists'],\n when: ['User starts workflow'],\n then: ['Instance is created and started'],\n },\n ],\n examples: [\n {\n key: 'start-onboarding',\n input: {\n workflowKey: 'onboarding-v1',\n context: { employeeId: 'emp-123' },\n },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Transition workflow to next step.\n */\nexport const TransitionWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.transition',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'transition', 'state-machine'],\n description: 'Transition a workflow instance to the next step.',\n goal: 'Move workflow forward based on action.',\n context: 'Task completion, approval decisions.',\n },\n io: {\n input: TransitionInputModel,\n output: TransitionResultModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.step.exited',\n version: 1,\n when: 'Step is exited',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: 1,\n when: 'New step is entered',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.instance.completed',\n version: 1,\n when: 'Workflow reaches end',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.transitioned'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'transition-workflow-happy-path',\n given: ['Workflow instance is waiting at step'],\n when: ['User provides input'],\n then: ['Instance moves to next step'],\n },\n ],\n examples: [\n {\n key: 'complete-task',\n input: {\n instanceId: 'inst-456',\n action: 'complete',\n data: { approved: true },\n },\n output: { success: true, nextStep: 'notify-hr' },\n },\n ],\n },\n});\n\n/**\n * Pause a running workflow.\n */\nexport const PauseWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.pause',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'pause'],\n description: 'Pause a running workflow instance.',\n goal: 'Temporarily halt workflow execution.',\n context: 'Administrative action, emergency stop.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.paused',\n version: 1,\n when: 'Workflow is paused',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.paused'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'pause-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['Admin pauses workflow'],\n then: ['Instance status becomes PAUSED'],\n },\n ],\n examples: [\n {\n key: 'pause-maintenance',\n input: { instanceId: 'inst-456', reason: 'System maintenance' },\n output: { id: 'inst-456', status: 'paused' },\n },\n ],\n },\n});\n\n/**\n * Resume a paused workflow.\n */\nexport const ResumeWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.resume',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'resume'],\n description: 'Resume a paused workflow instance.',\n goal: 'Continue workflow execution.',\n context: 'Administrative action.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.resumed',\n version: 1,\n when: 'Workflow is resumed',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.resumed'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'resume-workflow-happy-path',\n given: ['Workflow is paused'],\n when: ['Admin resumes workflow'],\n then: ['Instance status becomes RUNNING'],\n },\n ],\n examples: [\n {\n key: 'resume-normal',\n input: { instanceId: 'inst-456', reason: 'Issue resolved' },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Cancel a workflow instance.\n */\nexport const CancelWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.cancel',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'cancel'],\n description: 'Cancel a workflow instance.',\n goal: 'Terminate workflow without completion.',\n context: 'User request, system cancellation.',\n },\n io: {\n input: defineSchemaModel({\n name: 'CancelWorkflowInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.cancelled',\n version: 1,\n when: 'Workflow is cancelled',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.cancelled'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'cancel-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['User cancels workflow'],\n then: ['Instance status becomes CANCELLED'],\n },\n ],\n examples: [\n {\n key: 'cancel-mistake',\n input: { instanceId: 'inst-456', reason: 'Created by mistake' },\n output: { id: 'inst-456', status: 'cancelled' },\n },\n ],\n },\n});\n\n/**\n * List workflow instances.\n */\nexport const ListInstancesContract = defineQuery({\n meta: {\n key: 'workflow.instance.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'list'],\n description: 'List workflow instances with filtering.',\n goal: 'Browse and search running workflows.',\n context: 'Dashboard, monitoring.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListInstancesInput',\n fields: {\n workflowKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n status: { type: InstanceStatusEnum, isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n referenceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n triggeredBy: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListInstancesOutput',\n fields: {\n instances: {\n type: WorkflowInstanceModel,\n isArray: true,\n isOptional: false,\n },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-instances-happy-path',\n given: ['Workflow instances exist'],\n when: ['User lists instances'],\n then: ['List of instances is returned'],\n },\n ],\n examples: [\n {\n key: 'list-running',\n input: { status: 'running', limit: 10 },\n output: { instances: [], total: 5 },\n },\n ],\n },\n});\n\n/**\n * Get a single workflow instance.\n */\nexport const GetInstanceContract = defineQuery({\n meta: {\n key: 'workflow.instance.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'get'],\n description: 'Get a workflow instance with details.',\n goal: 'View workflow instance details.',\n context: 'Instance detail view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetInstanceInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'get-instance-happy-path',\n given: ['Instance exists'],\n when: ['User requests instance details'],\n then: ['Instance details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-details',\n input: { instanceId: 'inst-456' },\n output: { id: 'inst-456', workflowKey: 'onboarding-v1' },\n },\n ],\n },\n});\n"],"mappings":";;;;;;AAaA,MAAM,SAAS,CAAC,2BAA2B;;;;AAK3C,MAAa,wBAAwB,cAAc;CACjD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;G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GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAY;GAAM;EACrC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ,EACN,YAAY;IACV,MAAM,eAAe,iBAAiB;IACtC,YAAY;IACb,EACF;GACF,CAAC;EACF,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,kBAAkB;GAC1B,MAAM,CAAC,iCAAiC;GACxC,MAAM,CAAC,gCAAgC;GACxC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,YAAY,YAAY;GACjC,QAAQ;IAAE,IAAI;IAAY,aAAa;IAAiB;GACzD,CACF;EACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"instance.operations.js","names":[],"sources":["../../src/instance/instance.operations.ts"],"sourcesContent":["import {\n defineCommand,\n defineQuery,\n} from '@contractspec/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';\nimport { InstanceStatusEnum } from './instance.enum';\nimport {\n StartWorkflowInputModel,\n TransitionInputModel,\n TransitionResultModel,\n WorkflowInstanceModel,\n} from './instance.schema';\n\nconst OWNERS = ['@example.workflow-system'] as const;\n\n/**\n * Start a new workflow instance.\n */\nexport const StartWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.start',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'start'],\n description: 'Start a new workflow instance.',\n goal: 'Initiate a workflow for a business process.',\n context: 'Order creation, request submission, etc.',\n },\n io: {\n input: StartWorkflowInputModel,\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.started',\n version: '1.0.0',\n when: 'Workflow starts',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: '1.0.0',\n when: 'First step entered',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.started'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'start-workflow-happy-path',\n given: ['Workflow definition exists'],\n when: ['User starts workflow'],\n then: ['Instance is created and started'],\n },\n ],\n examples: [\n {\n key: 'start-onboarding',\n input: {\n workflowKey: 'onboarding-v1',\n context: { employeeId: 'emp-123' },\n },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Transition workflow to next step.\n */\nexport const TransitionWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.transition',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'transition', 'state-machine'],\n description: 'Transition a workflow instance to the next step.',\n goal: 'Move workflow forward based on action.',\n context: 'Task completion, approval decisions.',\n },\n io: {\n input: TransitionInputModel,\n output: TransitionResultModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.step.exited',\n version: '1.0.0',\n when: 'Step is exited',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.step.entered',\n version: '1.0.0',\n when: 'New step is entered',\n payload: WorkflowInstanceModel,\n },\n {\n key: 'workflow.instance.completed',\n version: '1.0.0',\n when: 'Workflow reaches end',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.transitioned'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'transition-workflow-happy-path',\n given: ['Workflow instance is waiting at step'],\n when: ['User provides input'],\n then: ['Instance moves to next step'],\n },\n ],\n examples: [\n {\n key: 'complete-task',\n input: {\n instanceId: 'inst-456',\n action: 'complete',\n data: { approved: true },\n },\n output: { success: true, nextStep: 'notify-hr' },\n },\n ],\n },\n});\n\n/**\n * Pause a running workflow.\n */\nexport const PauseWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.pause',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'pause'],\n description: 'Pause a running workflow instance.',\n goal: 'Temporarily halt workflow execution.',\n context: 'Administrative action, emergency stop.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.paused',\n version: '1.0.0',\n when: 'Workflow is paused',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.paused'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'pause-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['Admin pauses workflow'],\n then: ['Instance status becomes PAUSED'],\n },\n ],\n examples: [\n {\n key: 'pause-maintenance',\n input: { instanceId: 'inst-456', reason: 'System maintenance' },\n output: { id: 'inst-456', status: 'paused' },\n },\n ],\n },\n});\n\n/**\n * Resume a paused workflow.\n */\nexport const ResumeWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.resume',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'resume'],\n description: 'Resume a paused workflow instance.',\n goal: 'Continue workflow execution.',\n context: 'Administrative action.',\n },\n io: {\n input: defineSchemaModel({\n name: 'PauseResumeInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.resumed',\n version: '1.0.0',\n when: 'Workflow is resumed',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.resumed'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'resume-workflow-happy-path',\n given: ['Workflow is paused'],\n when: ['Admin resumes workflow'],\n then: ['Instance status becomes RUNNING'],\n },\n ],\n examples: [\n {\n key: 'resume-normal',\n input: { instanceId: 'inst-456', reason: 'Issue resolved' },\n output: { id: 'inst-456', status: 'running' },\n },\n ],\n },\n});\n\n/**\n * Cancel a workflow instance.\n */\nexport const CancelWorkflowContract = defineCommand({\n meta: {\n key: 'workflow.instance.cancel',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'cancel'],\n description: 'Cancel a workflow instance.',\n goal: 'Terminate workflow without completion.',\n context: 'User request, system cancellation.',\n },\n io: {\n input: defineSchemaModel({\n name: 'CancelWorkflowInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n reason: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'workflow.instance.cancelled',\n version: '1.0.0',\n when: 'Workflow is cancelled',\n payload: WorkflowInstanceModel,\n },\n ],\n audit: ['workflow.instance.cancelled'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'cancel-workflow-happy-path',\n given: ['Workflow is running'],\n when: ['User cancels workflow'],\n then: ['Instance status becomes CANCELLED'],\n },\n ],\n examples: [\n {\n key: 'cancel-mistake',\n input: { instanceId: 'inst-456', reason: 'Created by mistake' },\n output: { id: 'inst-456', status: 'cancelled' },\n },\n ],\n },\n});\n\n/**\n * List workflow instances.\n */\nexport const ListInstancesContract = defineQuery({\n meta: {\n key: 'workflow.instance.list',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'list'],\n description: 'List workflow instances with filtering.',\n goal: 'Browse and search running workflows.',\n context: 'Dashboard, monitoring.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListInstancesInput',\n fields: {\n workflowKey: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n status: { type: InstanceStatusEnum, isOptional: true },\n referenceType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n referenceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n triggeredBy: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: true,\n },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListInstancesOutput',\n fields: {\n instances: {\n type: WorkflowInstanceModel,\n isArray: true,\n isOptional: false,\n },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-instances-happy-path',\n given: ['Workflow instances exist'],\n when: ['User lists instances'],\n then: ['List of instances is returned'],\n },\n ],\n examples: [\n {\n key: 'list-running',\n input: { status: 'running', limit: 10 },\n output: { instances: [], total: 5 },\n },\n ],\n },\n});\n\n/**\n * Get a single workflow instance.\n */\nexport const GetInstanceContract = defineQuery({\n meta: {\n key: 'workflow.instance.get',\n version: '1.0.0',\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['workflow', 'instance', 'get'],\n description: 'Get a workflow instance with details.',\n goal: 'View workflow instance details.',\n context: 'Instance detail view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetInstanceInput',\n fields: {\n instanceId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n },\n }),\n output: WorkflowInstanceModel,\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'get-instance-happy-path',\n given: ['Instance exists'],\n when: ['User requests instance details'],\n then: ['Instance details are returned'],\n },\n ],\n examples: [\n {\n key: 'get-details',\n input: { instanceId: 'inst-456' },\n output: { id: 'inst-456', workflowKey: 'onboarding-v1' },\n },\n ],\n },\n});\n"],"mappings":";;;;;;AAaA,MAAM,SAAS,CAAC,2BAA2B;;;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C,CACF;EACF;CACF,CAAC;;;;AAKF,MAAa,sBAAsB,YAAY;CAC7C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAY;GAAY;GAAM;EACrC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ,EACN,YAAY;IACV,MAAM,eAAe,iBAAiB;IACtC,YAAY;IACb,EACF;GACF,CAAC;EACF,QAAQ;EACT;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,kBAAkB;GAC1B,MAAM,CAAC,iCAAiC;GACxC,MAAM,CAAC,gCAAgC;GACxC,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO,EAAE,YAAY,YAAY;GACjC,QAAQ;IAAE,IAAI;IAAY,aAAa;IAAiB;GACzD,CACF;EACF;CACF,CAAC"}
|
|
@@ -1,220 +1,220 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _contractspec_lib_schema798 from "@contractspec/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/instance/instance.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* A running workflow instance.
|
|
6
6
|
*/
|
|
7
|
-
declare const WorkflowInstanceModel:
|
|
7
|
+
declare const WorkflowInstanceModel: _contractspec_lib_schema798.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
workflowDefinitionId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
referenceId: {
|
|
17
|
-
type:
|
|
17
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
18
18
|
isOptional: true;
|
|
19
19
|
};
|
|
20
20
|
referenceType: {
|
|
21
|
-
type:
|
|
21
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
22
22
|
isOptional: true;
|
|
23
23
|
};
|
|
24
24
|
status: {
|
|
25
|
-
type:
|
|
25
|
+
type: _contractspec_lib_schema798.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
currentStepId: {
|
|
29
|
-
type:
|
|
29
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
30
30
|
isOptional: true;
|
|
31
31
|
};
|
|
32
32
|
contextData: {
|
|
33
|
-
type:
|
|
33
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
34
34
|
isOptional: true;
|
|
35
35
|
};
|
|
36
36
|
triggeredBy: {
|
|
37
|
-
type:
|
|
37
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
organizationId: {
|
|
41
|
-
type:
|
|
41
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
42
42
|
isOptional: false;
|
|
43
43
|
};
|
|
44
44
|
priority: {
|
|
45
|
-
type:
|
|
45
|
+
type: _contractspec_lib_schema798.FieldType<number, number>;
|
|
46
46
|
isOptional: false;
|
|
47
47
|
};
|
|
48
48
|
dueAt: {
|
|
49
|
-
type:
|
|
49
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
50
50
|
isOptional: true;
|
|
51
51
|
};
|
|
52
52
|
outcome: {
|
|
53
|
-
type:
|
|
53
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
54
54
|
isOptional: true;
|
|
55
55
|
};
|
|
56
56
|
resultData: {
|
|
57
|
-
type:
|
|
57
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
58
58
|
isOptional: true;
|
|
59
59
|
};
|
|
60
60
|
errorMessage: {
|
|
61
|
-
type:
|
|
61
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
62
62
|
isOptional: true;
|
|
63
63
|
};
|
|
64
64
|
createdAt: {
|
|
65
|
-
type:
|
|
65
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
66
66
|
isOptional: false;
|
|
67
67
|
};
|
|
68
68
|
startedAt: {
|
|
69
|
-
type:
|
|
69
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
70
70
|
isOptional: true;
|
|
71
71
|
};
|
|
72
72
|
completedAt: {
|
|
73
|
-
type:
|
|
73
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
74
74
|
isOptional: true;
|
|
75
75
|
};
|
|
76
76
|
}>;
|
|
77
77
|
/**
|
|
78
78
|
* Input for starting a workflow.
|
|
79
79
|
*/
|
|
80
|
-
declare const StartWorkflowInputModel:
|
|
80
|
+
declare const StartWorkflowInputModel: _contractspec_lib_schema798.SchemaModel<{
|
|
81
81
|
workflowKey: {
|
|
82
|
-
type:
|
|
82
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
83
83
|
isOptional: false;
|
|
84
84
|
};
|
|
85
85
|
contextData: {
|
|
86
|
-
type:
|
|
86
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
87
87
|
isOptional: true;
|
|
88
88
|
};
|
|
89
89
|
referenceId: {
|
|
90
|
-
type:
|
|
90
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
91
91
|
isOptional: true;
|
|
92
92
|
};
|
|
93
93
|
referenceType: {
|
|
94
|
-
type:
|
|
94
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
95
95
|
isOptional: true;
|
|
96
96
|
};
|
|
97
97
|
priority: {
|
|
98
|
-
type:
|
|
98
|
+
type: _contractspec_lib_schema798.FieldType<number, number>;
|
|
99
99
|
isOptional: true;
|
|
100
100
|
};
|
|
101
101
|
dueAt: {
|
|
102
|
-
type:
|
|
102
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
103
103
|
isOptional: true;
|
|
104
104
|
};
|
|
105
105
|
}>;
|
|
106
106
|
/**
|
|
107
107
|
* Input for transitioning a workflow.
|
|
108
108
|
*/
|
|
109
|
-
declare const TransitionInputModel:
|
|
109
|
+
declare const TransitionInputModel: _contractspec_lib_schema798.SchemaModel<{
|
|
110
110
|
instanceId: {
|
|
111
|
-
type:
|
|
111
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
112
112
|
isOptional: false;
|
|
113
113
|
};
|
|
114
114
|
action: {
|
|
115
|
-
type:
|
|
115
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
116
116
|
isOptional: false;
|
|
117
117
|
};
|
|
118
118
|
data: {
|
|
119
|
-
type:
|
|
119
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
120
120
|
isOptional: true;
|
|
121
121
|
};
|
|
122
122
|
comment: {
|
|
123
|
-
type:
|
|
123
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
124
124
|
isOptional: true;
|
|
125
125
|
};
|
|
126
126
|
}>;
|
|
127
127
|
/**
|
|
128
128
|
* Result of a workflow transition.
|
|
129
129
|
*/
|
|
130
|
-
declare const TransitionResultModel:
|
|
130
|
+
declare const TransitionResultModel: _contractspec_lib_schema798.SchemaModel<{
|
|
131
131
|
success: {
|
|
132
|
-
type:
|
|
132
|
+
type: _contractspec_lib_schema798.FieldType<boolean, boolean>;
|
|
133
133
|
isOptional: false;
|
|
134
134
|
};
|
|
135
135
|
instance: {
|
|
136
|
-
type:
|
|
136
|
+
type: _contractspec_lib_schema798.SchemaModel<{
|
|
137
137
|
id: {
|
|
138
|
-
type:
|
|
138
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
139
139
|
isOptional: false;
|
|
140
140
|
};
|
|
141
141
|
workflowDefinitionId: {
|
|
142
|
-
type:
|
|
142
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
143
143
|
isOptional: false;
|
|
144
144
|
};
|
|
145
145
|
referenceId: {
|
|
146
|
-
type:
|
|
146
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
147
147
|
isOptional: true;
|
|
148
148
|
};
|
|
149
149
|
referenceType: {
|
|
150
|
-
type:
|
|
150
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
151
151
|
isOptional: true;
|
|
152
152
|
};
|
|
153
153
|
status: {
|
|
154
|
-
type:
|
|
154
|
+
type: _contractspec_lib_schema798.EnumType<[string, string, string, string, string, string, string, string]>;
|
|
155
155
|
isOptional: false;
|
|
156
156
|
};
|
|
157
157
|
currentStepId: {
|
|
158
|
-
type:
|
|
158
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
159
159
|
isOptional: true;
|
|
160
160
|
};
|
|
161
161
|
contextData: {
|
|
162
|
-
type:
|
|
162
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
163
163
|
isOptional: true;
|
|
164
164
|
};
|
|
165
165
|
triggeredBy: {
|
|
166
|
-
type:
|
|
166
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
167
167
|
isOptional: false;
|
|
168
168
|
};
|
|
169
169
|
organizationId: {
|
|
170
|
-
type:
|
|
170
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
171
171
|
isOptional: false;
|
|
172
172
|
};
|
|
173
173
|
priority: {
|
|
174
|
-
type:
|
|
174
|
+
type: _contractspec_lib_schema798.FieldType<number, number>;
|
|
175
175
|
isOptional: false;
|
|
176
176
|
};
|
|
177
177
|
dueAt: {
|
|
178
|
-
type:
|
|
178
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
179
179
|
isOptional: true;
|
|
180
180
|
};
|
|
181
181
|
outcome: {
|
|
182
|
-
type:
|
|
182
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
183
183
|
isOptional: true;
|
|
184
184
|
};
|
|
185
185
|
resultData: {
|
|
186
|
-
type:
|
|
186
|
+
type: _contractspec_lib_schema798.FieldType<unknown, unknown>;
|
|
187
187
|
isOptional: true;
|
|
188
188
|
};
|
|
189
189
|
errorMessage: {
|
|
190
|
-
type:
|
|
190
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
191
191
|
isOptional: true;
|
|
192
192
|
};
|
|
193
193
|
createdAt: {
|
|
194
|
-
type:
|
|
194
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
195
195
|
isOptional: false;
|
|
196
196
|
};
|
|
197
197
|
startedAt: {
|
|
198
|
-
type:
|
|
198
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
199
199
|
isOptional: true;
|
|
200
200
|
};
|
|
201
201
|
completedAt: {
|
|
202
|
-
type:
|
|
202
|
+
type: _contractspec_lib_schema798.FieldType<Date, string>;
|
|
203
203
|
isOptional: true;
|
|
204
204
|
};
|
|
205
205
|
}>;
|
|
206
206
|
isOptional: false;
|
|
207
207
|
};
|
|
208
208
|
previousStepKey: {
|
|
209
|
-
type:
|
|
209
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
210
210
|
isOptional: true;
|
|
211
211
|
};
|
|
212
212
|
currentStepKey: {
|
|
213
|
-
type:
|
|
213
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
214
214
|
isOptional: true;
|
|
215
215
|
};
|
|
216
216
|
message: {
|
|
217
|
-
type:
|
|
217
|
+
type: _contractspec_lib_schema798.FieldType<string, string>;
|
|
218
218
|
isOptional: true;
|
|
219
219
|
};
|
|
220
220
|
}>;
|
|
@@ -10,7 +10,7 @@ import { StabilityEnum } from "@contractspec/lib.contracts";
|
|
|
10
10
|
const WorkflowDesignerPresentation = {
|
|
11
11
|
meta: {
|
|
12
12
|
key: "workflow.designer",
|
|
13
|
-
version: 1,
|
|
13
|
+
version: "1.0.0",
|
|
14
14
|
title: "Workflow Designer",
|
|
15
15
|
description: "Visual workflow designer with drag-and-drop steps",
|
|
16
16
|
domain: "workflow-system",
|
|
@@ -39,7 +39,7 @@ const WorkflowDesignerPresentation = {
|
|
|
39
39
|
const WorkflowListPresentation = {
|
|
40
40
|
meta: {
|
|
41
41
|
key: "workflow.definition.list",
|
|
42
|
-
version: 1,
|
|
42
|
+
version: "1.0.0",
|
|
43
43
|
title: "Workflow List",
|
|
44
44
|
description: "List of workflow definitions with status and actions",
|
|
45
45
|
domain: "workflow-system",
|
|
@@ -68,7 +68,7 @@ const WorkflowListPresentation = {
|
|
|
68
68
|
const WorkflowDetailPresentation = {
|
|
69
69
|
meta: {
|
|
70
70
|
key: "workflow.definition.detail",
|
|
71
|
-
version: 1,
|
|
71
|
+
version: "1.0.0",
|
|
72
72
|
title: "Workflow Details",
|
|
73
73
|
description: "Detailed view of a workflow definition with steps",
|
|
74
74
|
domain: "workflow-system",
|
|
@@ -93,7 +93,7 @@ const WorkflowDetailPresentation = {
|
|
|
93
93
|
const InstanceListPresentation = {
|
|
94
94
|
meta: {
|
|
95
95
|
key: "workflow.instance.list",
|
|
96
|
-
version: 1,
|
|
96
|
+
version: "1.0.0",
|
|
97
97
|
title: "Instance List",
|
|
98
98
|
description: "List of workflow instances with status and progress",
|
|
99
99
|
domain: "workflow-system",
|
|
@@ -122,7 +122,7 @@ const InstanceListPresentation = {
|
|
|
122
122
|
const InstanceDetailPresentation = {
|
|
123
123
|
meta: {
|
|
124
124
|
key: "workflow.instance.detail",
|
|
125
|
-
version: 1,
|
|
125
|
+
version: "1.0.0",
|
|
126
126
|
title: "Instance Details",
|
|
127
127
|
description: "Detailed view of a workflow instance with step timeline",
|
|
128
128
|
domain: "workflow-system",
|
|
@@ -152,7 +152,7 @@ const InstanceDetailPresentation = {
|
|
|
152
152
|
const ProgressTrackerPresentation = {
|
|
153
153
|
meta: {
|
|
154
154
|
key: "workflow.instance.progress",
|
|
155
|
-
version: 1,
|
|
155
|
+
version: "1.0.0",
|
|
156
156
|
title: "Progress Tracker",
|
|
157
157
|
description: "Visual progress tracker showing current step in workflow",
|
|
158
158
|
domain: "workflow-system",
|
|
@@ -181,7 +181,7 @@ const ProgressTrackerPresentation = {
|
|
|
181
181
|
const ApprovalInboxPresentation = {
|
|
182
182
|
meta: {
|
|
183
183
|
key: "workflow.approval.inbox",
|
|
184
|
-
version: 1,
|
|
184
|
+
version: "1.0.0",
|
|
185
185
|
title: "Approval Inbox",
|
|
186
186
|
description: "Inbox showing pending approval requests for current user",
|
|
187
187
|
domain: "workflow-system",
|
|
@@ -210,7 +210,7 @@ const ApprovalInboxPresentation = {
|
|
|
210
210
|
const ApprovalDetailPresentation = {
|
|
211
211
|
meta: {
|
|
212
212
|
key: "workflow.approval.detail",
|
|
213
|
-
version: 1,
|
|
213
|
+
version: "1.0.0",
|
|
214
214
|
title: "Approval Details",
|
|
215
215
|
description: "Detailed approval request view with context and actions",
|
|
216
216
|
domain: "workflow-system",
|
|
@@ -239,7 +239,7 @@ const ApprovalDetailPresentation = {
|
|
|
239
239
|
const ApprovalFormPresentation = {
|
|
240
240
|
meta: {
|
|
241
241
|
key: "workflow.approval.form",
|
|
242
|
-
version: 1,
|
|
242
|
+
version: "1.0.0",
|
|
243
243
|
title: "Approval Form",
|
|
244
244
|
description: "Form for submitting approval decisions",
|
|
245
245
|
domain: "workflow-system",
|
|
@@ -267,7 +267,7 @@ const ApprovalFormPresentation = {
|
|
|
267
267
|
const PendingApprovalsBadgePresentation = {
|
|
268
268
|
meta: {
|
|
269
269
|
key: "workflow.approval.badge",
|
|
270
|
-
version: 1,
|
|
270
|
+
version: "1.0.0",
|
|
271
271
|
title: "Pending Approvals Badge",
|
|
272
272
|
description: "Badge showing count of pending approvals",
|
|
273
273
|
domain: "workflow-system",
|
|
@@ -296,7 +296,7 @@ const PendingApprovalsBadgePresentation = {
|
|
|
296
296
|
const WorkflowMetricsPresentation = {
|
|
297
297
|
meta: {
|
|
298
298
|
key: "workflow.metrics",
|
|
299
|
-
version: 1,
|
|
299
|
+
version: "1.0.0",
|
|
300
300
|
title: "Workflow Metrics",
|
|
301
301
|
description: "Dashboard widget showing workflow metrics and statistics",
|
|
302
302
|
domain: "workflow-system",
|