@syncmatters/script-api 1.0.13 → 1.0.15
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
CHANGED
|
@@ -205,7 +205,7 @@ export interface QueryOptions {
|
|
|
205
205
|
/** @deprecated (use standard fields filter) system specific property filters; allowed values are defined in meta.queryFilter.propertyFilter */
|
|
206
206
|
propertyFilter?: any;
|
|
207
207
|
}
|
|
208
|
-
export type RowMatchRuleType = "id" /** match by source row id (key) */ | "name[ci]" /** match by destination row name (case
|
|
208
|
+
export type RowMatchRuleType = "id" /** match by source row id (key) */ | "name[ci]" /** match by destination row name (case insensitive) */ | "email[ci]" /** match by destination row email (case insensitive) */ | "domain[ci]" /** match by destination domain (case insensitive) */ | "first_and_last_name[ci]" /** match by destination first and last name (case insensitive) */ | "field_value_equals[ci]" /** match by value in user selected field (case insensitive) */ | "field_values_equal[ci]"; /** match by 1-5 user selected source/destination field pairs, all must be equal (case insensitive) */
|
|
209
209
|
export type RowMatchRuleOrder = "oldest" | "newest" | "alphabetical";
|
|
210
210
|
/** source row data used by the destination connector when matching a source row to a destination row */
|
|
211
211
|
export interface RowMatchData {
|
|
@@ -227,6 +227,11 @@ export interface RowMatchData {
|
|
|
227
227
|
lastname?: string;
|
|
228
228
|
/** custom value to match */
|
|
229
229
|
custom?: string | number;
|
|
230
|
+
/**
|
|
231
|
+
* field_values_equal[ci]: values to match, index-aligned with QueryMatchFilter.destFieldPaths. A blank ("") value
|
|
232
|
+
* means the destination field must be empty/absent - filter for "empty", never drop the filter.
|
|
233
|
+
*/
|
|
234
|
+
customs?: Array<string | number>;
|
|
230
235
|
};
|
|
231
236
|
}
|
|
232
237
|
/** unique ids (property names) used in the row match data passed to the destination when a match is saught */
|
|
@@ -300,6 +305,11 @@ export interface QueryMatchFilter {
|
|
|
300
305
|
selectOrder?: RowMatchRuleOrder;
|
|
301
306
|
/** if the rule references a field in the destination row the path to the destination field will be specified here (e.g. match value in a specific field) */
|
|
302
307
|
destFieldPath?: Array<API.JsonValuePathPart>;
|
|
308
|
+
/**
|
|
309
|
+
* field_values_equal[ci]: paths to the destination fields to compare, index-aligned with RowMatchData.match.customs;
|
|
310
|
+
* a destination row matches when every pair is equal
|
|
311
|
+
*/
|
|
312
|
+
destFieldPaths?: Array<Array<API.JsonValuePathPart>>;
|
|
303
313
|
/** data to match */
|
|
304
314
|
srcData: Array<RowMatchData>;
|
|
305
315
|
/**
|
|
@@ -22,6 +22,12 @@ export interface XmlParseOptions {
|
|
|
22
22
|
* When set, xmlParse streams matching elements; omit for a full-document Promise.
|
|
23
23
|
*/
|
|
24
24
|
emit?: string[];
|
|
25
|
+
/**
|
|
26
|
+
* XPath subset expressions (same syntax as `emit`) naming elements to prune: a matching
|
|
27
|
+
* element and its whole subtree are dropped before any `emit` matching or recording, so
|
|
28
|
+
* documents padded with unread markup cost neither parse time nor memory. Requires `emit`.
|
|
29
|
+
*/
|
|
30
|
+
skip?: string[];
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* One matched element from a streaming xmlParse({ source, emit }) call.
|
|
@@ -17,9 +17,10 @@ export declare function localNameOf(qname: string): string;
|
|
|
17
17
|
/**
|
|
18
18
|
* Compile one XPath-subset expression.
|
|
19
19
|
* Supported: `//Name`, `/A/B/C`, `A/B` (local names only; prefixes ignored).
|
|
20
|
+
* `label` names the option being compiled so errors point at `emit` or `skip`.
|
|
20
21
|
*/
|
|
21
|
-
export declare function compileEmitExpression(raw: string): XmlEmitMatcher;
|
|
22
|
-
export declare function compileEmitExpressions(
|
|
22
|
+
export declare function compileEmitExpression(raw: string, label?: string): XmlEmitMatcher;
|
|
23
|
+
export declare function compileEmitExpressions(expressions: string[], label?: string): XmlEmitMatcher[];
|
|
23
24
|
/** True if the current element stack (local names) matches the compiled expression. */
|
|
24
25
|
export declare function matchesEmit(matcher: XmlEmitMatcher, pathLocalNames: string[]): boolean;
|
|
25
26
|
/** Last path step local name for a matcher (the element that starts a potential match). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
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": "
|
|
31
|
+
"typesContentHash": "ad2f1f5cd5868f2362746920bfba5713dcf146857db7641a69ed90c72e101dff",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "*"
|
|
34
34
|
}
|
package/sdk-test/sdk-test.d.ts
CHANGED
|
@@ -354,6 +354,8 @@ export interface MatchData {
|
|
|
354
354
|
srcData: API.RowMatchData[];
|
|
355
355
|
/** path to the field on the dest row that holds the field to match with, if applicable to the rule */
|
|
356
356
|
destFieldPath?: API.JsonValuePath;
|
|
357
|
+
/** field_values_equal[ci]: paths to the dest row fields to match with, index-aligned with srcData[].match.customs */
|
|
358
|
+
destFieldPaths?: API.JsonValuePath[];
|
|
357
359
|
/** ids of dest rows expected back in response to the match query */
|
|
358
360
|
expectedMatchRowIds: string[];
|
|
359
361
|
/** optionally specify the fields to include in the match query */
|