@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
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Good-to-Go action attachments — shared API contract shapes.
|
|
3
|
+
*
|
|
4
|
+
* A type offers actions to its assets by attaching them, inherited with
|
|
5
|
+
* field-binding mechanics (a keyed nearest-wins merge — FORMS.md §6): an
|
|
6
|
+
* authored row attaches an action, re-configures an inherited attachment, or
|
|
7
|
+
* detaches it for this type and its descendants.
|
|
8
|
+
*/
|
|
9
|
+
/** An authored attachment row on a type (a delta, keyed by action name). */
|
|
10
|
+
export interface IActionAttachment {
|
|
11
|
+
/** Immutable handle of the action being attached, configured or detached. */
|
|
12
|
+
actionName: string;
|
|
13
|
+
/**
|
|
14
|
+
* Offer the action only while this expression is TRUE for the asset.
|
|
15
|
+
* Presentation, not authorization — submit does not re-check it.
|
|
16
|
+
*/
|
|
17
|
+
visibleWhen?: string;
|
|
18
|
+
/** Suppress the inherited attachment from this type down. */
|
|
19
|
+
detach?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** A resolved attachment (own + inherited), on a type's `actionsAll`. */
|
|
22
|
+
export interface IActionAttachmentAll {
|
|
23
|
+
actionName: string;
|
|
24
|
+
/** The action's display label, denormalised at resolve (refreshed on rename). */
|
|
25
|
+
label: string;
|
|
26
|
+
visibleWhen?: string;
|
|
27
|
+
/** Path of the type whose row attached it (provenance, like `fieldsAll`). */
|
|
28
|
+
typePath: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Good-to-Go action attachments — shared API contract shapes.
|
|
4
|
+
*
|
|
5
|
+
* A type offers actions to its assets by attaching them, inherited with
|
|
6
|
+
* field-binding mechanics (a keyed nearest-wins merge — FORMS.md §6): an
|
|
7
|
+
* authored row attaches an action, re-configures an inherited attachment, or
|
|
8
|
+
* detaches it for this type and its descendants.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=attachments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachments.js","sourceRoot":"","sources":["../../src/shared/attachments.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/shared/index.d.ts
CHANGED
package/dist/shared/index.js
CHANGED
|
@@ -25,4 +25,6 @@ __exportStar(require("./sort"), exports);
|
|
|
25
25
|
__exportStar(require("./timezone"), exports);
|
|
26
26
|
__exportStar(require("./timestamp"), exports);
|
|
27
27
|
__exportStar(require("./relative-date"), exports);
|
|
28
|
+
__exportStar(require("./readiness"), exports);
|
|
29
|
+
__exportStar(require("./attachments"), exports);
|
|
28
30
|
//# sourceMappingURL=index.js.map
|
package/dist/shared/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,2CAAwB;AACxB,0CAAuB;AACvB,2CAAwB;AACxB,4CAAyB;AACzB,yCAAsB;AACtB,0CAAuB;AACvB,yCAAsB;AACtB,6CAA0B;AAC1B,8CAA2B;AAC3B,kDAA+B;AAC/B,8CAA2B;AAC3B,gDAA6B"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
3
|
+
*
|
|
4
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
5
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
6
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
7
|
+
* `ready` is the worst level among its issues.
|
|
8
|
+
*/
|
|
9
|
+
/** Readiness severity: 1 = amber (warning), 2 = red (blocking). */
|
|
10
|
+
export declare type ReadinessLevel = 1 | 2;
|
|
11
|
+
/** Overall readiness: 0 = ready (green), else the worst issue level. */
|
|
12
|
+
export declare type ReadinessState = 0 | ReadinessLevel;
|
|
13
|
+
/**
|
|
14
|
+
* A rule's optional remediation tie to an action attached to the same type
|
|
15
|
+
* (FORMS.md §7): when the issue is shown, the UI offers `cta` → runs the
|
|
16
|
+
* action's form against the asset. Discoverable remediation, nothing more —
|
|
17
|
+
* the rule clears identically however the field changes.
|
|
18
|
+
*/
|
|
19
|
+
export interface IReadinessRuleAction {
|
|
20
|
+
/** Immutable handle of the linked action (must be in the type's `actionsAll`). */
|
|
21
|
+
actionName: string;
|
|
22
|
+
/** Button label the UI offers on the fired issue. */
|
|
23
|
+
cta: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An authored readiness rule on a type. `expression` is an excelexp boolean;
|
|
27
|
+
* when it evaluates TRUE the issue fires at `level` with `message` rendered as
|
|
28
|
+
* a `{FieldName}` template.
|
|
29
|
+
*/
|
|
30
|
+
export interface IReadinessRule {
|
|
31
|
+
level: ReadinessLevel;
|
|
32
|
+
expression: string;
|
|
33
|
+
message: string;
|
|
34
|
+
action?: IReadinessRuleAction;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A resolved rule (own + inherited), carrying the path of the type that
|
|
38
|
+
* authored it — mirrors how `IFieldDefinitionAll` carries `typePath`.
|
|
39
|
+
*/
|
|
40
|
+
export interface IReadinessRuleAll extends IReadinessRule {
|
|
41
|
+
/** Id of the type that authored the rule. */
|
|
42
|
+
typeId: string;
|
|
43
|
+
typePath: string;
|
|
44
|
+
}
|
|
45
|
+
/** The remediation link resolved onto a fired issue at evaluation time. */
|
|
46
|
+
export interface IReadinessIssueAction extends IReadinessRuleAction {
|
|
47
|
+
/** The linked action's display label at evaluation time. */
|
|
48
|
+
label: string;
|
|
49
|
+
}
|
|
50
|
+
/** A fired readiness issue on an asset. */
|
|
51
|
+
export interface IReadinessIssue {
|
|
52
|
+
/** The type that authored the fired rule. */
|
|
53
|
+
typeId: string;
|
|
54
|
+
/**
|
|
55
|
+
* The asset the issue came from: the asset itself for a leaf, or a member
|
|
56
|
+
* for a kit (kit issues are materialized copies of member issues).
|
|
57
|
+
*/
|
|
58
|
+
assetId: string;
|
|
59
|
+
assetName: string;
|
|
60
|
+
level: ReadinessLevel;
|
|
61
|
+
/** Rendered message (the rule's `message` template with field values). */
|
|
62
|
+
reason: string;
|
|
63
|
+
/**
|
|
64
|
+
* Referenced DATE / number fields that had no value, causing the rule to
|
|
65
|
+
* fail closed. Present only when the issue fired on missing data.
|
|
66
|
+
*/
|
|
67
|
+
missingFields?: string[];
|
|
68
|
+
/**
|
|
69
|
+
* The fired rule's remediation link, stamped at evaluation only while the
|
|
70
|
+
* action is still attached to the asset's type — so it can never dangle.
|
|
71
|
+
*/
|
|
72
|
+
action?: IReadinessIssueAction;
|
|
73
|
+
}
|
|
74
|
+
/** Stored/returned readiness for an asset. */
|
|
75
|
+
export interface IReadiness {
|
|
76
|
+
/** Worst level among `readyIssues`; 0 = ready (green). */
|
|
77
|
+
ready: ReadinessState;
|
|
78
|
+
readyIssues: IReadinessIssue[];
|
|
79
|
+
/** Epoch ms of the evaluation that produced this result. */
|
|
80
|
+
evaluatedAt?: number;
|
|
81
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Good-to-Go (G2G) asset readiness — shared API contract shapes.
|
|
4
|
+
*
|
|
5
|
+
* Readiness rules are authored on types (and inherited like fields), evaluated
|
|
6
|
+
* against an asset's field values by the excelexp engine. A rule whose
|
|
7
|
+
* expression evaluates TRUE raises an issue at its level; an asset's overall
|
|
8
|
+
* `ready` is the worst level among its issues.
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness.js","sourceRoot":"","sources":["../../src/shared/readiness.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './void/post';
|
|
@@ -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("./void/post"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/submissions/[id]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { GetSubmissionResponse } from '../../shared';
|
|
2
|
+
export interface PostSubmissionVoidRequest {
|
|
3
|
+
reason?: string;
|
|
4
|
+
}
|
|
5
|
+
/** The voided submission — the resource with its `voided` overlay applied. */
|
|
6
|
+
export declare type PostSubmissionVoidResponse = GetSubmissionResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post.js","sourceRoot":"","sources":["../../../../src/submissions/[id]/void/post.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Media content types a capture block accepts (§4.3) — images only, never
|
|
3
|
+
* SVG (active content). Enforced at upload-mint (the presigned POST pins the
|
|
4
|
+
* exact type into the policy) and re-checked at submit.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SUBMISSION_MEDIA_CONTENT_TYPES: readonly ["image/png", "image/jpeg", "image/webp"];
|
|
7
|
+
export declare type SubmissionMediaContentType = (typeof SUBMISSION_MEDIA_CONTENT_TYPES)[number];
|
|
8
|
+
/**
|
|
9
|
+
* Upload size cap (§4.3), enforced by the presigned-POST policy's
|
|
10
|
+
* content-length-range condition and re-checked by HEAD at submit.
|
|
11
|
+
*/
|
|
12
|
+
export declare const SUBMISSION_MEDIA_MAX_BYTES: number;
|
|
13
|
+
/** Most files a single mint request may ask for — the per-form capture-block cap. */
|
|
14
|
+
export declare const SUBMISSION_UPLOADS_MAX_FILES = 10;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUBMISSION_UPLOADS_MAX_FILES = exports.SUBMISSION_MEDIA_MAX_BYTES = exports.SUBMISSION_MEDIA_CONTENT_TYPES = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Media content types a capture block accepts (§4.3) — images only, never
|
|
6
|
+
* SVG (active content). Enforced at upload-mint (the presigned POST pins the
|
|
7
|
+
* exact type into the policy) and re-checked at submit.
|
|
8
|
+
*/
|
|
9
|
+
exports.SUBMISSION_MEDIA_CONTENT_TYPES = [
|
|
10
|
+
'image/png',
|
|
11
|
+
'image/jpeg',
|
|
12
|
+
'image/webp',
|
|
13
|
+
];
|
|
14
|
+
/**
|
|
15
|
+
* Upload size cap (§4.3), enforced by the presigned-POST policy's
|
|
16
|
+
* content-length-range condition and re-checked by HEAD at submit.
|
|
17
|
+
*/
|
|
18
|
+
exports.SUBMISSION_MEDIA_MAX_BYTES = 10 * 1024 * 1024;
|
|
19
|
+
/** Most files a single mint request may ask for — the per-form capture-block cap. */
|
|
20
|
+
exports.SUBMISSION_UPLOADS_MAX_FILES = 10;
|
|
21
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/submissions/constants.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,8BAA8B,GAAG;IAC5C,WAAW;IACX,YAAY;IACZ,YAAY;CACJ,CAAA;AAKV;;;GAGG;AACU,QAAA,0BAA0B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1D,qFAAqF;AACxE,QAAA,4BAA4B,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/submissions/get/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,6CAA0B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SortOrders } from '../../shared';
|
|
2
|
+
export interface SubmissionFilters {
|
|
3
|
+
/** Filter to submissions against these assets. */
|
|
4
|
+
assets?: string[];
|
|
5
|
+
/** Filter to submissions against these locations. */
|
|
6
|
+
locations?: string[];
|
|
7
|
+
timeFrom?: number;
|
|
8
|
+
timeTo?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface GetSubmissionsQuery extends SubmissionFilters {
|
|
11
|
+
page?: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
sortOrder?: SortOrders;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/submissions/get/query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/submissions/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("./uploads"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/submissions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,2CAAwB;AACxB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,4CAAyB"}
|
|
@@ -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/submissions/post/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,6CAA0B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ActionTargetEntity } from '../../actions/shared';
|
|
2
|
+
import { ISubmissionAttachment, ISubmissionFieldValue } from '../shared';
|
|
3
|
+
export interface PostSubmissionRequest {
|
|
4
|
+
/** Client-minted idempotency key (ULID) — one per capture, reused on retry. */
|
|
5
|
+
clientReference: string;
|
|
6
|
+
actionName: string;
|
|
7
|
+
/** The form version pinned when the run opened. */
|
|
8
|
+
formName: string;
|
|
9
|
+
formVersion: number;
|
|
10
|
+
/** The run's target: a location run captures without write-back (§4.4). */
|
|
11
|
+
entity: ActionTargetEntity;
|
|
12
|
+
entityId: string;
|
|
13
|
+
/** Client fill time (ISO). */
|
|
14
|
+
capturedAt: string;
|
|
15
|
+
fieldValues?: ISubmissionFieldValue[];
|
|
16
|
+
attachments?: ISubmissionAttachment[];
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../../src/submissions/post/request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GetAssetResponse } from '../../assets';
|
|
2
|
+
import { GetSubmissionResponse, ISubmissionEffect } from '../shared';
|
|
3
|
+
/**
|
|
4
|
+
* Delivery status of one effect on a fresh submit (§4.2): a raiseAlert entry
|
|
5
|
+
* is 'raised' by being returned; sendMessage is 'sent' or 'failed' (the
|
|
6
|
+
* capture is committed either way — effects never roll it back). Replays
|
|
7
|
+
* carry the stored effects without statuses: effects are at-most-once and
|
|
8
|
+
* ran (if ever) on the original request.
|
|
9
|
+
*/
|
|
10
|
+
export declare type SubmissionEffectStatus = 'raised' | 'sent' | 'failed' | 'skipped';
|
|
11
|
+
export interface PostSubmissionResponseEffect extends ISubmissionEffect {
|
|
12
|
+
status?: SubmissionEffectStatus;
|
|
13
|
+
/** The send failure detail when status is 'failed'. */
|
|
14
|
+
error?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PostSubmissionResponse extends GetSubmissionResponse {
|
|
17
|
+
/** True when this request replayed an already-recorded capture (§3.3 dedupe). */
|
|
18
|
+
replayed: boolean;
|
|
19
|
+
/** Fresh target readiness after recompute; absent when the target has gone. */
|
|
20
|
+
readiness?: GetAssetResponse['readiness'];
|
|
21
|
+
effects?: PostSubmissionResponseEffect[];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/submissions/post/response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { ActionAlertLevel, ActionEffectType, ActionTargetEntity } from '../actions/shared';
|
|
2
|
+
import { IEmbeddedEntity } from '../shared';
|
|
3
|
+
import { IFieldValue } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* A value captured for one form field item, as transmitted at submit.
|
|
6
|
+
* Name-keyed (form items name global field definitions); exactly one value
|
|
7
|
+
* slot per entry — a multi-select (CHECKBOXES) sends one entry per selected
|
|
8
|
+
* option, and an unanswered field sends no entry at all.
|
|
9
|
+
*/
|
|
10
|
+
export interface ISubmissionFieldValue {
|
|
11
|
+
name: string;
|
|
12
|
+
valueString?: string;
|
|
13
|
+
valueInteger?: number;
|
|
14
|
+
valueDecimal?: number;
|
|
15
|
+
valueBoolean?: boolean;
|
|
16
|
+
/** DATE wire format: YYYY-MM-DD. */
|
|
17
|
+
valueDate?: string;
|
|
18
|
+
valueDateTime?: Date | string;
|
|
19
|
+
/** Tolerated on input for round-trips; stripped — identity resolves by name. */
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Tolerated on input for round-trips; stripped — re-derived server-side. */
|
|
22
|
+
computed?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/** A captured signature/photo reference (uploaded via B4's presigned POST). */
|
|
25
|
+
export interface ISubmissionAttachment {
|
|
26
|
+
/** Names a capture block of the pinned form version — distinct per row. */
|
|
27
|
+
blockName: string;
|
|
28
|
+
fileId: string;
|
|
29
|
+
contentType: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A write-back audit value in stored format: DATE as a YYYYMMDD integer,
|
|
33
|
+
* DATETIME as a Date, CHECKBOXES as the full option array.
|
|
34
|
+
*/
|
|
35
|
+
export declare type SubmissionWriteBackValue = string | number | boolean | string[];
|
|
36
|
+
/** One write-back row's outcome — applied with values, or skipped with why. */
|
|
37
|
+
export interface ISubmissionWriteBackAudit {
|
|
38
|
+
to: string;
|
|
39
|
+
appliedValue?: SubmissionWriteBackValue;
|
|
40
|
+
/** The asset-level value the write replaced; absent when the field had none. */
|
|
41
|
+
previousValue?: SubmissionWriteBackValue;
|
|
42
|
+
/** Present on expression rows — the formula that produced the value. */
|
|
43
|
+
expression?: string;
|
|
44
|
+
skipped?: true;
|
|
45
|
+
reason?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* One effect outcome as stored on the event (§4.2): resolved content for an
|
|
49
|
+
* effect that ran — messages interpolated over the submit env — or a skip
|
|
50
|
+
* audit when the action's write authority was gone (§3.2). Delivery status
|
|
51
|
+
* never persists: the event commits before effects run (see the POST
|
|
52
|
+
* response's status overlay).
|
|
53
|
+
*/
|
|
54
|
+
export interface ISubmissionEffect {
|
|
55
|
+
type: ActionEffectType;
|
|
56
|
+
/** raiseAlert severity. */
|
|
57
|
+
level?: ActionAlertLevel;
|
|
58
|
+
/** Resolved message (missing references render as "(not set)"). */
|
|
59
|
+
message?: string;
|
|
60
|
+
/** sendMessage recipients. */
|
|
61
|
+
to?: string[];
|
|
62
|
+
/** sendMessage resolved subject. */
|
|
63
|
+
subject?: string;
|
|
64
|
+
skipped?: true;
|
|
65
|
+
reason?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface ISubmissionContext {
|
|
68
|
+
entity: ActionTargetEntity;
|
|
69
|
+
entityId: string;
|
|
70
|
+
/** The asset's type at submit — never present on location runs (§4.4). */
|
|
71
|
+
typeId?: string;
|
|
72
|
+
/** The asset's type path at submit — never present on location runs (§4.4). */
|
|
73
|
+
typePath?: string;
|
|
74
|
+
}
|
|
75
|
+
/** The asset a submission ran against — identity plus its type path, both
|
|
76
|
+
* frozen at submit (later type renames never rewrite event history). */
|
|
77
|
+
export interface ISubmissionAssetEmbed extends IEmbeddedEntity {
|
|
78
|
+
typePath?: string;
|
|
79
|
+
}
|
|
80
|
+
/** Overlay from an appended FormSubmissionVoided event. */
|
|
81
|
+
export interface ISubmissionVoided {
|
|
82
|
+
eventId: string;
|
|
83
|
+
timestamp: number;
|
|
84
|
+
user: IEmbeddedEntity;
|
|
85
|
+
reason?: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The submission payload as stored on the FormSubmitted event — everything
|
|
89
|
+
* below the event envelope. Shared by the submission resource and the
|
|
90
|
+
* events-feed member.
|
|
91
|
+
*/
|
|
92
|
+
export interface ISubmissionPayload {
|
|
93
|
+
/** Client-minted idempotency key (ULID). */
|
|
94
|
+
clientReference: string;
|
|
95
|
+
/** Server-computed canonical hash of the capture (excludes attachment fileIds). */
|
|
96
|
+
fingerprint: string;
|
|
97
|
+
/** Absent when the action had been deleted by the time the capture drained. */
|
|
98
|
+
actionId?: string;
|
|
99
|
+
actionName: string;
|
|
100
|
+
actionLabel?: string;
|
|
101
|
+
formId: string;
|
|
102
|
+
formName: string;
|
|
103
|
+
formVersion: number;
|
|
104
|
+
/** Display label from the action's `event` config. */
|
|
105
|
+
eventLabel?: string;
|
|
106
|
+
context: ISubmissionContext;
|
|
107
|
+
/** Client fill time (ISO) — differs from the event timestamp under offline drain. */
|
|
108
|
+
capturedAt: string;
|
|
109
|
+
fieldValues: IFieldValue[];
|
|
110
|
+
attachments?: ISubmissionAttachment[];
|
|
111
|
+
writeBack?: ISubmissionWriteBackAudit[];
|
|
112
|
+
effects?: ISubmissionEffect[];
|
|
113
|
+
}
|
|
114
|
+
/** The payload of a FormSubmissionVoided event. */
|
|
115
|
+
export interface ISubmissionVoidPayload {
|
|
116
|
+
/** The FormSubmitted event id this void applies to. */
|
|
117
|
+
original: string;
|
|
118
|
+
actionName: string;
|
|
119
|
+
actionLabel?: string;
|
|
120
|
+
formName: string;
|
|
121
|
+
formVersion: number;
|
|
122
|
+
reason?: string;
|
|
123
|
+
}
|
|
124
|
+
/** The submission resource — a parsed FormSubmitted event. Exactly one of
|
|
125
|
+
* `asset`/`location` is present, matching the run's target entity. */
|
|
126
|
+
export interface GetSubmissionResponse extends ISubmissionPayload {
|
|
127
|
+
id: string;
|
|
128
|
+
timestamp: number;
|
|
129
|
+
asset?: ISubmissionAssetEmbed;
|
|
130
|
+
location?: IEmbeddedEntity;
|
|
131
|
+
user: IEmbeddedEntity;
|
|
132
|
+
voided?: ISubmissionVoided;
|
|
133
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/submissions/shared.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** GET /submissions/uploads/{fileId} — path parameters. */
|
|
2
|
+
export interface SubmissionUploadPath {
|
|
3
|
+
fileId: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* A short-lived presigned download for a committed object under the caller's
|
|
7
|
+
* own org — the key derives from the authenticated org, never from input.
|
|
8
|
+
*/
|
|
9
|
+
export interface GetSubmissionUploadResponse {
|
|
10
|
+
url: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../src/submissions/uploads/[fileId]/get.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get';
|
|
@@ -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("./get"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/submissions/uploads/[fileId]/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB"}
|