@cxtms/cx-schema 1.0.0

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 (133) hide show
  1. package/README.md +384 -0
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.d.ts.map +1 -0
  4. package/dist/cli.js +1523 -0
  5. package/dist/cli.js.map +1 -0
  6. package/dist/index.d.ts +7 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +11 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/types.d.ts +111 -0
  11. package/dist/types.d.ts.map +1 -0
  12. package/dist/types.js +6 -0
  13. package/dist/types.js.map +1 -0
  14. package/dist/utils/schemaLoader.d.ts +17 -0
  15. package/dist/utils/schemaLoader.d.ts.map +1 -0
  16. package/dist/utils/schemaLoader.js +134 -0
  17. package/dist/utils/schemaLoader.js.map +1 -0
  18. package/dist/validator.d.ts +64 -0
  19. package/dist/validator.d.ts.map +1 -0
  20. package/dist/validator.js +380 -0
  21. package/dist/validator.js.map +1 -0
  22. package/dist/workflowValidator.d.ts +64 -0
  23. package/dist/workflowValidator.d.ts.map +1 -0
  24. package/dist/workflowValidator.js +410 -0
  25. package/dist/workflowValidator.js.map +1 -0
  26. package/package.json +50 -0
  27. package/schemas/actions/all.json +26 -0
  28. package/schemas/actions/confirm.json +21 -0
  29. package/schemas/actions/consoleLog.json +16 -0
  30. package/schemas/actions/dialog.json +25 -0
  31. package/schemas/actions/fileDownload.json +16 -0
  32. package/schemas/actions/forEach.json +31 -0
  33. package/schemas/actions/if.json +12 -0
  34. package/schemas/actions/mutation.json +25 -0
  35. package/schemas/actions/navigate.json +18 -0
  36. package/schemas/actions/navigateBack.json +22 -0
  37. package/schemas/actions/navigateBackOrClose.json +21 -0
  38. package/schemas/actions/notification.json +19 -0
  39. package/schemas/actions/openBarcodeScanner.json +104 -0
  40. package/schemas/actions/query.json +32 -0
  41. package/schemas/actions/refresh.json +13 -0
  42. package/schemas/actions/resetDirtyState.json +22 -0
  43. package/schemas/actions/setFields.json +21 -0
  44. package/schemas/actions/setStore.json +13 -0
  45. package/schemas/actions/validateForm.json +15 -0
  46. package/schemas/actions/workflow.json +24 -0
  47. package/schemas/components/README.md +147 -0
  48. package/schemas/components/appComponent.json +50 -0
  49. package/schemas/components/barcodeScanner.json +69 -0
  50. package/schemas/components/button.json +123 -0
  51. package/schemas/components/calendar.json +489 -0
  52. package/schemas/components/card.json +176 -0
  53. package/schemas/components/collection.json +54 -0
  54. package/schemas/components/dataGrid.json +119 -0
  55. package/schemas/components/datasource.json +151 -0
  56. package/schemas/components/dropdown.json +57 -0
  57. package/schemas/components/field-collection.json +618 -0
  58. package/schemas/components/field.json +265 -0
  59. package/schemas/components/form.json +234 -0
  60. package/schemas/components/index.json +68 -0
  61. package/schemas/components/layout.json +69 -0
  62. package/schemas/components/module.json +138 -0
  63. package/schemas/components/navDropdown.json +36 -0
  64. package/schemas/components/navbar.json +78 -0
  65. package/schemas/components/navbarItem.json +28 -0
  66. package/schemas/components/navbarLink.json +36 -0
  67. package/schemas/components/row.json +31 -0
  68. package/schemas/components/tab.json +34 -0
  69. package/schemas/components/tabs.json +35 -0
  70. package/schemas/components/timeline.json +172 -0
  71. package/schemas/components/timelineGrid.json +324 -0
  72. package/schemas/fields/README.md +66 -0
  73. package/schemas/fields/attachment.json +156 -0
  74. package/schemas/fields/autocomplete-googleplaces.json +130 -0
  75. package/schemas/fields/checkbox.json +82 -0
  76. package/schemas/fields/date.json +88 -0
  77. package/schemas/fields/datetime.json +75 -0
  78. package/schemas/fields/email.json +75 -0
  79. package/schemas/fields/index.json +53 -0
  80. package/schemas/fields/number.json +91 -0
  81. package/schemas/fields/password.json +70 -0
  82. package/schemas/fields/radio.json +94 -0
  83. package/schemas/fields/rangedatetime.json +56 -0
  84. package/schemas/fields/select-async.json +334 -0
  85. package/schemas/fields/select.json +115 -0
  86. package/schemas/fields/tel.json +79 -0
  87. package/schemas/fields/text.json +86 -0
  88. package/schemas/fields/textarea.json +95 -0
  89. package/schemas/fields/time.json +91 -0
  90. package/schemas/fields/url.json +74 -0
  91. package/schemas/schema.graphql +10492 -0
  92. package/schemas/schemas.json +598 -0
  93. package/schemas/workflows/activity.json +111 -0
  94. package/schemas/workflows/common/condition.json +48 -0
  95. package/schemas/workflows/common/expression.json +76 -0
  96. package/schemas/workflows/common/mapping.json +134 -0
  97. package/schemas/workflows/input.json +76 -0
  98. package/schemas/workflows/output.json +41 -0
  99. package/schemas/workflows/schedule.json +26 -0
  100. package/schemas/workflows/tasks/accounting-transaction.json +95 -0
  101. package/schemas/workflows/tasks/all.json +34 -0
  102. package/schemas/workflows/tasks/attachment.json +94 -0
  103. package/schemas/workflows/tasks/charge.json +90 -0
  104. package/schemas/workflows/tasks/commodity.json +89 -0
  105. package/schemas/workflows/tasks/contact.json +82 -0
  106. package/schemas/workflows/tasks/csv.json +79 -0
  107. package/schemas/workflows/tasks/document-render.json +105 -0
  108. package/schemas/workflows/tasks/document-send.json +84 -0
  109. package/schemas/workflows/tasks/email-send.json +110 -0
  110. package/schemas/workflows/tasks/error.json +72 -0
  111. package/schemas/workflows/tasks/export.json +90 -0
  112. package/schemas/workflows/tasks/foreach.json +69 -0
  113. package/schemas/workflows/tasks/generic.json +47 -0
  114. package/schemas/workflows/tasks/graphql.json +78 -0
  115. package/schemas/workflows/tasks/httpRequest.json +119 -0
  116. package/schemas/workflows/tasks/job.json +88 -0
  117. package/schemas/workflows/tasks/log.json +73 -0
  118. package/schemas/workflows/tasks/map.json +58 -0
  119. package/schemas/workflows/tasks/order.json +87 -0
  120. package/schemas/workflows/tasks/payment.json +85 -0
  121. package/schemas/workflows/tasks/setVariable.json +76 -0
  122. package/schemas/workflows/tasks/switch.json +75 -0
  123. package/schemas/workflows/tasks/template.json +73 -0
  124. package/schemas/workflows/tasks/validation.json +90 -0
  125. package/schemas/workflows/tasks/while.json +53 -0
  126. package/schemas/workflows/tasks/workflow-execute.json +82 -0
  127. package/schemas/workflows/trigger.json +86 -0
  128. package/schemas/workflows/variable.json +46 -0
  129. package/schemas/workflows/workflow.json +172 -0
  130. package/scripts/postinstall.js +161 -0
  131. package/scripts/setup-vscode.js +80 -0
  132. package/templates/module.yaml +83 -0
  133. package/templates/workflow.yaml +100 -0
@@ -0,0 +1,598 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "CargoXplorer Module and Component Schemas",
4
+ "type": "object",
5
+ "definitions": {
6
+ "templateExpression": {
7
+ "type": "string",
8
+ "pattern": "\\{\\{.*\\}\\}",
9
+ "description": "Template expression that will be evaluated"
10
+ },
11
+
12
+ "permissions": {
13
+ "oneOf": [
14
+ {
15
+ "type": "string",
16
+ "description": "Single permission string"
17
+ },
18
+ {
19
+ "type": "array",
20
+ "description": "Array of permission strings",
21
+ "items": {
22
+ "type": "string"
23
+ }
24
+ }
25
+ ],
26
+ "description": "Permission(s) required to access this component"
27
+ },
28
+
29
+ "actionsList": {
30
+ "type": "array",
31
+ "description": "List of actions to execute",
32
+ "items": { "$ref": "actions/all.json" }
33
+ },
34
+
35
+ "localized": {
36
+ "type": "object",
37
+ "description": "Localized text object",
38
+ "patternProperties": {
39
+ "^[a-z]{2}-[A-Z]{2}$": {
40
+ "type": "string"
41
+ }
42
+ },
43
+ "additionalProperties": false
44
+ },
45
+
46
+ "component": {
47
+ "type": "object",
48
+ "description": "Generic component structure for CargoXplorer",
49
+ "properties": {
50
+ "component": {
51
+ "type": "string",
52
+ "description": "Component type identifier"
53
+ },
54
+ "name": {
55
+ "type": "string",
56
+ "description": "Component name identifier"
57
+ },
58
+ "props": {
59
+ "type": "object",
60
+ "description": "Component properties",
61
+ "additionalProperties": true
62
+ },
63
+ "children": {
64
+ "$ref": "#/definitions/componentChildren"
65
+ },
66
+ "isHidden": {
67
+ "$ref": "#/definitions/templateExpression",
68
+ "description": "Boolean expression for conditional rendering"
69
+ }
70
+ },
71
+ "required": ["component"],
72
+ "additionalProperties": false
73
+ },
74
+
75
+ "componentChildren": {
76
+ "type": "array",
77
+ "description": "Array of child components",
78
+ "items": {
79
+ "$ref": "#/definitions/component"
80
+ }
81
+ },
82
+
83
+ "dataGridView": {
84
+ "type": "object",
85
+ "properties": {
86
+ "name": {
87
+ "type": "string",
88
+ "description": "View identifier"
89
+ },
90
+ "displayName": {
91
+ "$ref": "#/definitions/localized"
92
+ },
93
+ "enableSelect": {
94
+ "type": "string",
95
+ "enum": ["Single", "Multiple", "None"],
96
+ "description": "Selection mode for grid rows"
97
+ },
98
+ "columns": {
99
+ "type": "array",
100
+ "description": "Column definitions",
101
+ "items": {
102
+ "type": "object",
103
+ "properties": {
104
+ "name": {
105
+ "type": "string",
106
+ "description": "Column field name"
107
+ },
108
+ "label": {
109
+ "$ref": "#/definitions/localized"
110
+ },
111
+ "showAs": {
112
+ "$ref": "#/definitions/component",
113
+ "description": "Custom component for column rendering"
114
+ },
115
+ "isHidden": {
116
+ "type": "boolean",
117
+ "description": "Whether column is hidden"
118
+ }
119
+ }
120
+ }
121
+ },
122
+ "filter": {
123
+ "type": "string",
124
+ "description": "Filter expression for this view"
125
+ },
126
+ "childViews": {
127
+ "type": "array",
128
+ "description": "Nested child views",
129
+ "items": {
130
+ "$ref": "#/definitions/dataGridView"
131
+ }
132
+ },
133
+ "showHeader": {
134
+ "type": "boolean",
135
+ "description": "Whether to show header for child views"
136
+ }
137
+ },
138
+ "required": ["name"]
139
+ },
140
+
141
+ "dataGridOptions": {
142
+ "type": "object",
143
+ "properties": {
144
+ "query": {
145
+ "type": "string",
146
+ "description": "Query name for data fetching",
147
+ "x-example": "orders"
148
+ },
149
+ "rootEntityName": {
150
+ "type": "string",
151
+ "description": "Root entity name"
152
+ },
153
+ "entityKeys": {
154
+ "type": "array",
155
+ "description": "Entity key fields",
156
+ "items": {
157
+ "type": "string"
158
+ }
159
+ },
160
+ "navigationType": {
161
+ "type": "string",
162
+ "enum": ["navigate", "dialog", "store"],
163
+ "description": "Navigation behavior type"
164
+ },
165
+ "enableDynamicGrid": {
166
+ "type": "boolean",
167
+ "description": "Enable dynamic grid features"
168
+ },
169
+ "enableViews": {
170
+ "type": "boolean",
171
+ "description": "Enable view switching"
172
+ },
173
+ "enableSearch": {
174
+ "type": "boolean",
175
+ "description": "Enable search functionality"
176
+ },
177
+ "enablePagination": {
178
+ "type": "boolean",
179
+ "description": "Enable pagination"
180
+ },
181
+ "enableColumns": {
182
+ "type": "boolean",
183
+ "description": "Enable column management"
184
+ },
185
+ "enableFilter": {
186
+ "type": "boolean",
187
+ "description": "Enable filtering"
188
+ },
189
+ "defaultView": {
190
+ "type": "string",
191
+ "description": "Default view name"
192
+ },
193
+ "onRowClick": {
194
+ "oneOf": [
195
+ { "$ref": "#/definitions/actionsList" },
196
+ {
197
+ "type": "object",
198
+ "properties": {
199
+ "dialog": {
200
+ "type": "object",
201
+ "properties": {
202
+ "name": {
203
+ "type": "string"
204
+ },
205
+ "props": {
206
+ "type": "object",
207
+ "additionalProperties": true
208
+ },
209
+ "component": {
210
+ "$ref": "#/definitions/component"
211
+ },
212
+ "onClose": {
213
+ "$ref": "#/definitions/actionsList"
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
219
+ ]
220
+ }
221
+ },
222
+ "required": [
223
+ "query",
224
+ "rootEntityName",
225
+ "entityKeys",
226
+ "navigationType",
227
+ "enableDynamicGrid",
228
+ "enableViews",
229
+ "enableSearch",
230
+ "enablePagination",
231
+ "enableColumns",
232
+ "enableFilter",
233
+ "defaultView",
234
+ "onRowClick"
235
+ ]
236
+ },
237
+
238
+ "collection": {
239
+ "type": "object",
240
+ "properties": {
241
+ "component": {
242
+ "type": "string",
243
+ "const": "collection"
244
+ },
245
+ "name": {
246
+ "type": "string",
247
+ "description": "Collection name identifier"
248
+ },
249
+ "props": {
250
+ "type": "object",
251
+ "properties": {
252
+ "items": {
253
+ "type": "string",
254
+ "description": "Template expression for items array"
255
+ },
256
+ "itemName": {
257
+ "type": "string",
258
+ "description": "Variable name for current item in iteration"
259
+ },
260
+ "cols": {
261
+ "type": "integer",
262
+ "description": "Number of columns for layout"
263
+ },
264
+ "orientation": {
265
+ "type": "string",
266
+ "enum": ["horizontal", "vertical"],
267
+ "description": "Layout orientation"
268
+ },
269
+ "containerTag": {
270
+ "type": "string",
271
+ "description": "HTML container tag"
272
+ },
273
+ "className": {
274
+ "type": "string",
275
+ "description": "CSS classes for styling"
276
+ },
277
+ "childClassName": {
278
+ "type": "string",
279
+ "description": "CSS classes for child elements"
280
+ }
281
+ },
282
+ "required": ["items", "itemName"]
283
+ },
284
+ "children": {
285
+ "$ref": "#/definitions/componentChildren"
286
+ }
287
+ },
288
+ "required": ["component", "props"]
289
+ },
290
+
291
+ "row": {
292
+ "type": "object",
293
+ "properties": {
294
+ "component": {
295
+ "type": "string",
296
+ "const": "row"
297
+ },
298
+ "props": {
299
+ "type": "object",
300
+ "properties": {
301
+ "className": {
302
+ "type": "string",
303
+ "description": "CSS classes for styling"
304
+ },
305
+ "cols": {
306
+ "type": "integer",
307
+ "description": "Number of columns"
308
+ }
309
+ }
310
+ },
311
+ "children": {
312
+ "$ref": "#/definitions/componentChildren"
313
+ },
314
+ "onClick": {
315
+ "$ref": "#/definitions/actionsList",
316
+ "description": "Actions to execute when the row is clicked"
317
+ }
318
+ }
319
+ },
320
+
321
+ "entityField": {
322
+ "type": "object",
323
+ "description": "Entity field definition",
324
+ "properties": {
325
+ "name": { "type": "string" },
326
+ "displayName": { "$ref": "#/definitions/localized" },
327
+ "description": { "$ref": "#/definitions/localized" },
328
+ "fieldType": { "type": "string" },
329
+ "isCustomField": { "type": "boolean", "description": "Whether this is a custom field" },
330
+ "isInactive": { "type": "boolean" },
331
+ "props": {
332
+ "type": "object",
333
+ "description": "Additional field properties",
334
+ "properties": {
335
+ "showAs": { "$ref": "#/definitions/component" },
336
+ "allowOrderBy": { "type": "boolean" },
337
+ "allowFilter": { "type": "boolean" },
338
+ "filter": {
339
+ "type": "object",
340
+ "description": "Field-level filter selector configuration",
341
+ "properties": {
342
+ "component": {
343
+ "type": "string",
344
+ "description": "Selector component to use (e.g., Contacts/Select)"
345
+ },
346
+ "props": {
347
+ "type": "object",
348
+ "properties": {
349
+ "filter": {
350
+ "type": "string",
351
+ "description": "Filter expression passed to the selector (e.g., contactType: Customer)"
352
+ },
353
+ "options": {
354
+ "type": "object",
355
+ "properties": {
356
+ "baseName": {
357
+ "type": "string",
358
+ "description": "Base name/id field used by the selector"
359
+ }
360
+ },
361
+ "additionalProperties": true
362
+ }
363
+ },
364
+ "additionalProperties": true
365
+ }
366
+ },
367
+ "required": ["component"],
368
+ "x-examples": [
369
+ {
370
+ "component": "Contacts/Select",
371
+ "props": { "filter": "contactType: Customer", "options": { "baseName": "contactId" } }
372
+ },
373
+ {
374
+ "component": "OrderStatuses/Select",
375
+ "props": { "filter": "orderType: Purchase" }
376
+ },
377
+ {
378
+ "component": "AppManifests/Select",
379
+ "props": { "options": { "baseName": "appManifestId" } }
380
+ },
381
+ {
382
+ "component": "Countries/Select"
383
+ }
384
+ ]
385
+ }
386
+ },
387
+ "additionalProperties": false
388
+ }
389
+ },
390
+ "required": ["name", "fieldType"]
391
+ },
392
+
393
+ "entity": {
394
+ "type": "object",
395
+ "description": "CargoXplorer entity definition",
396
+ "properties": {
397
+ "name": { "type": "string" },
398
+ "entityKind": {
399
+ "type": "string",
400
+ "enum": ["Order", "Contact", "OrderEntity", "AccountingTransaction", "Calendar", "CalendarEvent", "Other"]
401
+ },
402
+ "extension": { "type": "boolean", "description": "Whether this entity extends an existing type" },
403
+ "displayName": { "$ref": "#/definitions/localized" },
404
+ "description": { "$ref": "#/definitions/localized" },
405
+ "fields": {
406
+ "type": "array",
407
+ "items": { "$ref": "#/definitions/entityField" }
408
+ }
409
+ },
410
+ "required": ["name", "entityKind"]
411
+ },
412
+
413
+ "calendarEvent": {
414
+ "type": "object",
415
+ "description": "Calendar event object structure",
416
+ "properties": {
417
+ "id": {
418
+ "type": "string",
419
+ "description": "Unique event identifier"
420
+ },
421
+ "title": {
422
+ "type": "string",
423
+ "description": "Event display title"
424
+ },
425
+ "start": {
426
+ "type": "string",
427
+ "description": "Start date/time in ISO format"
428
+ },
429
+ "end": {
430
+ "type": "string",
431
+ "description": "End date/time in ISO format"
432
+ },
433
+ "allDay": {
434
+ "type": "boolean",
435
+ "description": "Whether event spans all day"
436
+ },
437
+ "url": {
438
+ "type": "string",
439
+ "description": "URL associated with event"
440
+ },
441
+ "classNames": {
442
+ "type": "array",
443
+ "description": "CSS class names for styling",
444
+ "items": {
445
+ "type": "string"
446
+ }
447
+ },
448
+ "editable": {
449
+ "type": "boolean",
450
+ "description": "Whether event can be edited"
451
+ },
452
+ "startEditable": {
453
+ "type": "boolean",
454
+ "description": "Whether event start can be edited"
455
+ },
456
+ "durationEditable": {
457
+ "type": "boolean",
458
+ "description": "Whether event duration can be edited"
459
+ },
460
+ "resourceEditable": {
461
+ "type": "boolean",
462
+ "description": "Whether event resource can be changed"
463
+ },
464
+ "display": {
465
+ "type": "string",
466
+ "enum": ["auto", "block", "list-item", "background", "inverse-background", "none"],
467
+ "description": "How the event is displayed"
468
+ },
469
+ "overlap": {
470
+ "type": "boolean",
471
+ "description": "Whether event can overlap with others"
472
+ },
473
+ "constraint": {
474
+ "oneOf": [{ "type": "string" }, { "type": "object" }],
475
+ "description": "Constraint for event movement"
476
+ },
477
+ "color": {
478
+ "type": "string",
479
+ "description": "Event background color"
480
+ },
481
+ "backgroundColor": {
482
+ "type": "string",
483
+ "description": "Event background color"
484
+ },
485
+ "borderColor": {
486
+ "type": "string",
487
+ "description": "Event border color"
488
+ },
489
+ "textColor": {
490
+ "type": "string",
491
+ "description": "Event text color"
492
+ },
493
+ "extendedProps": {
494
+ "type": "object",
495
+ "description": "Custom properties for the event",
496
+ "additionalProperties": true
497
+ }
498
+ },
499
+ "required": ["title", "start"]
500
+ }
501
+ },
502
+
503
+ "components": {
504
+ "schemas": {
505
+ "appComponent": {
506
+ "$ref": "components/appComponent.json"
507
+ },
508
+
509
+ "navbar": {
510
+ "$ref": "components/navbar.json"
511
+ },
512
+
513
+ "navbarItem": {
514
+ "$ref": "components/navbarItem.json"
515
+ },
516
+
517
+ "navDropdown": {
518
+ "$ref": "components/navDropdown.json"
519
+ },
520
+
521
+ "navbarLink": {
522
+ "$ref": "components/navbarLink.json"
523
+ },
524
+
525
+ "collection": {
526
+ "$ref": "components/collection.json"
527
+ },
528
+
529
+ "row": {
530
+ "$ref": "components/row.json"
531
+ },
532
+
533
+ "dataGrid": {
534
+ "$ref": "components/dataGrid.json"
535
+ },
536
+
537
+ "barcodeScanner": {
538
+ "$ref": "components/barcodeScanner.json"
539
+ },
540
+
541
+ "button": {
542
+ "$ref": "components/button.json"
543
+ },
544
+
545
+ "form": {
546
+ "$ref": "components/form.json"
547
+ },
548
+
549
+ "layout": {
550
+ "$ref": "components/layout.json"
551
+ },
552
+
553
+ "tabs": {
554
+ "$ref": "components/tabs.json"
555
+ },
556
+
557
+ "tab": {
558
+ "$ref": "components/tab.json"
559
+ },
560
+
561
+ "field": {
562
+ "$ref": "components/field.json"
563
+ },
564
+
565
+ "dropdown": {
566
+ "$ref": "components/dropdown.json"
567
+ },
568
+
569
+ "datasource": {
570
+ "$ref": "components/datasource.json"
571
+ },
572
+
573
+ "calendar": {
574
+ "$ref": "components/calendar.json"
575
+ },
576
+
577
+ "card": {
578
+ "$ref": "components/card.json"
579
+ },
580
+
581
+ "module": {
582
+ "$ref": "components/module.json"
583
+ },
584
+
585
+ "field-collection": {
586
+ "$ref": "components/field-collection.json"
587
+ },
588
+
589
+ "timeline": {
590
+ "$ref": "components/timeline.json"
591
+ },
592
+
593
+ "timeline-grid": {
594
+ "$ref": "components/timelineGrid.json"
595
+ }
596
+ }
597
+ }
598
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Workflow Activity",
4
+ "description": "Definition of a workflow activity containing steps",
5
+ "type": "object",
6
+ "properties": {
7
+ "name": {
8
+ "type": "string",
9
+ "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
10
+ "description": "Activity name identifier"
11
+ },
12
+ "description": {
13
+ "type": "string",
14
+ "description": "Activity description"
15
+ },
16
+ "conditions": {
17
+ "oneOf": [
18
+ {
19
+ "type": "string",
20
+ "description": "Single condition expression"
21
+ },
22
+ {
23
+ "type": "array",
24
+ "items": {
25
+ "oneOf": [
26
+ { "type": "string" },
27
+ {
28
+ "type": "object",
29
+ "properties": {
30
+ "expression": { "type": "string" }
31
+ }
32
+ }
33
+ ]
34
+ }
35
+ }
36
+ ],
37
+ "description": "Conditions for activity execution"
38
+ },
39
+ "continueOnError": {
40
+ "type": "boolean",
41
+ "description": "Whether to continue workflow on error"
42
+ },
43
+ "variables": {
44
+ "type": "array",
45
+ "description": "Activity-scoped variables",
46
+ "items": {
47
+ "$ref": "variable.json"
48
+ }
49
+ },
50
+ "steps": {
51
+ "type": "array",
52
+ "description": "Steps within the activity",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "task": {
57
+ "type": "string",
58
+ "description": "Task type identifier"
59
+ },
60
+ "name": {
61
+ "type": "string"
62
+ },
63
+ "inputs": {
64
+ "type": "object",
65
+ "additionalProperties": true
66
+ },
67
+ "outputs": {
68
+ "type": "array"
69
+ },
70
+ "conditions": {
71
+ "oneOf": [
72
+ { "type": "string" },
73
+ { "type": "array" }
74
+ ]
75
+ },
76
+ "continueOnError": {
77
+ "type": "boolean"
78
+ }
79
+ },
80
+ "required": ["task"],
81
+ "additionalProperties": true
82
+ },
83
+ "minItems": 1
84
+ },
85
+ "events": {
86
+ "oneOf": [
87
+ {
88
+ "type": "object",
89
+ "description": "Activity-level event handlers as object",
90
+ "properties": {
91
+ "onActivityStarted": { "type": "array" },
92
+ "onActivityCompleted": { "type": "array" },
93
+ "onActivityFailed": { "type": "array" }
94
+ },
95
+ "additionalProperties": true
96
+ },
97
+ {
98
+ "type": "array",
99
+ "description": "Activity-level event handlers as array",
100
+ "items": {
101
+ "type": "object",
102
+ "additionalProperties": true
103
+ }
104
+ }
105
+ ],
106
+ "description": "Activity-level event handlers"
107
+ }
108
+ },
109
+ "required": ["name", "steps"],
110
+ "additionalProperties": true
111
+ }