@spotto/contract 1.0.70-alpha.1 → 1.0.70-alpha.11
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/dist/actions/[id]/index.d.ts +1 -0
- package/dist/actions/[id]/index.js +18 -0
- package/dist/actions/[id]/index.js.map +1 -0
- package/dist/actions/[id]/patch/index.d.ts +2 -0
- package/dist/actions/[id]/patch/index.js +19 -0
- package/dist/actions/[id]/patch/index.js.map +1 -0
- package/dist/actions/[id]/patch/request.d.ts +12 -0
- package/dist/actions/[id]/patch/request.js +3 -0
- package/dist/actions/[id]/patch/request.js.map +1 -0
- package/dist/actions/[id]/patch/response.d.ts +1 -0
- package/dist/actions/[id]/patch/response.js +3 -0
- package/dist/actions/[id]/patch/response.js.map +1 -0
- package/dist/actions/get/index.d.ts +2 -0
- package/dist/actions/get/index.js +19 -0
- package/dist/actions/get/index.js.map +1 -0
- package/dist/actions/get/query.d.ts +14 -0
- package/dist/actions/get/query.js +3 -0
- package/dist/actions/get/query.js.map +1 -0
- package/dist/actions/get/response.d.ts +25 -0
- package/dist/actions/get/response.js +3 -0
- package/dist/actions/get/response.js.map +1 -0
- package/dist/actions/index.d.ts +4 -0
- package/dist/actions/index.js +21 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/post/index.d.ts +2 -0
- package/dist/actions/post/index.js +19 -0
- package/dist/actions/post/index.js.map +1 -0
- package/dist/actions/post/request.d.ts +15 -0
- package/dist/actions/post/request.js +3 -0
- package/dist/actions/post/request.js.map +1 -0
- package/dist/actions/post/response.d.ts +1 -0
- package/dist/actions/post/response.js +3 -0
- package/dist/actions/post/response.js.map +1 -0
- package/dist/actions/shared.d.ts +51 -0
- package/dist/actions/shared.js +13 -0
- package/dist/actions/shared.js.map +1 -0
- package/dist/ai/expression/index.d.ts +2 -0
- package/dist/ai/expression/index.js +19 -0
- package/dist/ai/expression/index.js.map +1 -0
- package/dist/ai/expression/request.d.ts +27 -0
- package/dist/ai/expression/request.js +3 -0
- package/dist/ai/expression/request.js.map +1 -0
- package/dist/ai/expression/response.d.ts +23 -0
- package/dist/ai/expression/response.js +3 -0
- package/dist/ai/expression/response.js.map +1 -0
- package/dist/ai/index.d.ts +1 -0
- package/dist/ai/index.js +18 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/assets/[id]/get.d.ts +9 -1
- package/dist/assets/[id]/patch/request.d.ts +5 -0
- package/dist/assets/get/query.d.ts +11 -4
- package/dist/assets/post/request.d.ts +2 -0
- package/dist/assets/post/request.js.map +1 -1
- package/dist/events/constants.d.ts +2 -1
- package/dist/events/constants.js +2 -0
- package/dist/events/constants.js.map +1 -1
- package/dist/events/get/response.d.ts +17 -1
- package/dist/fields/constants.d.ts +19 -0
- package/dist/fields/constants.js +15 -1
- package/dist/fields/constants.js.map +1 -1
- package/dist/forms/[id]/index.d.ts +1 -0
- package/dist/forms/[id]/index.js +18 -0
- package/dist/forms/[id]/index.js.map +1 -0
- package/dist/forms/[id]/patch/index.d.ts +2 -0
- package/dist/forms/[id]/patch/index.js +19 -0
- package/dist/forms/[id]/patch/index.js.map +1 -0
- package/dist/forms/[id]/patch/request.d.ts +14 -0
- package/dist/forms/[id]/patch/request.js +3 -0
- package/dist/forms/[id]/patch/request.js.map +1 -0
- package/dist/forms/[id]/patch/response.d.ts +1 -0
- package/dist/forms/[id]/patch/response.js +3 -0
- package/dist/forms/[id]/patch/response.js.map +1 -0
- package/dist/forms/constants.d.ts +19 -0
- package/dist/forms/constants.js +33 -0
- package/dist/forms/constants.js.map +1 -0
- package/dist/forms/get/index.d.ts +2 -0
- package/dist/forms/get/index.js +19 -0
- package/dist/forms/get/index.js.map +1 -0
- package/dist/forms/get/query.d.ts +18 -0
- package/dist/forms/get/query.js +3 -0
- package/dist/forms/get/query.js.map +1 -0
- package/dist/forms/get/response.d.ts +24 -0
- package/dist/forms/get/response.js +3 -0
- package/dist/forms/get/response.js.map +1 -0
- package/dist/forms/index.d.ts +6 -0
- package/dist/forms/index.js +23 -0
- package/dist/forms/index.js.map +1 -0
- package/dist/forms/post/index.d.ts +2 -0
- package/dist/forms/post/index.js +19 -0
- package/dist/forms/post/index.js.map +1 -0
- package/dist/forms/post/request.d.ts +10 -0
- package/dist/forms/post/request.js +3 -0
- package/dist/forms/post/request.js.map +1 -0
- package/dist/forms/post/response.d.ts +1 -0
- package/dist/forms/post/response.js +3 -0
- package/dist/forms/post/response.js.map +1 -0
- package/dist/forms/shared.d.ts +86 -0
- package/dist/forms/shared.js +3 -0
- package/dist/forms/shared.js.map +1 -0
- package/dist/forms/versions/index.d.ts +2 -0
- package/dist/forms/versions/index.js +19 -0
- package/dist/forms/versions/index.js.map +1 -0
- package/dist/forms/versions/path.d.ts +8 -0
- package/dist/forms/versions/path.js +3 -0
- package/dist/forms/versions/path.js.map +1 -0
- package/dist/forms/versions/response.d.ts +1 -0
- package/dist/forms/versions/response.js +3 -0
- package/dist/forms/versions/response.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/integrations/constants.d.ts +1 -0
- package/dist/integrations/oneblink/patch/request.d.ts +3 -2
- package/dist/integrations/oneblink/token.d.ts +2 -0
- package/dist/shared/attachments.d.ts +29 -0
- package/dist/shared/attachments.js +11 -0
- package/dist/shared/attachments.js.map +1 -0
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.js +2 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/readiness.d.ts +81 -0
- package/dist/shared/readiness.js +11 -0
- package/dist/shared/readiness.js.map +1 -0
- package/dist/submissions/[id]/index.d.ts +1 -0
- package/dist/submissions/[id]/index.js +18 -0
- package/dist/submissions/[id]/index.js.map +1 -0
- package/dist/submissions/[id]/void/post.d.ts +6 -0
- package/dist/submissions/[id]/void/post.js +3 -0
- package/dist/submissions/[id]/void/post.js.map +1 -0
- package/dist/submissions/constants.d.ts +14 -0
- package/dist/submissions/constants.js +21 -0
- package/dist/submissions/constants.js.map +1 -0
- package/dist/submissions/get/index.d.ts +2 -0
- package/dist/submissions/get/index.js +19 -0
- package/dist/submissions/get/index.js.map +1 -0
- package/dist/submissions/get/query.d.ts +14 -0
- package/dist/submissions/get/query.js +3 -0
- package/dist/submissions/get/query.js.map +1 -0
- package/dist/submissions/get/response.d.ts +6 -0
- package/dist/submissions/get/response.js +3 -0
- package/dist/submissions/get/response.js.map +1 -0
- package/dist/submissions/index.d.ts +6 -0
- package/dist/submissions/index.js +23 -0
- package/dist/submissions/index.js.map +1 -0
- package/dist/submissions/post/index.d.ts +2 -0
- package/dist/submissions/post/index.js +19 -0
- package/dist/submissions/post/index.js.map +1 -0
- package/dist/submissions/post/request.d.ts +17 -0
- package/dist/submissions/post/request.js +3 -0
- package/dist/submissions/post/request.js.map +1 -0
- package/dist/submissions/post/response.d.ts +22 -0
- package/dist/submissions/post/response.js +3 -0
- package/dist/submissions/post/response.js.map +1 -0
- package/dist/submissions/shared.d.ts +133 -0
- package/dist/submissions/shared.js +3 -0
- package/dist/submissions/shared.js.map +1 -0
- package/dist/submissions/uploads/[fileId]/get.d.ts +11 -0
- package/dist/submissions/uploads/[fileId]/get.js +3 -0
- package/dist/submissions/uploads/[fileId]/get.js.map +1 -0
- package/dist/submissions/uploads/[fileId]/index.d.ts +1 -0
- package/dist/submissions/uploads/[fileId]/index.js +18 -0
- package/dist/submissions/uploads/[fileId]/index.js.map +1 -0
- package/dist/submissions/uploads/index.d.ts +2 -0
- package/dist/submissions/uploads/index.js +19 -0
- package/dist/submissions/uploads/index.js.map +1 -0
- package/dist/submissions/uploads/post/index.d.ts +2 -0
- package/dist/submissions/uploads/post/index.js +19 -0
- package/dist/submissions/uploads/post/index.js.map +1 -0
- package/dist/submissions/uploads/post/request.d.ts +9 -0
- package/dist/submissions/uploads/post/request.js +3 -0
- package/dist/submissions/uploads/post/request.js.map +1 -0
- package/dist/submissions/uploads/post/response.d.ts +18 -0
- package/dist/submissions/uploads/post/response.js +3 -0
- package/dist/submissions/uploads/post/response.js.map +1 -0
- package/dist/types/[id]/get.d.ts +17 -2
- package/dist/types/[id]/patch/request.d.ts +16 -2
- package/dist/types/post/request.d.ts +16 -2
- package/dist/types/post/request.js.map +1 -1
- package/dist/users/current.d.ts +7 -0
- package/dist/users/home-layout/index.d.ts +3 -0
- package/dist/users/home-layout/index.js +20 -0
- package/dist/users/home-layout/index.js.map +1 -0
- package/dist/users/home-layout/request.d.ts +5 -0
- package/dist/users/home-layout/request.js +3 -0
- package/dist/users/home-layout/request.js.map +1 -0
- package/dist/users/home-layout/response.d.ts +5 -0
- package/dist/users/home-layout/response.js +3 -0
- package/dist/users/home-layout/response.js.map +1 -0
- package/dist/users/home-layout/shared.d.ts +64 -0
- package/dist/users/home-layout/shared.js +19 -0
- package/dist/users/home-layout/shared.js.map +1 -0
- package/dist/users/index.d.ts +1 -0
- package/dist/users/index.js +1 -0
- package/dist/users/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,3 +2,22 @@ export declare type FieldDataType = 'STRING' | 'INTEGER' | 'DECIMAL' | 'BOOLEAN'
|
|
|
2
2
|
export declare const FIELD_DATA_TYPES: FieldDataType[];
|
|
3
3
|
export declare type FieldInputType = 'SINGLELINE' | 'MULTILINE' | 'LINK' | 'RICHTEXT' | 'DROPDOWN' | 'RADIO' | 'CHECKBOXES' | 'DATE' | 'DATETIME' | 'INTEGER' | 'DECIMAL' | 'SWITCH';
|
|
4
4
|
export declare const FIELD_INPUT_TYPES: FieldInputType[];
|
|
5
|
+
export declare type FieldSource = 'INPUT' | 'COMPUTED' | 'AGGREGATED';
|
|
6
|
+
export declare const FIELD_SOURCES: FieldSource[];
|
|
7
|
+
export declare type AggregateFunction = 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'COUNT';
|
|
8
|
+
export declare const AGGREGATE_FUNCTIONS: AggregateFunction[];
|
|
9
|
+
/**
|
|
10
|
+
* A per-type field-binding delta, layered onto the inherited field identity
|
|
11
|
+
* (`fieldsAll = parent.fieldsAll ⊕ fields`). Omitted `source` on an override =
|
|
12
|
+
* inherit; explicit `INPUT` = reset to user-entered.
|
|
13
|
+
* - `expression` — COMPUTED: excelexp over the asset's other fields.
|
|
14
|
+
* - `visibleWhen` — conditional visibility (client-render only).
|
|
15
|
+
* - `function` — AGGREGATED (M2 — kits): the same field is reduced across
|
|
16
|
+
* a kit's direct members.
|
|
17
|
+
*/
|
|
18
|
+
export interface IFieldBindingDelta {
|
|
19
|
+
source?: FieldSource;
|
|
20
|
+
expression?: string;
|
|
21
|
+
visibleWhen?: string;
|
|
22
|
+
function?: AggregateFunction;
|
|
23
|
+
}
|
package/dist/fields/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
|
|
3
|
+
exports.AGGREGATE_FUNCTIONS = exports.FIELD_SOURCES = exports.FIELD_INPUT_TYPES = exports.FIELD_DATA_TYPES = void 0;
|
|
4
4
|
const dataTypes = {
|
|
5
5
|
STRING: null,
|
|
6
6
|
INTEGER: null,
|
|
@@ -25,4 +25,18 @@ const inputTypes = {
|
|
|
25
25
|
SWITCH: null,
|
|
26
26
|
};
|
|
27
27
|
exports.FIELD_INPUT_TYPES = Object.keys(inputTypes);
|
|
28
|
+
const fieldSources = {
|
|
29
|
+
INPUT: null,
|
|
30
|
+
COMPUTED: null,
|
|
31
|
+
AGGREGATED: null,
|
|
32
|
+
};
|
|
33
|
+
exports.FIELD_SOURCES = Object.keys(fieldSources);
|
|
34
|
+
const aggregateFunctions = {
|
|
35
|
+
SUM: null,
|
|
36
|
+
AVG: null,
|
|
37
|
+
MIN: null,
|
|
38
|
+
MAX: null,
|
|
39
|
+
COUNT: null,
|
|
40
|
+
};
|
|
41
|
+
exports.AGGREGATE_FUNCTIONS = Object.keys(aggregateFunctions);
|
|
28
42
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/fields/constants.ts"],"names":[],"mappings":";;;AAQA,MAAM,SAAS,GAAqC;IAClD,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;CACf,CAAA;AAEY,QAAA,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAoB,CAAA;AAgBzE,MAAM,UAAU,GAAsC;IACpD,UAAU,EAAE,IAAI;IAChB,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,MAAM,EAAE,IAAI;CACb,CAAA;AAEY,QAAA,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAqB,CAAA;AAS5E,MAAM,YAAY,GAAmC;IACnD,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,IAAI;IACd,UAAU,EAAE,IAAI;CACjB,CAAA;AAEY,QAAA,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAkB,CAAA;AAIvE,MAAM,kBAAkB,GAAyC;IAC/D,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,KAAK,EAAE,IAAI;CACZ,CAAA;AAEY,QAAA,mBAAmB,GAAG,MAAM,CAAC,IAAI,CAC5C,kBAAkB,CACI,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './patch';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./patch"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/[id]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./request"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/forms/[id]/patch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormItem, FormPrefillRow, FormWriteBackRow } from '../../shared';
|
|
2
|
+
/**
|
|
3
|
+
* Publishes a new version of the form. `{id}` is the version document the
|
|
4
|
+
* editor loaded — the server inserts exactly `that.version + 1` and returns
|
|
5
|
+
* 409 when the head has moved ("form changed — reload"). Version documents
|
|
6
|
+
* themselves are never mutated. Omitted fields carry over from the loaded
|
|
7
|
+
* version; `name` is immutable.
|
|
8
|
+
*/
|
|
9
|
+
export interface UpdateFormRequest {
|
|
10
|
+
label?: string;
|
|
11
|
+
items?: FormItem[];
|
|
12
|
+
prefill?: FormPrefillRow[];
|
|
13
|
+
writeBack?: FormWriteBackRow[];
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/forms/[id]/patch/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetFormResponse as UpdateFormResponse } from '../../get/response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/forms/[id]/patch/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldDataType } from '../fields/constants';
|
|
2
|
+
/**
|
|
3
|
+
* Context names injected into every form-expression environment (entity-neutral
|
|
4
|
+
* — asset and location targets share them). Reserved: the fields service
|
|
5
|
+
* rejects creating a custom field with any of these names (case-insensitively,
|
|
6
|
+
* matching its name-uniqueness rule), because the injected context value would
|
|
7
|
+
* shadow the field in every form env. They can never collide with engine
|
|
8
|
+
* functions — call-vs-identifier is decided syntactically.
|
|
9
|
+
*/
|
|
10
|
+
export declare const RESERVED_CONTEXT_FIELD_NAMES: readonly ["entityId", "entityName", "entityTypeId", "currentUser", "now"];
|
|
11
|
+
export declare type ReservedContextFieldName = (typeof RESERVED_CONTEXT_FIELD_NAMES)[number];
|
|
12
|
+
/**
|
|
13
|
+
* The dataType each injected context value presents as inside a form env —
|
|
14
|
+
* what save-time expression checks and `from`→`to` compatibility resolve a
|
|
15
|
+
* context reference to. Ids are opaque strings; `now` is the submit timestamp.
|
|
16
|
+
*/
|
|
17
|
+
export declare const RESERVED_CONTEXT_FIELD_TYPES: Record<ReservedContextFieldName, FieldDataType>;
|
|
18
|
+
/** Signature/photo capture blocks allowed on a single form version. */
|
|
19
|
+
export declare const MAX_CAPTURE_BLOCKS_PER_FORM = 10;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_CAPTURE_BLOCKS_PER_FORM = exports.RESERVED_CONTEXT_FIELD_TYPES = exports.RESERVED_CONTEXT_FIELD_NAMES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Context names injected into every form-expression environment (entity-neutral
|
|
6
|
+
* — asset and location targets share them). Reserved: the fields service
|
|
7
|
+
* rejects creating a custom field with any of these names (case-insensitively,
|
|
8
|
+
* matching its name-uniqueness rule), because the injected context value would
|
|
9
|
+
* shadow the field in every form env. They can never collide with engine
|
|
10
|
+
* functions — call-vs-identifier is decided syntactically.
|
|
11
|
+
*/
|
|
12
|
+
exports.RESERVED_CONTEXT_FIELD_NAMES = [
|
|
13
|
+
'entityId',
|
|
14
|
+
'entityName',
|
|
15
|
+
'entityTypeId',
|
|
16
|
+
'currentUser',
|
|
17
|
+
'now',
|
|
18
|
+
];
|
|
19
|
+
/**
|
|
20
|
+
* The dataType each injected context value presents as inside a form env —
|
|
21
|
+
* what save-time expression checks and `from`→`to` compatibility resolve a
|
|
22
|
+
* context reference to. Ids are opaque strings; `now` is the submit timestamp.
|
|
23
|
+
*/
|
|
24
|
+
exports.RESERVED_CONTEXT_FIELD_TYPES = {
|
|
25
|
+
entityId: 'STRING',
|
|
26
|
+
entityName: 'STRING',
|
|
27
|
+
entityTypeId: 'STRING',
|
|
28
|
+
currentUser: 'STRING',
|
|
29
|
+
now: 'DATETIME',
|
|
30
|
+
};
|
|
31
|
+
/** Signature/photo capture blocks allowed on a single form version. */
|
|
32
|
+
exports.MAX_CAPTURE_BLOCKS_PER_FORM = 10;
|
|
33
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/forms/constants.ts"],"names":[],"mappings":";;;AAEA;;;;;;;GAOG;AACU,QAAA,4BAA4B,GAAG;IAC1C,UAAU;IACV,YAAY;IACZ,cAAc;IACd,aAAa;IACb,KAAK;CACG,CAAA;AAKV;;;;GAIG;AACU,QAAA,4BAA4B,GAGrC;IACF,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,QAAQ;IACpB,YAAY,EAAE,QAAQ;IACtB,WAAW,EAAE,QAAQ;IACrB,GAAG,EAAE,UAAU;CAChB,CAAA;AAED,uEAAuE;AAC1D,QAAA,2BAA2B,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./query"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/get/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { StandardSortFields, SortOrders } from '../../shared';
|
|
2
|
+
export declare type FormEmbedField = 'meta';
|
|
3
|
+
/**
|
|
4
|
+
* Lists current form versions only (one row per form name). Historic
|
|
5
|
+
* versions are fetched individually via GET /forms/{name}/versions/{version}.
|
|
6
|
+
*/
|
|
7
|
+
export interface GetFormsQuery {
|
|
8
|
+
page?: number;
|
|
9
|
+
limit?: number;
|
|
10
|
+
ids?: string[];
|
|
11
|
+
sort?: StandardSortFields;
|
|
12
|
+
sortOrder?: SortOrders;
|
|
13
|
+
embed?: Array<FormEmbedField>;
|
|
14
|
+
/** Exact form name (the immutable handle). */
|
|
15
|
+
name?: string;
|
|
16
|
+
/** Include archived forms — defaults to false. */
|
|
17
|
+
archived?: boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/forms/get/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { IEntityMeta } from '../../shared';
|
|
2
|
+
import { FormItem, FormPrefillRow, FormWriteBackRow } from '../shared';
|
|
3
|
+
import { GetFormsQuery } from './query';
|
|
4
|
+
/** One immutable form version document. */
|
|
5
|
+
export interface GetFormResponse {
|
|
6
|
+
id: string;
|
|
7
|
+
/** Immutable handle — shared by every version of the form. */
|
|
8
|
+
name: string;
|
|
9
|
+
label: string;
|
|
10
|
+
version: number;
|
|
11
|
+
/** Exactly one version per (org, name) is current. */
|
|
12
|
+
current: boolean;
|
|
13
|
+
archived: boolean;
|
|
14
|
+
items: FormItem[];
|
|
15
|
+
prefill: FormPrefillRow[];
|
|
16
|
+
writeBack: FormWriteBackRow[];
|
|
17
|
+
createdBy: string;
|
|
18
|
+
meta?: IEntityMeta;
|
|
19
|
+
}
|
|
20
|
+
export interface GetFormsResponse {
|
|
21
|
+
query: GetFormsQuery | null;
|
|
22
|
+
total: number;
|
|
23
|
+
items: GetFormResponse[];
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/get/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
|
18
|
+
__exportStar(require("./shared"), exports);
|
|
19
|
+
__exportStar(require("./get"), exports);
|
|
20
|
+
__exportStar(require("./post"), exports);
|
|
21
|
+
__exportStar(require("./[id]"), exports);
|
|
22
|
+
__exportStar(require("./versions"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/forms/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,2CAAwB;AACxB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,6CAA0B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./request"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/post/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FormItem, FormPrefillRow, FormWriteBackRow } from '../shared';
|
|
2
|
+
/** Creates a new form as version 1 (current). */
|
|
3
|
+
export interface PostFormRequest {
|
|
4
|
+
/** Immutable handle; referenced by actions. */
|
|
5
|
+
name: string;
|
|
6
|
+
label: string;
|
|
7
|
+
items: FormItem[];
|
|
8
|
+
prefill?: FormPrefillRow[];
|
|
9
|
+
writeBack?: FormWriteBackRow[];
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/forms/post/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetFormResponse as PostFormResponse } from '../get/response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/post/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ReservedContextFieldName } from './constants';
|
|
2
|
+
/**
|
|
3
|
+
* How a form field item's value is produced. `INPUT` (default) is entered by
|
|
4
|
+
* the user, `COMPUTED` derives from an expression over the merged env, and
|
|
5
|
+
* `CONTEXT` is injected from the submission context (never entered/computed).
|
|
6
|
+
* `AGGREGATED` is meaningless on a form — there are no members.
|
|
7
|
+
*/
|
|
8
|
+
export declare type FormFieldSource = 'INPUT' | 'COMPUTED' | 'CONTEXT';
|
|
9
|
+
/** Content blocks that capture media and produce a submission attachment. */
|
|
10
|
+
export declare type FormCaptureKind = 'signature' | 'photo';
|
|
11
|
+
/**
|
|
12
|
+
* A field binding on a form — a delta over the global field definition
|
|
13
|
+
* (which owns identity: dataType, options), plus form-only extras.
|
|
14
|
+
*/
|
|
15
|
+
export interface FormFieldItem {
|
|
16
|
+
kind: 'field';
|
|
17
|
+
/** Name of a global field definition. */
|
|
18
|
+
name: string;
|
|
19
|
+
source?: FormFieldSource;
|
|
20
|
+
/** Required (and only allowed) when source is COMPUTED. */
|
|
21
|
+
expression?: string;
|
|
22
|
+
/** Required (and only allowed) when source is CONTEXT. */
|
|
23
|
+
from?: ReservedContextFieldName;
|
|
24
|
+
/** Must be present to submit — only bites while the item is visible. */
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/** Shown, not editable (e.g. filled by prefill purely for context). */
|
|
27
|
+
readonly?: boolean;
|
|
28
|
+
/** Open-time expression seeding the initial value (prefill wins over it). */
|
|
29
|
+
default?: string;
|
|
30
|
+
visibleWhen?: string;
|
|
31
|
+
/** Per-form display overrides; identity still comes from the definition. */
|
|
32
|
+
label?: string;
|
|
33
|
+
help?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface FormSectionItem {
|
|
36
|
+
kind: 'section';
|
|
37
|
+
title: string;
|
|
38
|
+
}
|
|
39
|
+
export interface FormTextItem {
|
|
40
|
+
kind: 'text';
|
|
41
|
+
text: string;
|
|
42
|
+
}
|
|
43
|
+
export interface FormImageItem {
|
|
44
|
+
kind: 'image';
|
|
45
|
+
src: string;
|
|
46
|
+
caption?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FormDividerItem {
|
|
49
|
+
kind: 'divider';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A signature/photo capture block. Produces an attachment reference on the
|
|
53
|
+
* submission (never a fieldValue), keyed by the block's `name`.
|
|
54
|
+
*/
|
|
55
|
+
export interface FormCaptureItem {
|
|
56
|
+
kind: FormCaptureKind;
|
|
57
|
+
name: string;
|
|
58
|
+
required?: boolean;
|
|
59
|
+
label?: string;
|
|
60
|
+
help?: string;
|
|
61
|
+
}
|
|
62
|
+
export declare type FormItem = FormFieldItem | FormSectionItem | FormTextItem | FormImageItem | FormDividerItem | FormCaptureItem;
|
|
63
|
+
export declare type FormItemKind = FormItem['kind'];
|
|
64
|
+
/**
|
|
65
|
+
* A read-in row: on open, seed form field `to` from the target — either a
|
|
66
|
+
* copy of target field `from` or an `expression` over the target's effective
|
|
67
|
+
* values (exactly one of the two), optionally gated by `when`.
|
|
68
|
+
*/
|
|
69
|
+
export interface FormPrefillRow {
|
|
70
|
+
to: string;
|
|
71
|
+
from?: string;
|
|
72
|
+
expression?: string;
|
|
73
|
+
when?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A write-back row: on submit, set target field `to` — either a copy of
|
|
77
|
+
* captured form value `from` or an `expression` over the merged env (exactly
|
|
78
|
+
* one of the two), optionally gated by `when`. Written as ordinary authored
|
|
79
|
+
* data (user-editable afterward) and triggers the standard recompute.
|
|
80
|
+
*/
|
|
81
|
+
export interface FormWriteBackRow {
|
|
82
|
+
to: string;
|
|
83
|
+
from?: string;
|
|
84
|
+
expression?: string;
|
|
85
|
+
when?: string;
|
|
86
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/forms/shared.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./path"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/forms/versions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,6CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path.js","sourceRoot":"","sources":["../../../src/forms/versions/path.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetFormResponse as GetFormVersionResponse } from '../get/response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/versions/response.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from './shared';
|
|
2
|
+
export * from './ai';
|
|
2
3
|
export * from './events';
|
|
3
4
|
export * from './integrations';
|
|
4
5
|
export * from './labels';
|
|
@@ -21,3 +22,6 @@ export * from './system';
|
|
|
21
22
|
export * from './reports';
|
|
22
23
|
export * from './sso';
|
|
23
24
|
export * from './views';
|
|
25
|
+
export * from './forms';
|
|
26
|
+
export * from './actions';
|
|
27
|
+
export * from './submissions';
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./shared"), exports);
|
|
18
|
+
__exportStar(require("./ai"), exports);
|
|
18
19
|
__exportStar(require("./events"), exports);
|
|
19
20
|
__exportStar(require("./integrations"), exports);
|
|
20
21
|
__exportStar(require("./labels"), exports);
|
|
@@ -37,4 +38,7 @@ __exportStar(require("./system"), exports);
|
|
|
37
38
|
__exportStar(require("./reports"), exports);
|
|
38
39
|
__exportStar(require("./sso"), exports);
|
|
39
40
|
__exportStar(require("./views"), exports);
|
|
41
|
+
__exportStar(require("./forms"), exports);
|
|
42
|
+
__exportStar(require("./actions"), exports);
|
|
43
|
+
__exportStar(require("./submissions"), exports);
|
|
40
44
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,wCAAqB;AACrB,0CAAuB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,uCAAoB;AACpB,2CAAwB;AACxB,iDAA8B;AAC9B,2CAAwB;AACxB,2CAAwB;AACxB,8CAA2B;AAC3B,6CAA0B;AAC1B,kDAA+B;AAC/B,4CAAyB;AACzB,0CAAuB;AACvB,yCAAsB;AACtB,8CAA2B;AAC3B,0CAAuB;AACvB,8CAA2B;AAC3B,0CAAuB;AACvB,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,8CAA2B;AAC3B,2CAAwB;AACxB,4CAAyB;AACzB,wCAAqB;AACrB,0CAAuB;AACvB,0CAAuB;AACvB,4CAAyB;AACzB,gDAA6B"}
|