@syncmatters/script-api 1.0.47 → 1.0.49
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/package.json +2 -2
- package/sdk-test/sdk-test.d.ts +24 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.49",
|
|
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": "9f3c55aae0159e15414998799adafbf82999beae5147c4049bde00af30954edd",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@types/node": "*"
|
|
34
34
|
}
|
package/sdk-test/sdk-test.d.ts
CHANGED
|
@@ -304,6 +304,22 @@ export interface BeforeOptions {
|
|
|
304
304
|
connection: unknown;
|
|
305
305
|
/** Logger to use for logging. */
|
|
306
306
|
log: API.Logger;
|
|
307
|
+
/**
|
|
308
|
+
* What this run was narrowed to, so before() can clean up and seed only what the run will use. Absent on a
|
|
309
|
+
* runner that predates it: treat absent as a full run.
|
|
310
|
+
*/
|
|
311
|
+
selection?: BeforeSelection;
|
|
312
|
+
}
|
|
313
|
+
/** What a run was narrowed to (sm connector test --object / --check / --only, or the web UI's choices). */
|
|
314
|
+
export interface BeforeSelection {
|
|
315
|
+
/** "all": every object of the suite; "selected": only objectIds; "none": no object features run. */
|
|
316
|
+
objects: "all" | "selected" | "none";
|
|
317
|
+
/** Native ids of the objects to test when objects is "selected", otherwise empty. */
|
|
318
|
+
objectIds: string[];
|
|
319
|
+
/** The object features the run tests; ["all"] when it is not restricted to some. */
|
|
320
|
+
features: ObjectFeature[];
|
|
321
|
+
/** Ids of the custom checks the run was narrowed to; empty when it was not narrowed to named checks. */
|
|
322
|
+
checkIds: string[];
|
|
307
323
|
}
|
|
308
324
|
/** Result of testing a connector. */
|
|
309
325
|
export interface ConnectorTestResult {
|
|
@@ -645,7 +661,7 @@ export interface RowFilterData {
|
|
|
645
661
|
fields?: Array<API.JsonValuePath>;
|
|
646
662
|
/**
|
|
647
663
|
* The row-filter query must fail (error; e.g. a timeout forced with requestTimeoutOverride), or the rows it returns
|
|
648
|
-
* must hold these values (rows). With error set, expectedRowIds may be empty.
|
|
664
|
+
* must hold these values (rows). With error set, expectedRowIds may be empty; with noRows set it must be.
|
|
649
665
|
*/
|
|
650
666
|
expect?: Expect;
|
|
651
667
|
}
|
|
@@ -656,6 +672,13 @@ export interface RowFilterData {
|
|
|
656
672
|
export interface Expect {
|
|
657
673
|
/** the operation must fail, and fail like this; a success is a failure of the test */
|
|
658
674
|
error?: ExpectedError;
|
|
675
|
+
/**
|
|
676
|
+
* The query must succeed and return no rows: an unknown id that reads as nothing, a filter or match that finds
|
|
677
|
+
* nothing, a parent without children, a checkpoint with nothing newer. Honoured by row filters, match rules, related
|
|
678
|
+
* filters and checkpoint step 2, where an empty expected id list is otherwise rejected as invalid test data (a prepare
|
|
679
|
+
* hook that found nothing must not pass by accident). The expected id list must be empty when this is set.
|
|
680
|
+
*/
|
|
681
|
+
noRows?: true;
|
|
659
682
|
/**
|
|
660
683
|
* Assertions on returned rows' values by path, keyed by row meta.key; "*" applies to every returned row, and an
|
|
661
684
|
* assertion under a row's own key overrides a "*" assertion on the same path.
|