@spotto/contract 1.0.70-alpha.10 → 1.0.70-alpha.12

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.
Files changed (154) hide show
  1. package/dist/actions/[id]/index.d.ts +1 -0
  2. package/dist/actions/[id]/index.js +18 -0
  3. package/dist/actions/[id]/index.js.map +1 -0
  4. package/dist/actions/[id]/patch/index.d.ts +2 -0
  5. package/dist/actions/[id]/patch/index.js +19 -0
  6. package/dist/actions/[id]/patch/index.js.map +1 -0
  7. package/dist/actions/[id]/patch/request.d.ts +12 -0
  8. package/dist/actions/[id]/patch/request.js +3 -0
  9. package/dist/actions/[id]/patch/request.js.map +1 -0
  10. package/dist/actions/[id]/patch/response.d.ts +1 -0
  11. package/dist/actions/[id]/patch/response.js +3 -0
  12. package/dist/actions/[id]/patch/response.js.map +1 -0
  13. package/dist/actions/get/index.d.ts +2 -0
  14. package/dist/actions/get/index.js +19 -0
  15. package/dist/actions/get/index.js.map +1 -0
  16. package/dist/actions/get/query.d.ts +14 -0
  17. package/dist/actions/get/query.js +3 -0
  18. package/dist/actions/get/query.js.map +1 -0
  19. package/dist/actions/get/response.d.ts +25 -0
  20. package/dist/actions/get/response.js +3 -0
  21. package/dist/actions/get/response.js.map +1 -0
  22. package/dist/actions/index.d.ts +4 -0
  23. package/dist/actions/index.js +21 -0
  24. package/dist/actions/index.js.map +1 -0
  25. package/dist/actions/post/index.d.ts +2 -0
  26. package/dist/actions/post/index.js +19 -0
  27. package/dist/actions/post/index.js.map +1 -0
  28. package/dist/actions/post/request.d.ts +15 -0
  29. package/dist/actions/post/request.js +3 -0
  30. package/dist/actions/post/request.js.map +1 -0
  31. package/dist/actions/post/response.d.ts +1 -0
  32. package/dist/actions/post/response.js +3 -0
  33. package/dist/actions/post/response.js.map +1 -0
  34. package/dist/actions/shared.d.ts +51 -0
  35. package/dist/actions/shared.js +13 -0
  36. package/dist/actions/shared.js.map +1 -0
  37. package/dist/events/constants.d.ts +2 -1
  38. package/dist/events/constants.js +2 -0
  39. package/dist/events/constants.js.map +1 -1
  40. package/dist/events/get/response.d.ts +17 -1
  41. package/dist/forms/[id]/index.d.ts +1 -0
  42. package/dist/forms/[id]/index.js +18 -0
  43. package/dist/forms/[id]/index.js.map +1 -0
  44. package/dist/forms/[id]/patch/index.d.ts +2 -0
  45. package/dist/forms/[id]/patch/index.js +19 -0
  46. package/dist/forms/[id]/patch/index.js.map +1 -0
  47. package/dist/forms/[id]/patch/request.d.ts +16 -0
  48. package/dist/forms/[id]/patch/request.js +3 -0
  49. package/dist/forms/[id]/patch/request.js.map +1 -0
  50. package/dist/forms/[id]/patch/response.d.ts +1 -0
  51. package/dist/forms/[id]/patch/response.js +3 -0
  52. package/dist/forms/[id]/patch/response.js.map +1 -0
  53. package/dist/forms/constants.d.ts +19 -0
  54. package/dist/forms/constants.js +33 -0
  55. package/dist/forms/constants.js.map +1 -0
  56. package/dist/forms/get/index.d.ts +2 -0
  57. package/dist/forms/get/index.js +19 -0
  58. package/dist/forms/get/index.js.map +1 -0
  59. package/dist/forms/get/query.d.ts +18 -0
  60. package/dist/forms/get/query.js +3 -0
  61. package/dist/forms/get/query.js.map +1 -0
  62. package/dist/forms/get/response.d.ts +25 -0
  63. package/dist/forms/get/response.js +3 -0
  64. package/dist/forms/get/response.js.map +1 -0
  65. package/dist/forms/index.d.ts +6 -0
  66. package/dist/forms/index.js +23 -0
  67. package/dist/forms/index.js.map +1 -0
  68. package/dist/forms/post/index.d.ts +2 -0
  69. package/dist/forms/post/index.js +19 -0
  70. package/dist/forms/post/index.js.map +1 -0
  71. package/dist/forms/post/request.d.ts +11 -0
  72. package/dist/forms/post/request.js +3 -0
  73. package/dist/forms/post/request.js.map +1 -0
  74. package/dist/forms/post/response.d.ts +1 -0
  75. package/dist/forms/post/response.js +3 -0
  76. package/dist/forms/post/response.js.map +1 -0
  77. package/dist/forms/shared.d.ts +128 -0
  78. package/dist/forms/shared.js +3 -0
  79. package/dist/forms/shared.js.map +1 -0
  80. package/dist/forms/versions/index.d.ts +2 -0
  81. package/dist/forms/versions/index.js +19 -0
  82. package/dist/forms/versions/index.js.map +1 -0
  83. package/dist/forms/versions/path.d.ts +8 -0
  84. package/dist/forms/versions/path.js +3 -0
  85. package/dist/forms/versions/path.js.map +1 -0
  86. package/dist/forms/versions/response.d.ts +1 -0
  87. package/dist/forms/versions/response.js +3 -0
  88. package/dist/forms/versions/response.js.map +1 -0
  89. package/dist/index.d.ts +3 -0
  90. package/dist/index.js +3 -0
  91. package/dist/index.js.map +1 -1
  92. package/dist/shared/attachments.d.ts +29 -0
  93. package/dist/shared/attachments.js +11 -0
  94. package/dist/shared/attachments.js.map +1 -0
  95. package/dist/shared/index.d.ts +1 -0
  96. package/dist/shared/index.js +1 -0
  97. package/dist/shared/index.js.map +1 -1
  98. package/dist/shared/readiness.d.ts +23 -0
  99. package/dist/submissions/[id]/index.d.ts +1 -0
  100. package/dist/submissions/[id]/index.js +18 -0
  101. package/dist/submissions/[id]/index.js.map +1 -0
  102. package/dist/submissions/[id]/void/post.d.ts +6 -0
  103. package/dist/submissions/[id]/void/post.js +3 -0
  104. package/dist/submissions/[id]/void/post.js.map +1 -0
  105. package/dist/submissions/constants.d.ts +14 -0
  106. package/dist/submissions/constants.js +21 -0
  107. package/dist/submissions/constants.js.map +1 -0
  108. package/dist/submissions/get/index.d.ts +2 -0
  109. package/dist/submissions/get/index.js +19 -0
  110. package/dist/submissions/get/index.js.map +1 -0
  111. package/dist/submissions/get/query.d.ts +14 -0
  112. package/dist/submissions/get/query.js +3 -0
  113. package/dist/submissions/get/query.js.map +1 -0
  114. package/dist/submissions/get/response.d.ts +6 -0
  115. package/dist/submissions/get/response.js +3 -0
  116. package/dist/submissions/get/response.js.map +1 -0
  117. package/dist/submissions/index.d.ts +6 -0
  118. package/dist/submissions/index.js +23 -0
  119. package/dist/submissions/index.js.map +1 -0
  120. package/dist/submissions/post/index.d.ts +2 -0
  121. package/dist/submissions/post/index.js +19 -0
  122. package/dist/submissions/post/index.js.map +1 -0
  123. package/dist/submissions/post/request.d.ts +17 -0
  124. package/dist/submissions/post/request.js +3 -0
  125. package/dist/submissions/post/request.js.map +1 -0
  126. package/dist/submissions/post/response.d.ts +22 -0
  127. package/dist/submissions/post/response.js +3 -0
  128. package/dist/submissions/post/response.js.map +1 -0
  129. package/dist/submissions/shared.d.ts +133 -0
  130. package/dist/submissions/shared.js +3 -0
  131. package/dist/submissions/shared.js.map +1 -0
  132. package/dist/submissions/uploads/[fileId]/get.d.ts +11 -0
  133. package/dist/submissions/uploads/[fileId]/get.js +3 -0
  134. package/dist/submissions/uploads/[fileId]/get.js.map +1 -0
  135. package/dist/submissions/uploads/[fileId]/index.d.ts +1 -0
  136. package/dist/submissions/uploads/[fileId]/index.js +18 -0
  137. package/dist/submissions/uploads/[fileId]/index.js.map +1 -0
  138. package/dist/submissions/uploads/index.d.ts +2 -0
  139. package/dist/submissions/uploads/index.js +19 -0
  140. package/dist/submissions/uploads/index.js.map +1 -0
  141. package/dist/submissions/uploads/post/index.d.ts +2 -0
  142. package/dist/submissions/uploads/post/index.js +19 -0
  143. package/dist/submissions/uploads/post/index.js.map +1 -0
  144. package/dist/submissions/uploads/post/request.d.ts +9 -0
  145. package/dist/submissions/uploads/post/request.js +3 -0
  146. package/dist/submissions/uploads/post/request.js.map +1 -0
  147. package/dist/submissions/uploads/post/response.d.ts +18 -0
  148. package/dist/submissions/uploads/post/response.js +3 -0
  149. package/dist/submissions/uploads/post/response.js.map +1 -0
  150. package/dist/types/[id]/get.d.ts +3 -1
  151. package/dist/types/[id]/patch/request.d.ts +4 -1
  152. package/dist/types/post/request.d.ts +2 -1
  153. package/dist/types/post/request.js.map +1 -1
  154. package/package.json +2 -2
@@ -0,0 +1,25 @@
1
+ import { IEntityMeta } from '../../shared';
2
+ import { FormItem, FormPrefillRow, FormSettings, 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
+ settings?: FormSettings;
18
+ createdBy: string;
19
+ meta?: IEntityMeta;
20
+ }
21
+ export interface GetFormsResponse {
22
+ query: GetFormsQuery | null;
23
+ total: number;
24
+ items: GetFormResponse[];
25
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/get/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './constants';
2
+ export * from './shared';
3
+ export * from './get';
4
+ export * from './post';
5
+ export * from './[id]';
6
+ export * from './versions';
@@ -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,2 @@
1
+ export * from './request';
2
+ export * from './response';
@@ -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,11 @@
1
+ import { FormItem, FormPrefillRow, FormSettings, 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
+ settings?: FormSettings;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=request.js.map
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/post/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,128 @@
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 hyperlink content block — opens `href` (validated http(s)-only at save,
53
+ * so a stored href is always safe to render as an anchor).
54
+ */
55
+ export interface FormLinkItem {
56
+ kind: 'link';
57
+ href: string;
58
+ /** Display text; the href itself shows when omitted. */
59
+ label?: string;
60
+ }
61
+ /**
62
+ * An embedded YouTube video. The URL is stored as authored (watch, share,
63
+ * shorts or embed form — validated against the YouTube hosts at save) and
64
+ * the client derives the embed markup, so only allowlisted hosts ever reach
65
+ * an iframe.
66
+ */
67
+ export interface FormVideoItem {
68
+ kind: 'video';
69
+ url: string;
70
+ caption?: string;
71
+ }
72
+ /**
73
+ * A signature/photo capture block. Produces an attachment reference on the
74
+ * submission (never a fieldValue), keyed by the block's `name`.
75
+ */
76
+ export interface FormCaptureItem {
77
+ kind: FormCaptureKind;
78
+ name: string;
79
+ required?: boolean;
80
+ label?: string;
81
+ help?: string;
82
+ }
83
+ export declare type FormItem = FormFieldItem | FormSectionItem | FormTextItem | FormImageItem | FormDividerItem | FormLinkItem | FormVideoItem | FormCaptureItem;
84
+ export declare type FormItemKind = FormItem['kind'];
85
+ /**
86
+ * Runner presentation options — how the form presents its chrome, not what
87
+ * it collects. Optional as a whole, and PATCH replaces it wholesale (like
88
+ * the arrays), so an option can be cleared by publishing without it.
89
+ */
90
+ export interface FormSettings {
91
+ /** Overrides the submit button text (e.g. "Confirm"). */
92
+ submitLabel?: string;
93
+ /** Show a cancel button that closes the form without submitting. */
94
+ showCancel?: boolean;
95
+ /** Cancel button text — only allowed alongside `showCancel`. */
96
+ cancelLabel?: string;
97
+ /**
98
+ * Content-only: completing the form records NOTHING (no submission, no
99
+ * event, no write-back) — the server rejects a submission against it.
100
+ * Save-time validation forbids write-back rows, capture blocks and
101
+ * required items. For a recorded acknowledgment, use a non-informational
102
+ * form with a signature block and a "Confirm" submitLabel instead.
103
+ */
104
+ informational?: boolean;
105
+ }
106
+ /**
107
+ * A read-in row: on open, seed form field `to` from the target — either a
108
+ * copy of target field `from` or an `expression` over the target's effective
109
+ * values (exactly one of the two), optionally gated by `when`.
110
+ */
111
+ export interface FormPrefillRow {
112
+ to: string;
113
+ from?: string;
114
+ expression?: string;
115
+ when?: string;
116
+ }
117
+ /**
118
+ * A write-back row: on submit, set target field `to` — either a copy of
119
+ * captured form value `from` or an `expression` over the merged env (exactly
120
+ * one of the two), optionally gated by `when`. Written as ordinary authored
121
+ * data (user-editable afterward) and triggers the standard recompute.
122
+ */
123
+ export interface FormWriteBackRow {
124
+ to: string;
125
+ from?: string;
126
+ expression?: string;
127
+ when?: string;
128
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.js","sourceRoot":"","sources":["../../src/forms/shared.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './path';
2
+ export * from './response';
@@ -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,8 @@
1
+ /**
2
+ * Path parameters for GET /forms/{name}/versions/{version} — fetches a
3
+ * pinned, possibly non-current version (submission detail renders these).
4
+ */
5
+ export interface FormVersionPath {
6
+ name: string;
7
+ version: number;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=path.js.map
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/forms/versions/response.ts"],"names":[],"mappings":""}
package/dist/index.d.ts CHANGED
@@ -22,3 +22,6 @@ export * from './system';
22
22
  export * from './reports';
23
23
  export * from './sso';
24
24
  export * from './views';
25
+ export * from './forms';
26
+ export * from './actions';
27
+ export * from './submissions';
package/dist/index.js CHANGED
@@ -38,4 +38,7 @@ __exportStar(require("./system"), exports);
38
38
  __exportStar(require("./reports"), exports);
39
39
  __exportStar(require("./sso"), exports);
40
40
  __exportStar(require("./views"), exports);
41
+ __exportStar(require("./forms"), exports);
42
+ __exportStar(require("./actions"), exports);
43
+ __exportStar(require("./submissions"), exports);
41
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,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"}
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"}
@@ -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"}
@@ -10,3 +10,4 @@ export * from './timezone';
10
10
  export * from './timestamp';
11
11
  export * from './relative-date';
12
12
  export * from './readiness';
13
+ export * from './attachments';
@@ -26,4 +26,5 @@ __exportStar(require("./timezone"), exports);
26
26
  __exportStar(require("./timestamp"), exports);
27
27
  __exportStar(require("./relative-date"), exports);
28
28
  __exportStar(require("./readiness"), exports);
29
+ __exportStar(require("./attachments"), exports);
29
30
  //# sourceMappingURL=index.js.map
@@ -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;AAC/B,8CAA2B"}
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"}
@@ -10,6 +10,18 @@
10
10
  export declare type ReadinessLevel = 1 | 2;
11
11
  /** Overall readiness: 0 = ready (green), else the worst issue level. */
12
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
+ }
13
25
  /**
14
26
  * An authored readiness rule on a type. `expression` is an excelexp boolean;
15
27
  * when it evaluates TRUE the issue fires at `level` with `message` rendered as
@@ -19,6 +31,7 @@ export interface IReadinessRule {
19
31
  level: ReadinessLevel;
20
32
  expression: string;
21
33
  message: string;
34
+ action?: IReadinessRuleAction;
22
35
  }
23
36
  /**
24
37
  * A resolved rule (own + inherited), carrying the path of the type that
@@ -29,6 +42,11 @@ export interface IReadinessRuleAll extends IReadinessRule {
29
42
  typeId: string;
30
43
  typePath: string;
31
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
+ }
32
50
  /** A fired readiness issue on an asset. */
33
51
  export interface IReadinessIssue {
34
52
  /** The type that authored the fired rule. */
@@ -47,6 +65,11 @@ export interface IReadinessIssue {
47
65
  * fail closed. Present only when the issue fired on missing data.
48
66
  */
49
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;
50
73
  }
51
74
  /** Stored/returned readiness for an asset. */
52
75
  export interface IReadiness {
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=post.js.map
@@ -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,2 @@
1
+ export * from './query';
2
+ export * from './response';
@@ -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,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/submissions/get/query.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { GetSubmissionResponse } from '../shared';
2
+ import { GetSubmissionsQuery } from './query';
3
+ export interface GetSubmissionsResponse {
4
+ query: GetSubmissionsQuery | null;
5
+ items: GetSubmissionResponse[];
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.js","sourceRoot":"","sources":["../../../src/submissions/get/response.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export * from './constants';
2
+ export * from './shared';
3
+ export * from './get';
4
+ export * from './post';
5
+ export * from './[id]';
6
+ export * from './uploads';