@cxtms/cx-schema 1.1.1 → 1.3.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 (39) hide show
  1. package/.claude/skills/cx-core/ref-entity-commodity.md +22 -0
  2. package/.claude/skills/cx-workflow/SKILL.md +2 -2
  3. package/.claude/skills/cx-workflow/ref-entity.md +30 -1
  4. package/.claude/skills/cx-workflow/ref-expressions.md +3 -0
  5. package/.claude/skills/cx-workflow/ref-utilities.md +21 -0
  6. package/dist/cli.js +399 -88
  7. package/dist/cli.js.map +1 -1
  8. package/dist/extractUtils.d.ts +11 -0
  9. package/dist/extractUtils.d.ts.map +1 -0
  10. package/dist/extractUtils.js +19 -0
  11. package/dist/extractUtils.js.map +1 -0
  12. package/dist/validator.js +2 -2
  13. package/dist/validator.js.map +1 -1
  14. package/dist/workflowValidator.js +2 -2
  15. package/dist/workflowValidator.js.map +1 -1
  16. package/package.json +5 -5
  17. package/schemas/workflows/tasks/action-event.json +65 -0
  18. package/schemas/workflows/tasks/all.json +126 -26
  19. package/schemas/workflows/tasks/appmodule.json +56 -0
  20. package/schemas/workflows/tasks/attachment.json +4 -1
  21. package/schemas/workflows/tasks/authentication.json +72 -0
  22. package/schemas/workflows/tasks/caching.json +68 -0
  23. package/schemas/workflows/tasks/charge.json +3 -1
  24. package/schemas/workflows/tasks/commodity.json +3 -0
  25. package/schemas/workflows/tasks/contact-address.json +72 -0
  26. package/schemas/workflows/tasks/contact-payment-method.json +72 -0
  27. package/schemas/workflows/tasks/edi.json +65 -0
  28. package/schemas/workflows/tasks/filetransfer.json +102 -0
  29. package/schemas/workflows/tasks/flow-transition.json +68 -0
  30. package/schemas/workflows/tasks/httpRequest.json +23 -0
  31. package/schemas/workflows/tasks/import.json +64 -0
  32. package/schemas/workflows/tasks/inventory.json +67 -0
  33. package/schemas/workflows/tasks/movement.json +54 -0
  34. package/schemas/workflows/tasks/note.json +59 -0
  35. package/schemas/workflows/tasks/number.json +65 -0
  36. package/schemas/workflows/tasks/order.json +8 -1
  37. package/schemas/workflows/tasks/pdf-document.json +60 -0
  38. package/schemas/workflows/tasks/user.json +70 -0
  39. package/scripts/postinstall.js +3 -3
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Action Event Tasks",
4
+ "description": "Action event operations (triggers UI notifications or webhooks)",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "ActionEvent/Create"
11
+ ],
12
+ "description": "Task type identifier"
13
+ },
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Step name identifier"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "Step description"
21
+ },
22
+ "conditions": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "expression": { "type": "string" }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "Action event inputs",
38
+ "properties": {
39
+ "eventName": {
40
+ "type": "string",
41
+ "description": "Event name identifier"
42
+ },
43
+ "data": {
44
+ "type": "object",
45
+ "description": "Event data payload",
46
+ "additionalProperties": true
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ },
51
+ "outputs": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "name": { "type": "string" },
57
+ "mapping": { "type": "string" }
58
+ },
59
+ "required": ["name", "mapping"]
60
+ }
61
+ }
62
+ },
63
+ "required": ["task"],
64
+ "additionalProperties": true
65
+ }
@@ -4,31 +4,131 @@
4
4
  "description": "Aggregator schema for all workflow task types. Uses anyOf to allow matching any known task type or falling back to generic task structure.",
5
5
  "type": "object",
6
6
  "anyOf": [
7
- { "$ref": "foreach.json" },
8
- { "$ref": "switch.json" },
9
- { "$ref": "while.json" },
10
- { "$ref": "validation.json" },
11
- { "$ref": "map.json" },
12
- { "$ref": "setVariable.json" },
13
- { "$ref": "httpRequest.json" },
14
- { "$ref": "log.json" },
15
- { "$ref": "error.json" },
16
- { "$ref": "csv.json" },
17
- { "$ref": "export.json" },
18
- { "$ref": "template.json" },
19
- { "$ref": "graphql.json" },
20
- { "$ref": "order.json" },
21
- { "$ref": "contact.json" },
22
- { "$ref": "commodity.json" },
23
- { "$ref": "job.json" },
24
- { "$ref": "attachment.json" },
25
- { "$ref": "email-send.json" },
26
- { "$ref": "document-render.json" },
27
- { "$ref": "document-send.json" },
28
- { "$ref": "charge.json" },
29
- { "$ref": "accounting-transaction.json" },
30
- { "$ref": "payment.json" },
31
- { "$ref": "workflow-execute.json" },
32
- { "$ref": "generic.json" }
7
+ {
8
+ "$ref": "accounting-transaction.json"
9
+ },
10
+ {
11
+ "$ref": "action-event.json"
12
+ },
13
+ {
14
+ "$ref": "appmodule.json"
15
+ },
16
+ {
17
+ "$ref": "attachment.json"
18
+ },
19
+ {
20
+ "$ref": "authentication.json"
21
+ },
22
+ {
23
+ "$ref": "caching.json"
24
+ },
25
+ {
26
+ "$ref": "charge.json"
27
+ },
28
+ {
29
+ "$ref": "commodity.json"
30
+ },
31
+ {
32
+ "$ref": "contact-address.json"
33
+ },
34
+ {
35
+ "$ref": "contact-payment-method.json"
36
+ },
37
+ {
38
+ "$ref": "contact.json"
39
+ },
40
+ {
41
+ "$ref": "csv.json"
42
+ },
43
+ {
44
+ "$ref": "document-render.json"
45
+ },
46
+ {
47
+ "$ref": "document-send.json"
48
+ },
49
+ {
50
+ "$ref": "edi.json"
51
+ },
52
+ {
53
+ "$ref": "email-send.json"
54
+ },
55
+ {
56
+ "$ref": "error.json"
57
+ },
58
+ {
59
+ "$ref": "export.json"
60
+ },
61
+ {
62
+ "$ref": "filetransfer.json"
63
+ },
64
+ {
65
+ "$ref": "flow-transition.json"
66
+ },
67
+ {
68
+ "$ref": "foreach.json"
69
+ },
70
+ {
71
+ "$ref": "graphql.json"
72
+ },
73
+ {
74
+ "$ref": "httpRequest.json"
75
+ },
76
+ {
77
+ "$ref": "import.json"
78
+ },
79
+ {
80
+ "$ref": "inventory.json"
81
+ },
82
+ {
83
+ "$ref": "job.json"
84
+ },
85
+ {
86
+ "$ref": "log.json"
87
+ },
88
+ {
89
+ "$ref": "map.json"
90
+ },
91
+ {
92
+ "$ref": "movement.json"
93
+ },
94
+ {
95
+ "$ref": "note.json"
96
+ },
97
+ {
98
+ "$ref": "number.json"
99
+ },
100
+ {
101
+ "$ref": "order.json"
102
+ },
103
+ {
104
+ "$ref": "payment.json"
105
+ },
106
+ {
107
+ "$ref": "pdf-document.json"
108
+ },
109
+ {
110
+ "$ref": "setVariable.json"
111
+ },
112
+ {
113
+ "$ref": "switch.json"
114
+ },
115
+ {
116
+ "$ref": "template.json"
117
+ },
118
+ {
119
+ "$ref": "user.json"
120
+ },
121
+ {
122
+ "$ref": "validation.json"
123
+ },
124
+ {
125
+ "$ref": "while.json"
126
+ },
127
+ {
128
+ "$ref": "workflow-execute.json"
129
+ },
130
+ {
131
+ "$ref": "generic.json"
132
+ }
33
133
  ]
34
134
  }
@@ -0,0 +1,56 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "App Module Tasks",
4
+ "description": "App module management operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "AppModule/Create",
11
+ "AppModule/Update",
12
+ "AppModule/Delete"
13
+ ],
14
+ "description": "Task type identifier"
15
+ },
16
+ "name": {
17
+ "type": "string",
18
+ "description": "Step name identifier"
19
+ },
20
+ "description": {
21
+ "type": "string",
22
+ "description": "Step description"
23
+ },
24
+ "conditions": {
25
+ "type": "array",
26
+ "items": {
27
+ "type": "object",
28
+ "properties": {
29
+ "expression": { "type": "string" }
30
+ },
31
+ "required": ["expression"]
32
+ }
33
+ },
34
+ "continueOnError": {
35
+ "type": "boolean"
36
+ },
37
+ "inputs": {
38
+ "type": "object",
39
+ "description": "App module operation inputs",
40
+ "additionalProperties": true
41
+ },
42
+ "outputs": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "object",
46
+ "properties": {
47
+ "name": { "type": "string" },
48
+ "mapping": { "type": "string" }
49
+ },
50
+ "required": ["name", "mapping"]
51
+ }
52
+ }
53
+ },
54
+ "required": ["task"],
55
+ "additionalProperties": true
56
+ }
@@ -10,7 +10,10 @@
10
10
  "Attachment/Create@1",
11
11
  "Attachment/Update@1",
12
12
  "Attachment/Delete@1",
13
- "Attachment/Get@1"
13
+ "Attachment/Get@1",
14
+ "Attachment/Thumbnail",
15
+ "Attachment/PdfThumbnail",
16
+ "Attachment/RegenerateThumbnails"
14
17
  ],
15
18
  "description": "Task type identifier"
16
19
  },
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Authentication Tasks",
4
+ "description": "Authentication and OAuth operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Authentication/OAuth2"
11
+ ],
12
+ "description": "Task type identifier"
13
+ },
14
+ "name": {
15
+ "type": "string",
16
+ "description": "Step name identifier"
17
+ },
18
+ "description": {
19
+ "type": "string",
20
+ "description": "Step description"
21
+ },
22
+ "conditions": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "expression": { "type": "string" }
28
+ },
29
+ "required": ["expression"]
30
+ }
31
+ },
32
+ "continueOnError": {
33
+ "type": "boolean"
34
+ },
35
+ "inputs": {
36
+ "type": "object",
37
+ "description": "Authentication operation inputs",
38
+ "properties": {
39
+ "provider": {
40
+ "type": "string",
41
+ "description": "OAuth2 provider name"
42
+ },
43
+ "clientId": {
44
+ "type": "string",
45
+ "description": "OAuth2 client ID"
46
+ },
47
+ "clientSecret": {
48
+ "type": "string",
49
+ "description": "OAuth2 client secret"
50
+ },
51
+ "tokenUrl": {
52
+ "type": "string",
53
+ "description": "Token endpoint URL"
54
+ }
55
+ },
56
+ "additionalProperties": true
57
+ },
58
+ "outputs": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "name": { "type": "string" },
64
+ "mapping": { "type": "string" }
65
+ },
66
+ "required": ["name", "mapping"]
67
+ }
68
+ }
69
+ },
70
+ "required": ["task"],
71
+ "additionalProperties": true
72
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Caching Tasks",
4
+ "description": "In-memory cache operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "Caching/SetCache@1",
11
+ "Caching/GetCache@1"
12
+ ],
13
+ "description": "Task type identifier"
14
+ },
15
+ "name": {
16
+ "type": "string",
17
+ "description": "Step name identifier"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "description": "Step description"
22
+ },
23
+ "conditions": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "expression": { "type": "string" }
29
+ },
30
+ "required": ["expression"]
31
+ }
32
+ },
33
+ "continueOnError": {
34
+ "type": "boolean"
35
+ },
36
+ "inputs": {
37
+ "type": "object",
38
+ "description": "Caching operation inputs",
39
+ "properties": {
40
+ "key": {
41
+ "type": "string",
42
+ "description": "Cache key"
43
+ },
44
+ "value": {
45
+ "description": "Value to cache (for SetCache)"
46
+ },
47
+ "ttl": {
48
+ "type": "integer",
49
+ "description": "Time-to-live in seconds (for SetCache)"
50
+ }
51
+ },
52
+ "additionalProperties": true
53
+ },
54
+ "outputs": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "object",
58
+ "properties": {
59
+ "name": { "type": "string" },
60
+ "mapping": { "type": "string" }
61
+ },
62
+ "required": ["name", "mapping"]
63
+ }
64
+ }
65
+ },
66
+ "required": ["task"],
67
+ "additionalProperties": true
68
+ }
@@ -10,7 +10,9 @@
10
10
  "Charge/Create@1",
11
11
  "Charge/Update",
12
12
  "Charge/Delete@1",
13
- "Charge/Calculate"
13
+ "Charge/Calculate",
14
+ "Charge/DynamicUpdate",
15
+ "Discount/Update"
14
16
  ],
15
17
  "description": "Task type identifier"
16
18
  },
@@ -9,9 +9,12 @@
9
9
  "enum": [
10
10
  "Commodity/Create@1",
11
11
  "Commodity/Update@1",
12
+ "Commodity/Update@2",
12
13
  "Commodity/Delete@1",
13
14
  "Commodity/Get@1",
15
+ "Commodity/Split@1",
14
16
  "Commodity/Repack@1",
17
+ "Commodity/Unpack@1",
15
18
  "OrderCommodity/Create@1",
16
19
  "OrderCommodity/Update@1",
17
20
  "OrderCommodity/Delete@1",
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Contact Address Tasks",
4
+ "description": "Contact address CRUD and import operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "ContactAddress/Create",
11
+ "ContactAddress/Update",
12
+ "ContactAddress/Delete",
13
+ "ContactAddress/Import"
14
+ ],
15
+ "description": "Task type identifier"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "description": "Step name identifier"
20
+ },
21
+ "description": {
22
+ "type": "string",
23
+ "description": "Step description"
24
+ },
25
+ "conditions": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "expression": { "type": "string" }
31
+ },
32
+ "required": ["expression"]
33
+ }
34
+ },
35
+ "continueOnError": {
36
+ "type": "boolean"
37
+ },
38
+ "inputs": {
39
+ "type": "object",
40
+ "description": "Contact address operation inputs",
41
+ "properties": {
42
+ "contactId": {
43
+ "type": "string",
44
+ "description": "Parent contact ID"
45
+ },
46
+ "addressId": {
47
+ "type": "string",
48
+ "description": "Address ID (for update/delete)"
49
+ },
50
+ "entity": {
51
+ "type": "object",
52
+ "description": "Address entity data",
53
+ "additionalProperties": true
54
+ }
55
+ },
56
+ "additionalProperties": true
57
+ },
58
+ "outputs": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "name": { "type": "string" },
64
+ "mapping": { "type": "string" }
65
+ },
66
+ "required": ["name", "mapping"]
67
+ }
68
+ }
69
+ },
70
+ "required": ["task"],
71
+ "additionalProperties": true
72
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Contact Payment Method Tasks",
4
+ "description": "Contact payment method operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "ContactPaymentMethod/Create",
11
+ "ContactPaymentMethod/Update",
12
+ "ContactPaymentMethod/SendChargedAmount",
13
+ "ContactPaymentMethod/VerifyChargedAmount"
14
+ ],
15
+ "description": "Task type identifier"
16
+ },
17
+ "name": {
18
+ "type": "string",
19
+ "description": "Step name identifier"
20
+ },
21
+ "description": {
22
+ "type": "string",
23
+ "description": "Step description"
24
+ },
25
+ "conditions": {
26
+ "type": "array",
27
+ "items": {
28
+ "type": "object",
29
+ "properties": {
30
+ "expression": { "type": "string" }
31
+ },
32
+ "required": ["expression"]
33
+ }
34
+ },
35
+ "continueOnError": {
36
+ "type": "boolean"
37
+ },
38
+ "inputs": {
39
+ "type": "object",
40
+ "description": "Contact payment method operation inputs",
41
+ "properties": {
42
+ "contactId": {
43
+ "type": "string",
44
+ "description": "Parent contact ID"
45
+ },
46
+ "paymentMethodId": {
47
+ "type": "string",
48
+ "description": "Payment method ID"
49
+ },
50
+ "entity": {
51
+ "type": "object",
52
+ "description": "Payment method entity data",
53
+ "additionalProperties": true
54
+ }
55
+ },
56
+ "additionalProperties": true
57
+ },
58
+ "outputs": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "name": { "type": "string" },
64
+ "mapping": { "type": "string" }
65
+ },
66
+ "required": ["name", "mapping"]
67
+ }
68
+ }
69
+ },
70
+ "required": ["task"],
71
+ "additionalProperties": true
72
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "EDI Tasks",
4
+ "description": "EDI and structured file parsing operations",
5
+ "type": "object",
6
+ "properties": {
7
+ "task": {
8
+ "type": "string",
9
+ "enum": [
10
+ "EDI/Parse@1",
11
+ "StructuredFile/Parse"
12
+ ],
13
+ "description": "Task type identifier"
14
+ },
15
+ "name": {
16
+ "type": "string",
17
+ "description": "Step name identifier"
18
+ },
19
+ "description": {
20
+ "type": "string",
21
+ "description": "Step description"
22
+ },
23
+ "conditions": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "properties": {
28
+ "expression": { "type": "string" }
29
+ },
30
+ "required": ["expression"]
31
+ }
32
+ },
33
+ "continueOnError": {
34
+ "type": "boolean"
35
+ },
36
+ "inputs": {
37
+ "type": "object",
38
+ "description": "EDI/parsing operation inputs",
39
+ "properties": {
40
+ "content": {
41
+ "type": "string",
42
+ "description": "File content to parse"
43
+ },
44
+ "format": {
45
+ "type": "string",
46
+ "description": "EDI format (e.g., X12, EDIFACT)"
47
+ }
48
+ },
49
+ "additionalProperties": true
50
+ },
51
+ "outputs": {
52
+ "type": "array",
53
+ "items": {
54
+ "type": "object",
55
+ "properties": {
56
+ "name": { "type": "string" },
57
+ "mapping": { "type": "string" }
58
+ },
59
+ "required": ["name", "mapping"]
60
+ }
61
+ }
62
+ },
63
+ "required": ["task"],
64
+ "additionalProperties": true
65
+ }