@syncmatters/script-api 1.0.5 → 1.0.6
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 +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
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": "87164fc7d9ba4a7b759acaa21737560cfb815a277721adbff4ab10a0ade8f806",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@types/node": "*"
|
|
26
26
|
}
|
package/sdk-test/sdk-test.d.ts
CHANGED
|
@@ -208,6 +208,10 @@ export interface ConnectorTestResult {
|
|
|
208
208
|
testConnection?: "Passed" | "Not tested" | "Failed: Fatal error during testing" | "Failed: Test connection response did not report success";
|
|
209
209
|
objectsStatus?: "Passed" | "Partial: Only selected objects tested" | "Partial: Only selected objects tested, not all features can be tested" | "Partial: Only selected object tests run" | "Partial: Only selected objects tested, only selected object tests run" | "Partial: Not all features/objects can be tested" | "Not tested" | "Failed: Fatal error during testing" | "Failed: One or more objects failed tests";
|
|
210
210
|
objects: ObjectTestResult[];
|
|
211
|
+
/** Diagnostic details for connection-level stages, keyed by stage (testConnection, metaRefresh). */
|
|
212
|
+
details?: {
|
|
213
|
+
[stage: string]: TestDetail[];
|
|
214
|
+
};
|
|
211
215
|
}
|
|
212
216
|
export interface ObjectTestResult {
|
|
213
217
|
objectId: string;
|
|
@@ -251,6 +255,10 @@ export interface ObjectTestResult {
|
|
|
251
255
|
deleteFatalError?: CaughtError;
|
|
252
256
|
fieldMetadata?: "Passed" | "Not tested" | "Failed: One or more fields have metadata issues";
|
|
253
257
|
fieldMetadataIssues: FieldMetadataIssue[];
|
|
258
|
+
/** Diagnostic details keyed by feature (list, idsFilter, checkpointFilter, upsert, upsertClean, delete, fieldMetadata). */
|
|
259
|
+
details?: {
|
|
260
|
+
[feature: string]: TestDetail[];
|
|
261
|
+
};
|
|
254
262
|
}
|
|
255
263
|
export interface FieldMetadataIssue {
|
|
256
264
|
operation: "query" | "upsert" | "delete";
|
|
@@ -264,6 +272,8 @@ export interface MatchRuleTestResult {
|
|
|
264
272
|
notTestedReason?: string;
|
|
265
273
|
errorRowId?: string;
|
|
266
274
|
fatalError?: CaughtError;
|
|
275
|
+
/** Diagnostic details for this rule. */
|
|
276
|
+
details?: TestDetail[];
|
|
267
277
|
}
|
|
268
278
|
export interface RelatedFilterTestResult {
|
|
269
279
|
relationshipId: string;
|
|
@@ -272,12 +282,28 @@ export interface RelatedFilterTestResult {
|
|
|
272
282
|
notTestedReason?: string;
|
|
273
283
|
errorRowId?: string;
|
|
274
284
|
fatalError?: CaughtError;
|
|
285
|
+
/** Diagnostic details for this relationship. */
|
|
286
|
+
details?: TestDetail[];
|
|
275
287
|
}
|
|
276
288
|
/** Details from caught error that blocked test completion */
|
|
277
289
|
export interface CaughtError {
|
|
278
290
|
message?: string;
|
|
279
291
|
stack?: string;
|
|
280
292
|
}
|
|
293
|
+
/**
|
|
294
|
+
* A diagnostic detail captured while testing; mirrors what the test harness logs (a message plus
|
|
295
|
+
* the inputs/outputs the message relates to). Details are saved with the test result so the
|
|
296
|
+
* harness i/o can be reviewed alongside statuses; the platform scrubs them after a short
|
|
297
|
+
* retention window, statuses remain.
|
|
298
|
+
*/
|
|
299
|
+
export interface TestDetail {
|
|
300
|
+
level: "info" | "error";
|
|
301
|
+
message: string;
|
|
302
|
+
/** Inputs/outputs relating to the message (e.g. filter ids used, rows returned). */
|
|
303
|
+
data?: unknown;
|
|
304
|
+
/** Set when the data payload was dropped to honour the capture size budget. */
|
|
305
|
+
truncated?: boolean;
|
|
306
|
+
}
|
|
281
307
|
/** Options passed when requesting data that will be used for an upsert test. */
|
|
282
308
|
export interface UpsertOptions {
|
|
283
309
|
meta: API.ObjectMeta;
|