@syncmatters/script-api 1.0.8 → 1.0.9
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.
- package/lib/connection.d.ts +8 -1
- package/lib/sync.d.ts +6 -1
- package/package.json +2 -2
package/lib/connection.d.ts
CHANGED
|
@@ -192,6 +192,8 @@ export interface QueryOptions {
|
|
|
192
192
|
randomFilter?: boolean;
|
|
193
193
|
/** filter for rows by row id (key) */
|
|
194
194
|
idsFilter?: Array<string>;
|
|
195
|
+
/** path of the alternate key field that the idsFilter values refer to, if applicable */
|
|
196
|
+
idsFilterField?: Array<API.JsonValuePathPart>;
|
|
195
197
|
/** filter for rows that relate to another object on this connection */
|
|
196
198
|
relatedFilter?: QueryRelatedFilter;
|
|
197
199
|
/** filter for rows that meet a specific matching rule */
|
|
@@ -239,6 +241,8 @@ export interface QueryOneOptions {
|
|
|
239
241
|
relationshipFields?: Array<string>;
|
|
240
242
|
/** filter for rows by row id (key) */
|
|
241
243
|
idsFilter?: Array<string>;
|
|
244
|
+
/** path of the alternate key field that the idsFilter values refer to, if applicable */
|
|
245
|
+
idsFilterField?: Array<API.JsonValuePathPart>;
|
|
242
246
|
/** filter for rows that relate to another object on this connection */
|
|
243
247
|
relatedFilter?: QueryRelatedFilter;
|
|
244
248
|
/** filter for rows that meet a specific matching rule */
|
|
@@ -264,7 +268,8 @@ export interface Row {
|
|
|
264
268
|
data?: any;
|
|
265
269
|
/** if filters requested files be included in the response, and the if row includes a file, the file will be here */
|
|
266
270
|
file?: FileProvider | null | undefined;
|
|
267
|
-
/** if filters requested rows filter by 'related', or 'matched' to source rows the relationship details will be here
|
|
271
|
+
/** if filters requested rows filter by 'related', or 'matched' to source rows the relationship details will be here;
|
|
272
|
+
* for idsFilter queries with an idsFilterField, srcRowId holds the requested (alternate key) value this row matched */
|
|
268
273
|
relationship?: {
|
|
269
274
|
relationshipId?: string;
|
|
270
275
|
srcObjectId?: string;
|
|
@@ -439,6 +444,8 @@ export interface ObjectField {
|
|
|
439
444
|
isKey?: boolean;
|
|
440
445
|
/** field holds an object containing the user defined row unique identifier required for add an update operations, and an indication of the operation type */
|
|
441
446
|
isUserKey?: boolean;
|
|
447
|
+
/** field holds a unique value and the connector honors it as an idsFilterField key in queries */
|
|
448
|
+
isAlternateKey?: boolean;
|
|
442
449
|
/** field, and any fields below, are custom (account specific) */
|
|
443
450
|
isCustom?: boolean;
|
|
444
451
|
/** can this field be referenced in match rules? */
|
package/lib/sync.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Row, QueryRelatedFilter, QueryMatchFilter, QueryCheckpointFilter, UpsertCleanOptions, UpsertCleanResponse, ObjectFieldConstraints, JsonValuePath, RowMatchRuleType, Logger, Connection } from "../index.js";
|
|
1
|
+
import { Row, QueryRelatedFilter, QueryMatchFilter, QueryCheckpointFilter, UpsertCleanOptions, UpsertCleanResponse, ObjectFieldConstraints, JsonValuePath, JsonValuePathPart, RowMatchRuleType, Logger, Connection } from "../index.js";
|
|
2
2
|
export type GroupRunMode = "Standard" | "SelectedIds" | "Errors";
|
|
3
3
|
export type SyncOptimalBatchSizeOperation = "noFilter" | "idsFilter" | "relatedFilter" | "matchFilter" | "checkpointFilter" | "randomFilter" | "rowFilter" | "upsert" | "delete";
|
|
4
4
|
export type SyncOptimalBatchSizeBatchType = "atomic" | "concurrent" | "splitInsertUpdateAtomic";
|
|
@@ -163,6 +163,9 @@ export interface SyncEndpointField {
|
|
|
163
163
|
/** indicates this field holds an object containing the user defined unique row identifier required
|
|
164
164
|
* for add and update operations, with an indication of the operation type */
|
|
165
165
|
isUserDefinedId?: boolean;
|
|
166
|
+
/** indicates this field holds a unique value the connector can resolve rows by as an alternate to
|
|
167
|
+
* the row id (e.g. in lookups) */
|
|
168
|
+
isAlternateId?: boolean;
|
|
166
169
|
/** indicates this field is custom */
|
|
167
170
|
isCustom?: boolean;
|
|
168
171
|
}
|
|
@@ -198,6 +201,8 @@ export interface SyncQueryOptions {
|
|
|
198
201
|
randomFilter?: boolean;
|
|
199
202
|
/** filter for rows by row id (key) */
|
|
200
203
|
idsFilter?: Array<string>;
|
|
204
|
+
/** path of the alternate key field that the idsFilter values refer to, if applicable */
|
|
205
|
+
idsFilterField?: Array<JsonValuePathPart>;
|
|
201
206
|
/** filter for rows that relate to another objects rows on this endpoint */
|
|
202
207
|
relatedFilter?: QueryRelatedFilter;
|
|
203
208
|
/** filter for rows that meet a specific matching rule */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"author": "SyncMatters",
|
|
22
22
|
"homepage": "https://syncmatters.com",
|
|
23
|
-
"typesContentHash": "
|
|
23
|
+
"typesContentHash": "fbf6d9da4649e1b2922ad811c5ebb8c69b7d526bd28c77fcc3a42e0abc9eda59",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@types/node": "*"
|
|
26
26
|
}
|