@syncmatters/connector-sdk 1.0.35 → 1.0.37

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.
@@ -156,6 +156,13 @@ How to choose the value:
156
156
  terms, tax codes, categories, statuses, GL accounts). They are not `unknown`.
157
157
  - **Two objects may share an entity.** Customers and vendors in separate objects are
158
158
  `company.customer` and `company.vendor`; that is what the sub-type is for.
159
+ - **A few sub-types are companions, not kinds of the record.** `deal.forecast` (the revenue forecast
160
+ of an opportunity) and `job_requisition.posting` (a job-board posting of a requisition) are
161
+ different records tied to the main one, each with its own id. Declare the companion on those
162
+ objects and keep the bare entity or a kind sub-type for the object that is the record itself.
163
+ A companion's fields are typed as the entity's, but the platform never picks a companion object
164
+ as the record for the entity (for example when it resolves a `deal` reference through another
165
+ sync). Which sub-types are companions is platform knowledge; you declare only the value.
159
166
 
160
167
  **When `"unknown"` is the right declaration.** `unknown` is a real answer, not a placeholder. Use
161
168
  it when no entity describes a row:
@@ -208,6 +215,7 @@ show its **Type** as "declared by connector". "Detected from the name" marks an
208
215
  | `isKey: true` | this field is the row's unique id — its value becomes `row.meta.key`. Assign this (or `isUserKey`) to exactly one `queryFields`, plus one `upsertFields`, plus one `deleteFields` |
209
216
  | `isUserKey: true` | user-supplied natural key that can both add and update — see below |
210
217
  | `isAlternateKey: true` | scalar `queryFields` field holding a unique value the connector can resolve rows by (`queryOptions.idsFilterField`) — a COMMITMENT to honor that filter, see [05-query.md](./05-query.md) |
218
+ | `isElementKey: true` | on a field declared directly in an array's `arrayObjectFields`: the field holds each element's unique id (e.g. an order line `id`), required for update operations on existing elements. At most one per array; a nested array carries its own. Rejected anywhere else |
211
219
  | `canMatch: true` | field may be referenced by match rules (set on id/name/email-like fields; apply recursively into nested object fields where meaningful) |
212
220
  | `optionValues` | picklist options `[{ id, name?, group? }]` |
213
221
  | `canUpdateOptions: true` | new picklist options may be added via `upsertFieldOptions()` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/connector-sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "TypeScript type definitions for the SyncMatters connector SDK (types only - connectors execute on the SyncMatters platform)",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -12,9 +12,9 @@
12
12
  "license": "MIT",
13
13
  "author": "SyncMatters",
14
14
  "homepage": "https://syncmatters.com",
15
- "typesContentHash": "ca51dea3f49e69e304b4ee2d2d9e68d46e2bfb60243e5121077f83c1a6bb59df",
15
+ "typesContentHash": "cba3a175140a1619417a118311c149e51e0d03f6247605343c970823f6f9b26b",
16
16
  "dependencies": {
17
17
  "@types/node": "*",
18
- "@syncmatters/script-api": "^1.0.37"
18
+ "@syncmatters/script-api": "^1.0.40"
19
19
  }
20
20
  }