@spotto/contract 1.0.70-alpha.10 → 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/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/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 +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- 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 +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/readiness.d.ts +23 -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 +3 -1
- package/dist/types/[id]/patch/request.d.ts +4 -1
- package/dist/types/post/request.d.ts +2 -1
- package/dist/types/post/request.js.map +1 -1
- package/package.json +2 -2
|
@@ -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/actions/[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/actions/[id]/patch/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionEffect, ActionEvent, ActionPresentation, ActionTargetEntity } from '../../shared';
|
|
2
|
+
/** `name` is immutable. `event: null` clears the custom history label. */
|
|
3
|
+
export interface UpdateActionRequest {
|
|
4
|
+
label?: string;
|
|
5
|
+
purpose?: string;
|
|
6
|
+
form?: string;
|
|
7
|
+
targetEntity?: ActionTargetEntity;
|
|
8
|
+
presentation?: ActionPresentation;
|
|
9
|
+
event?: ActionEvent | null;
|
|
10
|
+
/** Replaced wholesale; an empty array clears every effect. */
|
|
11
|
+
effects?: ActionEffect[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../../src/actions/[id]/patch/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetActionResponse as UpdateActionResponse } from '../../get/response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../../src/actions/[id]/patch/response.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("./query"), exports);
|
|
18
|
+
__exportStar(require("./response"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/actions/get/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { StandardSortFields, SortOrders } from '../../shared';
|
|
2
|
+
import { ActionTargetEntity } from '../shared';
|
|
3
|
+
export declare type ActionEmbedField = 'meta';
|
|
4
|
+
export interface GetActionsQuery {
|
|
5
|
+
page?: number;
|
|
6
|
+
limit?: number;
|
|
7
|
+
ids?: string[];
|
|
8
|
+
sort?: StandardSortFields;
|
|
9
|
+
sortOrder?: SortOrders;
|
|
10
|
+
embed?: Array<ActionEmbedField>;
|
|
11
|
+
/** Actions running the given form (exact form name). */
|
|
12
|
+
form?: string;
|
|
13
|
+
targetEntity?: ActionTargetEntity;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/actions/get/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IEntityMeta } from '../../shared';
|
|
2
|
+
import { ActionEffect, ActionEvent, ActionPresentation, ActionTargetEntity } from '../shared';
|
|
3
|
+
import { GetActionsQuery } from './query';
|
|
4
|
+
export interface GetActionResponse {
|
|
5
|
+
id: string;
|
|
6
|
+
/** Immutable handle; referenced by type attachments and rule CTAs. */
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
/** Free-form semantic tag (e.g. INSPECTION, CAPTURE, AUDIT). */
|
|
10
|
+
purpose?: string;
|
|
11
|
+
/** Form name — resolved to the current version at run time. */
|
|
12
|
+
form: string;
|
|
13
|
+
targetEntity: ActionTargetEntity;
|
|
14
|
+
presentation: ActionPresentation;
|
|
15
|
+
/** Absent = the generic submission label on history events. */
|
|
16
|
+
event?: ActionEvent;
|
|
17
|
+
/** Run on submit in author order (§4.2); absent = none. */
|
|
18
|
+
effects?: ActionEffect[];
|
|
19
|
+
meta?: IEntityMeta;
|
|
20
|
+
}
|
|
21
|
+
export interface GetActionsResponse {
|
|
22
|
+
query: GetActionsQuery | null;
|
|
23
|
+
total: number;
|
|
24
|
+
items: GetActionResponse[];
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/actions/get/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./shared"), exports);
|
|
18
|
+
__exportStar(require("./get"), exports);
|
|
19
|
+
__exportStar(require("./post"), exports);
|
|
20
|
+
__exportStar(require("./[id]"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAwB;AACxB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB"}
|
|
@@ -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/actions/post/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActionEffect, ActionEvent, ActionPresentation, ActionTargetEntity } from '../shared';
|
|
2
|
+
export interface PostActionRequest {
|
|
3
|
+
/** Immutable handle; referenced by type attachments and rule CTAs. */
|
|
4
|
+
name: string;
|
|
5
|
+
label: string;
|
|
6
|
+
purpose?: string;
|
|
7
|
+
/** Must name an existing, non-archived form. Required in v1. */
|
|
8
|
+
form: string;
|
|
9
|
+
targetEntity: ActionTargetEntity;
|
|
10
|
+
/** Defaults to { placement: ['entityDetailButton'] }. */
|
|
11
|
+
presentation?: ActionPresentation;
|
|
12
|
+
event?: ActionEvent;
|
|
13
|
+
/** Run on submit in author order; templates checked at save (§4.2). */
|
|
14
|
+
effects?: ActionEffect[];
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/actions/post/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetActionResponse as PostActionResponse } from '../get/response';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/actions/post/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** The kind of entity an action runs against. */
|
|
2
|
+
export declare type ActionTargetEntity = 'asset' | 'location';
|
|
3
|
+
/**
|
|
4
|
+
* Where the client surfaces the action. Asset-target actions appear per the
|
|
5
|
+
* type attachment; location-target actions appear on every location (v1).
|
|
6
|
+
* `entityListButton` also surfaces the action inline on each row of the entity
|
|
7
|
+
* list / tree, not just on the detail page.
|
|
8
|
+
*/
|
|
9
|
+
export declare type ActionPlacement = 'entityDetailButton' | 'overflowMenu' | 'entityListButton';
|
|
10
|
+
export interface ActionPresentation {
|
|
11
|
+
placement: ActionPlacement[];
|
|
12
|
+
icon?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Display label stamped on the submission event (e.g. "INSPECTION_COMPLETED").
|
|
16
|
+
* Absent/null = the generic submission label. Never an event *type* — the
|
|
17
|
+
* stored type is always FormSubmitted.
|
|
18
|
+
*/
|
|
19
|
+
export interface ActionEvent {
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
/** Severity of a raiseAlert effect — drives the client toast/result panel. */
|
|
23
|
+
export declare const ACTION_ALERT_LEVELS: readonly ["success", "info", "warning", "error"];
|
|
24
|
+
export declare type ActionAlertLevel = (typeof ACTION_ALERT_LEVELS)[number];
|
|
25
|
+
/** One SES call carries all of a sendMessage effect's recipients (§4.2). */
|
|
26
|
+
export declare const ACTION_EFFECT_MAX_RECIPIENTS = 50;
|
|
27
|
+
/**
|
|
28
|
+
* Raise a resolved message into the submit response and the stored
|
|
29
|
+
* submission — client toast + result panel (§4.2). There is no persistent
|
|
30
|
+
* notification store in v1.
|
|
31
|
+
*/
|
|
32
|
+
export interface ActionAlertEffect {
|
|
33
|
+
type: 'raiseAlert';
|
|
34
|
+
level: ActionAlertLevel;
|
|
35
|
+
/** Template; {Field} placeholders resolve over the submit env at run time. */
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Email via SES, sent post-commit best-effort (§4.2) — at most once per
|
|
40
|
+
* capture; interpolated values are HTML-escaped into the body at send time.
|
|
41
|
+
*/
|
|
42
|
+
export interface ActionMessageEffect {
|
|
43
|
+
type: 'sendMessage';
|
|
44
|
+
/** Static recipient addresses (v1), capped at ACTION_EFFECT_MAX_RECIPIENTS. */
|
|
45
|
+
to: string[];
|
|
46
|
+
/** Template, interpolated like message (an SES field — structurally header-safe). */
|
|
47
|
+
subject: string;
|
|
48
|
+
message: string;
|
|
49
|
+
}
|
|
50
|
+
export declare type ActionEffect = ActionAlertEffect | ActionMessageEffect;
|
|
51
|
+
export declare type ActionEffectType = ActionEffect['type'];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACTION_EFFECT_MAX_RECIPIENTS = exports.ACTION_ALERT_LEVELS = void 0;
|
|
4
|
+
/** Severity of a raiseAlert effect — drives the client toast/result panel. */
|
|
5
|
+
exports.ACTION_ALERT_LEVELS = [
|
|
6
|
+
'success',
|
|
7
|
+
'info',
|
|
8
|
+
'warning',
|
|
9
|
+
'error',
|
|
10
|
+
];
|
|
11
|
+
/** One SES call carries all of a sendMessage effect's recipients (§4.2). */
|
|
12
|
+
exports.ACTION_EFFECT_MAX_RECIPIENTS = 50;
|
|
13
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/actions/shared.ts"],"names":[],"mappings":";;;AA4BA,8EAA8E;AACjE,QAAA,mBAAmB,GAAG;IACjC,SAAS;IACT,MAAM;IACN,SAAS;IACT,OAAO;CACC,CAAA;AAIV,4EAA4E;AAC/D,QAAA,4BAA4B,GAAG,EAAE,CAAA"}
|
|
@@ -4,6 +4,7 @@ export declare type AssetCrudEventType = 'AssetCreated' | 'AssetUpdated' | 'Asse
|
|
|
4
4
|
export declare type LocationCrudEventType = 'LocationCreated' | 'LocationUpdated' | 'LocationDeleted';
|
|
5
5
|
export declare type ReaderCrudEventType = 'ReaderCreated' | 'ReaderUpdated' | 'ReaderDeleted';
|
|
6
6
|
export declare type SnapshotCrudEventType = 'SnapshotCreated' | 'SnapshotDeleted';
|
|
7
|
+
export declare type FormEventType = 'FormSubmitted' | 'FormSubmissionVoided';
|
|
7
8
|
export declare type SlateEventType = 'ReaderArrived' | 'ReaderExited' | 'Arrived' | 'Moved' | 'Exited' | 'ReaderOnline' | 'ReaderOffline' | 'AssetDispatch';
|
|
8
|
-
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | 'UserSearch' | 'WorkflowActionExecuted';
|
|
9
|
+
export declare type EventType = SlateEventType | AssetCrudEventType | LocationCrudEventType | ReaderCrudEventType | SnapshotCrudEventType | FormEventType | 'UserSearch' | 'WorkflowActionExecuted';
|
|
9
10
|
export declare const EVENT_TYPES: EventType[];
|
package/dist/events/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/events/constants.ts"],"names":[],"mappings":";;;AACa,QAAA,qBAAqB,GAA0B;IAC1D,MAAM;IACN,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;CACP,CAAA;AAyCY,QAAA,WAAW,GAAgB;IACtC,eAAe;IACf,cAAc;IACd,SAAS;IACT,OAAO;IACP,QAAQ;IACR,cAAc;IACd,eAAe;IACf,eAAe;IACf,cAAc;IACd,cAAc;IACd,cAAc;IACd,iBAAiB;IACjB,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,eAAe;IACf,sBAAsB;IACtB,YAAY;IACZ,wBAAwB;CACzB,CAAA"}
|
|
@@ -6,6 +6,7 @@ import { LocationType } from '../../locations/constants';
|
|
|
6
6
|
import { GetSnapshotResponse } from '../../snapshots';
|
|
7
7
|
import { ExecutedWorkflow } from '../../workflows';
|
|
8
8
|
import { GetAssetResponse } from '../../assets';
|
|
9
|
+
import { ISubmissionAssetEmbed, ISubmissionPayload, ISubmissionVoidPayload } from '../../submissions';
|
|
9
10
|
export interface EventLocation {
|
|
10
11
|
id?: string;
|
|
11
12
|
name?: string;
|
|
@@ -85,6 +86,21 @@ export interface IWorkflowActionExecutedEvent extends IBaseEvent {
|
|
|
85
86
|
type: 'WorkflowActionExecuted';
|
|
86
87
|
workflow: ExecutedWorkflow;
|
|
87
88
|
}
|
|
89
|
+
/** Exactly one of `asset`/`location` is present — the run's target (§4.4). */
|
|
90
|
+
export interface IFormSubmittedEvent extends IBaseEvent {
|
|
91
|
+
type: 'FormSubmitted';
|
|
92
|
+
asset?: ISubmissionAssetEmbed;
|
|
93
|
+
location?: IEmbeddedEntity;
|
|
94
|
+
user: IEmbeddedEntity;
|
|
95
|
+
submission: ISubmissionPayload;
|
|
96
|
+
}
|
|
97
|
+
export interface IFormSubmissionVoidedEvent extends IBaseEvent {
|
|
98
|
+
type: 'FormSubmissionVoided';
|
|
99
|
+
asset?: ISubmissionAssetEmbed;
|
|
100
|
+
location?: IEmbeddedEntity;
|
|
101
|
+
user: IEmbeddedEntity;
|
|
102
|
+
submission: ISubmissionVoidPayload;
|
|
103
|
+
}
|
|
88
104
|
export interface IArrivedEventAsset extends IEmbeddedEntity {
|
|
89
105
|
dispatch?: boolean;
|
|
90
106
|
userId?: string;
|
|
@@ -137,7 +153,7 @@ export interface IAssetDispatchEvent extends IBaseEvent {
|
|
|
137
153
|
location?: AssetEventLocation;
|
|
138
154
|
dispatchExpires: number;
|
|
139
155
|
}
|
|
140
|
-
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent;
|
|
156
|
+
export declare type GetEventResponse = IAssetCrudEvent | ILocationCrudEvent | IReaderCrudEvent | ISnapshotCrudEvent | IUserSearchEvent | IReaderArrivedEvent | IReaderExitedEvent | IArrivedEvent | IMovedEvent | IExitedEvent | IReaderOnlineEvent | IReaderOfflineEvent | IAssetDispatchEvent | IWorkflowActionExecutedEvent | IFormSubmittedEvent | IFormSubmissionVoidedEvent;
|
|
141
157
|
export interface GetEventsResponse {
|
|
142
158
|
query: GetEventsQuery | null;
|
|
143
159
|
items: GetEventResponse[];
|
|
@@ -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":""}
|