@syncmatters/connector-sdk 1.0.23 → 1.0.24

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.
@@ -18,6 +18,14 @@ this.#http = SDK.utilities.httpClient({
18
18
  `rateLimiter` types: `{ type: "rolling", count, ms }` (N requests per window) and
19
19
  `{ type: "concurrent", count }` (N in flight). Set them from the API's documented limits.
20
20
 
21
+ Thrown error messages have the values of sensitive keys (`password`, `api_key`, `client_secret`,
22
+ `token`, ...) replaced with `***` in the URL, the request body and the response text; keys match
23
+ case-insensitively and ignore `_`/`-`. Pass `redactKeys: { url?: string[], body?: string[] }` to
24
+ replace either default set (`SDK.defaultRedactKeys`), e.g.
25
+ `redactKeys: { body: [...SDK.defaultRedactKeys.body, "ssn"] }`. `SDK.utilities.redact()` gives the
26
+ same `redactUrl` / `redactJSON` / `redactText` helpers for anything the connector logs itself.
27
+ `err.responseBodyString` is never redacted, so parse the raw response from there.
28
+
21
29
  When a window limiter alone is not enough (some APIs also punish burst concurrency), compose
22
30
  two limiters:
23
31
 
package/module.d.ts CHANGED
@@ -2,8 +2,8 @@
2
2
  * Connector SDK (SDK) is a fusion of elements from the script API and
3
3
  * SDK specific elements that would be of no interest to users of the API.
4
4
  */
5
- export { EventScriptComplete } from "@syncmatters/script-api";
6
- export type { Cache, FileProvider, HttpRequest, HttpClientOptions, KvCollection, KvIterator, Logger, EventContext, TestResult, Row, ObjectMeta, ObjectField, ObjectFieldOption, RateLimiterOptions, ScriptType, JsonValuePath, JsonValuePathPart, QueryMatchFilter, QueryCheckpointFilter, EventTypeMeta, ObjectIndex, ObjectMetaUpsert, ObjectRowFilter, ObjectRelationship, ObjectFieldConstraints, ObjectSettingMeta, ObjectUnavailableReason, DiscoverResult, DiscoveredObject, MetaState, MetaStateObject, UpsertIssue, UpsertFieldOptionMeta, RowMatchRuleType, RowMatchData, RowMatchRuleOrder, SyncSession, SyncOptimalBatchSizeOperation, SyncOptimalBatchSizeBatchType, } from "@syncmatters/script-api";
5
+ export { EventScriptComplete, defaultRedactKeys } from "@syncmatters/script-api";
6
+ export type { Cache, FileProvider, HttpRequest, HttpClientOptions, Redactor, RedactorOptions, KvCollection, KvIterator, Logger, EventContext, TestResult, Row, ObjectMeta, ObjectField, ObjectFieldOption, RateLimiterOptions, ScriptType, JsonValuePath, JsonValuePathPart, QueryMatchFilter, QueryCheckpointFilter, EventTypeMeta, ObjectIndex, ObjectMetaUpsert, ObjectRowFilter, ObjectRelationship, ObjectFieldConstraints, ObjectSettingMeta, ObjectUnavailableReason, DiscoverResult, DiscoveredObject, MetaState, MetaStateObject, UpsertIssue, UpsertFieldOptionMeta, RowMatchRuleType, RowMatchData, RowMatchRuleOrder, SyncSession, SyncOptimalBatchSizeOperation, SyncOptimalBatchSizeBatchType, } from "@syncmatters/script-api";
7
7
  export * from "./lib/connector.js";
8
8
  export * from "./lib/connector-error.js";
9
9
  export { envSet } from "./lib/environment.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/connector-sdk",
3
- "version": "1.0.23",
3
+ "version": "1.0.24",
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": "e95f9d6b630e71d88bbe6141c111d148e0024e2e77b094d06f9874fc8de4a89f",
15
+ "typesContentHash": "9c37c3774bbf7d5f07ec3f990cf261ac44e14bc8ac8787c2e5b714be321264e0",
16
16
  "dependencies": {
17
17
  "@types/node": "*",
18
- "@syncmatters/script-api": "^1.0.25"
18
+ "@syncmatters/script-api": "^1.0.26"
19
19
  }
20
20
  }