@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,87 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Order Tasks",
4
+ "description": "Order entity CRUD operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Order/Create@1",
11
+ "Order/Update@1",
12
+ "Order/Update@2",
13
+ "Order/Delete@1",
14
+ "Order/Get@1"
15
+ ],
16
+ "description": "Task type identifier"
17
+ },
18
+ "name": {
19
+ "type": "string",
20
+ "description": "Step name identifier"
21
+ },
22
+ "description": {
23
+ "type": "string",
24
+ "description": "Step description"
25
+ },
26
+ "conditions": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "properties": {
31
+ "expression": {
32
+ "type": "string"
33
+ }
34
+ },
35
+ "required": ["expression"]
36
+ }
37
+ },
38
+ "continueOnError": {
39
+ "type": "boolean"
40
+ },
41
+ "inputs": {
42
+ "type": "object",
43
+ "description": "Order operation inputs",
44
+ "properties": {
45
+ "orderId": {
46
+ "type": "string",
47
+ "description": "Order ID (for update/delete/get operations)"
48
+ },
49
+ "orderType": {
50
+ "type": "string",
51
+ "description": "Order type (for create operations)"
52
+ },
53
+ "entity": {
54
+ "type": "object",
55
+ "description": "Order entity data",
56
+ "additionalProperties": true
57
+ },
58
+ "partial": {
59
+ "type": "boolean",
60
+ "description": "Partial update (patch)"
61
+ },
62
+ "validateOnly": {
63
+ "type": "boolean",
64
+ "description": "Only validate, don't persist"
65
+ }
66
+ },
67
+ "additionalProperties": true
68
+ },
69
+ "outputs": {
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "name": {
75
+ "type": "string"
76
+ },
77
+ "mapping": {
78
+ "type": "string"
79
+ }
80
+ },
81
+ "required": ["name", "mapping"]
82
+ }
83
+ }
84
+ },
85
+ "required": ["task"],
86
+ "additionalProperties": true
87
+ }
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Payment Tasks",
4
+ "description": "Payment processing operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": ["Payment/Create", "Payment/Create@1"],
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "Payment inputs",
38
+ "properties": {
39
+ "paymentId": {
40
+ "type": "string",
41
+ "description": "Payment ID"
42
+ },
43
+ "amount": {
44
+ "type": "number",
45
+ "description": "Payment amount"
46
+ },
47
+ "customerId": {
48
+ "type": "string",
49
+ "description": "Customer contact ID"
50
+ },
51
+ "invoiceId": {
52
+ "type": "string",
53
+ "description": "Invoice to apply payment to"
54
+ },
55
+ "paymentMethod": {
56
+ "type": "string",
57
+ "description": "Payment method"
58
+ },
59
+ "entity": {
60
+ "type": "object",
61
+ "description": "Payment entity data",
62
+ "additionalProperties": true
63
+ }
64
+ },
65
+ "additionalProperties": true
66
+ },
67
+ "outputs": {
68
+ "type": "array",
69
+ "items": {
70
+ "type": "object",
71
+ "properties": {
72
+ "name": {
73
+ "type": "string"
74
+ },
75
+ "mapping": {
76
+ "type": "string"
77
+ }
78
+ },
79
+ "required": ["name", "mapping"]
80
+ }
81
+ }
82
+ },
83
+ "required": ["task"],
84
+ "additionalProperties": true
85
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "SetVariable Task",
4
+ "description": "Set or update workflow variables",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": ["Utilities/SetVariable", "Utilities/SetVariable@1"],
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "SetVariable inputs",
38
+ "properties": {
39
+ "variables": {
40
+ "type": "array",
41
+ "items": {
42
+ "type": "object",
43
+ "properties": {
44
+ "name": {
45
+ "type": "string",
46
+ "description": "Variable name to set"
47
+ },
48
+ "value": {
49
+ "description": "Value to assign (can be expression, template, or complex object)"
50
+ }
51
+ },
52
+ "required": ["name", "value"]
53
+ }
54
+ }
55
+ },
56
+ "additionalProperties": true
57
+ },
58
+ "outputs": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "name": {
64
+ "type": "string"
65
+ },
66
+ "mapping": {
67
+ "type": "string"
68
+ }
69
+ },
70
+ "required": ["name", "mapping"]
71
+ }
72
+ }
73
+ },
74
+ "required": ["task"],
75
+ "additionalProperties": true
76
+ }
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Switch Task",
4
+ "description": "Conditional branching with multiple cases",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "const": "switch",
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ },
31
+ "description": "Conditions for execution"
32
+ },
33
+ "continueOnError": {
34
+ "type": "boolean",
35
+ "description": "Continue on error"
36
+ },
37
+ "cases": {
38
+ "type": "array",
39
+ "description": "Switch cases",
40
+ "items": {
41
+ "type": "object",
42
+ "properties": {
43
+ "when": {
44
+ "type": "string",
45
+ "description": "Condition expression for this case"
46
+ },
47
+ "steps": {
48
+ "type": "array",
49
+ "items": {
50
+ "$ref": "generic.json"
51
+ },
52
+ "minItems": 1
53
+ }
54
+ },
55
+ "required": ["when", "steps"],
56
+ "additionalProperties": true
57
+ },
58
+ "minItems": 1
59
+ },
60
+ "default": {
61
+ "type": "object",
62
+ "description": "Default case if no conditions match",
63
+ "properties": {
64
+ "steps": {
65
+ "type": "array",
66
+ "items": {
67
+ "$ref": "generic.json"
68
+ }
69
+ }
70
+ }
71
+ }
72
+ },
73
+ "required": ["task", "cases"],
74
+ "additionalProperties": true
75
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Template Task",
4
+ "description": "Render templates using Handlebars",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": ["Utilities/Template@1"],
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "Template inputs",
38
+ "properties": {
39
+ "template": {
40
+ "type": "string",
41
+ "description": "Handlebars template string"
42
+ },
43
+ "data": {
44
+ "description": "Data to pass to template"
45
+ },
46
+ "helpers": {
47
+ "type": "object",
48
+ "description": "Custom Handlebars helpers",
49
+ "additionalProperties": true
50
+ }
51
+ },
52
+ "required": ["template"],
53
+ "additionalProperties": true
54
+ },
55
+ "outputs": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "object",
59
+ "properties": {
60
+ "name": {
61
+ "type": "string"
62
+ },
63
+ "mapping": {
64
+ "type": "string"
65
+ }
66
+ },
67
+ "required": ["name", "mapping"]
68
+ }
69
+ }
70
+ },
71
+ "required": ["task"],
72
+ "additionalProperties": true
73
+ }
@@ -0,0 +1,90 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Validation Task",
4
+ "description": "Validate data with rules",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": ["Validation/Validate@1"],
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ },
31
+ "description": "Conditions for execution"
32
+ },
33
+ "continueOnError": {
34
+ "type": "boolean",
35
+ "description": "Continue on error"
36
+ },
37
+ "inputs": {
38
+ "type": "object",
39
+ "description": "Validation inputs",
40
+ "properties": {
41
+ "rules": {
42
+ "type": "array",
43
+ "description": "Validation rules",
44
+ "items": {
45
+ "type": "object",
46
+ "properties": {
47
+ "type": {
48
+ "type": "string",
49
+ "enum": ["required", "expression"],
50
+ "description": "Validation rule type"
51
+ },
52
+ "expression": {
53
+ "type": "string",
54
+ "description": "Expression to validate (for expression type)"
55
+ },
56
+ "value": {
57
+ "type": "string",
58
+ "description": "Value to validate (for required type)"
59
+ },
60
+ "message": {
61
+ "type": "string",
62
+ "description": "Error message if validation fails"
63
+ }
64
+ },
65
+ "required": ["type"]
66
+ }
67
+ }
68
+ },
69
+ "additionalProperties": true
70
+ },
71
+ "outputs": {
72
+ "type": "array",
73
+ "items": {
74
+ "type": "object",
75
+ "properties": {
76
+ "name": {
77
+ "type": "string"
78
+ },
79
+ "mapping": {
80
+ "type": "string"
81
+ }
82
+ },
83
+ "required": ["name", "mapping"]
84
+ },
85
+ "description": "Output mappings"
86
+ }
87
+ },
88
+ "required": ["task"],
89
+ "additionalProperties": true
90
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "While Task",
4
+ "description": "Loop while conditions are true",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "const": "while",
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ },
31
+ "description": "Conditions to continue looping"
32
+ },
33
+ "continueOnError": {
34
+ "type": "boolean",
35
+ "description": "Continue on error"
36
+ },
37
+ "maxIterations": {
38
+ "type": "integer",
39
+ "minimum": 1,
40
+ "description": "Maximum number of iterations to prevent infinite loops"
41
+ },
42
+ "steps": {
43
+ "type": "array",
44
+ "description": "Steps to execute each iteration",
45
+ "items": {
46
+ "$ref": "generic.json"
47
+ },
48
+ "minItems": 1
49
+ }
50
+ },
51
+ "required": ["task", "conditions", "steps"],
52
+ "additionalProperties": true
53
+ }
@@ -0,0 +1,82 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Workflow Execute Task",
4
+ "description": "Execute another workflow",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": ["Workflow/Execute@1"],
10
+ "description": "Task type identifier"
11
+ },
12
+ "name": {
13
+ "type": "string",
14
+ "description": "Step name identifier"
15
+ },
16
+ "description": {
17
+ "type": "string",
18
+ "description": "Step description"
19
+ },
20
+ "conditions": {
21
+ "type": "array",
22
+ "items": {
23
+ "type": "object",
24
+ "properties": {
25
+ "expression": {
26
+ "type": "string"
27
+ }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "Workflow execution inputs",
38
+ "properties": {
39
+ "workflowId": {
40
+ "type": "string",
41
+ "format": "uuid",
42
+ "description": "ID of workflow to execute"
43
+ },
44
+ "workflowName": {
45
+ "type": "string",
46
+ "description": "Name of workflow to execute (alternative to workflowId)"
47
+ },
48
+ "workflowInputs": {
49
+ "type": "object",
50
+ "description": "Inputs to pass to the child workflow",
51
+ "additionalProperties": true
52
+ },
53
+ "async": {
54
+ "type": "boolean",
55
+ "description": "Execute asynchronously"
56
+ },
57
+ "timeout": {
58
+ "type": "integer",
59
+ "description": "Execution timeout in milliseconds"
60
+ }
61
+ },
62
+ "additionalProperties": true
63
+ },
64
+ "outputs": {
65
+ "type": "array",
66
+ "items": {
67
+ "type": "object",
68
+ "properties": {
69
+ "name": {
70
+ "type": "string"
71
+ },
72
+ "mapping": {
73
+ "type": "string"
74
+ }
75
+ },
76
+ "required": ["name", "mapping"]
77
+ }
78
+ }
79
+ },
80
+ "required": ["task"],
81
+ "additionalProperties": true
82
+ }