@cxtms/cx-schema 1.9.253 → 1.9.255

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cxtms/cx-schema",
3
- "version": "1.9.253",
3
+ "version": "1.9.255",
4
4
  "description": "Schema validation package for CXTMS YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "Transmission Tasks",
4
- "description": "Create, update, and delete transmission records linked to orders",
4
+ "description": "Create, update, and delete transmission records linked to orders or addressed to contacts",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "task": {
@@ -55,7 +55,11 @@
55
55
  "orderIds": {
56
56
  "type": ["array", "string"],
57
57
  "items": { "type": ["integer", "string"] },
58
- "description": "Order IDs to link (required for Create, at least one)"
58
+ "description": "Optional order IDs to link"
59
+ },
60
+ "contactId": {
61
+ "type": ["integer", "string", "null"],
62
+ "description": "Partner contact used for delivery and channel defaults"
59
63
  },
60
64
  "channel": {
61
65
  "type": "string",
@@ -145,7 +149,31 @@
145
149
  },
146
150
  "payloadRef": {
147
151
  "type": ["string", "null"],
148
- "description": "Reference to stored payload (e.g. blob URI)"
152
+ "description": "Reference to a stored payload; mutually exclusive with payload"
153
+ },
154
+ "payload": {
155
+ "description": "JSON, text, or binary/base64 payload uploaded to storage"
156
+ },
157
+ "payloadContentType": {
158
+ "type": ["string", "null"],
159
+ "description": "Content type override for payload"
160
+ },
161
+ "attachments": {
162
+ "type": ["array", "string", "null"],
163
+ "description": "Attachment inputs; each uses exactly one source",
164
+ "items": {
165
+ "type": "object",
166
+ "properties": {
167
+ "attachmentId": { "type": ["integer", "string", "null"] },
168
+ "attachmentGuid": { "type": ["string", "null"], "format": "uuid" },
169
+ "url": { "type": ["string", "null"] },
170
+ "data": { "description": "Raw bytes or base64 data" },
171
+ "fileName": { "type": ["string", "null"] },
172
+ "contentType": { "type": ["string", "null"] },
173
+ "metadata": { "type": ["object", "string", "null"] }
174
+ },
175
+ "additionalProperties": false
176
+ }
149
177
  },
150
178
  "scheduledAt": {
151
179
  "type": ["string", "null"],
@@ -11,9 +11,30 @@
11
11
  - PackageType
12
12
  - NoteThread
13
13
  - Note
14
+ - OrganizationConnection
14
15
 
15
16
  EntityField, Tag, Attachment, Division, EquipmentType, Equipment, EquipmentStatus, PackageType, Note/NoteThread.
16
17
 
18
+ ## OrganizationConnection
19
+
20
+ Application-defined link between two regular organizations. The owner organization is distinct from the two endpoints and is the tenant in which entity workflows run.
21
+
22
+ | Field | Type | Notes |
23
+ |-------|------|-------|
24
+ | `organizationConnectionId` | `int` | PK |
25
+ | `organizationId` | `int` | Owner/workflow tenant |
26
+ | `sourceOrganizationId` | `int` | First endpoint; must be a regular organization |
27
+ | `targetOrganizationId` | `int` | Second endpoint; must be a different regular organization |
28
+ | `connectionType` | `string` | Required, application-defined, max 50 characters |
29
+ | `isEnabled` | `bool` | Defaults to true |
30
+ | `ediRoutingId` | `string?` | Reserved EDI routing ID, max 15 characters |
31
+
32
+ **GraphQL:** `organizationConnections(organizationId, filter, search, orderBy)` returns connections where the requested organization is either endpoint. System-admin-only mutations are `linkOrganizations(organizationId, sourceOrganizationId, targetOrganizationId, connectionType)` and `unlinkOrganizations(organizationConnectionId)`. A pair/type combination is unique regardless of endpoint order.
33
+
34
+ **Entity workflows:** `OrganizationConnection` supports `Added`, `Modified`, and `Deleted` at `Before` and `After` positions in the owner organization. Use `Before Deleted` to veto unlinking when application rules require it.
35
+
36
+ ---
37
+
17
38
  ## EntityField
18
39
 
19
40
  App-module field metadata used by grids, forms, filters, and entity extensions.
@@ -359,6 +359,8 @@ Polymorphic form field — renders different input types based on `type` prop.
359
359
 
360
360
  Password fields receive a stable input id from the field name unless an explicit `id` is provided. This keeps multiple password fields in the same form isolated for browser autocomplete. Use `autoComplete` when a form needs a specific password-manager hint.
361
361
 
362
+ For `type: select`, the web renderer forwards the parsed `disabled` value to the underlying select control, so both booleans and template expressions prevent opening or changing the selection.
363
+
362
364
  **Field Types:**
363
365
  | Type | Description |
364
366
  |------|-------------|
@@ -479,11 +479,11 @@ Output `result`: `{ added, updated, skipped, failed, total, errors[] }`.
479
479
 
480
480
  | Task | Description |
481
481
  |------|-------------|
482
- | `Transmission/Create` | Create transmission record linked to orders |
482
+ | `Transmission/Create` | Create a transmission, optionally linked to orders or addressed to a contact |
483
483
  | `Transmission/Update` | Update transmission fields (dynamic) |
484
484
  | `Transmission/Delete` | Delete transmission record |
485
485
 
486
- Records inbound/outbound message transmissions (EDI, API, Email, Webhook) linked to orders.
486
+ Records inbound/outbound message transmissions (EDI, API, Email, Webhook). Contact-addressed outbound records can carry stored payloads and attachments and are queued for delivery.
487
487
 
488
488
  ```yaml
489
489
  - task: "Transmission/Create@1"
@@ -492,14 +492,10 @@ Records inbound/outbound message transmissions (EDI, API, Email, Webhook) linked
492
492
  organizationId: "{{ int organizationId }}"
493
493
  transmission:
494
494
  orderIds: "{{ orderIds }}"
495
- channel: "EDI"
496
- direction: "Outbound"
495
+ contactId: "{{ int partnerContactId }}"
497
496
  messageType: "214"
498
- sender: "{{ senderISA }}"
499
- receiver: "{{ receiverISA }}"
500
- status: "Pending"
501
- endpoint: "{{ endpoint }}"
502
- protocol: "SFTP"
497
+ payload: "{{ orderPayload }}"
498
+ payloadContentType: "application/json"
503
499
  outputs:
504
500
  - name: transmission
505
501
  mapping: "transmission"
@@ -527,12 +523,14 @@ Records inbound/outbound message transmissions (EDI, API, Email, Webhook) linked
527
523
  mapping: "success"
528
524
  ```
529
525
 
530
- **Create inputs:** `organizationId` (int, required), `transmission` object — `orderIds` (required, at least one), `channel`, `direction` (Inbound/Outbound), `messageType`, `sender`, `receiver`, `status`, `endpoint`, `protocol`, `correlationId` (auto-generated if omitted), `parentId`, `httpStatus`, `byteSize`, `retryCount`, `maxRetries`, `nextRetryAt`, `errorCode`, `errorMessage`, `customValues`, `headers`, `payloadRef`, `scheduledAt`, `startedAt`, `completedAt`, `durationMs`.
526
+ **Create inputs:** `organizationId` (int, required), `transmission` object — optional `orderIds`; `contactId`; `channel` (required without `contactId`); `direction` (Inbound/Outbound, defaults to Outbound); `messageType`, `sender`, `receiver`, `status`, `endpoint`, `protocol`, `correlationId` (auto-generated if omitted), `parentId`, `httpStatus`, `byteSize`, `retryCount`, `maxRetries`, `nextRetryAt`, `errorCode`, `errorMessage`, `customValues`, `headers`, `payloadRef`, `payload`, `payloadContentType`, `attachments`, `scheduledAt`, `startedAt`, `completedAt`, `durationMs`. `payload` and `payloadRef` are mutually exclusive. Each attachment uses exactly one of `attachmentId`, `attachmentGuid`, `url`, or `data`; URL/data entries require `fileName`.
531
527
 
532
528
  **Create outputs:** `transmission` (full TransmissionDto).
533
529
  **Update inputs:** `organizationId`, `transmissionId`, `transmission` (dynamic partial fields).
534
530
  **Delete outputs:** `success` (boolean).
535
531
 
532
+ Contact-addressed transmissions with a supported transport are queued through the outbox. Transmission entity triggers expose decoded `entity.payload` (within the server preload limit) and `entity.attachments` with download URLs.
533
+
536
534
  **Status enum:** Pending, InProgress, Sent, Received, Delivered, Acknowledged, Rejected, Error, RetryScheduled, Cancelled, Expired, Accepted.
537
535
 
538
536
  ## Accounting Transaction (Additional)