@cxtms/cx-schema 1.9.10 → 1.9.11

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.10",
3
+ "version": "1.9.11",
4
4
  "description": "Schema validation package for CargoXplorer YAML modules",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -73,7 +73,9 @@ PK: `id` (int, auto). Scoped per organization.
73
73
  | `placeName` | `string` | Place/city name |
74
74
  | `stateCode` | `string?` | FK to State |
75
75
  | `accuracy` | `AccuracyTypes?` | 1=Region, 2=Municipality, 3=Neighborhood, 4=Place, 5=Street, 6=Centroid |
76
- | `timeZone` | `string?` | IANA timezone ID (e.g., `America/Chicago`) |
76
+ | `timeZone` | `string?` | IANA timezone ID (e.g., `America/Chicago`). GraphQL auto-resolves from GPS coordinates when not stored |
77
+ | `longitude` | `double?` | From Location.X (GraphQL computed) |
78
+ | `latitude` | `double?` | From Location.Y (GraphQL computed) |
77
79
  | `customValues` | `Dictionary` | jsonb |
78
80
  | `location` | `Point?` | WGS 84 (SRID 4326). X=longitude, Y=latitude |
79
81
 
@@ -214,6 +214,8 @@ collection: "Activity?.Step?.output?.items?"
214
214
  url: "{{ config?.baseUrl? }}"
215
215
  ```
216
216
 
217
+ **Engine-level null safety for object inputs**: Task inputs resolved as complex objects (e.g., `headers`, `columnMappings`, configuration objects) are automatically null-safe at the engine level. If an optional object input is omitted from YAML, the engine returns `null` instead of throwing — no `?` suffix needed on the YAML key itself. The `?` operator is still required in template expressions and NCalc paths that reference those objects.
218
+
217
219
  **When `?` is NOT needed** (guaranteed system variables):
218
220
  `organizationId`, `currentUserId`, `executionId`, `workflowId`, `triggerType`, `eventType`, `position`, `entityName`, `entityId`, `entity`, `entity.*`, `data`, `changes`, `inputs.*`, `exception.message`, `item` (foreach current), `item.*`, `index`, `iteration`
219
221
 
@@ -147,6 +147,8 @@ Used in `collection:` (foreach), `mapping:` (outputs), and variable resolution.
147
147
  |---------|-------------|---------|
148
148
  | `a.b.c` | Dot-separated nested path | `order.customer.name` |
149
149
  | `prop?` | Optional access (null if missing) | `order.customer?.name?` |
150
+
151
+ > **Note**: Object-type task inputs (e.g., `headers`, `columnMappings`) are automatically null-safe at the engine level. Omitting an optional object input from YAML returns `null` without errors. The `?` suffix remains required in template expression paths and NCalc conditions.
150
152
  | `list[0]` | Array index | `items[0]` |
151
153
  | `list[^1]` | Index from end (last item) | `items[^1]` |
152
154
  | `list[*]` | Flatten/wildcard (all items) | `containers[*].commodities` |