cxtms 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +384 -0
- package/dist/cli.d.ts +6 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +4784 -0
- package/dist/cli.js.map +1 -0
- package/dist/extractUtils.d.ts +11 -0
- package/dist/extractUtils.d.ts.map +1 -0
- package/dist/extractUtils.js +19 -0
- package/dist/extractUtils.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/schemaLoader.d.ts +17 -0
- package/dist/utils/schemaLoader.d.ts.map +1 -0
- package/dist/utils/schemaLoader.js +134 -0
- package/dist/utils/schemaLoader.js.map +1 -0
- package/dist/validator.d.ts +72 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +432 -0
- package/dist/validator.js.map +1 -0
- package/dist/workflowValidator.d.ts +103 -0
- package/dist/workflowValidator.d.ts.map +1 -0
- package/dist/workflowValidator.js +753 -0
- package/dist/workflowValidator.js.map +1 -0
- package/package.json +51 -0
- package/schemas/actions/all.json +27 -0
- package/schemas/actions/clipboard.json +46 -0
- package/schemas/actions/confirm.json +21 -0
- package/schemas/actions/consoleLog.json +16 -0
- package/schemas/actions/dialog.json +25 -0
- package/schemas/actions/fileDownload.json +16 -0
- package/schemas/actions/forEach.json +31 -0
- package/schemas/actions/if.json +12 -0
- package/schemas/actions/mutation.json +25 -0
- package/schemas/actions/navigate.json +18 -0
- package/schemas/actions/navigateBack.json +22 -0
- package/schemas/actions/navigateBackOrClose.json +21 -0
- package/schemas/actions/notification.json +19 -0
- package/schemas/actions/openBarcodeScanner.json +104 -0
- package/schemas/actions/query.json +32 -0
- package/schemas/actions/refresh.json +13 -0
- package/schemas/actions/resetDirtyState.json +22 -0
- package/schemas/actions/setFields.json +21 -0
- package/schemas/actions/setStore.json +13 -0
- package/schemas/actions/validateForm.json +15 -0
- package/schemas/actions/workflow.json +24 -0
- package/schemas/components/README.md +147 -0
- package/schemas/components/appComponent.json +58 -0
- package/schemas/components/barcodeScanner.json +69 -0
- package/schemas/components/button.json +123 -0
- package/schemas/components/calendar.json +489 -0
- package/schemas/components/card.json +176 -0
- package/schemas/components/collection.json +54 -0
- package/schemas/components/dataGrid.json +119 -0
- package/schemas/components/datasource.json +151 -0
- package/schemas/components/dropdown.json +57 -0
- package/schemas/components/field-collection.json +618 -0
- package/schemas/components/field.json +265 -0
- package/schemas/components/form.json +234 -0
- package/schemas/components/index.json +71 -0
- package/schemas/components/layout.json +69 -0
- package/schemas/components/module.json +167 -0
- package/schemas/components/navDropdown.json +36 -0
- package/schemas/components/navbar.json +78 -0
- package/schemas/components/navbarItem.json +28 -0
- package/schemas/components/navbarLink.json +36 -0
- package/schemas/components/row.json +31 -0
- package/schemas/components/slot.json +30 -0
- package/schemas/components/tab.json +34 -0
- package/schemas/components/tabs.json +35 -0
- package/schemas/components/timeline.json +172 -0
- package/schemas/components/timelineGrid.json +328 -0
- package/schemas/fields/README.md +66 -0
- package/schemas/fields/attachment.json +156 -0
- package/schemas/fields/autocomplete-googleplaces.json +130 -0
- package/schemas/fields/checkbox.json +82 -0
- package/schemas/fields/date.json +88 -0
- package/schemas/fields/datetime.json +75 -0
- package/schemas/fields/email.json +75 -0
- package/schemas/fields/index.json +53 -0
- package/schemas/fields/number.json +91 -0
- package/schemas/fields/password.json +70 -0
- package/schemas/fields/radio.json +94 -0
- package/schemas/fields/rangedatetime.json +56 -0
- package/schemas/fields/select-async.json +334 -0
- package/schemas/fields/select.json +115 -0
- package/schemas/fields/tel.json +79 -0
- package/schemas/fields/text.json +86 -0
- package/schemas/fields/textarea.json +95 -0
- package/schemas/fields/time.json +91 -0
- package/schemas/fields/url.json +74 -0
- package/schemas/schema.graphql +12248 -0
- package/schemas/schemas.json +610 -0
- package/schemas/workflows/activity.json +96 -0
- package/schemas/workflows/common/condition.json +48 -0
- package/schemas/workflows/common/expression.json +76 -0
- package/schemas/workflows/common/mapping.json +173 -0
- package/schemas/workflows/common/step.json +38 -0
- package/schemas/workflows/flow/aggregation.json +44 -0
- package/schemas/workflows/flow/entity.json +129 -0
- package/schemas/workflows/flow/state.json +105 -0
- package/schemas/workflows/flow/transition.json +143 -0
- package/schemas/workflows/input.json +122 -0
- package/schemas/workflows/output.json +61 -0
- package/schemas/workflows/schedule.json +26 -0
- package/schemas/workflows/tasks/accounting-transaction.json +95 -0
- package/schemas/workflows/tasks/action-event.json +65 -0
- package/schemas/workflows/tasks/all.json +152 -0
- package/schemas/workflows/tasks/appmodule.json +56 -0
- package/schemas/workflows/tasks/attachment.json +97 -0
- package/schemas/workflows/tasks/authentication.json +86 -0
- package/schemas/workflows/tasks/caching.json +68 -0
- package/schemas/workflows/tasks/charge.json +92 -0
- package/schemas/workflows/tasks/commodity.json +92 -0
- package/schemas/workflows/tasks/contact-address.json +72 -0
- package/schemas/workflows/tasks/contact-payment-method.json +72 -0
- package/schemas/workflows/tasks/contact.json +82 -0
- package/schemas/workflows/tasks/csv.json +81 -0
- package/schemas/workflows/tasks/document-render.json +105 -0
- package/schemas/workflows/tasks/document-send.json +84 -0
- package/schemas/workflows/tasks/edi.json +157 -0
- package/schemas/workflows/tasks/email-send.json +110 -0
- package/schemas/workflows/tasks/error.json +72 -0
- package/schemas/workflows/tasks/export.json +90 -0
- package/schemas/workflows/tasks/filetransfer.json +102 -0
- package/schemas/workflows/tasks/flow-transition.json +68 -0
- package/schemas/workflows/tasks/foreach.json +69 -0
- package/schemas/workflows/tasks/generic.json +47 -0
- package/schemas/workflows/tasks/graphql.json +78 -0
- package/schemas/workflows/tasks/httpRequest.json +161 -0
- package/schemas/workflows/tasks/import.json +64 -0
- package/schemas/workflows/tasks/inventory.json +67 -0
- package/schemas/workflows/tasks/job.json +88 -0
- package/schemas/workflows/tasks/log.json +73 -0
- package/schemas/workflows/tasks/map.json +58 -0
- package/schemas/workflows/tasks/movement.json +54 -0
- package/schemas/workflows/tasks/note.json +59 -0
- package/schemas/workflows/tasks/number.json +65 -0
- package/schemas/workflows/tasks/order-tracking-event.json +109 -0
- package/schemas/workflows/tasks/order.json +139 -0
- package/schemas/workflows/tasks/payment.json +85 -0
- package/schemas/workflows/tasks/pdf-document.json +60 -0
- package/schemas/workflows/tasks/postal-codes.json +92 -0
- package/schemas/workflows/tasks/resolve-timezone.json +65 -0
- package/schemas/workflows/tasks/setVariable.json +76 -0
- package/schemas/workflows/tasks/switch.json +75 -0
- package/schemas/workflows/tasks/template.json +73 -0
- package/schemas/workflows/tasks/tracking-event.json +137 -0
- package/schemas/workflows/tasks/transmission.json +185 -0
- package/schemas/workflows/tasks/unzip-file.json +68 -0
- package/schemas/workflows/tasks/user.json +70 -0
- package/schemas/workflows/tasks/validation.json +99 -0
- package/schemas/workflows/tasks/while.json +53 -0
- package/schemas/workflows/tasks/workflow-execute.json +82 -0
- package/schemas/workflows/trigger.json +90 -0
- package/schemas/workflows/variable.json +46 -0
- package/schemas/workflows/workflow.json +335 -0
- package/scripts/postinstall.js +291 -0
- package/scripts/setup-vscode.js +80 -0
- package/skills/cxtms-developer/SKILL.md +118 -0
- package/skills/cxtms-developer/ref-cli-auth.md +120 -0
- package/skills/cxtms-developer/ref-entity-accounting.md +180 -0
- package/skills/cxtms-developer/ref-entity-commodity.md +239 -0
- package/skills/cxtms-developer/ref-entity-contact.md +163 -0
- package/skills/cxtms-developer/ref-entity-geography.md +154 -0
- package/skills/cxtms-developer/ref-entity-job.md +77 -0
- package/skills/cxtms-developer/ref-entity-notification.md +85 -0
- package/skills/cxtms-developer/ref-entity-order-sub.md +160 -0
- package/skills/cxtms-developer/ref-entity-order.md +183 -0
- package/skills/cxtms-developer/ref-entity-organization.md +41 -0
- package/skills/cxtms-developer/ref-entity-rate.md +182 -0
- package/skills/cxtms-developer/ref-entity-shared.md +176 -0
- package/skills/cxtms-developer/ref-entity-warehouse.md +115 -0
- package/skills/cxtms-developer/ref-graphql-query.md +309 -0
- package/skills/cxtms-module-builder/SKILL.md +477 -0
- package/skills/cxtms-module-builder/ref-components-data.md +293 -0
- package/skills/cxtms-module-builder/ref-components-display.md +411 -0
- package/skills/cxtms-module-builder/ref-components-forms.md +369 -0
- package/skills/cxtms-module-builder/ref-components-interactive.md +317 -0
- package/skills/cxtms-module-builder/ref-components-layout.md +390 -0
- package/skills/cxtms-module-builder/ref-components-specialized.md +477 -0
- package/skills/cxtms-workflow-builder/SKILL.md +438 -0
- package/skills/cxtms-workflow-builder/ref-accounting.md +66 -0
- package/skills/cxtms-workflow-builder/ref-communication.md +169 -0
- package/skills/cxtms-workflow-builder/ref-entity.md +342 -0
- package/skills/cxtms-workflow-builder/ref-expressions-ncalc.md +128 -0
- package/skills/cxtms-workflow-builder/ref-expressions-template.md +161 -0
- package/skills/cxtms-workflow-builder/ref-filetransfer.md +80 -0
- package/skills/cxtms-workflow-builder/ref-flow.md +210 -0
- package/skills/cxtms-workflow-builder/ref-other.md +157 -0
- package/skills/cxtms-workflow-builder/ref-query.md +105 -0
- package/skills/cxtms-workflow-builder/ref-utilities.md +417 -0
- package/templates/module-configuration.yaml +44 -0
- package/templates/module-form.yaml +152 -0
- package/templates/module-grid.yaml +229 -0
- package/templates/module-select.yaml +139 -0
- package/templates/module.yaml +84 -0
- package/templates/workflow-api-tracking.yaml +189 -0
- package/templates/workflow-basic.yaml +76 -0
- package/templates/workflow-document.yaml +155 -0
- package/templates/workflow-entity-trigger.yaml +90 -0
- package/templates/workflow-ftp-edi.yaml +158 -0
- package/templates/workflow-ftp-tracking.yaml +161 -0
- package/templates/workflow-mcp-tool.yaml +112 -0
- package/templates/workflow-public-api.yaml +135 -0
- package/templates/workflow-scheduled-execute.yaml +75 -0
- package/templates/workflow-scheduled.yaml +125 -0
- package/templates/workflow-utility.yaml +96 -0
- package/templates/workflow-webhook.yaml +128 -0
- package/templates/workflow.yaml +140 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Workflow Condition",
|
|
4
|
+
"description": "Condition evaluation patterns for workflow execution control",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"condition": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"expression": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "NCalc expression that evaluates to boolean"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": ["expression"],
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
},
|
|
17
|
+
"conditionArray": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"$ref": "#/definitions/condition"
|
|
21
|
+
},
|
|
22
|
+
"description": "Array of conditions (all must be true)"
|
|
23
|
+
},
|
|
24
|
+
"simpleCondition": {
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Simple condition expression string"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"$ref": "#/definitions/condition"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"x-examples": {
|
|
37
|
+
"singleCondition": {
|
|
38
|
+
"expression": "[status] = 'Active'"
|
|
39
|
+
},
|
|
40
|
+
"multipleConditions": [
|
|
41
|
+
{ "expression": "[isValid] = true" },
|
|
42
|
+
{ "expression": "[amount] > 0" }
|
|
43
|
+
],
|
|
44
|
+
"complexExpression": {
|
|
45
|
+
"expression": "([status] = 'Completed' || [status] = 'Failed') && [notifyUser] = true"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "NCalc Expression",
|
|
4
|
+
"description": "NCalc expression patterns for workflow conditions and calculations",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"expression": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "NCalc expression string",
|
|
9
|
+
"x-examples": [
|
|
10
|
+
"[orderTotal] > 1000",
|
|
11
|
+
"[status] = 'Approved'",
|
|
12
|
+
"isNullOrEmpty([value?]) = false",
|
|
13
|
+
"[status] = 'Completed' || [status] = 'Failed'",
|
|
14
|
+
"format('{0:F2}', [weight])",
|
|
15
|
+
"convertWeight([value], [fromUnit], [toUnit])",
|
|
16
|
+
"formatDate([date], 'MM.dd.yyyy hh:mm', 'en-US')",
|
|
17
|
+
"sum([collection], [each.property])",
|
|
18
|
+
"distinct([collection])",
|
|
19
|
+
"length([array])",
|
|
20
|
+
"All([items], [item.isValid])",
|
|
21
|
+
"Any([items], [item.status] = 'Complete')",
|
|
22
|
+
"contains([text], 'search')",
|
|
23
|
+
"base64(format('{0}:{1}', [user], [password]))",
|
|
24
|
+
"replace([value], 'pattern', 'replacement')",
|
|
25
|
+
"lower([value])",
|
|
26
|
+
"upper([value])",
|
|
27
|
+
"trim(first(split([string], '(')))",
|
|
28
|
+
"join([array], [item.name], ', ')"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"templateExpression": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "Template expression with variable substitution",
|
|
34
|
+
"x-examples": [
|
|
35
|
+
"{{ orderId }}",
|
|
36
|
+
"{{ customer.name }}",
|
|
37
|
+
"{{ order?.customValues?.isConsolidated? }}",
|
|
38
|
+
"Order-{{ orderNumber }}-{{ Date.Now.ToString('yyyyMMdd') }}"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
"safeNavigation": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Path with optional chaining using ?",
|
|
44
|
+
"x-examples": [
|
|
45
|
+
"order?.customer?.email?",
|
|
46
|
+
"items?[0]?.name?",
|
|
47
|
+
"activity?.step?.output?"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"variableConverters": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Variable type converters",
|
|
53
|
+
"enum": [
|
|
54
|
+
"string",
|
|
55
|
+
"int",
|
|
56
|
+
"decimal",
|
|
57
|
+
"bool",
|
|
58
|
+
"datetime",
|
|
59
|
+
"luceneString",
|
|
60
|
+
"emptyIfNull",
|
|
61
|
+
"nullIfEmpty",
|
|
62
|
+
"transliterate",
|
|
63
|
+
"parseJson",
|
|
64
|
+
"toJson"
|
|
65
|
+
],
|
|
66
|
+
"x-examples": [
|
|
67
|
+
"[int orderId]",
|
|
68
|
+
"[decimal amount]",
|
|
69
|
+
"[string value]",
|
|
70
|
+
"[bool isActive]",
|
|
71
|
+
"[datetime createdDate]",
|
|
72
|
+
"[luceneString searchTerm]"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Workflow Mapping",
|
|
4
|
+
"description": "Input/output mapping patterns for workflow data flow",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"outputMapping": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Output variable name"
|
|
12
|
+
},
|
|
13
|
+
"mapping": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Path to extract value from result"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["name", "mapping"],
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
},
|
|
21
|
+
"variableMapping": {
|
|
22
|
+
"oneOf": [
|
|
23
|
+
{
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "Simple template expression"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"expression": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "NCalc expression"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": true
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"switch": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"expression": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"cases": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": true
|
|
51
|
+
},
|
|
52
|
+
"default": {}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {
|
|
58
|
+
"extends": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Extend an existing object"
|
|
61
|
+
},
|
|
62
|
+
"defaultIfNull": {},
|
|
63
|
+
"mapping": {}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"type": "object",
|
|
68
|
+
"properties": {
|
|
69
|
+
"foreach": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Expression evaluating to array collection to iterate (e.g., 'stepName.result?.items?')"
|
|
72
|
+
},
|
|
73
|
+
"item": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "Variable name for current item (default: 'item')"
|
|
76
|
+
},
|
|
77
|
+
"index": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "Variable name for current index"
|
|
80
|
+
},
|
|
81
|
+
"conditions": {
|
|
82
|
+
"oneOf": [
|
|
83
|
+
{
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Single NCalc filter expression (e.g., '[item.isActive] = true')"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"oneOf": [
|
|
91
|
+
{ "type": "string" },
|
|
92
|
+
{
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"expression": { "type": "string" }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"description": "Array of condition expressions (all must be true)"
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
"description": "Filter conditions — only items matching all conditions are included"
|
|
104
|
+
},
|
|
105
|
+
"continueOnError": {
|
|
106
|
+
"type": "boolean",
|
|
107
|
+
"description": "Skip items that cause errors and continue"
|
|
108
|
+
},
|
|
109
|
+
"mapping": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"description": "Object defining the output shape — each key maps to a template expression or nested value directive",
|
|
112
|
+
"additionalProperties": true
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"required": ["foreach", "mapping"],
|
|
116
|
+
"additionalProperties": false
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"type": "object",
|
|
120
|
+
"properties": {
|
|
121
|
+
"coalesce": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {},
|
|
124
|
+
"description": "Return first non-null value"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"pathExpression": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Dot-notation path to access nested values",
|
|
133
|
+
"x-examples": [
|
|
134
|
+
"activityName.stepName.outputVariable",
|
|
135
|
+
"orders.items?[0]?.jobs[0]?.jobId",
|
|
136
|
+
"order?.customValues?.isConsolidated?",
|
|
137
|
+
"orders?[orderType=\"ParcelShipment\"]?[0]?",
|
|
138
|
+
"carriers[contactId=(carrierId)]",
|
|
139
|
+
"charges[applyToContactId=(carrierId)]",
|
|
140
|
+
"commodities[**]",
|
|
141
|
+
"commodities[**][-1]"
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
"x-examples": {
|
|
146
|
+
"simpleMapping": {
|
|
147
|
+
"name": "orderId",
|
|
148
|
+
"mapping": "getOrder.order.orderId"
|
|
149
|
+
},
|
|
150
|
+
"safeNavMapping": {
|
|
151
|
+
"name": "customValue",
|
|
152
|
+
"mapping": "order?.customValues?.value?"
|
|
153
|
+
},
|
|
154
|
+
"templateMapping": "Order_{{ order.orderNumber }}.pdf",
|
|
155
|
+
"switchMapping": {
|
|
156
|
+
"switch": {
|
|
157
|
+
"expression": "[orderType]"
|
|
158
|
+
},
|
|
159
|
+
"cases": {
|
|
160
|
+
"Air": "air-template",
|
|
161
|
+
"Ocean": "ocean-template"
|
|
162
|
+
},
|
|
163
|
+
"default": "default-template"
|
|
164
|
+
},
|
|
165
|
+
"foreachMapping": {
|
|
166
|
+
"foreach": "items?",
|
|
167
|
+
"mapping": {
|
|
168
|
+
"id": "{{ item.id }}",
|
|
169
|
+
"name": "{{ item.name }}"
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Workflow Step",
|
|
4
|
+
"description": "A single step (task) within a workflow activity or event handler",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"task": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Task type identifier (e.g., 'Utilities/Log@1', 'GraphQL/Query@1')"
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Step name identifier"
|
|
14
|
+
},
|
|
15
|
+
"inputs": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"description": "Task-specific input parameters",
|
|
18
|
+
"additionalProperties": true
|
|
19
|
+
},
|
|
20
|
+
"outputs": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "Output mappings from task results"
|
|
23
|
+
},
|
|
24
|
+
"conditions": {
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{ "type": "string" },
|
|
27
|
+
{ "type": "array" }
|
|
28
|
+
],
|
|
29
|
+
"description": "Conditions for step execution"
|
|
30
|
+
},
|
|
31
|
+
"continueOnError": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Whether to continue workflow on step error"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"required": ["task"],
|
|
37
|
+
"additionalProperties": true
|
|
38
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Flow Aggregation",
|
|
4
|
+
"description": "Aggregation definition for Flow workflows. Defines reusable data queries for use in transition conditions.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1,
|
|
10
|
+
"description": "Unique name for the aggregation. Referenced in conditions."
|
|
11
|
+
},
|
|
12
|
+
"expression": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"pattern": "^(all|any|sum|count|first|last|distinct|groupBy)\\s*\\(",
|
|
16
|
+
"description": "Aggregation expression using supported functions: all(), any(), sum(), count(), first(), last(), distinct(), groupBy()."
|
|
17
|
+
},
|
|
18
|
+
"parameter": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Optional parameter name for parameterized aggregations."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["name", "expression"],
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"x-examples": [
|
|
26
|
+
{
|
|
27
|
+
"name": "allItemsReceived",
|
|
28
|
+
"expression": "all(Order.Commodities, item.ReceivedQuantity >= item.Quantity)"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "totalWeight",
|
|
32
|
+
"expression": "sum(Order.Commodities, item.Weight)"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "itemCount",
|
|
36
|
+
"expression": "count(Order.Commodities)"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "chargesByType",
|
|
40
|
+
"expression": "sum(Order.Charges, item.Amount)",
|
|
41
|
+
"parameter": "chargeType"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Flow Entity",
|
|
4
|
+
"description": "Entity configuration for Flow workflows. Specifies the entity whose lifecycle is managed by the flow.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": [
|
|
10
|
+
"Order",
|
|
11
|
+
"Commodity",
|
|
12
|
+
"AccountingTransaction",
|
|
13
|
+
"Workflow",
|
|
14
|
+
"OrganizationConfig",
|
|
15
|
+
"Contact",
|
|
16
|
+
"AppModule",
|
|
17
|
+
"Attachment",
|
|
18
|
+
"OrderCommodity",
|
|
19
|
+
"TrackingEvent",
|
|
20
|
+
"JobOrder"
|
|
21
|
+
],
|
|
22
|
+
"description": "The entity name whose lifecycle this flow manages"
|
|
23
|
+
},
|
|
24
|
+
"type": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The entity subtype. Required for Order, AccountingTransaction, and Contact entities."
|
|
27
|
+
},
|
|
28
|
+
"includes": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"description": "Navigation paths for related data to load with the entity. Supports dot-notation for nested relationships (e.g., 'Customer.BillingAddress')."
|
|
34
|
+
},
|
|
35
|
+
"query": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "GraphQL-style query string specifying the default fields to load for the entity. States can override this with their own query."
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"required": ["name"],
|
|
41
|
+
"allOf": [
|
|
42
|
+
{
|
|
43
|
+
"if": {
|
|
44
|
+
"properties": {
|
|
45
|
+
"name": { "const": "Order" }
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"then": {
|
|
49
|
+
"required": ["type"],
|
|
50
|
+
"properties": {
|
|
51
|
+
"type": {
|
|
52
|
+
"enum": [
|
|
53
|
+
"Brokerage",
|
|
54
|
+
"ParcelShipment",
|
|
55
|
+
"Quote",
|
|
56
|
+
"WarehouseReceipt",
|
|
57
|
+
"AirShipmentOrder",
|
|
58
|
+
"OceanShipmentOrder",
|
|
59
|
+
"LoadOrder",
|
|
60
|
+
"DeliveryOrder"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"if": {
|
|
68
|
+
"properties": {
|
|
69
|
+
"name": { "const": "AccountingTransaction" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"then": {
|
|
73
|
+
"required": ["type"],
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"enum": ["Invoice", "Bill", "CreditMemo"]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"if": {
|
|
83
|
+
"properties": {
|
|
84
|
+
"name": { "const": "Contact" }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"then": {
|
|
88
|
+
"required": ["type"],
|
|
89
|
+
"properties": {
|
|
90
|
+
"type": {
|
|
91
|
+
"enum": ["Customer", "Carrier", "Vendor", "Driver", "Employee"]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"if": {
|
|
98
|
+
"properties": {
|
|
99
|
+
"name": { "const": "Commodity" }
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"then": {
|
|
103
|
+
"properties": {
|
|
104
|
+
"type": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"description": "CommodityType code. Optional — if omitted, the flow applies to all commodity types."
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"x-examples": [
|
|
114
|
+
{
|
|
115
|
+
"name": "Order",
|
|
116
|
+
"type": "Brokerage",
|
|
117
|
+
"includes": ["Commodities", "Customer.BillingAddress", "Charges"],
|
|
118
|
+
"query": "{ commodities { id, quantity }, customer { name, email } }"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"name": "Contact",
|
|
122
|
+
"type": "Customer"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "Commodity",
|
|
126
|
+
"includes": ["commodityStatus", "commodityEvents.trackingEvent.eventDefinition"]
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "Flow State",
|
|
4
|
+
"description": "State definition for Flow workflows. Each state represents a status in the entity lifecycle.",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"name": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"minLength": 1,
|
|
10
|
+
"description": "The state name. Must match an existing status entity name."
|
|
11
|
+
},
|
|
12
|
+
"stage": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "Stage grouping for this state (e.g., 'Processing', 'Completed'). Used for organizing states in the UI."
|
|
15
|
+
},
|
|
16
|
+
"parent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Parent state name for hierarchical organization. Child states inherit parent transitions."
|
|
19
|
+
},
|
|
20
|
+
"isInitial": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"default": false,
|
|
23
|
+
"description": "Indicates this is the initial state for new entities. At most one state can be marked as initial."
|
|
24
|
+
},
|
|
25
|
+
"isFinal": {
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"default": false,
|
|
28
|
+
"description": "Indicates this is a final/terminal state. Final states cannot be transition sources."
|
|
29
|
+
},
|
|
30
|
+
"requireConfirmation": {
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"default": false,
|
|
33
|
+
"description": "Requires user confirmation before transitioning to this state."
|
|
34
|
+
},
|
|
35
|
+
"onEnter": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"properties": {
|
|
40
|
+
"task": { "type": "string" },
|
|
41
|
+
"name": { "type": "string" },
|
|
42
|
+
"inputs": { "type": "object", "additionalProperties": true },
|
|
43
|
+
"outputs": { "type": "array" },
|
|
44
|
+
"conditions": { "oneOf": [{ "type": "string" }, { "type": "array" }] },
|
|
45
|
+
"continueOnError": { "type": "boolean" }
|
|
46
|
+
},
|
|
47
|
+
"required": ["task"],
|
|
48
|
+
"additionalProperties": true
|
|
49
|
+
},
|
|
50
|
+
"description": "Steps to execute when entering this state. Executed after the transition steps."
|
|
51
|
+
},
|
|
52
|
+
"onExit": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"task": { "type": "string" },
|
|
58
|
+
"name": { "type": "string" },
|
|
59
|
+
"inputs": { "type": "object", "additionalProperties": true },
|
|
60
|
+
"outputs": { "type": "array" },
|
|
61
|
+
"conditions": { "oneOf": [{ "type": "string" }, { "type": "array" }] },
|
|
62
|
+
"continueOnError": { "type": "boolean" }
|
|
63
|
+
},
|
|
64
|
+
"required": ["task"],
|
|
65
|
+
"additionalProperties": true
|
|
66
|
+
},
|
|
67
|
+
"description": "Steps to execute when exiting this state. Executed before the transition steps."
|
|
68
|
+
},
|
|
69
|
+
"query": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "GraphQL-style query string specifying fields to load when entity is in this state. Overrides the entity-level query."
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"required": ["name"],
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"x-examples": [
|
|
77
|
+
{
|
|
78
|
+
"name": "Draft",
|
|
79
|
+
"stage": "Entry",
|
|
80
|
+
"isInitial": true
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"name": "Shipped",
|
|
84
|
+
"stage": "Fulfillment",
|
|
85
|
+
"onEnter": [
|
|
86
|
+
{
|
|
87
|
+
"task": "SendEmail@1",
|
|
88
|
+
"inputs": {
|
|
89
|
+
"template": "shipped_notification"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"name": "Delivered",
|
|
96
|
+
"stage": "Complete",
|
|
97
|
+
"isFinal": true
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "AwaitingPickup",
|
|
101
|
+
"parent": "Active",
|
|
102
|
+
"requireConfirmation": true
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}
|