@syncmatters/connector-sdk 1.0.29 → 1.0.30
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.
|
@@ -69,7 +69,7 @@ await this.#core.init(args);
|
|
|
69
69
|
| Field | Values / meaning |
|
|
70
70
|
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
71
71
|
| `name` | the file name, e.g. `"Acme.mjs"` |
|
|
72
|
-
| `type` | `"connector"` (entry) · `"module"` · `"connectortest"` · `"json"` · `"yaml"` · `"markdown"` (help docs shipped beside the connector, e.g. `Connectors/<Name>/help/index.md` — see [17-user-help-pages.md](./17-user-help-pages.md); never a module, never staged at runtime) |
|
|
72
|
+
| `type` | `"connector"` (entry) · `"module"` · `"connectortest"` · `"json"` · `"yaml"` · `"markdown"` (help docs shipped beside the connector, e.g. `Connectors/<Name>/help/index.md` — see [17-user-help-pages.md](./17-user-help-pages.md); never a module, never staged at runtime) · `"connector_overrides"` (a derived connector; see [Connector overrides](#connector-overrides) below) |
|
|
73
73
|
| `runnable` | `false` for connector files (they are invoked by the platform, not run directly) |
|
|
74
74
|
| `engine` | runtime engine version int; leave as scaffolded unless told otherwise |
|
|
75
75
|
| `resource_size` | `""` or `"medium"` — runtime resource class hint |
|
|
@@ -229,6 +229,52 @@ Delete and Full columns) and optional `read_mandatory`/`write_mandatory`/`delete
|
|
|
229
229
|
(`"write": "acme:create acme:update"`), never commas. The Delete column only shows when some item
|
|
230
230
|
sets `delete`.
|
|
231
231
|
|
|
232
|
+
## Connector overrides
|
|
233
|
+
|
|
234
|
+
A partner can publish a variant of an existing connector (its own OAuth app, different defaults,
|
|
235
|
+
an on-premise edition) without copying the code. The variant is a `connector_overrides` file:
|
|
236
|
+
`files/Connectors/<Name>/<Name>.json` (contents `{}`) with a connector sidecar whose
|
|
237
|
+
`connector_metadata` is **sparse** and names the source bundle. The CLI writes the pair with
|
|
238
|
+
`sm connector overrides init <Name> --source <connector>`; `sm files push` creates it, and
|
|
239
|
+
publishing happens in the web UI as for any connector.
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"type": "connector_overrides",
|
|
244
|
+
"connector_metadata": {
|
|
245
|
+
"source_bundle_unique_id": "<unique id of the source bundle>",
|
|
246
|
+
"connector_name": "HubSpot for Acme",
|
|
247
|
+
"application_name": "for Acme",
|
|
248
|
+
"oauth2_provider": { "client_id": "...", "client_secret": "..." },
|
|
249
|
+
"agent_mode": "always",
|
|
250
|
+
"default_objects": ["Contacts", "Companies"],
|
|
251
|
+
"settings": {
|
|
252
|
+
"event_types_exclude": { "default": { "type": "string", "expression": "acme" } },
|
|
253
|
+
"url": { "hidden": true, "default": { "type": "string", "expression": "https://..." } }
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
Merge rules: a key present overrides the source, absent inherits, `null` clears; `settings` merge
|
|
260
|
+
per setting id and, inside a setting, per attribute; arrays (`default_objects`, `scope_groups`,
|
|
261
|
+
`categories`) replace whole. A setting's contract with the code (`type`, `control`, `options`,
|
|
262
|
+
`template`, `secret`, `readonly`, `staticonly`, `connector_managed`, `mandatory`,
|
|
263
|
+
`defines_version`, `prerequisite`, `affects_meta`) cannot be overridden, a child may only touch
|
|
264
|
+
settings the source declares, and the source must be a published, non-deprecated connector that
|
|
265
|
+
is not itself derived (one level only). A source sidecar may opt out with `"overrides": false`
|
|
266
|
+
beside `connector_metadata`. Secrets round-trip as for any connector: after the first push the
|
|
267
|
+
platform withholds `client_secret` and a secret setting's default, and pushing the sidecar back
|
|
268
|
+
without them keeps the stored values. `sm pull` returns the sparse document, never the merged one;
|
|
269
|
+
`sm connector overrides show <Name>` prints the merged view with each key tagged inherited or
|
|
270
|
+
overridden, and `sm validate` applies the rules above locally (`--offline` skips the checks that
|
|
271
|
+
need the source).
|
|
272
|
+
|
|
273
|
+
The connector code is unchanged and never sees the difference: `args.connectorMetadata`, the
|
|
274
|
+
settings form, `discover()` pre-selection (`default_objects`) and the OAuth token all come from the
|
|
275
|
+
merged document at run time. `sm connector features` and `sm connector test` run against the
|
|
276
|
+
source's code; point them at the source when iterating on a child.
|
|
277
|
+
|
|
232
278
|
## Do not edit
|
|
233
279
|
|
|
234
280
|
- `.sm/` (CLI state), and the CLI-generated `package.json` / `jsconfig.json` / `AGENTS.md`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/connector-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.30",
|
|
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,7 +12,7 @@
|
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"author": "SyncMatters",
|
|
14
14
|
"homepage": "https://syncmatters.com",
|
|
15
|
-
"typesContentHash": "
|
|
15
|
+
"typesContentHash": "8e29e77372018ca6bc5853cc65cab70f96df520839150d3a5f3365a2e7c995ed",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@types/node": "*",
|
|
18
18
|
"@syncmatters/script-api": "^1.0.33"
|