@superbuilders/primer-tives 4.0.1 → 4.0.2
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/README.md +4 -3
- package/dist/client/auth/provider.d.ts.map +1 -1
- package/dist/client/index.js +6594 -189
- package/dist/client/index.js.map +74 -7
- package/dist/contracts/index.d.ts +2 -1
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +6528 -121
- package/dist/contracts/index.js.map +72 -5
- package/dist/contracts/pci-schemas.d.ts +100 -28
- package/dist/contracts/pci-schemas.d.ts.map +1 -1
- package/dist/contracts/types.d.ts +1 -0
- package/dist/contracts/types.d.ts.map +1 -1
- package/dist/contracts/validation.d.ts +379 -89
- package/dist/contracts/validation.d.ts.map +1 -1
- package/dist/errors.js +32 -1
- package/dist/errors.js.map +2 -2
- package/dist/grade-level.js +32 -1
- package/dist/grade-level.js.map +2 -2
- package/dist/subject-pcis.js +32 -1
- package/dist/subject-pcis.js.map +2 -2
- package/dist/subject.js +32 -1
- package/dist/subject.js.map +2 -2
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,29 +1,101 @@
|
|
|
1
|
-
import
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
1
|
+
import * as validate from "@superbuilders/validate";
|
|
2
|
+
declare const FractionInputPropsDraft07Schema: {
|
|
3
|
+
readonly type: "object";
|
|
4
|
+
readonly additionalProperties: false;
|
|
5
|
+
readonly required: readonly ["form", "requireSimplified"];
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly form: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly enum: readonly ["whole", "proper", "improper", "mixed"];
|
|
10
|
+
};
|
|
11
|
+
readonly requireSimplified: {
|
|
12
|
+
readonly type: "boolean";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const FractionInputSubmissionDraft07Schema: {
|
|
17
|
+
readonly oneOf: readonly [{
|
|
18
|
+
readonly type: "object";
|
|
19
|
+
readonly additionalProperties: false;
|
|
20
|
+
readonly required: readonly ["form", "whole"];
|
|
21
|
+
readonly properties: {
|
|
22
|
+
readonly form: {
|
|
23
|
+
readonly const: "whole";
|
|
24
|
+
};
|
|
25
|
+
readonly whole: {
|
|
26
|
+
readonly type: "string";
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "object";
|
|
31
|
+
readonly additionalProperties: false;
|
|
32
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
33
|
+
readonly properties: {
|
|
34
|
+
readonly form: {
|
|
35
|
+
readonly const: "proper";
|
|
36
|
+
};
|
|
37
|
+
readonly numerator: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
};
|
|
40
|
+
readonly denominator: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
readonly type: "object";
|
|
46
|
+
readonly additionalProperties: false;
|
|
47
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
48
|
+
readonly properties: {
|
|
49
|
+
readonly form: {
|
|
50
|
+
readonly const: "improper";
|
|
51
|
+
};
|
|
52
|
+
readonly numerator: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
};
|
|
55
|
+
readonly denominator: {
|
|
56
|
+
readonly type: "string";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "object";
|
|
61
|
+
readonly additionalProperties: false;
|
|
62
|
+
readonly required: readonly ["form", "whole", "numerator", "denominator"];
|
|
63
|
+
readonly properties: {
|
|
64
|
+
readonly form: {
|
|
65
|
+
readonly const: "mixed";
|
|
66
|
+
};
|
|
67
|
+
readonly whole: {
|
|
68
|
+
readonly type: "string";
|
|
69
|
+
};
|
|
70
|
+
readonly numerator: {
|
|
71
|
+
readonly type: "string";
|
|
72
|
+
};
|
|
73
|
+
readonly denominator: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
}];
|
|
78
|
+
};
|
|
79
|
+
declare const FractionInputPropsSchema: validate.Validator<{
|
|
80
|
+
form: "whole" | "proper" | "improper" | "mixed";
|
|
81
|
+
requireSimplified: boolean;
|
|
82
|
+
}>;
|
|
83
|
+
declare const FractionInputSubmissionSchema: validate.Validator<{
|
|
84
|
+
whole: string;
|
|
85
|
+
form: "whole";
|
|
86
|
+
} | {
|
|
87
|
+
form: "proper";
|
|
88
|
+
numerator: string;
|
|
89
|
+
denominator: string;
|
|
90
|
+
} | {
|
|
91
|
+
form: "improper";
|
|
92
|
+
numerator: string;
|
|
93
|
+
denominator: string;
|
|
94
|
+
} | {
|
|
95
|
+
whole: string;
|
|
96
|
+
form: "mixed";
|
|
97
|
+
numerator: string;
|
|
98
|
+
denominator: string;
|
|
99
|
+
}>;
|
|
100
|
+
export { FractionInputPropsDraft07Schema, FractionInputPropsSchema, FractionInputSubmissionDraft07Schema, FractionInputSubmissionSchema };
|
|
29
101
|
//# sourceMappingURL=pci-schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pci-schemas.d.ts","sourceRoot":"","sources":["../../src/contracts/pci-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"pci-schemas.d.ts","sourceRoot":"","sources":["../../src/contracts/pci-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AAEnD,QAAA,MAAM,+BAA+B;;;;;;;;;;;;;CAQU,CAAA;AAE/C,QAAA,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCK,CAAA;AAE/C,QAAA,MAAM,wBAAwB;;;EAAoD,CAAA;AAClF,QAAA,MAAM,6BAA6B;;;;;;;;;;;;;;;;EAAyD,CAAA;AAE5F,OAAO,EACN,+BAA+B,EAC/B,wBAAwB,EACxB,oCAAoC,EACpC,6BAA6B,EAC7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/contracts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAA;AAE1F,UAAU,SAAS;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACd;AAED,UAAU,aAAa;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,aAAa,EAAE,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/contracts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAA;AAE1F,UAAU,SAAS;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACd;AAED,UAAU,aAAa;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,GAAG,EAAE,aAAa,EAAE,CAAA;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,WA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A;AAEP,KAAK,kBAAkB,CAAC,IAAI,SAAS,KAAK,GAAG,KAAK,IAC/C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,EAAE,CAAA;CAAE,GACrC,aAAa,CAAC,IAAI,CAAC,CAAA;AAEtB,YAAY,EACX,aAAa,EACb,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,CAAA"}
|
|
@@ -1,92 +1,382 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as validate from "@superbuilders/validate";
|
|
2
2
|
import type { RendererInteraction, RendererSubmission } from "./types";
|
|
3
|
-
declare const MatchPairSchema:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
3
|
+
declare const MatchPairSchema: {
|
|
4
|
+
readonly type: "object";
|
|
5
|
+
readonly additionalProperties: false;
|
|
6
|
+
readonly required: readonly ["source", "target"];
|
|
7
|
+
readonly properties: {
|
|
8
|
+
readonly source: {
|
|
9
|
+
readonly type: "string";
|
|
10
|
+
};
|
|
11
|
+
readonly target: {
|
|
12
|
+
readonly type: "string";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const ChoiceSubmissionSchema: {
|
|
17
|
+
readonly type: "object";
|
|
18
|
+
readonly additionalProperties: false;
|
|
19
|
+
readonly required: readonly ["type", "selectedKeys"];
|
|
20
|
+
readonly properties: {
|
|
21
|
+
readonly type: {
|
|
22
|
+
readonly const: "choice";
|
|
23
|
+
};
|
|
24
|
+
readonly selectedKeys: {
|
|
25
|
+
readonly type: "array";
|
|
26
|
+
readonly items: {
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
declare const TextEntrySubmissionSchema: {
|
|
33
|
+
readonly type: "object";
|
|
34
|
+
readonly additionalProperties: false;
|
|
35
|
+
readonly required: readonly ["type", "value"];
|
|
36
|
+
readonly properties: {
|
|
37
|
+
readonly type: {
|
|
38
|
+
readonly const: "text-entry";
|
|
39
|
+
};
|
|
40
|
+
readonly value: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
declare const ExtendedTextSubmissionSchema: {
|
|
46
|
+
readonly type: "object";
|
|
47
|
+
readonly additionalProperties: false;
|
|
48
|
+
readonly required: readonly ["type", "values"];
|
|
49
|
+
readonly properties: {
|
|
50
|
+
readonly type: {
|
|
51
|
+
readonly const: "extended-text";
|
|
52
|
+
};
|
|
53
|
+
readonly values: {
|
|
54
|
+
readonly type: "array";
|
|
55
|
+
readonly minItems: 1;
|
|
56
|
+
readonly items: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
declare const OrderSubmissionSchema: {
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
readonly additionalProperties: false;
|
|
65
|
+
readonly required: readonly ["type", "orderedKeys"];
|
|
66
|
+
readonly properties: {
|
|
67
|
+
readonly type: {
|
|
68
|
+
readonly const: "order";
|
|
69
|
+
};
|
|
70
|
+
readonly orderedKeys: {
|
|
71
|
+
readonly type: "array";
|
|
72
|
+
readonly items: {
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
declare const MatchSubmissionSchema: {
|
|
79
|
+
readonly type: "object";
|
|
80
|
+
readonly additionalProperties: false;
|
|
81
|
+
readonly required: readonly ["type", "pairs"];
|
|
82
|
+
readonly properties: {
|
|
83
|
+
readonly type: {
|
|
84
|
+
readonly const: "match";
|
|
85
|
+
};
|
|
86
|
+
readonly pairs: {
|
|
87
|
+
readonly type: "array";
|
|
88
|
+
readonly items: {
|
|
89
|
+
readonly type: "object";
|
|
90
|
+
readonly additionalProperties: false;
|
|
91
|
+
readonly required: readonly ["source", "target"];
|
|
92
|
+
readonly properties: {
|
|
93
|
+
readonly source: {
|
|
94
|
+
readonly type: "string";
|
|
95
|
+
};
|
|
96
|
+
readonly target: {
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
declare const FractionInputPciSubmissionSchema: {
|
|
105
|
+
readonly type: "object";
|
|
106
|
+
readonly additionalProperties: false;
|
|
107
|
+
readonly required: readonly ["type", "pciId", "value"];
|
|
108
|
+
readonly properties: {
|
|
109
|
+
readonly type: {
|
|
110
|
+
readonly const: "portable-custom";
|
|
111
|
+
};
|
|
112
|
+
readonly pciId: {
|
|
113
|
+
readonly const: "urn:primer:pci:fraction-input";
|
|
114
|
+
};
|
|
115
|
+
readonly value: {
|
|
116
|
+
readonly oneOf: readonly [{
|
|
117
|
+
readonly type: "object";
|
|
118
|
+
readonly additionalProperties: false;
|
|
119
|
+
readonly required: readonly ["form", "whole"];
|
|
120
|
+
readonly properties: {
|
|
121
|
+
readonly form: {
|
|
122
|
+
readonly const: "whole";
|
|
123
|
+
};
|
|
124
|
+
readonly whole: {
|
|
125
|
+
readonly type: "string";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
}, {
|
|
129
|
+
readonly type: "object";
|
|
130
|
+
readonly additionalProperties: false;
|
|
131
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
132
|
+
readonly properties: {
|
|
133
|
+
readonly form: {
|
|
134
|
+
readonly const: "proper";
|
|
135
|
+
};
|
|
136
|
+
readonly numerator: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
};
|
|
139
|
+
readonly denominator: {
|
|
140
|
+
readonly type: "string";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
}, {
|
|
144
|
+
readonly type: "object";
|
|
145
|
+
readonly additionalProperties: false;
|
|
146
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
147
|
+
readonly properties: {
|
|
148
|
+
readonly form: {
|
|
149
|
+
readonly const: "improper";
|
|
150
|
+
};
|
|
151
|
+
readonly numerator: {
|
|
152
|
+
readonly type: "string";
|
|
153
|
+
};
|
|
154
|
+
readonly denominator: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
}, {
|
|
159
|
+
readonly type: "object";
|
|
160
|
+
readonly additionalProperties: false;
|
|
161
|
+
readonly required: readonly ["form", "whole", "numerator", "denominator"];
|
|
162
|
+
readonly properties: {
|
|
163
|
+
readonly form: {
|
|
164
|
+
readonly const: "mixed";
|
|
165
|
+
};
|
|
166
|
+
readonly whole: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
};
|
|
169
|
+
readonly numerator: {
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
};
|
|
172
|
+
readonly denominator: {
|
|
173
|
+
readonly type: "string";
|
|
174
|
+
};
|
|
175
|
+
};
|
|
176
|
+
}];
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
declare const RendererSubmissionDraft07Schema: {
|
|
181
|
+
readonly oneOf: readonly [{
|
|
182
|
+
readonly type: "object";
|
|
183
|
+
readonly additionalProperties: false;
|
|
184
|
+
readonly required: readonly ["type", "selectedKeys"];
|
|
185
|
+
readonly properties: {
|
|
186
|
+
readonly type: {
|
|
187
|
+
readonly const: "choice";
|
|
188
|
+
};
|
|
189
|
+
readonly selectedKeys: {
|
|
190
|
+
readonly type: "array";
|
|
191
|
+
readonly items: {
|
|
192
|
+
readonly type: "string";
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
}, {
|
|
197
|
+
readonly type: "object";
|
|
198
|
+
readonly additionalProperties: false;
|
|
199
|
+
readonly required: readonly ["type", "value"];
|
|
200
|
+
readonly properties: {
|
|
201
|
+
readonly type: {
|
|
202
|
+
readonly const: "text-entry";
|
|
203
|
+
};
|
|
204
|
+
readonly value: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
}, {
|
|
209
|
+
readonly type: "object";
|
|
210
|
+
readonly additionalProperties: false;
|
|
211
|
+
readonly required: readonly ["type", "values"];
|
|
212
|
+
readonly properties: {
|
|
213
|
+
readonly type: {
|
|
214
|
+
readonly const: "extended-text";
|
|
215
|
+
};
|
|
216
|
+
readonly values: {
|
|
217
|
+
readonly type: "array";
|
|
218
|
+
readonly minItems: 1;
|
|
219
|
+
readonly items: {
|
|
220
|
+
readonly type: "string";
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "object";
|
|
226
|
+
readonly additionalProperties: false;
|
|
227
|
+
readonly required: readonly ["type", "orderedKeys"];
|
|
228
|
+
readonly properties: {
|
|
229
|
+
readonly type: {
|
|
230
|
+
readonly const: "order";
|
|
231
|
+
};
|
|
232
|
+
readonly orderedKeys: {
|
|
233
|
+
readonly type: "array";
|
|
234
|
+
readonly items: {
|
|
235
|
+
readonly type: "string";
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
}, {
|
|
240
|
+
readonly type: "object";
|
|
241
|
+
readonly additionalProperties: false;
|
|
242
|
+
readonly required: readonly ["type", "pairs"];
|
|
243
|
+
readonly properties: {
|
|
244
|
+
readonly type: {
|
|
245
|
+
readonly const: "match";
|
|
246
|
+
};
|
|
247
|
+
readonly pairs: {
|
|
248
|
+
readonly type: "array";
|
|
249
|
+
readonly items: {
|
|
250
|
+
readonly type: "object";
|
|
251
|
+
readonly additionalProperties: false;
|
|
252
|
+
readonly required: readonly ["source", "target"];
|
|
253
|
+
readonly properties: {
|
|
254
|
+
readonly source: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
};
|
|
257
|
+
readonly target: {
|
|
258
|
+
readonly type: "string";
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
}, {
|
|
265
|
+
readonly type: "object";
|
|
266
|
+
readonly additionalProperties: false;
|
|
267
|
+
readonly required: readonly ["type", "pciId", "value"];
|
|
268
|
+
readonly properties: {
|
|
269
|
+
readonly type: {
|
|
270
|
+
readonly const: "portable-custom";
|
|
271
|
+
};
|
|
272
|
+
readonly pciId: {
|
|
273
|
+
readonly const: "urn:primer:pci:fraction-input";
|
|
274
|
+
};
|
|
275
|
+
readonly value: {
|
|
276
|
+
readonly oneOf: readonly [{
|
|
277
|
+
readonly type: "object";
|
|
278
|
+
readonly additionalProperties: false;
|
|
279
|
+
readonly required: readonly ["form", "whole"];
|
|
280
|
+
readonly properties: {
|
|
281
|
+
readonly form: {
|
|
282
|
+
readonly const: "whole";
|
|
283
|
+
};
|
|
284
|
+
readonly whole: {
|
|
285
|
+
readonly type: "string";
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
}, {
|
|
289
|
+
readonly type: "object";
|
|
290
|
+
readonly additionalProperties: false;
|
|
291
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
292
|
+
readonly properties: {
|
|
293
|
+
readonly form: {
|
|
294
|
+
readonly const: "proper";
|
|
295
|
+
};
|
|
296
|
+
readonly numerator: {
|
|
297
|
+
readonly type: "string";
|
|
298
|
+
};
|
|
299
|
+
readonly denominator: {
|
|
300
|
+
readonly type: "string";
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
}, {
|
|
304
|
+
readonly type: "object";
|
|
305
|
+
readonly additionalProperties: false;
|
|
306
|
+
readonly required: readonly ["form", "numerator", "denominator"];
|
|
307
|
+
readonly properties: {
|
|
308
|
+
readonly form: {
|
|
309
|
+
readonly const: "improper";
|
|
310
|
+
};
|
|
311
|
+
readonly numerator: {
|
|
312
|
+
readonly type: "string";
|
|
313
|
+
};
|
|
314
|
+
readonly denominator: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
}, {
|
|
319
|
+
readonly type: "object";
|
|
320
|
+
readonly additionalProperties: false;
|
|
321
|
+
readonly required: readonly ["form", "whole", "numerator", "denominator"];
|
|
322
|
+
readonly properties: {
|
|
323
|
+
readonly form: {
|
|
324
|
+
readonly const: "mixed";
|
|
325
|
+
};
|
|
326
|
+
readonly whole: {
|
|
327
|
+
readonly type: "string";
|
|
328
|
+
};
|
|
329
|
+
readonly numerator: {
|
|
330
|
+
readonly type: "string";
|
|
331
|
+
};
|
|
332
|
+
readonly denominator: {
|
|
333
|
+
readonly type: "string";
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
}];
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
}];
|
|
340
|
+
};
|
|
341
|
+
declare const RendererSubmissionSchema: validate.Validator<{
|
|
342
|
+
type: "choice";
|
|
343
|
+
selectedKeys: string[];
|
|
344
|
+
} | {
|
|
345
|
+
value: string;
|
|
346
|
+
type: "text-entry";
|
|
347
|
+
} | {
|
|
348
|
+
values: string[];
|
|
349
|
+
type: "extended-text";
|
|
350
|
+
} | {
|
|
351
|
+
type: "order";
|
|
352
|
+
orderedKeys: string[];
|
|
353
|
+
} | {
|
|
354
|
+
type: "match";
|
|
355
|
+
pairs: {
|
|
356
|
+
source: string;
|
|
357
|
+
target: string;
|
|
358
|
+
}[];
|
|
359
|
+
} | {
|
|
360
|
+
value: {
|
|
361
|
+
whole: string;
|
|
362
|
+
form: "whole";
|
|
363
|
+
} | {
|
|
364
|
+
form: "proper";
|
|
365
|
+
numerator: string;
|
|
366
|
+
denominator: string;
|
|
367
|
+
} | {
|
|
368
|
+
form: "improper";
|
|
369
|
+
numerator: string;
|
|
370
|
+
denominator: string;
|
|
371
|
+
} | {
|
|
372
|
+
whole: string;
|
|
373
|
+
form: "mixed";
|
|
374
|
+
numerator: string;
|
|
375
|
+
denominator: string;
|
|
376
|
+
};
|
|
377
|
+
type: "portable-custom";
|
|
378
|
+
pciId: "urn:primer:pci:fraction-input";
|
|
379
|
+
}>;
|
|
90
380
|
type SubmissionValidationSuccess = {
|
|
91
381
|
ok: true;
|
|
92
382
|
value: RendererSubmission;
|
|
@@ -98,6 +388,6 @@ type SubmissionValidationFailure = {
|
|
|
98
388
|
type SubmissionValidationResult = SubmissionValidationSuccess | SubmissionValidationFailure;
|
|
99
389
|
declare function validateSubmissionForInteraction(interaction: RendererInteraction, submission: RendererSubmission): SubmissionValidationResult;
|
|
100
390
|
declare function submissionValidationMessage(result: SubmissionValidationFailure): string;
|
|
101
|
-
export { ChoiceSubmissionSchema, ExtendedTextSubmissionSchema, FractionInputPciSubmissionSchema, MatchPairSchema, MatchSubmissionSchema, OrderSubmissionSchema, RendererSubmissionSchema, TextEntrySubmissionSchema, submissionValidationMessage, validateSubmissionForInteraction };
|
|
391
|
+
export { ChoiceSubmissionSchema, ExtendedTextSubmissionSchema, FractionInputPciSubmissionSchema, MatchPairSchema, MatchSubmissionSchema, OrderSubmissionSchema, RendererSubmissionDraft07Schema, RendererSubmissionSchema, TextEntrySubmissionSchema, submissionValidationMessage, validateSubmissionForInteraction };
|
|
102
392
|
export type { SubmissionValidationFailure, SubmissionValidationResult, SubmissionValidationSuccess };
|
|
103
393
|
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/contracts/validation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/contracts/validation.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAA;AACnD,OAAO,KAAK,EAGX,mBAAmB,EAEnB,kBAAkB,EAClB,MAAM,6CAA6C,CAAA;AAEpD,QAAA,MAAM,eAAe;;;;;;;;;;;;CAK0B,CAAA;AAE/C,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