@syncmatters/script-api 1.0.2 → 1.0.4
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 +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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": "
|
|
19
|
+
"typesContentHash": "ed924bcb7bf03a6b4a1769beacbdf45f9887b21cb6a20f2a434b9fbe1813b4b8",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@types/node": "*"
|
|
22
22
|
}
|
package/sdk-test/sdk-test.d.ts
CHANGED
|
@@ -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;
|
|
@@ -393,7 +401,7 @@ export interface ListCleanupOptions {
|
|
|
393
401
|
}
|
|
394
402
|
/** Data returned when requesting data that will be used for an list test. */
|
|
395
403
|
export interface ListData {
|
|
396
|
-
/** number of rows included in each page of data returned via a list query,
|
|
404
|
+
/** number of rows included in each page of data returned via a list query, used to test pagination */
|
|
397
405
|
pageSize: number;
|
|
398
406
|
/** optionally specify the fields to include in the list query */
|
|
399
407
|
fields?: Array<API.JsonValuePath>;
|