@acorex/platform 20.6.0-next.2 → 20.6.0-next.21

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 (107) hide show
  1. package/common/index.d.ts +7 -3
  2. package/core/index.d.ts +210 -56
  3. package/fesm2022/acorex-platform-auth.mjs +19 -19
  4. package/fesm2022/acorex-platform-auth.mjs.map +1 -1
  5. package/fesm2022/{acorex-platform-common-common-settings.provider-CLb2KMfv.mjs → acorex-platform-common-common-settings.provider-zhqNP3xb.mjs} +28 -4
  6. package/fesm2022/acorex-platform-common-common-settings.provider-zhqNP3xb.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-common.mjs +104 -103
  8. package/fesm2022/acorex-platform-common.mjs.map +1 -1
  9. package/fesm2022/acorex-platform-core.mjs +279 -78
  10. package/fesm2022/acorex-platform-core.mjs.map +1 -1
  11. package/fesm2022/acorex-platform-domain.mjs +65 -20
  12. package/fesm2022/acorex-platform-domain.mjs.map +1 -1
  13. package/fesm2022/acorex-platform-layout-builder.mjs +56 -135
  14. package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
  15. package/fesm2022/acorex-platform-layout-components.mjs +1322 -409
  16. package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-layout-designer.mjs +73 -73
  18. package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-layout-entity.mjs +7736 -3813
  20. package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
  21. package/fesm2022/acorex-platform-layout-views.mjs +58 -40
  22. package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
  23. package/fesm2022/acorex-platform-layout-widget-core.mjs +91 -82
  24. package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
  25. package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs} +4 -4
  26. package/fesm2022/{acorex-platform-layout-widgets-button-widget-designer.component-lHfg4JFJ.mjs.map → acorex-platform-layout-widgets-button-widget-designer.component-C3VoBb_b.mjs.map} +1 -1
  27. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMSnecnD.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs} +4 -4
  28. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-CMSnecnD.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-edit.component-fhhZOWul.mjs.map} +1 -1
  29. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DN-sIFYe.mjs → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs} +4 -4
  30. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-DN-sIFYe.mjs.map → acorex-platform-layout-widgets-extra-properties-schema-widget-view.component-C3Qbs0fz.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-Bn9w0SEz.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs} +4 -4
  32. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-Bn9w0SEz.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-edit.component-CngQBUlN.mjs.map} +1 -1
  33. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-B8mgcvoX.mjs → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs} +4 -4
  34. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-values-widget-view.component-B8mgcvoX.mjs.map → acorex-platform-layout-widgets-extra-properties-values-widget-view.component-DSNo9e4W.mjs.map} +1 -1
  35. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-Bhof2SY8.mjs → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs} +4 -4
  36. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-edit.component-Bhof2SY8.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-edit.component-CL0CwEHX.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-CeQIvKVV.mjs → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs} +4 -4
  38. package/fesm2022/{acorex-platform-layout-widgets-extra-properties-widget-view.component-CeQIvKVV.mjs.map → acorex-platform-layout-widgets-extra-properties-widget-view.component-B6Fi0xTw.mjs.map} +1 -1
  39. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs} +6 -6
  40. package/fesm2022/{acorex-platform-layout-widgets-file-list-popup.component-BOP7jFp4.mjs.map → acorex-platform-layout-widgets-file-list-popup.component-D0y-9nE5.mjs.map} +1 -1
  41. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs +30 -0
  42. package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +1 -0
  43. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs} +4 -4
  44. package/fesm2022/{acorex-platform-layout-widgets-page-widget-designer.component-C57lyBs3.mjs.map → acorex-platform-layout-widgets-page-widget-designer.component-BtZMBxYp.mjs.map} +1 -1
  45. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs} +6 -6
  46. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +1 -0
  47. package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs} +5 -5
  48. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +1 -0
  49. package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHES_0ot.mjs → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs} +4 -4
  50. package/fesm2022/{acorex-platform-layout-widgets-text-block-widget-designer.component-DHES_0ot.mjs.map → acorex-platform-layout-widgets-text-block-widget-designer.component-Df1BFkSa.mjs.map} +1 -1
  51. package/fesm2022/acorex-platform-layout-widgets.mjs +3809 -2060
  52. package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
  53. package/fesm2022/acorex-platform-native.mjs +7 -7
  54. package/fesm2022/acorex-platform-native.mjs.map +1 -1
  55. package/fesm2022/acorex-platform-runtime.mjs +119 -43
  56. package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
  57. package/fesm2022/{acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs → acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs} +30 -9
  58. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +1 -0
  59. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D5K0XUqM.mjs +1522 -0
  60. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-D5K0XUqM.mjs.map +1 -0
  61. package/fesm2022/{acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs → acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs} +4 -4
  62. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-BTA6h7Xd.mjs.map +1 -0
  63. package/fesm2022/{acorex-platform-themes-default-entity-master-single-view.component-BArdGNfr.mjs → acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs} +7 -7
  64. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-B_P0a5KW.mjs.map +1 -0
  65. package/fesm2022/{acorex-platform-themes-default-error-401.component-D7rEInHg.mjs → acorex-platform-themes-default-error-401.component-cfREo88K.mjs} +4 -4
  66. package/fesm2022/{acorex-platform-themes-default-error-401.component-D7rEInHg.mjs.map → acorex-platform-themes-default-error-401.component-cfREo88K.mjs.map} +1 -1
  67. package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs} +4 -4
  68. package/fesm2022/{acorex-platform-themes-default-error-404.component-BTZlVrd8.mjs.map → acorex-platform-themes-default-error-404.component-CdCV5ZoA.mjs.map} +1 -1
  69. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs} +4 -4
  70. package/fesm2022/{acorex-platform-themes-default-error-offline.component-BhvEi6nX.mjs.map → acorex-platform-themes-default-error-offline.component-E7SzBcAt.mjs.map} +1 -1
  71. package/fesm2022/acorex-platform-themes-default.mjs +156 -53
  72. package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
  73. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
  74. package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
  75. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs} +4 -4
  76. package/fesm2022/{acorex-platform-themes-shared-icon-chooser-view.component-BXV40gay.mjs.map → acorex-platform-themes-shared-icon-chooser-view.component-9W52W6Nu.mjs.map} +1 -1
  77. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BpIf4s53.mjs → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs} +4 -4
  78. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-column.component-BpIf4s53.mjs.map → acorex-platform-themes-shared-theme-color-chooser-column.component-DTnfRy5f.mjs.map} +1 -1
  79. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-C9gvfQfX.mjs → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs} +4 -4
  80. package/fesm2022/{acorex-platform-themes-shared-theme-color-chooser-view.component-C9gvfQfX.mjs.map → acorex-platform-themes-shared-theme-color-chooser-view.component-DY0JtT1v.mjs.map} +1 -1
  81. package/fesm2022/acorex-platform-themes-shared.mjs +58 -153
  82. package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
  83. package/fesm2022/acorex-platform-workflow.mjs +327 -151
  84. package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
  85. package/layout/builder/index.d.ts +6 -33
  86. package/layout/components/index.d.ts +306 -61
  87. package/layout/designer/index.d.ts +1 -1
  88. package/layout/entity/index.d.ts +595 -94
  89. package/layout/views/index.d.ts +6 -58
  90. package/layout/widget-core/index.d.ts +31 -26
  91. package/layout/widgets/README.md +0 -1
  92. package/layout/widgets/index.d.ts +325 -99
  93. package/package.json +1 -1
  94. package/runtime/index.d.ts +36 -8
  95. package/themes/default/index.d.ts +32 -77
  96. package/themes/shared/index.d.ts +1 -39
  97. package/workflow/index.d.ts +909 -457
  98. package/fesm2022/acorex-platform-common-common-settings.provider-CLb2KMfv.mjs.map +0 -1
  99. package/fesm2022/acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs +0 -52
  100. package/fesm2022/acorex-platform-layout-entity-create-entity.command-BsLbiAdA.mjs.map +0 -1
  101. package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-fr77M8Z0.mjs.map +0 -1
  102. package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-CvZTRhct.mjs.map +0 -1
  103. package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-C_XmJV7Y.mjs.map +0 -1
  104. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs +0 -782
  105. package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-BkY9HXcT.mjs.map +0 -1
  106. package/fesm2022/acorex-platform-themes-default-entity-master-modify-view.component-DJPDil7w.mjs.map +0 -1
  107. package/fesm2022/acorex-platform-themes-default-entity-master-single-view.component-BArdGNfr.mjs.map +0 -1
@@ -2,8 +2,9 @@ import * as rxjs from 'rxjs';
2
2
  import { Observable } from 'rxjs';
3
3
  import * as i0 from '@angular/core';
4
4
  import { Type, ModuleWithProviders, Injector, InjectionToken } from '@angular/core';
5
- import { AXPValidationRules } from '@acorex/platform/core';
6
5
  import { AXPCommand } from '@acorex/platform/runtime';
6
+ import * as _acorex_platform_core from '@acorex/platform/core';
7
+ import { AXPExecuteCommandResult, AXPValidationRules } from '@acorex/platform/core';
7
8
  import { AXPWidgetTypesMap } from '@acorex/platform/layout/widget-core';
8
9
  import { AXStyleColorType } from '@acorex/cdk/common';
9
10
 
@@ -149,6 +150,826 @@ declare class AXPWorkflowService {
149
150
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowService>;
150
151
  }
151
152
 
153
+ /**
154
+ * Base entity with versioning support.
155
+ */
156
+ interface AXPVersionedEntity {
157
+ version: number;
158
+ isLatest: boolean;
159
+ isPublished: boolean;
160
+ }
161
+ /**
162
+ * Workflow definition stored in database.
163
+ * This is the stored format that matches Elsa backend structure.
164
+ */
165
+ interface AXPStoredWorkflowDefinition extends AXPVersionedEntity {
166
+ /**
167
+ * Unique ID of this workflow definition version.
168
+ */
169
+ id: string;
170
+ /**
171
+ * Logical definition ID (same across all versions).
172
+ */
173
+ definitionId: string;
174
+ /**
175
+ * Tenant ID (nullable).
176
+ */
177
+ tenantId?: string | null;
178
+ /**
179
+ * Human-readable name.
180
+ */
181
+ name?: string | null;
182
+ /**
183
+ * Description of what the workflow does.
184
+ */
185
+ description?: string | null;
186
+ /**
187
+ * Creation timestamp (ISO date-time).
188
+ */
189
+ createdAt: string;
190
+ /**
191
+ * Version of the tool that produced this definition (e.g. "3.2.0.0").
192
+ */
193
+ toolVersion?: string | null;
194
+ /**
195
+ * Materializer name for deserialization.
196
+ */
197
+ materializerName?: string;
198
+ /**
199
+ * JSON data (for simple workflows).
200
+ */
201
+ stringData?: string;
202
+ /**
203
+ * Binary data (for complex workflows).
204
+ */
205
+ binaryData?: Uint8Array;
206
+ }
207
+ /**
208
+ * Variable definition.
209
+ * Matches VariableDefinition from workflow definition schema.
210
+ */
211
+ interface AXPVariableDefinition {
212
+ /**
213
+ * Variable ID.
214
+ */
215
+ id?: string;
216
+ /**
217
+ * Variable name.
218
+ */
219
+ name: string;
220
+ /**
221
+ * Type name (e.g., "String", "Int32", "Boolean").
222
+ */
223
+ typeName: string;
224
+ /**
225
+ * Whether this is an array type.
226
+ */
227
+ isArray?: boolean;
228
+ /**
229
+ * Variable value (as string expression or literal).
230
+ */
231
+ value?: string | null;
232
+ /**
233
+ * Storage driver type name (for custom storage).
234
+ */
235
+ storageDriverTypeName?: string | null;
236
+ }
237
+ /**
238
+ * Workflow input definition.
239
+ * Matches WorkflowInputDefinition from workflow definition schema.
240
+ */
241
+ interface AXPWorkflowInputDefinition {
242
+ /**
243
+ * Input type (e.g., "String", "Int32", "Object").
244
+ */
245
+ type: string;
246
+ /**
247
+ * Input name.
248
+ */
249
+ name: string;
250
+ /**
251
+ * Display name.
252
+ */
253
+ displayName?: string;
254
+ /**
255
+ * Description.
256
+ */
257
+ description?: string;
258
+ /**
259
+ * Category for grouping.
260
+ */
261
+ category?: string;
262
+ /**
263
+ * UI hint (widget type).
264
+ */
265
+ uiHint?: string;
266
+ /**
267
+ * Storage driver type (for custom storage).
268
+ */
269
+ storageDriverType?: string | null;
270
+ }
271
+ /**
272
+ * Workflow output definition.
273
+ * Matches WorkflowOutputDefinition from workflow definition schema.
274
+ */
275
+ interface AXPWorkflowOutputDefinition {
276
+ /**
277
+ * Output type (e.g., "String", "Int32", "Object").
278
+ */
279
+ type: string;
280
+ /**
281
+ * Output name.
282
+ */
283
+ name: string;
284
+ /**
285
+ * Display name.
286
+ */
287
+ displayName?: string;
288
+ /**
289
+ * Description.
290
+ */
291
+ description?: string;
292
+ /**
293
+ * Category for grouping.
294
+ */
295
+ category?: string;
296
+ }
297
+ /**
298
+ * Expression.
299
+ * Used for dynamic values in activities.
300
+ */
301
+ interface AXPExpression {
302
+ /**
303
+ * Expression type (e.g., "Literal", "JavaScript", "Liquid").
304
+ */
305
+ type: string;
306
+ /**
307
+ * Expression value.
308
+ */
309
+ value?: any;
310
+ }
311
+ /**
312
+ * Input value wrapper.
313
+ * Wraps an expression with type information.
314
+ */
315
+ interface AXPInputValue {
316
+ /**
317
+ * Type name.
318
+ */
319
+ typeName: string;
320
+ /**
321
+ * Expression (or null).
322
+ */
323
+ expression?: AXPExpression | null;
324
+ }
325
+ /**
326
+ * Output value wrapper.
327
+ * References memory location.
328
+ */
329
+ interface AXPOutputValue {
330
+ /**
331
+ * Type name.
332
+ */
333
+ typeName: string;
334
+ /**
335
+ * Memory reference (or null).
336
+ */
337
+ memoryReference?: {
338
+ id: string;
339
+ } | null;
340
+ }
341
+ /**
342
+ * Position (for visual layout).
343
+ */
344
+ interface AXPPosition {
345
+ x: number;
346
+ y: number;
347
+ }
348
+ /**
349
+ * Endpoint (connection point).
350
+ */
351
+ interface AXPEndpoint {
352
+ /**
353
+ * Activity ID.
354
+ */
355
+ activity: string;
356
+ /**
357
+ * Port name (nullable).
358
+ */
359
+ port?: string | null;
360
+ }
361
+ /**
362
+ * Connection between activities.
363
+ */
364
+ interface AXPConnection {
365
+ /**
366
+ * Source endpoint.
367
+ */
368
+ source: AXPEndpoint;
369
+ /**
370
+ * Target endpoint.
371
+ */
372
+ target: AXPEndpoint;
373
+ /**
374
+ * Connection vertices (for curved paths).
375
+ */
376
+ vertices?: AXPPosition[];
377
+ }
378
+ /**
379
+ * Variable model (for flowchart variables).
380
+ */
381
+ interface AXPVariableModel {
382
+ id: string;
383
+ name: string;
384
+ typeName: string;
385
+ value?: string | null;
386
+ storageDriverTypeName?: string | null;
387
+ }
388
+ /**
389
+ * Metadata (designer annotations).
390
+ */
391
+ interface AXPMetadata {
392
+ [key: string]: any;
393
+ }
394
+ /**
395
+ * Custom properties (free-form bag).
396
+ */
397
+ interface AXPCustomProperties {
398
+ /**
399
+ * Connections that reference non-existent activities.
400
+ */
401
+ notFoundConnections?: AXPConnection[];
402
+ /**
403
+ * Additional custom properties.
404
+ */
405
+ [key: string]: any;
406
+ }
407
+ /**
408
+ * Base activity (workflow definition format).
409
+ * Matches Activity from workflow definition schema.
410
+ * Note: This is the workflow definition format, not the frontend Activity class.
411
+ */
412
+ interface AXPActivity {
413
+ /**
414
+ * Activity ID.
415
+ */
416
+ id: string;
417
+ /**
418
+ * Node ID (for visual designer).
419
+ */
420
+ nodeId: string;
421
+ /**
422
+ * Activity name.
423
+ */
424
+ name?: string | null;
425
+ /**
426
+ * Activity type (e.g., "Elsa.WriteLine", "Elsa.If").
427
+ */
428
+ type: string;
429
+ /**
430
+ * Activity version.
431
+ */
432
+ version: number;
433
+ /**
434
+ * Execution mode for this activity instance.
435
+ * Determines where this activity should be executed:
436
+ * - 'frontend': Execute in browser (UI activities like dialogs, toasts, navigation)
437
+ * - 'backend': Execute in backend (business logic, database operations, API calls)
438
+ * - 'both': Execute in both frontend and backend (hybrid activities)
439
+ *
440
+ * If not specified, falls back to ActivityDescriptor's executionMode.
441
+ * This allows per-instance override of the default execution mode.
442
+ *
443
+ * @example
444
+ * ```json
445
+ * {
446
+ * "id": "show-dialog",
447
+ * "type": "Elsa.ShowDialog",
448
+ * "executionMode": "frontend"
449
+ * }
450
+ * ```
451
+ */
452
+ executionMode?: 'frontend' | 'backend' | 'both';
453
+ /**
454
+ * Custom properties.
455
+ */
456
+ customProperties?: AXPCustomProperties;
457
+ /**
458
+ * Metadata (designer annotations).
459
+ */
460
+ metadata?: AXPMetadata;
461
+ /**
462
+ * Additional type-specific properties.
463
+ */
464
+ [key: string]: any;
465
+ }
466
+ /**
467
+ * Flowchart activity (workflow definition format).
468
+ * Matches Flowchart from workflow definition schema.
469
+ * This is the root activity that contains all other activities.
470
+ */
471
+ interface AXPFlowchart extends AXPActivity {
472
+ /**
473
+ * Type must be "Elsa.Flowchart" (for Elsa backend compatibility).
474
+ */
475
+ type: "Elsa.Flowchart";
476
+ /**
477
+ * Activities in this flowchart.
478
+ */
479
+ activities: AXPActivity[];
480
+ /**
481
+ * Variables in this flowchart.
482
+ */
483
+ variables?: AXPVariableModel[];
484
+ /**
485
+ * Connections between activities.
486
+ */
487
+ connections: AXPConnection[];
488
+ }
489
+ /**
490
+ * Complete workflow definition (v3.0.0 format).
491
+ * This matches the Elsa Workflow Definition schema for backend compatibility.
492
+ * All workflow definitions use this format.
493
+ */
494
+ interface AXPWorkflowDefinition {
495
+ /**
496
+ * Schema reference.
497
+ */
498
+ $schema?: string;
499
+ /**
500
+ * Unique ID of this workflow definition version.
501
+ */
502
+ id: string;
503
+ /**
504
+ * Logical definition ID (same across all versions).
505
+ */
506
+ definitionId: string;
507
+ /**
508
+ * Tenant ID (nullable).
509
+ */
510
+ tenantId?: string | null;
511
+ /**
512
+ * Human-readable name.
513
+ */
514
+ name?: string | null;
515
+ /**
516
+ * Description.
517
+ */
518
+ description?: string | null;
519
+ /**
520
+ * Creation timestamp (ISO date-time).
521
+ */
522
+ createdAt: string;
523
+ /**
524
+ * Version number (minimum 1).
525
+ */
526
+ version: number;
527
+ /**
528
+ * Tool version (e.g., "3.2.0.0").
529
+ */
530
+ toolVersion?: string | null;
531
+ /**
532
+ * Workflow variables.
533
+ */
534
+ variables?: AXPVariableDefinition[];
535
+ /**
536
+ * Workflow inputs.
537
+ */
538
+ inputs?: AXPWorkflowInputDefinition[];
539
+ /**
540
+ * Workflow outputs.
541
+ */
542
+ outputs?: AXPWorkflowOutputDefinition[];
543
+ /**
544
+ * Workflow outcomes.
545
+ */
546
+ outcomes?: string[];
547
+ /**
548
+ * Custom properties.
549
+ */
550
+ customProperties?: AXPCustomProperties;
551
+ /**
552
+ * Whether workflow is readonly.
553
+ */
554
+ isReadonly: boolean;
555
+ /**
556
+ * Whether workflow is system workflow.
557
+ */
558
+ isSystem: boolean;
559
+ /**
560
+ * Whether this is the latest version.
561
+ */
562
+ isLatest: boolean;
563
+ /**
564
+ * Whether workflow is published.
565
+ */
566
+ isPublished: boolean;
567
+ /**
568
+ * Workflow options.
569
+ */
570
+ options?: AXPWorkflowOptions;
571
+ /**
572
+ * @deprecated Use options.usableAsActivity instead.
573
+ */
574
+ usableAsActivity?: boolean | null;
575
+ /**
576
+ * Root activity (Flowchart).
577
+ */
578
+ root: AXPFlowchart;
579
+ }
580
+ /**
581
+ * Workflow configuration options.
582
+ */
583
+ interface AXPWorkflowOptions {
584
+ /**
585
+ * Activation strategy type.
586
+ */
587
+ activationStrategyType?: string | null;
588
+ /**
589
+ * Whether workflow can be used as an activity.
590
+ */
591
+ usableAsActivity?: boolean | null;
592
+ /**
593
+ * Auto-update consuming workflows.
594
+ */
595
+ autoUpdateConsumingWorkflows?: boolean;
596
+ /**
597
+ * Activity category (if usable as activity).
598
+ */
599
+ activityCategory?: string | null;
600
+ /**
601
+ * Incident strategy type.
602
+ */
603
+ incidentStrategyType?: string | null;
604
+ /**
605
+ * Commit strategy name.
606
+ */
607
+ commitStrategyName?: string | null;
608
+ }
609
+
610
+ /**
611
+ * Workflow status.
612
+ */
613
+ type AXPWorkflowStatus = 'Running' | 'Finished';
614
+ /**
615
+ * Workflow sub-status.
616
+ */
617
+ type AXPWorkflowSubStatus = 'Pending' | 'Executing' | 'Suspended' | 'Finished' | 'Cancelled' | 'Faulted';
618
+ /**
619
+ * Activity status.
620
+ */
621
+ type AXPActivityStatus = 'Running' | 'Completed' | 'Canceled' | 'Faulted';
622
+ /**
623
+ * Exception state.
624
+ */
625
+ interface AXPExceptionState {
626
+ /**
627
+ * Exception type name.
628
+ */
629
+ type: string;
630
+ /**
631
+ * Exception message.
632
+ */
633
+ message: string;
634
+ /**
635
+ * Stack trace (nullable).
636
+ */
637
+ stackTrace?: string | null;
638
+ /**
639
+ * Inner exception (nullable).
640
+ */
641
+ innerException?: AXPExceptionState | null;
642
+ }
643
+ /**
644
+ * Activity incident.
645
+ */
646
+ interface AXPActivityIncident {
647
+ /**
648
+ * Activity ID that caused the incident.
649
+ */
650
+ activityId: string;
651
+ /**
652
+ * Activity node ID.
653
+ */
654
+ activityNodeId: string;
655
+ /**
656
+ * Activity type.
657
+ */
658
+ activityType: string;
659
+ /**
660
+ * Incident message.
661
+ */
662
+ message: string;
663
+ /**
664
+ * Exception (nullable).
665
+ */
666
+ exception?: AXPExceptionState | null;
667
+ /**
668
+ * Timestamp (ISO date-time).
669
+ */
670
+ timestamp: string;
671
+ }
672
+ /**
673
+ * Workflow fault state.
674
+ */
675
+ interface AXPWorkflowFaultState {
676
+ /**
677
+ * Exception (nullable).
678
+ */
679
+ exception?: AXPExceptionState | null;
680
+ /**
681
+ * Fault message.
682
+ */
683
+ message: string;
684
+ /**
685
+ * Faulted activity ID (nullable).
686
+ */
687
+ faultedActivityId?: string | null;
688
+ }
689
+ /**
690
+ * Bookmark.
691
+ */
692
+ interface AXPBookmark {
693
+ /**
694
+ * Bookmark ID.
695
+ */
696
+ id: string;
697
+ /**
698
+ * Bookmark name.
699
+ */
700
+ name: string;
701
+ /**
702
+ * Bookmark hash.
703
+ */
704
+ hash: string;
705
+ /**
706
+ * Bookmark payload (nullable).
707
+ */
708
+ payload?: any | null;
709
+ /**
710
+ * Activity node ID.
711
+ */
712
+ activityNodeId: string;
713
+ /**
714
+ * Activity instance ID.
715
+ */
716
+ activityInstanceId: string;
717
+ /**
718
+ * Auto burn flag.
719
+ */
720
+ autoBurn?: boolean;
721
+ /**
722
+ * Callback method name (nullable).
723
+ */
724
+ callbackMethodName?: string | null;
725
+ /**
726
+ * Metadata (nullable).
727
+ */
728
+ metadata?: Record<string, string> | null;
729
+ }
730
+ /**
731
+ * Completion callback state.
732
+ */
733
+ interface AXPCompletionCallbackState {
734
+ /**
735
+ * Owner activity instance ID.
736
+ */
737
+ ownerInstanceId: string;
738
+ /**
739
+ * Child activity node ID.
740
+ */
741
+ childNodeId: string;
742
+ /**
743
+ * Method name (nullable).
744
+ */
745
+ methodName?: string | null;
746
+ }
747
+ /**
748
+ * Variable (for activity context).
749
+ */
750
+ interface AXPActivityVariable {
751
+ /**
752
+ * Variable ID.
753
+ */
754
+ id: string;
755
+ /**
756
+ * Variable name.
757
+ */
758
+ name: string;
759
+ /**
760
+ * Type name.
761
+ */
762
+ typeName: string;
763
+ /**
764
+ * Is array flag.
765
+ */
766
+ isArray?: boolean;
767
+ /**
768
+ * Variable value (nullable).
769
+ */
770
+ value?: any | null;
771
+ /**
772
+ * Storage driver type name (nullable).
773
+ */
774
+ storageDriverTypeName?: string | null;
775
+ }
776
+ /**
777
+ * Activity execution context state.
778
+ */
779
+ interface AXPActivityExecutionContextState {
780
+ /**
781
+ * Context ID (activity instance ID).
782
+ */
783
+ id: string;
784
+ /**
785
+ * Parent context ID (nullable).
786
+ */
787
+ parentContextId?: string | null;
788
+ /**
789
+ * Scheduled activity node ID.
790
+ */
791
+ scheduledActivityNodeId: string;
792
+ /**
793
+ * Owner activity node ID (nullable).
794
+ */
795
+ ownerActivityNodeId?: string | null;
796
+ /**
797
+ * Properties bag.
798
+ */
799
+ properties: Record<string, any>;
800
+ /**
801
+ * Activity state (evaluated properties) (nullable).
802
+ */
803
+ activityState?: Record<string, any> | null;
804
+ /**
805
+ * Dynamic variables.
806
+ */
807
+ dynamicVariables: AXPActivityVariable[];
808
+ /**
809
+ * Activity status.
810
+ */
811
+ status: AXPActivityStatus;
812
+ /**
813
+ * Is executing flag.
814
+ */
815
+ isExecuting: boolean;
816
+ /**
817
+ * Fault count.
818
+ */
819
+ faultCount: number;
820
+ /**
821
+ * Started at timestamp (ISO date-time).
822
+ */
823
+ startedAt: string;
824
+ /**
825
+ * Completed at timestamp (ISO date-time, nullable).
826
+ */
827
+ completedAt?: string | null;
828
+ /**
829
+ * Tag (nullable).
830
+ */
831
+ tag?: any | null;
832
+ }
833
+ /**
834
+ * Workflow state (internal execution state).
835
+ */
836
+ interface AXPWorkflowState {
837
+ /**
838
+ * State ID.
839
+ */
840
+ id: string;
841
+ /**
842
+ * Workflow definition ID.
843
+ */
844
+ definitionId: string;
845
+ /**
846
+ * Workflow definition version.
847
+ */
848
+ definitionVersion: number;
849
+ /**
850
+ * Correlation ID (nullable).
851
+ */
852
+ correlationId?: string | null;
853
+ /**
854
+ * Workflow status.
855
+ */
856
+ status: AXPWorkflowStatus;
857
+ /**
858
+ * Workflow sub-status.
859
+ */
860
+ subStatus: AXPWorkflowSubStatus;
861
+ /**
862
+ * Bookmarks.
863
+ */
864
+ bookmarks: AXPBookmark[];
865
+ /**
866
+ * Incidents.
867
+ */
868
+ incidents: AXPActivityIncident[];
869
+ /**
870
+ * Fault (nullable).
871
+ */
872
+ fault?: AXPWorkflowFaultState | null;
873
+ /**
874
+ * Completion callbacks.
875
+ */
876
+ completionCallbacks: AXPCompletionCallbackState[];
877
+ /**
878
+ * Activity execution contexts.
879
+ */
880
+ activityExecutionContexts: AXPActivityExecutionContextState[];
881
+ /**
882
+ * Input data.
883
+ */
884
+ input: Record<string, any>;
885
+ /**
886
+ * Output data.
887
+ */
888
+ output: Record<string, any>;
889
+ /**
890
+ * Properties bag.
891
+ */
892
+ properties: Record<string, any>;
893
+ /**
894
+ * Created at timestamp (ISO date-time).
895
+ */
896
+ createdAt: string;
897
+ /**
898
+ * Updated at timestamp (ISO date-time).
899
+ */
900
+ updatedAt: string;
901
+ /**
902
+ * Finished at timestamp (ISO date-time, nullable).
903
+ */
904
+ finishedAt?: string | null;
905
+ }
906
+ /**
907
+ * Workflow instance (stored in database).
908
+ * This matches the Elsa Workflow Instance schema for backend compatibility.
909
+ */
910
+ interface AXPWorkflowInstance {
911
+ /**
912
+ * Schema reference.
913
+ */
914
+ $schema?: string;
915
+ /**
916
+ * Unique instance ID.
917
+ */
918
+ id: string;
919
+ /**
920
+ * Workflow definition ID.
921
+ */
922
+ definitionId: string;
923
+ /**
924
+ * Workflow definition version ID.
925
+ */
926
+ definitionVersionId: string;
927
+ /**
928
+ * Workflow definition version number.
929
+ */
930
+ version: number;
931
+ /**
932
+ * Parent workflow instance ID (nullable, for child workflows).
933
+ */
934
+ parentWorkflowInstanceId?: string | null;
935
+ /**
936
+ * Workflow state (internal execution state).
937
+ */
938
+ workflowState: AXPWorkflowState;
939
+ /**
940
+ * Workflow status.
941
+ */
942
+ status: AXPWorkflowStatus;
943
+ /**
944
+ * Workflow sub-status.
945
+ */
946
+ subStatus: AXPWorkflowSubStatus;
947
+ /**
948
+ * Correlation ID (nullable).
949
+ */
950
+ correlationId?: string | null;
951
+ /**
952
+ * Instance name (nullable).
953
+ */
954
+ name?: string | null;
955
+ /**
956
+ * Incident count.
957
+ */
958
+ incidentCount: number;
959
+ /**
960
+ * Created at timestamp (ISO date-time).
961
+ */
962
+ createdAt: string;
963
+ /**
964
+ * Updated at timestamp (ISO date-time).
965
+ */
966
+ updatedAt: string;
967
+ /**
968
+ * Finished at timestamp (ISO date-time, nullable).
969
+ */
970
+ finishedAt?: string | null;
971
+ }
972
+
152
973
  interface ActivityPropertyWidget {
153
974
  type: AXPWidgetTypesMap[keyof AXPWidgetTypesMap] | string;
154
975
  options?: Record<string, any>;
@@ -175,10 +996,10 @@ interface IActivity<TInput = any, TOutput = any> extends AXPCommand<TInput, {
175
996
  * @param input - Activity input data
176
997
  * @returns Promise with output and outcomes
177
998
  */
178
- execute(input: TInput): Promise<{
999
+ execute(input: TInput): Promise<AXPExecuteCommandResult<{
179
1000
  output: TOutput;
180
1001
  outcomes: Record<string, any>;
181
- }>;
1002
+ }>>;
182
1003
  }
183
1004
  /**
184
1005
  * Base abstract class for activities.
@@ -192,17 +1013,17 @@ declare abstract class Activity<TInput = any, TOutput = any> implements IActivit
192
1013
  * Execute the activity as a command.
193
1014
  * Override this method in subclasses to implement activity logic.
194
1015
  */
195
- abstract execute(input: TInput): Promise<{
1016
+ abstract execute(input: TInput): Promise<AXPExecuteCommandResult<{
196
1017
  output: TOutput;
197
1018
  outcomes: Record<string, any>;
198
- }>;
1019
+ }>>;
199
1020
  /**
200
1021
  * Helper method that returns Done outcome by default.
201
1022
  */
202
- protected createResult(output: TOutput, outcome?: string): {
1023
+ protected createResult(output: TOutput, outcome?: string): AXPExecuteCommandResult<{
203
1024
  output: TOutput;
204
1025
  outcomes: Record<string, any>;
205
- };
1026
+ }>;
206
1027
  }
207
1028
  /**
208
1029
  * Activity descriptor - metadata about an activity type.
@@ -227,152 +1048,45 @@ interface ActivityDescriptor {
227
1048
  /**
228
1049
  * Icon name or class.
229
1050
  */
230
- icon?: string;
231
- /**
232
- * Where this activity should be executed.
233
- * - 'frontend': Execute in browser (UI activities, console, events)
234
- * - 'backend': Execute in backend (business logic, API calls)
235
- * - 'both': Execute in both frontend and backend (hybrid activities)
236
- *
237
- * Default: 'frontend'
238
- */
239
- executionMode?: 'frontend' | 'backend' | 'both';
240
- /**
241
- * Input descriptors.
242
- */
243
- inputs: InputDescriptor[];
244
- /**
245
- * Output descriptors.
246
- */
247
- outputs: OutputDescriptor[];
248
- /**
249
- * Static outcomes (exit points).
250
- * Example: ['Done', 'Success', 'Failed']
251
- */
252
- outcomes?: string[];
253
- /**
254
- * Whether this activity is browsable in the toolbox.
255
- * Default: true
256
- */
257
- isBrowsable?: boolean;
258
- /**
259
- * Whether this activity is a container (can have children).
260
- * Default: false
261
- */
262
- isContainer?: boolean;
263
- }
264
- /**
265
- * Input property descriptor.
266
- * Similar to AXPEntityProperty structure.
267
- */
268
- interface InputDescriptor {
269
- name: string;
270
- title: string;
271
- description?: string;
272
- schema: {
273
- dataType: string;
274
- nullable?: boolean;
275
- readonly?: boolean;
276
- hidden?: boolean | string;
277
- defaultValue?: any | string | ((context: any | null) => any);
278
- interface?: ActivityPropertyWidget;
279
- };
280
- validations?: AXPValidationRules;
281
- }
282
- /**
283
- * Output property descriptor.
284
- */
285
- interface OutputDescriptor {
286
- name: string;
287
- title: string;
288
- description?: string;
289
- schema: {
290
- dataType: string;
291
- };
292
- }
293
- /**
294
- * Activity registry for registering and creating activities.
295
- */
296
- declare class ActivityRegistry {
297
- private registry;
298
- private descriptors;
299
- /**
300
- * Register an activity type.
301
- */
302
- register(type: string, factory: () => IActivity, descriptor: ActivityDescriptor): void;
303
- /**
304
- * Create an activity instance.
305
- */
306
- create(type: string): IActivity;
307
- /**
308
- * Get activity descriptor.
309
- */
310
- getDescriptor(type: string): ActivityDescriptor | undefined;
311
- /**
312
- * Get all registered types.
313
- */
314
- getTypes(): string[];
315
- /**
316
- * Get all descriptors.
317
- */
318
- getAllDescriptors(): ActivityDescriptor[];
319
- /**
320
- * Get descriptors by category.
321
- */
322
- getDescriptorsByCategory(category: string): ActivityDescriptor[];
323
- }
324
-
325
- /**
326
- * Base entity with versioning support.
327
- */
328
- interface VersionedEntity {
329
- version: number;
330
- isLatest: boolean;
331
- isPublished: boolean;
332
- }
333
- /**
334
- * Simple workflow definition stored in database.
335
- */
336
- interface WorkflowDefinition extends VersionedEntity {
1051
+ icon?: string;
337
1052
  /**
338
- * Logical definition ID (same across all versions).
1053
+ * Where this activity should be executed.
1054
+ * - 'frontend': Execute in browser (UI activities, console, events)
1055
+ * - 'backend': Execute in backend (business logic, API calls)
1056
+ * - 'both': Execute in both frontend and backend (hybrid activities)
1057
+ *
1058
+ * Default: 'frontend'
339
1059
  */
340
- definitionId: string;
1060
+ executionMode?: 'frontend' | 'backend' | 'both';
341
1061
  /**
342
- * Human-readable name.
1062
+ * Input descriptors.
343
1063
  */
344
- name?: string;
1064
+ inputs: InputDescriptor[];
345
1065
  /**
346
- * Description of what the workflow does.
1066
+ * Output descriptors.
347
1067
  */
348
- description?: string;
1068
+ outputs: OutputDescriptor[];
349
1069
  /**
350
- * Materializer name for deserialization.
1070
+ * Static outcomes (exit points).
1071
+ * Example: ['Done', 'Success', 'Failed']
351
1072
  */
352
- materializerName: string;
1073
+ outcomes?: string[];
353
1074
  /**
354
- * JSON data (for simple workflows).
1075
+ * Whether this activity is browsable in the toolbox.
1076
+ * Default: true
355
1077
  */
356
- stringData?: string;
1078
+ isBrowsable?: boolean;
357
1079
  /**
358
- * Binary data (for complex workflows).
1080
+ * Whether this activity is a container (can have children).
1081
+ * Default: false
359
1082
  */
360
- binaryData?: Uint8Array;
361
- }
362
- /**
363
- * Simple variable definition.
364
- */
365
- interface Variable {
366
- id: string;
367
- name: string;
368
- typeName: string;
369
- value?: any;
1083
+ isContainer?: boolean;
370
1084
  }
371
1085
  /**
372
- * Simple input definition.
1086
+ * Input property descriptor.
373
1087
  * Similar to AXPEntityProperty structure.
374
1088
  */
375
- interface InputDefinition {
1089
+ interface InputDescriptor {
376
1090
  name: string;
377
1091
  title: string;
378
1092
  description?: string;
@@ -387,9 +1101,9 @@ interface InputDefinition {
387
1101
  validations?: AXPValidationRules;
388
1102
  }
389
1103
  /**
390
- * Simple output definition.
1104
+ * Output property descriptor.
391
1105
  */
392
- interface OutputDefinition {
1106
+ interface OutputDescriptor {
393
1107
  name: string;
394
1108
  title: string;
395
1109
  description?: string;
@@ -398,104 +1112,35 @@ interface OutputDefinition {
398
1112
  };
399
1113
  }
400
1114
  /**
401
- * Common workflow properties.
402
- */
403
- interface WorkflowCommon {
404
- options: WorkflowOptions;
405
- variables: Variable[];
406
- inputs: InputDefinition[];
407
- outputs: OutputDefinition[];
408
- outcomes: string[];
409
- customProperties: Record<string, any>;
410
- isReadonly: boolean;
411
- isSystem: boolean;
412
- }
413
- /**
414
- * Workflow configuration options.
415
- */
416
- interface WorkflowOptions {
417
- usableAsActivity: boolean;
418
- autoUpdateConsumingWorkflows: boolean;
419
- activationStrategyType?: string;
420
- }
421
-
422
- /**
423
- * Simple workflow definition - just a tree of activities.
424
- */
425
- interface AXPWorkflowEngine {
426
- /**
427
- * Workflow ID.
428
- */
429
- id: string;
430
- /**
431
- * Workflow name.
432
- */
433
- name: string;
434
- /**
435
- * Workflow description.
436
- */
437
- description?: string;
438
- /**
439
- * Workflow version.
440
- */
441
- version: number;
442
- /**
443
- * Root activity to execute.
444
- */
445
- root: IActivity;
446
- /**
447
- * All activities in this workflow (flat list for easy access).
448
- */
449
- activities: IActivity[];
450
- }
451
- /**
452
- * Simple workflow step - for backward compatibility with old system.
1115
+ * Activity registry for registering and creating activities.
453
1116
  */
454
- interface AXPWorkflowEngineStep {
455
- /**
456
- * Step ID.
457
- */
458
- id: string;
459
- /**
460
- * Activity type to execute.
461
- */
462
- type: string;
463
- /**
464
- * Activity name.
465
- */
466
- name?: string;
1117
+ declare class ActivityRegistry {
1118
+ private registry;
1119
+ private descriptors;
467
1120
  /**
468
- * Input properties for the activity.
1121
+ * Register an activity type.
469
1122
  */
470
- properties?: Record<string, any>;
1123
+ register(type: string, factory: () => IActivity, descriptor: ActivityDescriptor): void;
471
1124
  /**
472
- * Next steps based on outcomes.
1125
+ * Create an activity instance.
473
1126
  */
474
- nextSteps?: {
475
- outcome: string;
476
- stepId: string;
477
- }[];
478
- }
479
- /**
480
- * Simple workflow definition for backward compatibility.
481
- */
482
- interface AXPSimpleWorkflowEngine {
1127
+ create(type: string): IActivity;
483
1128
  /**
484
- * Workflow ID.
1129
+ * Get activity descriptor.
485
1130
  */
486
- id: string;
1131
+ getDescriptor(type: string): ActivityDescriptor | undefined;
487
1132
  /**
488
- * Workflow name.
1133
+ * Get all registered types.
489
1134
  */
490
- name: string;
1135
+ getTypes(): string[];
491
1136
  /**
492
- * Start step ID.
1137
+ * Get all descriptors.
493
1138
  */
494
- startStepId: string;
1139
+ getAllDescriptors(): ActivityDescriptor[];
495
1140
  /**
496
- * All steps in this workflow.
1141
+ * Get descriptors by category.
497
1142
  */
498
- steps: Record<string, AXPWorkflowEngineStep>;
1143
+ getDescriptorsByCategory(category: string): ActivityDescriptor[];
499
1144
  }
500
1145
 
501
1146
  interface ActivityCategoryDescriptor {
@@ -692,56 +1337,6 @@ interface AXPStartWorkflowExecutionResponse {
692
1337
  */
693
1338
  pendingTask?: AXPWorkflowTask | null;
694
1339
  }
695
- /**
696
- * Request to execute a backend activity.
697
- */
698
- interface AXPExecuteBackendActivityRequest {
699
- /**
700
- * Workflow ID.
701
- */
702
- workflowId: string;
703
- /**
704
- * Execution ID.
705
- */
706
- executionId: string;
707
- /**
708
- * Activity type (e.g., 'workflow-activity:execute-command').
709
- */
710
- activityType: string;
711
- /**
712
- * Activity ID from workflow definition.
713
- */
714
- activityId: string;
715
- /**
716
- * Activity properties (input data).
717
- */
718
- properties: Record<string, any>;
719
- /**
720
- * Current workflow state (optional, for context).
721
- */
722
- workflowState?: Partial<AXPWorkflowExecutionState>;
723
- }
724
- /**
725
- * Response after executing backend activity.
726
- */
727
- interface AXPExecuteBackendActivityResponse {
728
- /**
729
- * Activity execution output.
730
- */
731
- output: any;
732
- /**
733
- * Activity execution outcomes.
734
- */
735
- outcomes: Record<string, any>;
736
- /**
737
- * Next task to execute (if any).
738
- */
739
- nextTask?: AXPWorkflowTask | null;
740
- /**
741
- * Updated workflow state.
742
- */
743
- state: AXPWorkflowExecutionState;
744
- }
745
1340
  /**
746
1341
  * Request to resume a suspended workflow.
747
1342
  */
@@ -754,6 +1349,11 @@ interface AXPResumeWorkflowExecutionRequest {
754
1349
  * Step ID that was waiting for user input.
755
1350
  */
756
1351
  stepId: string;
1352
+ /**
1353
+ * Secure task token issued with the pending task.
1354
+ * Backend validates and resolves the step using this token.
1355
+ */
1356
+ taskToken: string;
757
1357
  /**
758
1358
  * User action outcome (e.g., 'Confirmed', 'Cancelled').
759
1359
  */
@@ -793,36 +1393,6 @@ interface AXPGetWorkflowExecutionStateRequest {
793
1393
  */
794
1394
  executionId: string;
795
1395
  }
796
- /**
797
- * Request to execute current step from execution state.
798
- */
799
- interface AXPExecuteCurrentStepRequest {
800
- /**
801
- * Execution ID.
802
- */
803
- executionId: string;
804
- }
805
- /**
806
- * Response after executing current step.
807
- */
808
- interface AXPExecuteCurrentStepResponse {
809
- /**
810
- * Step execution output.
811
- */
812
- output: any;
813
- /**
814
- * Step execution outcomes.
815
- */
816
- outcomes: Record<string, any>;
817
- /**
818
- * Next task to execute (if any, determined by backend from outcomeConnections).
819
- */
820
- nextTask?: AXPWorkflowTask | null;
821
- /**
822
- * Updated workflow state.
823
- */
824
- state: AXPWorkflowExecutionState;
825
- }
826
1396
  /**
827
1397
  * Request to get workflow definition.
828
1398
  */
@@ -837,9 +1407,9 @@ interface AXPGetWorkflowDefinitionRequest {
837
1407
  */
838
1408
  interface AXPGetWorkflowDefinitionResponse {
839
1409
  /**
840
- * Workflow definition (executable format).
1410
+ * Workflow definition.
841
1411
  */
842
- workflow: AXPWorkflowEngine;
1412
+ workflow: AXPWorkflowDefinition;
843
1413
  }
844
1414
  /**
845
1415
  * Workflow execution state (managed by backend, cached in client).
@@ -878,36 +1448,6 @@ interface AXPWorkflowExecutionState {
878
1448
  */
879
1449
  lastUpdated: Date;
880
1450
  }
881
- /**
882
- * Request to complete a task.
883
- */
884
- interface AXPCompleteTaskRequest {
885
- /**
886
- * Task token from the pending task.
887
- */
888
- taskToken: string;
889
- /**
890
- * Task execution result.
891
- */
892
- result?: any;
893
- /**
894
- * Error message if task failed.
895
- */
896
- error?: string;
897
- }
898
- /**
899
- * Response after completing a task.
900
- */
901
- interface AXPCompleteTaskResponse {
902
- /**
903
- * Updated workflow state.
904
- */
905
- state: AXPWorkflowExecutionState;
906
- /**
907
- * Next task to execute (if any).
908
- */
909
- nextTask?: AXPWorkflowTask | null;
910
- }
911
1451
 
912
1452
  /**
913
1453
  * Workflow execution result.
@@ -1007,49 +1547,11 @@ declare class WorkflowCoordinator {
1007
1547
  * @param outcome - User action outcome (e.g., 'Confirmed', 'Cancelled', 'Submitted')
1008
1548
  * @param userInput - Optional user input data
1009
1549
  */
1010
- resumeWorkflow(executionId: string, stepId: string, outcome: string, userInput?: any): Promise<WorkflowExecutionResult>;
1550
+ resumeWorkflow(executionId: string, stepId: string, outcome: string, userInput?: any, taskToken?: string): Promise<WorkflowExecutionResult>;
1011
1551
  /**
1012
1552
  * Get workflow execution state (from cache or backend).
1013
1553
  */
1014
1554
  getWorkflowState(executionId: string): Promise<AXPWorkflowExecutionState | null>;
1015
- /**
1016
- * Start step-based execution (only current step, not full workflow).
1017
- *
1018
- * Use this when you only need to execute one step at a time.
1019
- * Perfect for form-based workflows where user interacts with forms.
1020
- *
1021
- * @param workflowId - Workflow ID
1022
- * @param stepId - Initial step ID to execute
1023
- * @param input - Initial input data
1024
- * @returns Execution info with executionId and initial state
1025
- *
1026
- * @example
1027
- * ```typescript
1028
- * // Start login form step
1029
- * const execution = await coordinator.startStepExecution(
1030
- * 'login-workflow',
1031
- * 'login-form-step',
1032
- * {}
1033
- * );
1034
- *
1035
- * // Save executionId for resume after refresh
1036
- * localStorage.setItem('execution-id', execution.executionId);
1037
- * ```
1038
- */
1039
- startStepExecution(workflowId: string, stepId: string, input?: Record<string, any>): Promise<{
1040
- executionId: string;
1041
- state: AXPWorkflowExecutionState;
1042
- }>;
1043
- /**
1044
- * Get next task from backend after backend task completion.
1045
- *
1046
- * Use this when backend task completes - backend will return next task.
1047
- * For frontend tasks, use executeTask + completeTask instead.
1048
- *
1049
- * @param executionId - Execution ID
1050
- * @returns Next task from backend (if any)
1051
- */
1052
- getNextTask(executionId: string): Promise<WorkflowExecutionResult>;
1053
1555
  /**
1054
1556
  * Execute a frontend activity using CommandBus.
1055
1557
  *
@@ -1125,33 +1627,6 @@ declare abstract class AXPWorkflowExecutionService {
1125
1627
  * ```
1126
1628
  */
1127
1629
  abstract startExecution(request: AXPStartWorkflowExecutionRequest): Promise<AXPStartWorkflowExecutionResponse>;
1128
- /**
1129
- * Execute a backend activity.
1130
- *
1131
- * Executes an activity that should run in backend (e.g., execute-command, execute-query, set-variable).
1132
- *
1133
- * @param request - Backend activity execution request
1134
- * @returns Activity execution response with output and updated state
1135
- *
1136
- * @example
1137
- * ```typescript
1138
- * const response = await workflowExecutionService.executeBackendActivity({
1139
- * workflowId: 'my-workflow',
1140
- * executionId: 'exec-123',
1141
- * activityType: 'workflow-activity:execute-command',
1142
- * activityId: 'cmd-1',
1143
- * properties: {
1144
- * commandKey: 'Entity:Create',
1145
- * input: { entity: 'User', data: {...} }
1146
- * },
1147
- * workflowState: { variables: {...} }
1148
- * });
1149
- *
1150
- * console.log('Output:', response.output);
1151
- * console.log('Updated State:', response.state);
1152
- * ```
1153
- */
1154
- abstract executeBackendActivity(request: AXPExecuteBackendActivityRequest): Promise<AXPExecuteBackendActivityResponse>;
1155
1630
  /**
1156
1631
  * Resume a suspended workflow execution.
1157
1632
  *
@@ -1165,6 +1640,7 @@ declare abstract class AXPWorkflowExecutionService {
1165
1640
  * const response = await workflowExecutionService.resumeExecution({
1166
1641
  * executionId: 'exec-123',
1167
1642
  * stepId: 'step-dialog-1',
1643
+ * taskToken: 'sec-task-token',
1168
1644
  * outcome: 'Confirmed',
1169
1645
  * userInput: { confirmed: true }
1170
1646
  * });
@@ -1211,30 +1687,6 @@ declare abstract class AXPWorkflowExecutionService {
1211
1687
  * ```
1212
1688
  */
1213
1689
  abstract getWorkflowDefinition(request: AXPGetWorkflowDefinitionRequest): Promise<AXPGetWorkflowDefinitionResponse>;
1214
- /**
1215
- * Execute current step from execution state.
1216
- *
1217
- * Backend handles everything:
1218
- * - Gets execution state
1219
- * - Gets workflow definition
1220
- * - Finds current step
1221
- * - Executes step (or returns step info for frontend execution)
1222
- * - Determines next step based on outcomeConnections
1223
- *
1224
- * @param request - Execute current step request
1225
- * @returns Step execution response with output, outcomes, and next step
1226
- *
1227
- * @example
1228
- * ```typescript
1229
- * const response = await workflowExecutionService.executeCurrentStep({
1230
- * executionId: 'exec-123'
1231
- * });
1232
- *
1233
- * console.log('Output:', response.output);
1234
- * console.log('Next Step:', response.nextStep);
1235
- * ```
1236
- */
1237
- abstract executeCurrentStep(request: AXPExecuteCurrentStepRequest): Promise<AXPExecuteCurrentStepResponse>;
1238
1690
  static ɵfac: i0.ɵɵFactoryDeclaration<AXPWorkflowExecutionService, never>;
1239
1691
  static ɵprov: i0.ɵɵInjectableDeclaration<AXPWorkflowExecutionService>;
1240
1692
  }
@@ -1254,10 +1706,10 @@ declare class WriteLine extends Activity<{
1254
1706
  constructor();
1255
1707
  execute(input: {
1256
1708
  text?: string;
1257
- }): Promise<{
1709
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1258
1710
  output: void;
1259
1711
  outcomes: Record<string, any>;
1260
- }>;
1712
+ }>>;
1261
1713
  }
1262
1714
 
1263
1715
  /**
@@ -1276,10 +1728,10 @@ declare class Sequence extends Activity<{}, void> {
1276
1728
  */
1277
1729
  activities: IActivity[];
1278
1730
  constructor();
1279
- execute(input: {}): Promise<{
1731
+ execute(input: {}): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1280
1732
  output: void;
1281
1733
  outcomes: Record<string, any>;
1282
- }>;
1734
+ }>>;
1283
1735
  }
1284
1736
 
1285
1737
  /**
@@ -1320,13 +1772,13 @@ declare class ShowConfirmDialog extends Activity<{
1320
1772
  defaultAction?: 'confirm' | 'cancel';
1321
1773
  align?: 'horizontal' | 'vertical';
1322
1774
  backdrop?: boolean;
1323
- }): Promise<{
1775
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1324
1776
  output: {
1325
1777
  result: boolean;
1326
1778
  action: string;
1327
1779
  };
1328
1780
  outcomes: Record<string, any>;
1329
- }>;
1781
+ }>>;
1330
1782
  }
1331
1783
 
1332
1784
  /**
@@ -1360,13 +1812,13 @@ declare class ShowAlertDialog extends Activity<{
1360
1812
  title?: string;
1361
1813
  message?: string;
1362
1814
  color?: AXStyleColorType;
1363
- }): Promise<{
1815
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1364
1816
  output: {
1365
1817
  result: boolean;
1366
1818
  action: string;
1367
1819
  };
1368
1820
  outcomes: Record<string, any>;
1369
- }>;
1821
+ }>>;
1370
1822
  }
1371
1823
 
1372
1824
  /**
@@ -1396,10 +1848,10 @@ declare class ShowToast extends Activity<{
1396
1848
  title?: string;
1397
1849
  message?: string;
1398
1850
  duration?: number;
1399
- }): Promise<{
1851
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1400
1852
  output: void;
1401
1853
  outcomes: Record<string, any>;
1402
- }>;
1854
+ }>>;
1403
1855
  }
1404
1856
 
1405
1857
  /**
@@ -1434,10 +1886,10 @@ declare class Navigate extends Activity<{
1434
1886
  entity?: string;
1435
1887
  entityId?: string;
1436
1888
  url?: string;
1437
- }): Promise<{
1889
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1438
1890
  output: void;
1439
1891
  outcomes: Record<string, any>;
1440
- }>;
1892
+ }>>;
1441
1893
  }
1442
1894
 
1443
1895
  /**
@@ -1460,10 +1912,10 @@ declare class SetVariable extends Activity<{
1460
1912
  execute(input: {
1461
1913
  variableName: string;
1462
1914
  value: any;
1463
- }): Promise<{
1915
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1464
1916
  output: void;
1465
1917
  outcomes: Record<string, any>;
1466
- }>;
1918
+ }>>;
1467
1919
  }
1468
1920
 
1469
1921
  /**
@@ -1486,10 +1938,10 @@ declare class DispatchEvent extends Activity<{
1486
1938
  execute(input: {
1487
1939
  eventName: string;
1488
1940
  eventData?: any;
1489
- }): Promise<{
1941
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1490
1942
  output: void;
1491
1943
  outcomes: Record<string, any>;
1492
- }>;
1944
+ }>>;
1493
1945
  }
1494
1946
 
1495
1947
  /**
@@ -1513,10 +1965,10 @@ declare class If extends Activity<{
1513
1965
  condition: string | boolean;
1514
1966
  thenActivities?: IActivity[];
1515
1967
  elseActivities?: IActivity[];
1516
- }): Promise<{
1968
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1517
1969
  output: any;
1518
1970
  outcomes: Record<string, any>;
1519
- }>;
1971
+ }>>;
1520
1972
  private evaluateCondition;
1521
1973
  }
1522
1974
 
@@ -1540,10 +1992,10 @@ declare class While extends Activity<{
1540
1992
  condition: string | boolean;
1541
1993
  activities?: IActivity[];
1542
1994
  maxIterations?: number;
1543
- }): Promise<{
1995
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1544
1996
  output: any;
1545
1997
  outcomes: Record<string, any>;
1546
- }>;
1998
+ }>>;
1547
1999
  private evaluateCondition;
1548
2000
  }
1549
2001
 
@@ -1571,10 +2023,10 @@ declare class ForEach extends Activity<{
1571
2023
  activities?: IActivity[];
1572
2024
  itemVariableName?: string;
1573
2025
  indexVariableName?: string;
1574
- }): Promise<{
2026
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1575
2027
  output: any;
1576
2028
  outcomes: Record<string, any>;
1577
- }>;
2029
+ }>>;
1578
2030
  }
1579
2031
 
1580
2032
  /**
@@ -1598,10 +2050,10 @@ declare class ExecuteCommand extends Activity<{
1598
2050
  execute(input: {
1599
2051
  commandKey: string;
1600
2052
  input?: any;
1601
- }): Promise<{
2053
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1602
2054
  output: any;
1603
2055
  outcomes: Record<string, any>;
1604
- }>;
2056
+ }>>;
1605
2057
  }
1606
2058
 
1607
2059
  /**
@@ -1625,10 +2077,10 @@ declare class ExecuteQuery extends Activity<{
1625
2077
  execute(input: {
1626
2078
  queryKey: string;
1627
2079
  input?: any;
1628
- }): Promise<{
2080
+ }): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1629
2081
  output: any;
1630
2082
  outcomes: Record<string, any>;
1631
- }>;
2083
+ }>>;
1632
2084
  }
1633
2085
 
1634
2086
  /**
@@ -1645,10 +2097,10 @@ declare class ExecuteQuery extends Activity<{
1645
2097
  */
1646
2098
  declare class StartActivity extends Activity<Record<string, never>, void> {
1647
2099
  constructor();
1648
- execute(input: Record<string, never>): Promise<{
2100
+ execute(input: Record<string, never>): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1649
2101
  output: void;
1650
2102
  outcomes: Record<string, any>;
1651
- }>;
2103
+ }>>;
1652
2104
  }
1653
2105
 
1654
2106
  /**
@@ -1665,10 +2117,10 @@ declare class StartActivity extends Activity<Record<string, never>, void> {
1665
2117
  */
1666
2118
  declare class EndActivity extends Activity<Record<string, never>, void> {
1667
2119
  constructor();
1668
- execute(input: Record<string, never>): Promise<{
2120
+ execute(input: Record<string, never>): Promise<_acorex_platform_core.AXPExecuteCommandResult<{
1669
2121
  output: void;
1670
2122
  outcomes: Record<string, any>;
1671
- }>;
2123
+ }>>;
1672
2124
  }
1673
2125
 
1674
2126
  /**
@@ -1678,4 +2130,4 @@ declare class EndActivity extends Activity<Record<string, never>, void> {
1678
2130
  declare const provideWorkflowActivityCommands: () => i0.EnvironmentProviders;
1679
2131
 
1680
2132
  export { AXPActivityCategoryProviderService, AXPActivityProviderService, AXPWorkflowAction, AXPWorkflowContext, AXPWorkflowError, AXPWorkflowEventService, AXPWorkflowExecutionService, AXPWorkflowFunction, AXPWorkflowModule, AXPWorkflowRegistryService, AXPWorkflowService, AXP_ACTIVITY_CATEGORY_PROVIDER, AXP_ACTIVITY_PROVIDER, Activity, ActivityRegistry, DispatchEvent, EndActivity, ExecuteCommand, ExecuteQuery, ForEach, If, Navigate, Sequence, SetVariable, ShowAlertDialog, ShowConfirmDialog, ShowToast, StartActivity, While, WorkflowCoordinator, WriteLine, createWorkFlowEvent, ofType, provideWorkflowActivityCommands };
1681
- export type { AXPActivityCategoryProvider, AXPActivityCategoryProviderContext, AXPActivityProvider, AXPActivityProviderContext, AXPCompleteTaskRequest, AXPCompleteTaskResponse, AXPExecuteBackendActivityRequest, AXPExecuteBackendActivityResponse, AXPExecuteCurrentStepRequest, AXPExecuteCurrentStepResponse, AXPGetWorkflowDefinitionRequest, AXPGetWorkflowDefinitionResponse, AXPGetWorkflowExecutionStateRequest, AXPResumeWorkflowExecutionRequest, AXPResumeWorkflowExecutionResponse, AXPSimpleWorkflowEngine, AXPStartWorkflowExecutionRequest, AXPStartWorkflowExecutionResponse, AXPWorkflow, AXPWorkflowActionInput, AXPWorkflowCondition, AXPWorkflowConditionType, AXPWorkflowEngine, AXPWorkflowEngineStep, AXPWorkflowEvent, AXPWorkflowExecutionState, AXPWorkflowModuleConfigs, AXPWorkflowNextStep, AXPWorkflowStep, AXPWorkflowTask, ActivityCategory, ActivityCategoryDescriptor, ActivityDescriptor, ActivityPropertyWidget, IActivity, InputDefinition, InputDescriptor, OutputDefinition, OutputDescriptor, Variable, VersionedEntity, WorkflowCommon, WorkflowDefinition, WorkflowExecutionResult, WorkflowOptions };
2133
+ export type { AXPActivity, AXPActivityCategoryProvider, AXPActivityCategoryProviderContext, AXPActivityExecutionContextState, AXPActivityIncident, AXPActivityProvider, AXPActivityProviderContext, AXPActivityStatus, AXPActivityVariable, AXPBookmark, AXPCompletionCallbackState, AXPConnection, AXPCustomProperties, AXPEndpoint, AXPExceptionState, AXPExpression, AXPFlowchart, AXPGetWorkflowDefinitionRequest, AXPGetWorkflowDefinitionResponse, AXPGetWorkflowExecutionStateRequest, AXPInputValue, AXPMetadata, AXPOutputValue, AXPPosition, AXPResumeWorkflowExecutionRequest, AXPResumeWorkflowExecutionResponse, AXPStartWorkflowExecutionRequest, AXPStartWorkflowExecutionResponse, AXPStoredWorkflowDefinition, AXPVariableDefinition, AXPVariableModel, AXPVersionedEntity, AXPWorkflow, AXPWorkflowActionInput, AXPWorkflowCondition, AXPWorkflowConditionType, AXPWorkflowDefinition, AXPWorkflowEvent, AXPWorkflowExecutionState, AXPWorkflowFaultState, AXPWorkflowInputDefinition, AXPWorkflowInstance, AXPWorkflowModuleConfigs, AXPWorkflowNextStep, AXPWorkflowOptions, AXPWorkflowOutputDefinition, AXPWorkflowState, AXPWorkflowStatus, AXPWorkflowStep, AXPWorkflowSubStatus, AXPWorkflowTask, ActivityCategory, ActivityCategoryDescriptor, ActivityDescriptor, ActivityPropertyWidget, IActivity, InputDescriptor, OutputDescriptor, WorkflowExecutionResult };