@bpmnkit/operate 0.0.5

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 (72) hide show
  1. package/README.md +131 -0
  2. package/dist/components/badge.d.ts +2 -0
  3. package/dist/components/badge.js +2 -0
  4. package/dist/components/card.d.ts +2 -0
  5. package/dist/components/card.js +2 -0
  6. package/dist/components/chart.d.ts +6 -0
  7. package/dist/components/chart.js +161 -0
  8. package/dist/components/filter-table.d.ts +20 -0
  9. package/dist/components/filter-table.js +215 -0
  10. package/dist/components/table.d.ts +2 -0
  11. package/dist/components/table.js +2 -0
  12. package/dist/css.d.ts +2 -0
  13. package/dist/css.js +1071 -0
  14. package/dist/index.d.ts +3 -0
  15. package/dist/index.js +2 -0
  16. package/dist/mock-data.d.ts +18 -0
  17. package/dist/mock-data.js +509 -0
  18. package/dist/operate.d.ts +3 -0
  19. package/dist/operate.js +308 -0
  20. package/dist/router.d.ts +9 -0
  21. package/dist/router.js +49 -0
  22. package/dist/stores/base.d.ts +20 -0
  23. package/dist/stores/base.js +32 -0
  24. package/dist/stores/dashboard.d.ts +6 -0
  25. package/dist/stores/dashboard.js +19 -0
  26. package/dist/stores/decisions.d.ts +9 -0
  27. package/dist/stores/decisions.js +19 -0
  28. package/dist/stores/definitions.d.ts +9 -0
  29. package/dist/stores/definitions.js +19 -0
  30. package/dist/stores/incidents.d.ts +10 -0
  31. package/dist/stores/incidents.js +27 -0
  32. package/dist/stores/instances.d.ts +15 -0
  33. package/dist/stores/instances.js +33 -0
  34. package/dist/stores/jobs.d.ts +10 -0
  35. package/dist/stores/jobs.js +19 -0
  36. package/dist/stores/tasks.d.ts +10 -0
  37. package/dist/stores/tasks.js +19 -0
  38. package/dist/stream.d.ts +12 -0
  39. package/dist/stream.js +42 -0
  40. package/dist/types.d.ts +48 -0
  41. package/dist/types.js +2 -0
  42. package/dist/views/dashboard.d.ts +6 -0
  43. package/dist/views/dashboard.js +98 -0
  44. package/dist/views/decision-detail.d.ts +15 -0
  45. package/dist/views/decision-detail.js +167 -0
  46. package/dist/views/decisions.d.ts +7 -0
  47. package/dist/views/decisions.js +78 -0
  48. package/dist/views/definition-detail.d.ts +15 -0
  49. package/dist/views/definition-detail.js +339 -0
  50. package/dist/views/definitions.d.ts +7 -0
  51. package/dist/views/definitions.js +70 -0
  52. package/dist/views/header.d.ts +9 -0
  53. package/dist/views/header.js +49 -0
  54. package/dist/views/incident-detail.d.ts +14 -0
  55. package/dist/views/incident-detail.js +540 -0
  56. package/dist/views/incidents.d.ts +7 -0
  57. package/dist/views/incidents.js +108 -0
  58. package/dist/views/instance-detail.d.ts +16 -0
  59. package/dist/views/instance-detail.js +728 -0
  60. package/dist/views/instances.d.ts +7 -0
  61. package/dist/views/instances.js +249 -0
  62. package/dist/views/jobs.d.ts +6 -0
  63. package/dist/views/jobs.js +60 -0
  64. package/dist/views/messages.d.ts +11 -0
  65. package/dist/views/messages.js +431 -0
  66. package/dist/views/nav.d.ts +10 -0
  67. package/dist/views/nav.js +60 -0
  68. package/dist/views/task-detail.d.ts +13 -0
  69. package/dist/views/task-detail.js +187 -0
  70. package/dist/views/tasks.d.ts +7 -0
  71. package/dist/views/tasks.js +72 -0
  72. package/package.json +46 -0
@@ -0,0 +1,3 @@
1
+ export { createOperate } from "./operate.js";
2
+ export type { DashboardData, IncidentResult, JobSearchResult, OperateApi, OperateOptions, ProcessDefinitionResult, ProcessInstanceResult, ProfileInfo, Theme, UserTaskResult, VariableResult, } from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { createOperate } from "./operate.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,18 @@
1
+ import type { DashboardData, DecisionDefinitionResult, IncidentResult, JobSearchResult, MessageSubscriptionResult, ProcessDefinitionResult, ProcessInstanceResult, UserTaskResult, VariableResult } from "./types.js";
2
+ export declare const MOCK_BPMN_XML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\"\n xmlns:bpmndi=\"http://www.omg.org/spec/BPMN/20100524/DI\"\n xmlns:dc=\"http://www.omg.org/spec/DD/20100524/DC\"\n xmlns:di=\"http://www.omg.org/spec/DD/20100524/DI\"\n id=\"Definitions_1\" targetNamespace=\"http://bpmn.io/schema/bpmn\">\n <process id=\"order-process\" name=\"Order Processing\" isExecutable=\"true\">\n <startEvent id=\"start\" name=\"Order Received\"/>\n <sequenceFlow id=\"sf1\" sourceRef=\"start\" targetRef=\"review\"/>\n <userTask id=\"review\" name=\"Review Order\"/>\n <sequenceFlow id=\"sf2\" sourceRef=\"review\" targetRef=\"gw1\"/>\n <exclusiveGateway id=\"gw1\" name=\"Approved?\"/>\n <sequenceFlow id=\"sf3\" sourceRef=\"gw1\" targetRef=\"payment\" name=\"Yes\"/>\n <sequenceFlow id=\"sf4\" sourceRef=\"gw1\" targetRef=\"notify\" name=\"No\"/>\n <serviceTask id=\"payment\" name=\"Process Payment\"/>\n <sequenceFlow id=\"sf5\" sourceRef=\"payment\" targetRef=\"ship\"/>\n <serviceTask id=\"ship\" name=\"Ship Order\"/>\n <sequenceFlow id=\"sf6\" sourceRef=\"ship\" targetRef=\"end\"/>\n <serviceTask id=\"notify\" name=\"Notify Customer\"/>\n <sequenceFlow id=\"sf7\" sourceRef=\"notify\" targetRef=\"end\"/>\n <endEvent id=\"end\" name=\"Done\"/>\n </process>\n <bpmndi:BPMNDiagram id=\"BPMNDiagram_1\">\n <bpmndi:BPMNPlane id=\"BPMNPlane_1\" bpmnElement=\"order-process\">\n <bpmndi:BPMNShape id=\"start_di\" bpmnElement=\"start\"><dc:Bounds x=\"152\" y=\"152\" width=\"36\" height=\"36\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"review_di\" bpmnElement=\"review\"><dc:Bounds x=\"240\" y=\"130\" width=\"100\" height=\"80\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"gw1_di\" bpmnElement=\"gw1\" isMarkerVisible=\"true\"><dc:Bounds x=\"395\" y=\"145\" width=\"50\" height=\"50\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"payment_di\" bpmnElement=\"payment\"><dc:Bounds x=\"500\" y=\"130\" width=\"100\" height=\"80\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"ship_di\" bpmnElement=\"ship\"><dc:Bounds x=\"660\" y=\"130\" width=\"100\" height=\"80\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"notify_di\" bpmnElement=\"notify\"><dc:Bounds x=\"500\" y=\"250\" width=\"100\" height=\"80\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNShape id=\"end_di\" bpmnElement=\"end\"><dc:Bounds x=\"822\" y=\"152\" width=\"36\" height=\"36\"/></bpmndi:BPMNShape>\n <bpmndi:BPMNEdge id=\"sf1_di\" bpmnElement=\"sf1\"><di:waypoint x=\"188\" y=\"170\"/><di:waypoint x=\"240\" y=\"170\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf2_di\" bpmnElement=\"sf2\"><di:waypoint x=\"340\" y=\"170\"/><di:waypoint x=\"395\" y=\"170\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf3_di\" bpmnElement=\"sf3\"><di:waypoint x=\"445\" y=\"170\"/><di:waypoint x=\"500\" y=\"170\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf4_di\" bpmnElement=\"sf4\"><di:waypoint x=\"420\" y=\"195\"/><di:waypoint x=\"420\" y=\"290\"/><di:waypoint x=\"500\" y=\"290\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf5_di\" bpmnElement=\"sf5\"><di:waypoint x=\"600\" y=\"170\"/><di:waypoint x=\"660\" y=\"170\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf6_di\" bpmnElement=\"sf6\"><di:waypoint x=\"760\" y=\"170\"/><di:waypoint x=\"822\" y=\"170\"/></bpmndi:BPMNEdge>\n <bpmndi:BPMNEdge id=\"sf7_di\" bpmnElement=\"sf7\"><di:waypoint x=\"600\" y=\"290\"/><di:waypoint x=\"840\" y=\"290\"/><di:waypoint x=\"840\" y=\"188\"/></bpmndi:BPMNEdge>\n </bpmndi:BPMNPlane>\n </bpmndi:BPMNDiagram>\n</definitions>";
3
+ export declare function getMockDashboard(): DashboardData;
4
+ export declare const MOCK_DEFINITIONS: ProcessDefinitionResult[];
5
+ export declare const MOCK_INSTANCES: ProcessInstanceResult[];
6
+ export declare const MOCK_INCIDENTS: IncidentResult[];
7
+ export declare const MOCK_JOBS: JobSearchResult[];
8
+ export declare const MOCK_TASKS: UserTaskResult[];
9
+ export declare const MOCK_VARIABLES: Array<VariableResult & {
10
+ value: string;
11
+ }>;
12
+ export declare const MOCK_DECISIONS: DecisionDefinitionResult[];
13
+ export declare const MOCK_MESSAGE_SUBSCRIPTIONS: MessageSubscriptionResult[];
14
+ /** Active element IDs for mock instance pi-1 (at "payment" step) */
15
+ export declare const MOCK_ACTIVE_ELEMENTS: string[];
16
+ /** Visited sequence flow / element IDs for mock instance pi-1 */
17
+ export declare const MOCK_VISITED_ELEMENTS: string[];
18
+ //# sourceMappingURL=mock-data.d.ts.map
@@ -0,0 +1,509 @@
1
+ // ── BPMN XML for the demo canvas ─────────────────────────────────────────────
2
+ export const MOCK_BPMN_XML = `<?xml version="1.0" encoding="UTF-8"?>
3
+ <definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
4
+ xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
5
+ xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
6
+ xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
7
+ id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
8
+ <process id="order-process" name="Order Processing" isExecutable="true">
9
+ <startEvent id="start" name="Order Received"/>
10
+ <sequenceFlow id="sf1" sourceRef="start" targetRef="review"/>
11
+ <userTask id="review" name="Review Order"/>
12
+ <sequenceFlow id="sf2" sourceRef="review" targetRef="gw1"/>
13
+ <exclusiveGateway id="gw1" name="Approved?"/>
14
+ <sequenceFlow id="sf3" sourceRef="gw1" targetRef="payment" name="Yes"/>
15
+ <sequenceFlow id="sf4" sourceRef="gw1" targetRef="notify" name="No"/>
16
+ <serviceTask id="payment" name="Process Payment"/>
17
+ <sequenceFlow id="sf5" sourceRef="payment" targetRef="ship"/>
18
+ <serviceTask id="ship" name="Ship Order"/>
19
+ <sequenceFlow id="sf6" sourceRef="ship" targetRef="end"/>
20
+ <serviceTask id="notify" name="Notify Customer"/>
21
+ <sequenceFlow id="sf7" sourceRef="notify" targetRef="end"/>
22
+ <endEvent id="end" name="Done"/>
23
+ </process>
24
+ <bpmndi:BPMNDiagram id="BPMNDiagram_1">
25
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="order-process">
26
+ <bpmndi:BPMNShape id="start_di" bpmnElement="start"><dc:Bounds x="152" y="152" width="36" height="36"/></bpmndi:BPMNShape>
27
+ <bpmndi:BPMNShape id="review_di" bpmnElement="review"><dc:Bounds x="240" y="130" width="100" height="80"/></bpmndi:BPMNShape>
28
+ <bpmndi:BPMNShape id="gw1_di" bpmnElement="gw1" isMarkerVisible="true"><dc:Bounds x="395" y="145" width="50" height="50"/></bpmndi:BPMNShape>
29
+ <bpmndi:BPMNShape id="payment_di" bpmnElement="payment"><dc:Bounds x="500" y="130" width="100" height="80"/></bpmndi:BPMNShape>
30
+ <bpmndi:BPMNShape id="ship_di" bpmnElement="ship"><dc:Bounds x="660" y="130" width="100" height="80"/></bpmndi:BPMNShape>
31
+ <bpmndi:BPMNShape id="notify_di" bpmnElement="notify"><dc:Bounds x="500" y="250" width="100" height="80"/></bpmndi:BPMNShape>
32
+ <bpmndi:BPMNShape id="end_di" bpmnElement="end"><dc:Bounds x="822" y="152" width="36" height="36"/></bpmndi:BPMNShape>
33
+ <bpmndi:BPMNEdge id="sf1_di" bpmnElement="sf1"><di:waypoint x="188" y="170"/><di:waypoint x="240" y="170"/></bpmndi:BPMNEdge>
34
+ <bpmndi:BPMNEdge id="sf2_di" bpmnElement="sf2"><di:waypoint x="340" y="170"/><di:waypoint x="395" y="170"/></bpmndi:BPMNEdge>
35
+ <bpmndi:BPMNEdge id="sf3_di" bpmnElement="sf3"><di:waypoint x="445" y="170"/><di:waypoint x="500" y="170"/></bpmndi:BPMNEdge>
36
+ <bpmndi:BPMNEdge id="sf4_di" bpmnElement="sf4"><di:waypoint x="420" y="195"/><di:waypoint x="420" y="290"/><di:waypoint x="500" y="290"/></bpmndi:BPMNEdge>
37
+ <bpmndi:BPMNEdge id="sf5_di" bpmnElement="sf5"><di:waypoint x="600" y="170"/><di:waypoint x="660" y="170"/></bpmndi:BPMNEdge>
38
+ <bpmndi:BPMNEdge id="sf6_di" bpmnElement="sf6"><di:waypoint x="760" y="170"/><di:waypoint x="822" y="170"/></bpmndi:BPMNEdge>
39
+ <bpmndi:BPMNEdge id="sf7_di" bpmnElement="sf7"><di:waypoint x="600" y="290"/><di:waypoint x="840" y="290"/><di:waypoint x="840" y="188"/></bpmndi:BPMNEdge>
40
+ </bpmndi:BPMNPlane>
41
+ </bpmndi:BPMNDiagram>
42
+ </definitions>`;
43
+ // ── Helpers ───────────────────────────────────────────────────────────────────
44
+ function daysAgo(n) {
45
+ return new Date(Date.now() - n * 86_400_000).toISOString();
46
+ }
47
+ function hoursAgo(n) {
48
+ return new Date(Date.now() - n * 3_600_000).toISOString();
49
+ }
50
+ function minutesAgo(n) {
51
+ return new Date(Date.now() - n * 60_000).toISOString();
52
+ }
53
+ // ── Mock data generators ──────────────────────────────────────────────────────
54
+ export function getMockDashboard() {
55
+ return {
56
+ activeInstances: 24,
57
+ openIncidents: 3,
58
+ activeJobs: 8,
59
+ pendingTasks: 5,
60
+ definitions: 4,
61
+ };
62
+ }
63
+ export const MOCK_DEFINITIONS = [
64
+ {
65
+ processDefinitionKey: "pd-1",
66
+ processDefinitionId: "order-process",
67
+ name: "Order Processing",
68
+ version: 3,
69
+ versionTag: "v3.1",
70
+ tenantId: "<default>",
71
+ resourceName: "order-process.bpmn",
72
+ hasStartForm: false,
73
+ },
74
+ {
75
+ processDefinitionKey: "pd-1b",
76
+ processDefinitionId: "order-process",
77
+ name: "Order Processing",
78
+ version: 2,
79
+ versionTag: "v2.0",
80
+ tenantId: "<default>",
81
+ resourceName: "order-process.bpmn",
82
+ hasStartForm: false,
83
+ },
84
+ {
85
+ processDefinitionKey: "pd-1c",
86
+ processDefinitionId: "order-process",
87
+ name: "Order Processing",
88
+ version: 1,
89
+ versionTag: null,
90
+ tenantId: "<default>",
91
+ resourceName: "order-process.bpmn",
92
+ hasStartForm: false,
93
+ },
94
+ {
95
+ processDefinitionKey: "pd-2",
96
+ processDefinitionId: "customer-onboarding",
97
+ name: "Customer Onboarding",
98
+ version: 1,
99
+ versionTag: null,
100
+ tenantId: "<default>",
101
+ resourceName: "customer-onboarding.bpmn",
102
+ hasStartForm: true,
103
+ },
104
+ {
105
+ processDefinitionKey: "pd-3",
106
+ processDefinitionId: "invoice-approval",
107
+ name: "Invoice Approval",
108
+ version: 2,
109
+ versionTag: "stable",
110
+ tenantId: "<default>",
111
+ resourceName: "invoice-approval.bpmn",
112
+ hasStartForm: false,
113
+ },
114
+ {
115
+ processDefinitionKey: "pd-4",
116
+ processDefinitionId: "data-pipeline",
117
+ name: "Data Pipeline",
118
+ version: 1,
119
+ versionTag: null,
120
+ tenantId: "<default>",
121
+ resourceName: "data-pipeline.bpmn",
122
+ hasStartForm: false,
123
+ },
124
+ ];
125
+ export const MOCK_INSTANCES = [
126
+ {
127
+ processInstanceKey: "pi-1",
128
+ processDefinitionKey: "pd-1",
129
+ processDefinitionId: "order-process",
130
+ processDefinitionName: "Order Processing",
131
+ processDefinitionVersion: 3,
132
+ processDefinitionVersionTag: "v3.1",
133
+ state: "ACTIVE",
134
+ hasIncident: false,
135
+ startDate: hoursAgo(2),
136
+ endDate: null,
137
+ tenantId: "<default>",
138
+ parentProcessInstanceKey: "",
139
+ parentElementInstanceKey: "",
140
+ rootProcessInstanceKey: "pi-1",
141
+ tags: [],
142
+ businessId: "ORD-10042",
143
+ },
144
+ {
145
+ processInstanceKey: "pi-2",
146
+ processDefinitionKey: "pd-1",
147
+ processDefinitionId: "order-process",
148
+ processDefinitionName: "Order Processing",
149
+ processDefinitionVersion: 3,
150
+ processDefinitionVersionTag: "v3.1",
151
+ state: "ACTIVE",
152
+ hasIncident: true,
153
+ startDate: hoursAgo(5),
154
+ endDate: null,
155
+ tenantId: "<default>",
156
+ parentProcessInstanceKey: "",
157
+ parentElementInstanceKey: "",
158
+ rootProcessInstanceKey: "pi-2",
159
+ tags: [],
160
+ businessId: "ORD-10041",
161
+ },
162
+ {
163
+ processInstanceKey: "pi-3",
164
+ processDefinitionKey: "pd-2",
165
+ processDefinitionId: "customer-onboarding",
166
+ processDefinitionName: "Customer Onboarding",
167
+ processDefinitionVersion: 1,
168
+ processDefinitionVersionTag: null,
169
+ state: "COMPLETED",
170
+ hasIncident: false,
171
+ startDate: daysAgo(2),
172
+ endDate: daysAgo(1),
173
+ tenantId: "<default>",
174
+ parentProcessInstanceKey: "",
175
+ parentElementInstanceKey: "",
176
+ rootProcessInstanceKey: "pi-3",
177
+ tags: [],
178
+ businessId: "CUST-882",
179
+ },
180
+ {
181
+ processInstanceKey: "pi-4",
182
+ processDefinitionKey: "pd-3",
183
+ processDefinitionId: "invoice-approval",
184
+ processDefinitionName: "Invoice Approval",
185
+ processDefinitionVersion: 2,
186
+ processDefinitionVersionTag: "stable",
187
+ state: "ACTIVE",
188
+ hasIncident: false,
189
+ startDate: hoursAgo(1),
190
+ endDate: null,
191
+ tenantId: "<default>",
192
+ parentProcessInstanceKey: "",
193
+ parentElementInstanceKey: "",
194
+ rootProcessInstanceKey: "pi-4",
195
+ tags: [],
196
+ businessId: "INV-5503",
197
+ },
198
+ {
199
+ processInstanceKey: "pi-5",
200
+ processDefinitionKey: "pd-1",
201
+ processDefinitionId: "order-process",
202
+ processDefinitionName: "Order Processing",
203
+ processDefinitionVersion: 2,
204
+ processDefinitionVersionTag: null,
205
+ state: "TERMINATED",
206
+ hasIncident: false,
207
+ startDate: daysAgo(3),
208
+ endDate: daysAgo(3),
209
+ tenantId: "<default>",
210
+ parentProcessInstanceKey: "",
211
+ parentElementInstanceKey: "",
212
+ rootProcessInstanceKey: "pi-5",
213
+ tags: [],
214
+ businessId: "ORD-10038",
215
+ },
216
+ ];
217
+ export const MOCK_INCIDENTS = [
218
+ {
219
+ incidentKey: "inc-1",
220
+ processDefinitionKey: "pd-1",
221
+ processDefinitionId: "order-process",
222
+ processInstanceKey: "pi-2",
223
+ rootProcessInstanceKey: "pi-2",
224
+ elementInstanceKey: "ei-payment",
225
+ jobKey: "job-3",
226
+ elementId: "payment",
227
+ errorType: "JOB_NO_RETRIES",
228
+ errorMessage: "Payment gateway timeout after 3 retries",
229
+ state: "ACTIVE",
230
+ creationTime: hoursAgo(4),
231
+ tenantId: "<default>",
232
+ },
233
+ {
234
+ incidentKey: "inc-2",
235
+ processDefinitionKey: "pd-3",
236
+ processDefinitionId: "invoice-approval",
237
+ processInstanceKey: "pi-4",
238
+ rootProcessInstanceKey: "pi-4",
239
+ elementInstanceKey: "ei-validate",
240
+ jobKey: "job-5",
241
+ elementId: "validate",
242
+ errorType: "IO_MAPPING_ERROR",
243
+ errorMessage: "Failed to map variable 'invoiceAmount': null value",
244
+ state: "ACTIVE",
245
+ creationTime: minutesAgo(45),
246
+ tenantId: "<default>",
247
+ },
248
+ {
249
+ incidentKey: "inc-3",
250
+ processDefinitionKey: "pd-1",
251
+ processDefinitionId: "order-process",
252
+ processInstanceKey: "pi-5",
253
+ rootProcessInstanceKey: "pi-5",
254
+ elementInstanceKey: "ei-ship",
255
+ jobKey: "job-6",
256
+ elementId: "ship",
257
+ errorType: "CALLED_ELEMENT_ERROR",
258
+ errorMessage: "Sub-process 'shipping-service' not deployed",
259
+ state: "RESOLVED",
260
+ creationTime: daysAgo(3),
261
+ tenantId: "<default>",
262
+ },
263
+ ];
264
+ export const MOCK_JOBS = [
265
+ {
266
+ jobKey: "job-1",
267
+ type: "io.camunda:http-json:1",
268
+ state: "CREATED",
269
+ retries: 3,
270
+ elementId: "payment",
271
+ elementInstanceKey: "ei-payment-2",
272
+ processDefinitionKey: "pd-1",
273
+ processDefinitionId: "order-process",
274
+ processInstanceKey: "pi-1",
275
+ rootProcessInstanceKey: "pi-1",
276
+ worker: "payment-worker",
277
+ deadline: hoursAgo(-1),
278
+ customHeaders: {},
279
+ hasFailedWithRetriesLeft: false,
280
+ kind: "BPMN_ELEMENT",
281
+ listenerEventType: "UNSPECIFIED",
282
+ tenantId: "<default>",
283
+ },
284
+ {
285
+ jobKey: "job-2",
286
+ type: "ship-order",
287
+ state: "FAILED",
288
+ retries: 0,
289
+ elementId: "ship",
290
+ elementInstanceKey: "ei-ship-2",
291
+ processDefinitionKey: "pd-1",
292
+ processDefinitionId: "order-process",
293
+ processInstanceKey: "pi-1",
294
+ rootProcessInstanceKey: "pi-1",
295
+ worker: "shipping-worker",
296
+ deadline: null,
297
+ errorMessage: "Shipping provider unreachable",
298
+ customHeaders: {},
299
+ hasFailedWithRetriesLeft: false,
300
+ kind: "BPMN_ELEMENT",
301
+ listenerEventType: "UNSPECIFIED",
302
+ tenantId: "<default>",
303
+ },
304
+ {
305
+ jobKey: "job-3",
306
+ type: "io.camunda:http-json:1",
307
+ state: "FAILED",
308
+ retries: 0,
309
+ elementId: "payment",
310
+ elementInstanceKey: "ei-payment",
311
+ processDefinitionKey: "pd-1",
312
+ processDefinitionId: "order-process",
313
+ processInstanceKey: "pi-2",
314
+ rootProcessInstanceKey: "pi-2",
315
+ worker: "payment-worker",
316
+ deadline: null,
317
+ errorMessage: "Payment gateway timeout after 3 retries",
318
+ customHeaders: {},
319
+ hasFailedWithRetriesLeft: false,
320
+ kind: "BPMN_ELEMENT",
321
+ listenerEventType: "UNSPECIFIED",
322
+ tenantId: "<default>",
323
+ },
324
+ ];
325
+ export const MOCK_TASKS = [
326
+ {
327
+ userTaskKey: "ut-1",
328
+ name: "Review Order",
329
+ state: "CREATED",
330
+ assignee: null,
331
+ elementId: "review",
332
+ elementInstanceKey: "ei-review-1",
333
+ processDefinitionKey: "pd-1",
334
+ processDefinitionId: "order-process",
335
+ processInstanceKey: "pi-1",
336
+ rootProcessInstanceKey: "pi-1",
337
+ processName: "Order Processing",
338
+ candidateGroups: ["order-managers"],
339
+ candidateUsers: [],
340
+ dueDate: hoursAgo(-2),
341
+ followUpDate: null,
342
+ completionDate: null,
343
+ externalFormReference: null,
344
+ formKey: "",
345
+ tags: [],
346
+ customHeaders: {},
347
+ priority: 50,
348
+ creationDate: hoursAgo(2),
349
+ tenantId: "<default>",
350
+ },
351
+ {
352
+ userTaskKey: "ut-2",
353
+ name: "Approve Invoice",
354
+ state: "CREATED",
355
+ assignee: "alice@example.com",
356
+ elementId: "approve",
357
+ elementInstanceKey: "ei-approve-1",
358
+ processDefinitionKey: "pd-3",
359
+ processDefinitionId: "invoice-approval",
360
+ processInstanceKey: "pi-4",
361
+ rootProcessInstanceKey: "pi-4",
362
+ processName: "Invoice Approval",
363
+ candidateGroups: ["finance"],
364
+ candidateUsers: ["alice@example.com", "bob@example.com"],
365
+ dueDate: hoursAgo(-24),
366
+ followUpDate: null,
367
+ completionDate: null,
368
+ externalFormReference: null,
369
+ formKey: "",
370
+ tags: [],
371
+ customHeaders: {},
372
+ priority: 80,
373
+ creationDate: hoursAgo(1),
374
+ tenantId: "<default>",
375
+ },
376
+ ];
377
+ export const MOCK_VARIABLES = [
378
+ {
379
+ variableKey: "var-1",
380
+ name: "orderId",
381
+ value: '"ORD-10042"',
382
+ scopeKey: "pi-1",
383
+ processInstanceKey: "pi-1",
384
+ rootProcessInstanceKey: "pi-1",
385
+ tenantId: "<default>",
386
+ },
387
+ {
388
+ variableKey: "var-2",
389
+ name: "customerId",
390
+ value: '"CUST-5512"',
391
+ scopeKey: "pi-1",
392
+ processInstanceKey: "pi-1",
393
+ rootProcessInstanceKey: "pi-1",
394
+ tenantId: "<default>",
395
+ },
396
+ {
397
+ variableKey: "var-3",
398
+ name: "amount",
399
+ value: "149.99",
400
+ scopeKey: "pi-1",
401
+ processInstanceKey: "pi-1",
402
+ rootProcessInstanceKey: "pi-1",
403
+ tenantId: "<default>",
404
+ },
405
+ {
406
+ variableKey: "var-4",
407
+ name: "approved",
408
+ value: "true",
409
+ scopeKey: "pi-1",
410
+ processInstanceKey: "pi-1",
411
+ rootProcessInstanceKey: "pi-1",
412
+ tenantId: "<default>",
413
+ },
414
+ ];
415
+ export const MOCK_DECISIONS = [
416
+ {
417
+ decisionDefinitionId: "approve-order",
418
+ decisionDefinitionKey: "dd-1",
419
+ decisionRequirementsId: "order-decisions",
420
+ decisionRequirementsKey: "drg-1",
421
+ decisionRequirementsName: "Order Decisions",
422
+ decisionRequirementsVersion: 2,
423
+ name: "Approve Order",
424
+ version: 2,
425
+ tenantId: "<default>",
426
+ },
427
+ {
428
+ decisionDefinitionId: "approve-order",
429
+ decisionDefinitionKey: "dd-1b",
430
+ decisionRequirementsId: "order-decisions",
431
+ decisionRequirementsKey: "drg-1b",
432
+ decisionRequirementsName: "Order Decisions",
433
+ decisionRequirementsVersion: 1,
434
+ name: "Approve Order",
435
+ version: 1,
436
+ tenantId: "<default>",
437
+ },
438
+ {
439
+ decisionDefinitionId: "discount-tier",
440
+ decisionDefinitionKey: "dd-2",
441
+ decisionRequirementsId: "order-decisions",
442
+ decisionRequirementsKey: "drg-1",
443
+ decisionRequirementsName: "Order Decisions",
444
+ decisionRequirementsVersion: 2,
445
+ name: "Discount Tier",
446
+ version: 2,
447
+ tenantId: "<default>",
448
+ },
449
+ {
450
+ decisionDefinitionId: "credit-check",
451
+ decisionDefinitionKey: "dd-3",
452
+ decisionRequirementsId: "credit-decisions",
453
+ decisionRequirementsKey: "drg-2",
454
+ decisionRequirementsName: "Credit Decisions",
455
+ decisionRequirementsVersion: 1,
456
+ name: "Credit Check",
457
+ version: 1,
458
+ tenantId: "<default>",
459
+ },
460
+ ];
461
+ export const MOCK_MESSAGE_SUBSCRIPTIONS = [
462
+ {
463
+ messageSubscriptionKey: "ms-1",
464
+ processDefinitionId: "order-process",
465
+ processDefinitionKey: "pd-1",
466
+ processInstanceKey: "pi-1",
467
+ rootProcessInstanceKey: "pi-1",
468
+ elementId: "msg-payment-confirmed",
469
+ elementInstanceKey: "ei-msg-1",
470
+ messageSubscriptionState: "CREATED",
471
+ messageName: "PaymentConfirmed",
472
+ correlationKey: "ORD-10042",
473
+ tenantId: "<default>",
474
+ lastUpdatedDate: minutesAgo(30),
475
+ },
476
+ {
477
+ messageSubscriptionKey: "ms-2",
478
+ processDefinitionId: "order-process",
479
+ processDefinitionKey: "pd-1",
480
+ processInstanceKey: "pi-2",
481
+ rootProcessInstanceKey: "pi-2",
482
+ elementId: "msg-payment-confirmed",
483
+ elementInstanceKey: "ei-msg-2",
484
+ messageSubscriptionState: "CREATED",
485
+ messageName: "PaymentConfirmed",
486
+ correlationKey: "ORD-10041",
487
+ tenantId: "<default>",
488
+ lastUpdatedDate: hoursAgo(5),
489
+ },
490
+ {
491
+ messageSubscriptionKey: "ms-3",
492
+ processDefinitionId: "invoice-approval",
493
+ processDefinitionKey: "pd-3",
494
+ processInstanceKey: "pi-4",
495
+ rootProcessInstanceKey: "pi-4",
496
+ elementId: "msg-approval-override",
497
+ elementInstanceKey: "ei-msg-3",
498
+ messageSubscriptionState: "CREATED",
499
+ messageName: "ApprovalOverride",
500
+ correlationKey: "INV-5503",
501
+ tenantId: "<default>",
502
+ lastUpdatedDate: minutesAgo(45),
503
+ },
504
+ ];
505
+ /** Active element IDs for mock instance pi-1 (at "payment" step) */
506
+ export const MOCK_ACTIVE_ELEMENTS = ["review"];
507
+ /** Visited sequence flow / element IDs for mock instance pi-1 */
508
+ export const MOCK_VISITED_ELEMENTS = ["start", "sf1"];
509
+ //# sourceMappingURL=mock-data.js.map
@@ -0,0 +1,3 @@
1
+ import type { OperateApi, OperateOptions } from "./types.js";
2
+ export declare function createOperate(options: OperateOptions): OperateApi;
3
+ //# sourceMappingURL=operate.d.ts.map