@syncmatters/script-api 1.0.4 → 1.0.5
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
|
@@ -482,7 +482,14 @@ export interface ObjectFieldOption {
|
|
|
482
482
|
}
|
|
483
483
|
/** ObjectFieldConstraints holds details of expected/allowed values for a field. */
|
|
484
484
|
export interface ObjectFieldConstraints {
|
|
485
|
+
/**
|
|
486
|
+
* When the field is required on upsert.
|
|
487
|
+
* For fields inside `arrayObjectFields`, mandatory is only enforced when the parent array
|
|
488
|
+
* has at least one element — an empty or absent array does not trigger `ValueRequired`.
|
|
489
|
+
* When the array is non-empty, every element must provide a satisfying value.
|
|
490
|
+
*/
|
|
485
491
|
mandatory?: "always" | "add" | "update";
|
|
492
|
+
/** Values that satisfy a mandatory constraint without raising `ValueRequired`. */
|
|
486
493
|
mandatoryAccepts?: Array<"null" | "blank_string">;
|
|
487
494
|
max?: number;
|
|
488
495
|
min?: number;
|
|
@@ -11,4 +11,6 @@ export declare class HttpError extends Error implements HttpErrorType {
|
|
|
11
11
|
responseBodyBuffer?: Buffer;
|
|
12
12
|
responseBodyJson?: unknown;
|
|
13
13
|
constructor(err: Error | string, statusCode: number | undefined);
|
|
14
|
+
/** Include url in JSON serialization so user-visible error payloads retain the request URL. */
|
|
15
|
+
toJSON(): Pick<HttpErrorType, "name" | "message" | "stack" | "code" | "url" | "statusCode">;
|
|
14
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncmatters/script-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
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": {
|
|
@@ -11,12 +11,16 @@
|
|
|
11
11
|
"./sdk-test": {
|
|
12
12
|
"types": "./sdk-test.d.ts",
|
|
13
13
|
"default": "./index.js"
|
|
14
|
+
},
|
|
15
|
+
"./api": {
|
|
16
|
+
"types": "./api.d.ts",
|
|
17
|
+
"default": "./index.js"
|
|
14
18
|
}
|
|
15
19
|
},
|
|
16
20
|
"license": "MIT",
|
|
17
21
|
"author": "SyncMatters",
|
|
18
22
|
"homepage": "https://syncmatters.com",
|
|
19
|
-
"typesContentHash": "
|
|
23
|
+
"typesContentHash": "8c1e30614914088ef6397a1efbc237ea02bc438bc168ec2f27bc27ea96762cbe",
|
|
20
24
|
"dependencies": {
|
|
21
25
|
"@types/node": "*"
|
|
22
26
|
}
|