@syncmatters/script-api 1.0.16 → 1.0.18

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,8 +18,7 @@ export interface Connection {
18
18
  [id: string]: () => Promise<EventTypeMeta>;
19
19
  };
20
20
  discovery?(): Promise<DiscoverResult | undefined>;
21
- /** Metadata refresh and discovery times recorded as connection state (`{ objects: {} }` when none recorded). */
22
- readonly state: MetaState;
21
+ state(): Promise<MetaState>;
23
22
  };
24
23
  query: {
25
24
  [id: string]: (options?: QueryOptions) => QueryIterator<Row>;
@@ -403,7 +402,7 @@ export interface DiscoverResult {
403
402
  settingsMeta?: Record<string, Partial<ObjectSettingMeta>>;
404
403
  /** every object the connector could describe, without field detail */
405
404
  objects: DiscoveredObject[];
406
- /** connector-private; echoed back as MetaOptions.discovery.data */
405
+ /** connector-private; returned to the connector by MetaOptions.discovery() */
407
406
  data?: unknown;
408
407
  }
409
408
  /** MetaStateObject holds the refresh state of one selected object. */
@@ -26,7 +26,9 @@ export declare enum ErrorCode {
26
26
  ColumnNotFound = "SCRIPT_COLUMN_NOT_FOUND",
27
27
  UnexpectedRowCount = "SCRIPT_UNEXPECTED_ROW_COUNT",
28
28
  UnexpectedRowId = "SCRIPT_UNEXPECTED_ROW_ID",
29
- KvStoreShadowMismatch = "SCRIPT_KV_STORE_SHADOW_MISMATCH"
29
+ KvStoreShadowMismatch = "SCRIPT_KV_STORE_SHADOW_MISMATCH",
30
+ /** the token that started the run does not hold a scope the operation needs */
31
+ MissingScope = "SCRIPT_MISSING_SCOPE"
30
32
  }
31
33
  /**
32
34
  * ConnectorError extends error to expose a meaningful error code e.g.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/script-api",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "TypeScript type definitions for the SyncMatters script API (types only - scripts execute on the SyncMatters platform)",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "author": "SyncMatters",
30
30
  "homepage": "https://syncmatters.com",
31
- "typesContentHash": "ded988637cd580ceb7908990a4b80426f350619a0a067f24f49b9ccf3fc51967",
31
+ "typesContentHash": "880590dffe9b93eb5e71e130baabce5cc64b79f2376389a7e1f09d5663e5420e",
32
32
  "dependencies": {
33
33
  "@types/node": "*"
34
34
  }