@syncmatters/script-api 1.0.1 → 1.0.3

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.
@@ -198,8 +198,9 @@ export interface QueryOptions {
198
198
  matchFilter?: QueryMatchFilter;
199
199
  /** collect records changed since a particular checkpoint */
200
200
  checkpointFilter?: QueryCheckpointFilter;
201
- /** row filter & property filter are system-specific and may support non-standard filters */
201
+ /** system specific row filters; allowed values are defined in meta.queryFilter.rowFilter */
202
202
  rowFilter?: any;
203
+ /** @deprecated (use standard fields filter) system specific property filters; allowed values are defined in meta.queryFilter.propertyFilter */
203
204
  propertyFilter?: any;
204
205
  }
205
206
  export type RowMatchRuleType = "id" /** match by source row id (key) */ | "name[ci]" /** match by destination row name (case senstive) */ | "email[ci]" /** match by destination row email (case insenstive) */ | "domain[ci]" /** match by destination domain (case insenstive) */ | "first_and_last_name[ci]" /** match by destination first and last name (case insenstive) */ | "field_value_equals[ci]"; /** match by value in user selected field (case insenstive) */
@@ -334,7 +335,9 @@ export interface ObjectMeta {
334
335
  isCustom?: boolean;
335
336
  queryFields?: ObjectField[];
336
337
  queryFilter?: {
338
+ /** system specific row filters; 'extends' marks where each may augment standard filters */
337
339
  rowFilter?: ObjectRowFilter[];
340
+ /** @deprecated superseded by the standard fields filter (queryOptions.fields) */
338
341
  propertyFilter?: ObjectField[];
339
342
  };
340
343
  queryFile?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/script-api",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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": {
@@ -16,7 +16,7 @@
16
16
  "license": "MIT",
17
17
  "author": "SyncMatters",
18
18
  "homepage": "https://syncmatters.com",
19
- "typesContentHash": "29fdd96780e4fe73c142677135c027e19732844e98498afdb5d6627bee7f23de",
19
+ "typesContentHash": "5577c9441eba47e953c86451ad8491f6ab1d10a4c135b1f76564fe222a63e6f5",
20
20
  "dependencies": {
21
21
  "@types/node": "*"
22
22
  }
@@ -138,6 +138,14 @@ export interface ObjectFeatures {
138
138
  cannotTestReason?: string;
139
139
  /** Can rows be added/updated? */
140
140
  canUpsert?: boolean;
141
+ /**
142
+ * Rows are created but never updated (e.g. sent messages, execution records - the API
143
+ * has no update and the connector throws NotImplimented for rows arriving with a key).
144
+ * The upsert test runs its insert + query-back phases and SKIPS the update phase,
145
+ * reporting "Passed (insert only)"; upsertPrepare then only needs insert + verifyFields.
146
+ * Use cannotTestReason instead when even CREATING rows is off-limits.
147
+ */
148
+ insertOnly?: boolean;
141
149
  key?: {
142
150
  /** Path to the key in upsert fields */
143
151
  path?: API.JsonValuePath;
@@ -228,7 +236,7 @@ export interface ObjectTestResult {
228
236
  matchFilterNotTestedReason?: string;
229
237
  matchFieldCount?: number;
230
238
  matchFilterResults?: MatchRuleTestResult[];
231
- upsert?: "Passed" | "Not tested" | "Not supported" | "Failed: 'Same as object' not tested" | "Failed: Feature has no test spec" | "Failed: Fatal error during testing" | "Failed: Test spec does not define key field" | "Failed: No test data for insert" | "Failed: No test data for update" | "Failed: No verifyField included with test data" | "Failed: query after insert did not return expected rows" | "Failed: No key path to test update" | "Failed: update returned unexpected row" | "Failed: verifyField value on the upsert row was blank" | "Failed: verifyField value on the queried row does not match the upsert value";
239
+ upsert?: "Passed" | "Passed (insert only)" | "Not tested" | "Not supported" | "Failed: 'Same as object' not tested" | "Failed: Feature has no test spec" | "Failed: Fatal error during testing" | "Failed: Test spec does not define key field" | "Failed: No test data for insert" | "Failed: No test data for update" | "Failed: No verifyField included with test data" | "Failed: query after insert did not return expected rows" | "Failed: No key path to test update" | "Failed: update returned unexpected row" | "Failed: verifyField value on the upsert row was blank" | "Failed: verifyField value on the queried row does not match the upsert value";
232
240
  upsertNotTestedSameAsObjectId?: string;
233
241
  upsertNotTestedReason?: string;
234
242
  upsertFatalError?: CaughtError;