@cxtms/cx-schema 1.7.17 → 1.8.1
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/.claude/skills/cx-core/SKILL.md +38 -20
- package/.claude/skills/cx-core/ref-entity-accounting.md +0 -7
- package/.claude/skills/cx-core/ref-entity-commodity.md +0 -12
- package/.claude/skills/cx-core/ref-entity-contact.md +0 -10
- package/.claude/skills/cx-core/ref-entity-geography.md +0 -9
- package/.claude/skills/cx-core/ref-entity-notification.md +85 -0
- package/.claude/skills/cx-core/ref-entity-order-sub.md +7 -7
- package/.claude/skills/cx-core/ref-entity-order.md +1 -14
- package/.claude/skills/cx-core/ref-entity-rate.md +0 -8
- package/.claude/skills/cx-core/ref-entity-shared.md +20 -9
- package/.claude/skills/cx-core/ref-entity-warehouse.md +0 -5
- package/.claude/skills/cx-module/SKILL.md +28 -103
- package/.claude/skills/cx-module/ref-components-data.md +0 -7
- package/.claude/skills/cx-module/ref-components-display.md +0 -13
- package/.claude/skills/cx-module/ref-components-forms.md +1 -6
- package/.claude/skills/cx-module/ref-components-interactive.md +0 -11
- package/.claude/skills/cx-module/ref-components-layout.md +0 -11
- package/.claude/skills/cx-module/ref-components-specialized.md +0 -50
- package/.claude/skills/cx-workflow/SKILL.md +21 -130
- package/.claude/skills/cx-workflow/ref-communication.md +0 -8
- package/.claude/skills/cx-workflow/ref-entity.md +62 -17
- package/.claude/skills/cx-workflow/ref-expressions.md +272 -0
- package/.claude/skills/cx-workflow/ref-flow.md +5 -11
- package/.claude/skills/cx-workflow/ref-other.md +33 -14
- package/.claude/skills/cx-workflow/ref-utilities.md +111 -14
- package/README.md +34 -34
- package/dist/cli.js +166 -2394
- package/dist/cli.js.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/validator.d.ts +0 -8
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +2 -54
- package/dist/validator.js.map +1 -1
- package/dist/workflowValidator.d.ts +0 -4
- package/dist/workflowValidator.d.ts.map +1 -1
- package/dist/workflowValidator.js +2 -28
- package/dist/workflowValidator.js.map +1 -1
- package/package.json +2 -3
- package/schemas/actions/all.json +2 -1
- package/schemas/actions/clipboard.json +46 -0
- package/schemas/components/appComponent.json +0 -8
- package/schemas/components/module.json +2 -31
- package/schemas/components/timelineGrid.json +0 -4
- package/schemas/schemas.json +0 -12
- package/schemas/workflows/flow/entity.json +19 -0
- package/schemas/workflows/tasks/all.json +9 -0
- package/schemas/workflows/tasks/authentication.json +12 -26
- package/schemas/workflows/tasks/edi.json +93 -1
- package/schemas/workflows/tasks/httpRequest.json +4 -0
- package/schemas/workflows/tasks/order.json +45 -0
- package/schemas/workflows/tasks/resolve-timezone.json +65 -0
- package/schemas/workflows/tasks/transmission.json +185 -0
- package/schemas/workflows/tasks/unzip-file.json +68 -0
- package/schemas/workflows/variable.json +5 -1
- package/schemas/workflows/workflow.json +4 -0
- package/scripts/postinstall.js +1 -1
- package/templates/module-configuration.yaml +89 -23
- package/templates/module-form.yaml +3 -3
- package/templates/module-grid.yaml +3 -3
- package/templates/module-select.yaml +3 -3
- package/templates/module.yaml +2 -3
- package/templates/workflow-api-tracking.yaml +1 -1
- package/templates/workflow-basic.yaml +1 -1
- package/templates/workflow-document.yaml +1 -1
- package/templates/workflow-entity-trigger.yaml +1 -1
- package/templates/workflow-ftp-edi.yaml +1 -1
- package/templates/workflow-ftp-tracking.yaml +1 -1
- package/templates/workflow-mcp-tool.yaml +1 -1
- package/templates/workflow-public-api.yaml +1 -1
- package/templates/workflow-scheduled.yaml +1 -1
- package/templates/workflow-utility.yaml +1 -1
- package/templates/workflow-webhook.yaml +1 -1
- package/templates/workflow.yaml +1 -1
- package/.claude/skills/cx-core/ref-cli-auth.md +0 -120
- package/.claude/skills/cx-core/ref-graphql-query.md +0 -320
- package/.claude/skills/cx-workflow/ref-expressions-ncalc.md +0 -111
- package/.claude/skills/cx-workflow/ref-expressions-template.md +0 -148
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Configuration Module
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create module --template configuration
|
|
3
3
|
|
|
4
4
|
module:
|
|
5
5
|
name: "{{displayNameNoSpaces}}"
|
|
@@ -8,37 +8,103 @@ module:
|
|
|
8
8
|
en-US: "{{displayName}}"
|
|
9
9
|
description:
|
|
10
10
|
en-US: "{{displayName}} configuration module"
|
|
11
|
-
application:
|
|
11
|
+
application: CargoXplorer
|
|
12
|
+
fileName: "{{fileName}}"
|
|
12
13
|
|
|
13
14
|
components:
|
|
14
|
-
- name:
|
|
15
|
+
- name: {{displayNameNoSpaces}}/Configuration
|
|
15
16
|
displayName:
|
|
16
|
-
en-US: "{{displayName}}
|
|
17
|
-
platforms:
|
|
18
|
-
- web
|
|
17
|
+
en-US: "{{displayName}}"
|
|
19
18
|
layout:
|
|
20
|
-
component:
|
|
21
|
-
name: {{
|
|
19
|
+
component: form
|
|
20
|
+
name: {{name}}Form
|
|
22
21
|
props:
|
|
23
|
-
cols: 1
|
|
24
22
|
title:
|
|
25
|
-
en-US: "{{displayName}}
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
en-US: "{{displayName}}"
|
|
24
|
+
queries:
|
|
25
|
+
- name: getConfiguration
|
|
26
|
+
query:
|
|
27
|
+
command: |
|
|
28
|
+
query GetConfiguration($organizationId: Int!) {
|
|
29
|
+
configuration(organizationId: $organizationId) {
|
|
30
|
+
settingName
|
|
31
|
+
maxRetries
|
|
32
|
+
enableNotifications
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
variables:
|
|
36
|
+
organizationId: "\{{organizationId}}"
|
|
37
|
+
initialValues:
|
|
38
|
+
fromQuery:
|
|
39
|
+
name: getConfiguration
|
|
40
|
+
path: configuration
|
|
41
|
+
append:
|
|
42
|
+
settingName: "Default Setting"
|
|
43
|
+
maxRetries: 3
|
|
44
|
+
enableNotifications: true
|
|
45
|
+
validationSchema:
|
|
46
|
+
settingName:
|
|
47
|
+
type: string
|
|
48
|
+
required: true
|
|
49
|
+
maxRetries:
|
|
50
|
+
type: number
|
|
51
|
+
required: true
|
|
52
|
+
enableNotifications:
|
|
53
|
+
type: boolean
|
|
54
|
+
onSubmit:
|
|
55
|
+
- type: mutation
|
|
56
|
+
props:
|
|
57
|
+
command: |
|
|
58
|
+
mutation SaveConfiguration($organizationId: Int!, $input: ConfigurationInput!) {
|
|
59
|
+
saveConfiguration(organizationId: $organizationId, input: $input) {
|
|
60
|
+
success
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
variables:
|
|
64
|
+
organizationId: "\{{organizationId}}"
|
|
65
|
+
input: "\{{formValues}}"
|
|
66
|
+
- type: notification
|
|
67
|
+
props:
|
|
68
|
+
message:
|
|
69
|
+
en-US: "{{displayName}} saved successfully"
|
|
70
|
+
severity: success
|
|
28
71
|
children:
|
|
29
72
|
- component: field
|
|
30
|
-
name:
|
|
73
|
+
name: settingName
|
|
74
|
+
props:
|
|
75
|
+
label:
|
|
76
|
+
en-US: "Setting Name"
|
|
77
|
+
type: text
|
|
78
|
+
required: true
|
|
79
|
+
- component: field
|
|
80
|
+
name: maxRetries
|
|
81
|
+
props:
|
|
82
|
+
label:
|
|
83
|
+
en-US: "Max Retries"
|
|
84
|
+
type: number
|
|
85
|
+
- component: field
|
|
86
|
+
name: enableNotifications
|
|
31
87
|
props:
|
|
32
|
-
type: checkbox
|
|
33
88
|
label:
|
|
34
|
-
en-US: "Enable
|
|
89
|
+
en-US: "Enable Notifications"
|
|
90
|
+
type: checkbox
|
|
35
91
|
|
|
36
|
-
|
|
37
|
-
-
|
|
92
|
+
routes:
|
|
93
|
+
- name: configuration
|
|
94
|
+
path: /{{name}}
|
|
95
|
+
component: {{displayNameNoSpaces}}/Configuration
|
|
96
|
+
props:
|
|
97
|
+
title:
|
|
98
|
+
en-US: "{{displayName}}"
|
|
99
|
+
|
|
100
|
+
permissions:
|
|
101
|
+
- name: "{{displayNameNoSpaces}}/View"
|
|
38
102
|
displayName:
|
|
39
|
-
en-US: "{{displayName}}"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
103
|
+
en-US: "View {{displayName}}"
|
|
104
|
+
roles:
|
|
105
|
+
- Admin
|
|
106
|
+
- name: "{{displayNameNoSpaces}}/Edit"
|
|
107
|
+
displayName:
|
|
108
|
+
en-US: "Edit {{displayName}}"
|
|
109
|
+
roles:
|
|
110
|
+
- Admin
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Form Module
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create module --template form
|
|
3
3
|
|
|
4
4
|
module:
|
|
5
5
|
name: "{{displayNameNoSpaces}}"
|
|
@@ -8,8 +8,8 @@ module:
|
|
|
8
8
|
en-US: "{{displayName}}"
|
|
9
9
|
description:
|
|
10
10
|
en-US: "{{displayName}} module"
|
|
11
|
-
application:
|
|
12
|
-
|
|
11
|
+
application: CargoXplorer
|
|
12
|
+
fileName: "{{fileName}}"
|
|
13
13
|
|
|
14
14
|
components:
|
|
15
15
|
- name: {{displayNameNoSpaces}}/Detail
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Module
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create module --template grid
|
|
3
3
|
|
|
4
4
|
module:
|
|
5
5
|
name: "{{displayNameNoSpaces}}"
|
|
@@ -8,8 +8,8 @@ module:
|
|
|
8
8
|
en-US: "{{displayName}}"
|
|
9
9
|
description:
|
|
10
10
|
en-US: "{{displayName}} module"
|
|
11
|
-
application:
|
|
12
|
-
|
|
11
|
+
application: CargoXplorer
|
|
12
|
+
fileName: "{{fileName}}"
|
|
13
13
|
|
|
14
14
|
components:
|
|
15
15
|
- name: {{displayNameNoSpaces}}/List
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Select Module
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create module --template select
|
|
3
3
|
|
|
4
4
|
module:
|
|
5
5
|
name: "{{displayNameNoSpaces}}"
|
|
@@ -8,8 +8,8 @@ module:
|
|
|
8
8
|
en-US: "{{displayName}}"
|
|
9
9
|
description:
|
|
10
10
|
en-US: "{{displayName}} async select component"
|
|
11
|
-
application:
|
|
12
|
-
|
|
11
|
+
application: CargoXplorer
|
|
12
|
+
fileName: "{{fileName}}"
|
|
13
13
|
|
|
14
14
|
components:
|
|
15
15
|
- name: {{displayNameNoSpaces}}/Select
|
package/templates/module.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Module
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create module
|
|
3
3
|
|
|
4
4
|
module:
|
|
5
5
|
name: "{{name}}"
|
|
@@ -8,8 +8,7 @@ module:
|
|
|
8
8
|
description: "{{displayName}} module"
|
|
9
9
|
icon: "folder"
|
|
10
10
|
version: "1.0"
|
|
11
|
-
|
|
12
|
-
filePath: "{{fileName}}"
|
|
11
|
+
fileName: "{{fileName}}"
|
|
13
12
|
|
|
14
13
|
entities:
|
|
15
14
|
- name: {{name}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Workflow
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create workflow --template public-api
|
|
3
3
|
#
|
|
4
4
|
# This workflow exposes a public REST API endpoint.
|
|
5
5
|
# The api section defines the route, method, authentication, and OpenAPI metadata.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# {{displayName}} Workflow
|
|
2
|
-
# Generated by
|
|
2
|
+
# Generated by cx-cli create workflow --template webhook
|
|
3
3
|
#
|
|
4
4
|
# Endpoint: POST /api/v2/orgs/{organizationId}/webhooks/{workflowId}
|
|
5
5
|
# The endpoint is anonymous (no auth token required) and rate-limited (10/sec, 100/min per IP).
|
package/templates/workflow.yaml
CHANGED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
# CX Server Authentication & Management
|
|
2
|
-
|
|
3
|
-
## Contents
|
|
4
|
-
- Authentication (OAuth2 login/logout)
|
|
5
|
-
- PAT Tokens (CI/CD alternative to OAuth)
|
|
6
|
-
- Organization Management
|
|
7
|
-
- Session Resolution
|
|
8
|
-
- Publish (push modules and workflows to server)
|
|
9
|
-
|
|
10
|
-
## Authentication
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
# Login to a CX environment (OAuth2 + PKCE — opens browser)
|
|
14
|
-
npx cxtms login https://tms-v3-dev.usatrt.com
|
|
15
|
-
|
|
16
|
-
# Logout from current session
|
|
17
|
-
npx cxtms logout
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
The session is stored at `~/.cxtms/<project-dir>/.session.json`, scoped by project directory name. Each project gets its own server session. The CLI auto-refreshes expired tokens.
|
|
21
|
-
|
|
22
|
-
## PAT Tokens (alternative to OAuth)
|
|
23
|
-
|
|
24
|
-
For CI/CD or headless environments, use Personal Access Tokens instead of interactive OAuth:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
# Check PAT status and setup instructions
|
|
28
|
-
npx cxtms pat setup
|
|
29
|
-
|
|
30
|
-
# Create a new PAT token (requires OAuth login first)
|
|
31
|
-
npx cxtms pat create "my-ci-token"
|
|
32
|
-
|
|
33
|
-
# List active PAT tokens
|
|
34
|
-
npx cxtms pat list
|
|
35
|
-
|
|
36
|
-
# Revoke a PAT token
|
|
37
|
-
npx cxtms pat revoke <tokenId>
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
After creating a PAT, add to `.env` in your project root:
|
|
41
|
-
```
|
|
42
|
-
CXTMS_AUTH=pat_xxxxx...
|
|
43
|
-
CXTMS_SERVER=https://tms-v3-dev.usatrt.com
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
When `CXTMS_AUTH` is set, the CLI skips OAuth and uses the PAT token directly. `CXTMS_SERVER` provides the server URL (or set `server` in `app.yaml`).
|
|
47
|
-
|
|
48
|
-
## Organization Management
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
# List organizations on the server
|
|
52
|
-
npx cxtms orgs list
|
|
53
|
-
|
|
54
|
-
# Select an organization interactively
|
|
55
|
-
npx cxtms orgs select
|
|
56
|
-
|
|
57
|
-
# Set active organization by ID
|
|
58
|
-
npx cxtms orgs use <orgId>
|
|
59
|
-
|
|
60
|
-
# Show current context (server, org, app)
|
|
61
|
-
npx cxtms orgs use
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
The active org is cached in the session file and used by all server commands. **Always pass `--org <id>` on deploy/undeploy/release/execute/logs commands** to avoid the interactive org picker blocking automation.
|
|
65
|
-
|
|
66
|
-
## Session Resolution
|
|
67
|
-
|
|
68
|
-
Server commands resolve the target session in this order:
|
|
69
|
-
1. `CXTMS_AUTH` env var → PAT token auth (with `CXTMS_SERVER` or `app.yaml` server field)
|
|
70
|
-
2. `~/.cxtms/<project-dir>/.session.json` → project-scoped OAuth session
|
|
71
|
-
3. Not logged in → error
|
|
72
|
-
|
|
73
|
-
## Publish
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# Publish all modules and workflows from current project
|
|
77
|
-
npx cxtms publish
|
|
78
|
-
|
|
79
|
-
# Publish only a specific feature directory
|
|
80
|
-
npx cxtms publish --feature billing
|
|
81
|
-
npx cxtms publish billing
|
|
82
|
-
|
|
83
|
-
# Publish with explicit org ID
|
|
84
|
-
npx cxtms publish --org 42
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Validates all YAML files first, then pushes modules and workflows to the server. Skips files with validation errors and reports results.
|
|
88
|
-
|
|
89
|
-
## App Manifest Management
|
|
90
|
-
|
|
91
|
-
Server-side app manifest operations — install from git, release changes to git, and list installed apps.
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Install/refresh app from its git repository into the CX server
|
|
95
|
-
npx cxtms app install
|
|
96
|
-
|
|
97
|
-
# Force reinstall even if same version is already installed
|
|
98
|
-
npx cxtms app install --force
|
|
99
|
-
|
|
100
|
-
# Install from a specific branch
|
|
101
|
-
npx cxtms app install --branch develop
|
|
102
|
-
|
|
103
|
-
# Install but skip modules that have unpublished local changes
|
|
104
|
-
npx cxtms app install --skip-changed
|
|
105
|
-
|
|
106
|
-
# Release server changes to git (creates a PR) — message is required
|
|
107
|
-
npx cxtms app release -m "Add new shipping module"
|
|
108
|
-
|
|
109
|
-
# Force release all modules and workflows (not just changed ones)
|
|
110
|
-
npx cxtms app release -m "Full republish" --force
|
|
111
|
-
|
|
112
|
-
# List installed app manifests on the server
|
|
113
|
-
npx cxtms app list
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
**`app install`** reads `repository` and `branch` from `app.yaml`, downloads the repo on the server side, and installs/updates all modules and workflows. Use `--force` to reinstall even if the version hasn't changed. Use `--skip-changed` to preserve modules with unpublished changes.
|
|
117
|
-
|
|
118
|
-
**`app release`** takes the current server state and releases it to git by creating a PR. Requires a `-m` message describing the changes (like a git commit message). The server increments the version, creates a release branch, commits all module/workflow YAML files, and opens a pull request to the target branch.
|
|
119
|
-
|
|
120
|
-
**`app list`** shows all installed app manifests with their version, status flags (disabled, unpublished changes, update available), and repository info.
|