@syncmatters/connector-sdk 1.0.36 → 1.0.38

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.
@@ -49,6 +49,7 @@ the `SDK.Connector` interface — always the first line of `init()`.
49
49
  | `settings` | `Map<string, any>` | the connection's configured settings (`settings.get("api_key")`) |
50
50
  | `oauth2Provider?` | `OAuth2TokenProvider` | present when the connection has a managed OAuth2 token — see [03](./03-http-auth-ratelimit.md) |
51
51
  | `webhookUrl?` / `webhookUid?` | `string` | this connection's webhook endpoint / its unique id — see [07](./07-events-webhooks.md) |
52
+ | `agent` | `boolean` | true when the connector code runs on an on-premise agent PC |
52
53
 
53
54
  `init()` should: validate required settings (throw
54
55
  `SDK.ConnectorError(SDK.ErrorCode.InvalidOptionValue, ...)` naming the missing setting), stash
@@ -215,6 +215,7 @@ show its **Type** as "declared by connector". "Detected from the name" marks an
215
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` |
216
216
  | `isUserKey: true` | user-supplied natural key that can both add and update — see below |
217
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 |
218
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) |
219
220
  | `optionValues` | picklist options `[{ id, name?, group? }]` |
220
221
  | `canUpdateOptions: true` | new picklist options may be added via `upsertFieldOptions()` |
@@ -26,6 +26,8 @@ export interface InitArgs {
26
26
  readonly settings: Map<string, any>;
27
27
  /** if the connection has a managed OAuth2 token this provider will grant access to the access token */
28
28
  oauth2Provider?: OAuth2TokenProvider;
29
+ /** true when the connector code runs on an on-premise agent PC */
30
+ readonly agent: boolean;
29
31
  }
30
32
  /**
31
33
  * Connector represents a connection to a system, exposing meta data and data.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/connector-sdk",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
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": "3d73ad11d72941a3c267c95a31a22061cb03cc2f66548112063e9907845af733",
15
+ "typesContentHash": "dd77e6f22f4b8cea271cccc6ec602fe6edd92dc2bff88959fa3355436ee5c6c2",
16
16
  "dependencies": {
17
17
  "@types/node": "*",
18
- "@syncmatters/script-api": "^1.0.38"
18
+ "@syncmatters/script-api": "^1.0.42"
19
19
  }
20
20
  }