@syncmatters/connector-sdk 1.0.30 → 1.0.32
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.
|
@@ -231,8 +231,9 @@ sets `delete`.
|
|
|
231
231
|
|
|
232
232
|
## Connector overrides
|
|
233
233
|
|
|
234
|
-
A
|
|
235
|
-
an on-premise edition) without copying the code. The variant is a
|
|
234
|
+
A variant of an existing connector (its own OAuth app, a sandbox with other URLs and credentials,
|
|
235
|
+
different defaults, an on-premise edition) is made without copying the code. The variant is a
|
|
236
|
+
`connector_overrides` file:
|
|
236
237
|
`files/Connectors/<Name>/<Name>.json` (contents `{}`) with a connector sidecar whose
|
|
237
238
|
`connector_metadata` is **sparse** and names the source bundle. The CLI writes the pair with
|
|
238
239
|
`sm connector overrides init <Name> --source <connector>`; `sm files push` creates it, and
|
|
@@ -249,7 +250,7 @@ publishing happens in the web UI as for any connector.
|
|
|
249
250
|
"agent_mode": "always",
|
|
250
251
|
"default_objects": ["Contacts", "Companies"],
|
|
251
252
|
"settings": {
|
|
252
|
-
"
|
|
253
|
+
"event_types_include": { "default": { "type": "string", "expression": "deal,contact.creation" } },
|
|
253
254
|
"url": { "hidden": true, "default": { "type": "string", "expression": "https://..." } }
|
|
254
255
|
}
|
|
255
256
|
}
|
|
@@ -263,7 +264,11 @@ per setting id and, inside a setting, per attribute; arrays (`default_objects`,
|
|
|
263
264
|
`defines_version`, `prerequisite`, `affects_meta`) cannot be overridden, a child may only touch
|
|
264
265
|
settings the source declares, and the source must be a published, non-deprecated connector that
|
|
265
266
|
is not itself derived (one level only). A source sidecar may opt out with `"overrides": false`
|
|
266
|
-
beside `connector_metadata`.
|
|
267
|
+
beside `connector_metadata`. A child never inherits a secret: the source's OAuth client id and
|
|
268
|
+
secret and the default of every secret setting are dropped from the merged view, so a child whose
|
|
269
|
+
`oauth2_mode` is `"connector"` carries its own `client_id` and `client_secret` (publishing is
|
|
270
|
+
refused without them) and sets its own value for any secret setting it needs. The child's own
|
|
271
|
+
secrets round-trip as for any connector: after the first push the
|
|
267
272
|
platform withholds `client_secret` and a secret setting's default, and pushing the sidecar back
|
|
268
273
|
without them keeps the stored values. `sm pull` returns the sparse document, never the merged one;
|
|
269
274
|
`sm connector overrides show <Name>` prints the merged view with each key tagged inherited or
|
|
@@ -272,8 +277,18 @@ need the source).
|
|
|
272
277
|
|
|
273
278
|
The connector code is unchanged and never sees the difference: `args.connectorMetadata`, the
|
|
274
279
|
settings form, `discover()` pre-selection (`default_objects`) and the OAuth token all come from the
|
|
275
|
-
merged document at run time.
|
|
276
|
-
|
|
280
|
+
merged document at run time. Each time the source is published the child picks up the new code and
|
|
281
|
+
settings with no publish of its own; an override for a setting the source has since removed is
|
|
282
|
+
ignored and reported as a warning on the file. Publish the child only after changing its overrides.
|
|
283
|
+
|
|
284
|
+
In the account that owns it, a child can be used before it is published: it is offered in the
|
|
285
|
+
connection picker beside the account's other unpublished connectors, and a connection made that way
|
|
286
|
+
runs the source's latest published code with the child's current overrides. A connector test runs
|
|
287
|
+
on such a connection from the web UI, with test modules taken from the child's own folder. The CLI's
|
|
288
|
+
`sm connector test` and `sm connector features` take a connector file, not a child: point them at
|
|
289
|
+
the source. Feature generation belongs to the source in the web UI too. Field types are shared with
|
|
290
|
+
the source: classifying them through the child's connection fills the source's catalog, when the
|
|
291
|
+
source is published from the same account.
|
|
277
292
|
|
|
278
293
|
## Do not edit
|
|
279
294
|
|
|
@@ -148,7 +148,10 @@ Also available: `oauth2Provider.scope` (granted scopes — normalize with
|
|
|
148
148
|
|
|
149
149
|
`oauth2_mode` in the sidecar decides who owns the OAuth app: `"connector"` (one shared app) or
|
|
150
150
|
`"connection"` (each connection brings its own client id/secret) — see
|
|
151
|
-
[01-workspace-and-meta-json.md](./01-workspace-and-meta-json.md).
|
|
151
|
+
[01-workspace-and-meta-json.md](./01-workspace-and-meta-json.md). In `"connector"` mode the client
|
|
152
|
+
id and secret may be those of a derived connector (a
|
|
153
|
+
[connector overrides](./01-workspace-and-meta-json.md#connector-overrides) file) rather than this
|
|
154
|
+
sidecar's; the code sees no difference.
|
|
152
155
|
|
|
153
156
|
### Self-managed auth (when the managed OAuth2 provider doesn't fit)
|
|
154
157
|
|
|
@@ -142,7 +142,7 @@ same as "no list support". See [the query capability bar](#the-query-capability-
|
|
|
142
142
|
| `objectFields` | child fields when `type: "object"` |
|
|
143
143
|
| `arrayType` / `arrayObjectFields` | element type / element fields when `type: "array"` |
|
|
144
144
|
| `constraints` | validation: `mandatory` (`"always"` · `"add"` · `"update"`; array children only when parent array is non-empty), `max/min/maxLen/minLen`, `regex`, `email`, `integer`, `decimals`, `trim`, `dt: { format: "iso8601", "unix", ... }` |
|
|
145
|
-
| `isCustom` | account-specific
|
|
145
|
+
| `isCustom` | the field, and everything below it, is account-specific: a field the account created, or a vendor field with no meaning of its own that only holds an attribute each account defines (a user-defined-value slot, a generic custom-field array, `Custom1..N`). Put it on the container, not only on its leaves. A tenant-defined picklist or a notes field is not custom: the vendor defines what it holds. See below |
|
|
146
146
|
| `data` | connector-private payload, echoed back in metadata |
|
|
147
147
|
|
|
148
148
|
### `isKey` vs `isUserKey`
|
|
@@ -173,6 +173,23 @@ upsertFields.unshift({
|
|
|
173
173
|
});
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
+
### `isCustom`: what counts as custom
|
|
177
|
+
|
|
178
|
+
The test is whether the vendor gives the field a meaning of its own. Custom (`isCustom: true`):
|
|
179
|
+
|
|
180
|
+
- fields the account created (Salesforce `__c`, NetSuite `custentity*`, HubSpot portal properties);
|
|
181
|
+
- vendor fields that are only a slot for an attribute each account defines: user-defined-value
|
|
182
|
+
blocks (Rent Manager `UserDefinedValues`, `PreferredUnitUserDefinedValues`), generic
|
|
183
|
+
custom-field arrays (QuickBooks `CustomField`, Greenhouse `custom_fields`), numbered
|
|
184
|
+
`Custom1..N` fields.
|
|
185
|
+
|
|
186
|
+
Not custom: a vendor field whose picklist options or free text vary per account (a status, a
|
|
187
|
+
notes field). The vendor defines what it holds; only the values differ.
|
|
188
|
+
|
|
189
|
+
Set the flag on the container (the object or array field), so tools that walk the tree skip
|
|
190
|
+
everything below it. The field-type corpus extractor leaves custom fields out of the training
|
|
191
|
+
data, and the fields table badges them; auto-map does not read the flag today (2026-11-15).
|
|
192
|
+
|
|
176
193
|
### Match rules
|
|
177
194
|
|
|
178
195
|
`matchRules` values: `"id"`, `"name[ci]"`, `"email[ci]"`, `"domain[ci]"`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/connector-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.32",
|
|
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": "
|
|
15
|
+
"typesContentHash": "8f33da0577fafd35ce34e6334b774a5a2ce75365411fc731cacedae9bf822e87",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/node": "*",
|
|
18
|
-
"@syncmatters/script-api": "^1.0.
|
|
18
|
+
"@syncmatters/script-api": "^1.0.36"
|
|
19
19
|
}
|
|
20
20
|
}
|