@builder-builder/builder 0.0.19 → 0.0.21
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/bb.d.ts +12 -14
- package/dist/bb.js +32 -6
- package/dist/entities/builder/bind.d.ts +1 -1
- package/dist/entities/builder/builder.d.ts +2 -4
- package/dist/entities/builder/builder.js +1 -1
- package/dist/entities/collection/collection.d.ts +689 -1
- package/dist/entities/collection/collection.js +5 -2
- package/dist/entities/collection/config.d.ts +290 -0
- package/dist/entities/collection/config.js +13 -2
- package/dist/entities/collection/expectation.d.ts +1 -1
- package/dist/entities/collection/index.d.ts +3 -3
- package/dist/entities/collection/index.js +2 -2
- package/dist/entities/collection/when.d.ts +1 -1
- package/dist/entities/component/component.d.ts +64 -10
- package/dist/entities/component/component.js +9 -6
- package/dist/entities/component/config.d.ts +145 -0
- package/dist/entities/component/config.js +42 -0
- package/dist/entities/component/field.js +1 -1
- package/dist/entities/component/index.d.ts +3 -3
- package/dist/entities/component/index.js +2 -2
- package/dist/entities/component/when.d.ts +6 -6
- package/dist/entities/component/when.js +3 -3
- package/dist/entities/expectation.d.ts +4 -0
- package/dist/entities/expectation.js +3 -1
- package/dist/entities/index.d.ts +18 -17
- package/dist/entities/index.js +11 -10
- package/dist/entities/kind.d.ts +10 -7
- package/dist/entities/kind.js +39 -5
- package/dist/entities/model/bind.d.ts +1 -1
- package/dist/entities/model/index.d.ts +1 -1
- package/dist/entities/model/methods.d.ts +12 -12
- package/dist/entities/model/methods.js +2 -2
- package/dist/entities/model/model.js +1 -1
- package/dist/entities/model/models.d.ts +1 -1
- package/dist/entities/option/config.d.ts +109 -0
- package/dist/entities/option/config.js +15 -0
- package/dist/entities/option/index.d.ts +7 -7
- package/dist/entities/option/index.js +4 -4
- package/dist/entities/option/option.d.ts +88 -10
- package/dist/entities/option/option.js +9 -6
- package/dist/entities/option/select.d.ts +24 -14
- package/dist/entities/option/select.js +17 -6
- package/dist/entities/option/toggle.d.ts +17 -10
- package/dist/entities/option/toggle.js +19 -8
- package/dist/entities/option/when.d.ts +6 -6
- package/dist/{paths.d.ts → entities/paths.d.ts} +2 -0
- package/dist/{paths.js → entities/paths.js} +3 -0
- package/dist/entities/pricing/index.d.ts +1 -1
- package/dist/entities/pricing/index.js +1 -1
- package/dist/entities/pricing/pricing.js +1 -1
- package/dist/entities/pricing/rates.d.ts +5 -0
- package/dist/entities/pricing/rates.js +3 -1
- package/dist/entities/references.d.ts +723 -0
- package/dist/entities/references.js +7 -0
- package/dist/entities/serialise.d.ts +49 -43
- package/dist/entities/serialise.js +19 -13
- package/dist/entities/ui/describe.d.ts +15 -0
- package/dist/entities/ui/describe.js +11 -2
- package/dist/entities/ui/index.d.ts +4 -4
- package/dist/entities/ui/index.js +4 -4
- package/dist/entities/ui/input.d.ts +12 -3
- package/dist/entities/ui/input.js +4 -2
- package/dist/entities/ui/page.d.ts +15 -0
- package/dist/entities/ui/page.js +11 -2
- package/dist/entities/ui/pages.d.ts +132 -0
- package/dist/entities/ui/pages.js +12 -2
- package/dist/entities/ui/ui.d.ts +2 -3
- package/dist/entities/ui/ui.js +2 -2
- package/dist/entities/ui/uis.d.ts +1 -1
- package/dist/entities/ui/uis.js +2 -2
- package/dist/entities/validated.d.ts +26 -18
- package/dist/entities/when.d.ts +4 -3
- package/dist/entities/when.js +22 -2
- package/dist/environment.d.ts +2 -2
- package/dist/{validate → errors}/errors.d.ts +57 -35
- package/dist/{validate → errors}/errors.js +40 -5
- package/dist/errors/exception.d.ts +5 -0
- package/dist/{exception.js → errors/exception.js} +0 -3
- package/dist/errors/index.d.ts +4 -0
- package/dist/errors/index.js +3 -0
- package/dist/index.d.ts +19 -18
- package/dist/index.js +5 -4
- package/dist/instance.d.ts +7 -7
- package/dist/instance.js +4 -4
- package/dist/mappers/index.d.ts +2 -4
- package/dist/mappers/index.js +1 -2
- package/dist/mappers/instance.d.ts +2 -2
- package/dist/mappers/instance.js +7 -7
- package/dist/mappers/order.d.ts +4 -4
- package/dist/mappers/order.js +5 -5
- package/dist/mappers/price.js +18 -18
- package/dist/mappers/render/pages.d.ts +2 -2
- package/dist/mappers/render/render.d.ts +2 -2
- package/dist/mappers/render/render.js +12 -12
- package/dist/mappers/resolve.d.ts +11 -12
- package/dist/mappers/resolve.js +29 -46
- package/dist/mappers/variants/option-graph.d.ts +2 -3
- package/dist/mappers/variants/option-graph.js +2 -3
- package/dist/mappers/variants/variants.d.ts +2 -2
- package/dist/mappers/variants/variants.js +1 -1
- package/dist/private.d.ts +1 -2
- package/dist/private.js +1 -2
- package/dist/references.js +1 -1
- package/dist/validate/brand.js +1 -2
- package/dist/validate/builder.d.ts +3 -4
- package/dist/validate/builder.js +2 -3
- package/dist/validate/expectations.d.ts +1 -1
- package/dist/validate/index.d.ts +5 -2
- package/dist/validate/index.js +1 -0
- package/dist/validate/instance.d.ts +2 -3
- package/dist/validate/instance.js +1 -2
- package/dist/validate/model.d.ts +3 -4
- package/dist/validate/model.js +39 -44
- package/dist/validate/paths.d.ts +2 -3
- package/dist/validate/paths.js +1 -1
- package/dist/validate/pricing.d.ts +3 -4
- package/dist/validate/pricing.js +2 -3
- package/dist/validate/resolve.d.ts +3 -3
- package/dist/validate/resolve.js +1 -1
- package/dist/validate/ui.d.ts +3 -4
- package/dist/validate/ui.js +14 -5
- package/dist/validate/variants.d.ts +4 -5
- package/dist/validate/variants.js +6 -7
- package/package.json +7 -2
- package/dist/entities/component/details.d.ts +0 -66
- package/dist/entities/component/details.js +0 -24
- package/dist/entities/entry.d.ts +0 -4
- package/dist/entities/entry.js +0 -1
- package/dist/entities/option/values.d.ts +0 -49
- package/dist/entities/option/values.js +0 -14
- package/dist/entities/refs.d.ts +0 -6
- package/dist/entities/refs.js +0 -1
- package/dist/exception.d.ts +0 -13
- package/dist/validate/result.d.ts +0 -2
- package/dist/validate/result.js +0 -1
- /package/dist/{serialisable.d.ts → entities/serialisable.d.ts} +0 -0
- /package/dist/{serialisable.js → entities/serialisable.js} +0 -0
- /package/dist/{check.d.ts → errors/check.d.ts} +0 -0
- /package/dist/{check.js → errors/check.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderPaths } from '../../paths';
|
|
2
1
|
import type { Paramable, ParamableSerialised } from '../../references';
|
|
3
2
|
import type { BuilderModelState } from '../model/index';
|
|
3
|
+
import type { BuilderPaths } from '../paths';
|
|
4
4
|
import type { BuilderTags } from '../tags';
|
|
5
5
|
import type { BuilderWhenSerialised } from '../when';
|
|
6
6
|
import type { BuilderCollectionConfig, BuilderCollectionConfigSerialised } from './config';
|
|
@@ -86,6 +86,694 @@ export type BuilderCollectionSerialised = {
|
|
|
86
86
|
export declare const BuilderCollectionSerialisedSchema: v.GenericSchema<BuilderCollectionSerialised>;
|
|
87
87
|
export declare const BuilderCollectionsSerialisedSchema: v.SchemaWithPipe<readonly [v.ArraySchema<v.GenericSchema<BuilderCollectionSerialised>, undefined>, v.ReadonlyAction<BuilderCollectionSerialised[]>]>;
|
|
88
88
|
export type BuilderCollectionsSerialised = ReadonlyArray<BuilderCollectionSerialised>;
|
|
89
|
+
export declare const validateCollectionWhen: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../errors").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
90
|
+
readonly type: "enable";
|
|
91
|
+
readonly payload: {
|
|
92
|
+
readonly model: {
|
|
93
|
+
readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
|
|
94
|
+
readonly options: readonly {
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly payload: {
|
|
97
|
+
readonly type: "enable";
|
|
98
|
+
readonly payload: {
|
|
99
|
+
readonly type: "select";
|
|
100
|
+
readonly options: readonly [string, ...string[]];
|
|
101
|
+
readonly defaultValue: string | null;
|
|
102
|
+
readonly isOptional: boolean;
|
|
103
|
+
readonly optionLabels: {
|
|
104
|
+
readonly [x: string]: string;
|
|
105
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
106
|
+
readonly tags?: readonly string[] | undefined;
|
|
107
|
+
} | {
|
|
108
|
+
readonly type: "toggle";
|
|
109
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
110
|
+
readonly defaultValue: string | number | boolean | null;
|
|
111
|
+
readonly isOptional: boolean;
|
|
112
|
+
readonly tags?: readonly string[] | undefined;
|
|
113
|
+
};
|
|
114
|
+
} | {
|
|
115
|
+
readonly type: "match";
|
|
116
|
+
readonly matchPath: readonly (string | number)[];
|
|
117
|
+
readonly selectMap: {
|
|
118
|
+
readonly [x: string]: {
|
|
119
|
+
readonly type: "select";
|
|
120
|
+
readonly options: readonly [string, ...string[]];
|
|
121
|
+
readonly defaultValue: string | null;
|
|
122
|
+
readonly isOptional: boolean;
|
|
123
|
+
readonly optionLabels: {
|
|
124
|
+
readonly [x: string]: string;
|
|
125
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
126
|
+
readonly tags?: readonly string[] | undefined;
|
|
127
|
+
} | {
|
|
128
|
+
readonly type: "toggle";
|
|
129
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
130
|
+
readonly defaultValue: string | number | boolean | null;
|
|
131
|
+
readonly isOptional: boolean;
|
|
132
|
+
readonly tags?: readonly string[] | undefined;
|
|
133
|
+
} | null;
|
|
134
|
+
};
|
|
135
|
+
} | {
|
|
136
|
+
readonly type: "unless";
|
|
137
|
+
readonly unlessPath: readonly (string | number)[];
|
|
138
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
139
|
+
readonly payload: {
|
|
140
|
+
readonly type: "select";
|
|
141
|
+
readonly options: readonly [string, ...string[]];
|
|
142
|
+
readonly defaultValue: string | null;
|
|
143
|
+
readonly isOptional: boolean;
|
|
144
|
+
readonly optionLabels: {
|
|
145
|
+
readonly [x: string]: string;
|
|
146
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
147
|
+
readonly tags?: readonly string[] | undefined;
|
|
148
|
+
} | {
|
|
149
|
+
readonly type: "toggle";
|
|
150
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
151
|
+
readonly defaultValue: string | number | boolean | null;
|
|
152
|
+
readonly isOptional: boolean;
|
|
153
|
+
readonly tags?: readonly string[] | undefined;
|
|
154
|
+
};
|
|
155
|
+
} | {
|
|
156
|
+
readonly type: "select";
|
|
157
|
+
readonly options: readonly [string, ...string[]];
|
|
158
|
+
readonly defaultValue: string | null;
|
|
159
|
+
readonly isOptional: boolean;
|
|
160
|
+
readonly optionLabels: {
|
|
161
|
+
readonly [x: string]: string;
|
|
162
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
163
|
+
readonly tags?: readonly string[] | undefined;
|
|
164
|
+
} | {
|
|
165
|
+
readonly type: "toggle";
|
|
166
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
167
|
+
readonly defaultValue: string | number | boolean | null;
|
|
168
|
+
readonly isOptional: boolean;
|
|
169
|
+
readonly tags?: readonly string[] | undefined;
|
|
170
|
+
};
|
|
171
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
172
|
+
readonly tags?: readonly string[] | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
readonly components: readonly {
|
|
175
|
+
readonly name: string;
|
|
176
|
+
readonly payload: {
|
|
177
|
+
readonly fields: readonly {
|
|
178
|
+
readonly type: "component-field";
|
|
179
|
+
readonly name: string;
|
|
180
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
181
|
+
readonly isOptional: boolean;
|
|
182
|
+
readonly tags?: readonly string[] | undefined;
|
|
183
|
+
}[];
|
|
184
|
+
readonly tags?: readonly string[] | undefined;
|
|
185
|
+
} | {
|
|
186
|
+
readonly type: "enable";
|
|
187
|
+
readonly payload: {
|
|
188
|
+
readonly fields: readonly {
|
|
189
|
+
readonly type: "component-field";
|
|
190
|
+
readonly name: string;
|
|
191
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
192
|
+
readonly isOptional: boolean;
|
|
193
|
+
readonly tags?: readonly string[] | undefined;
|
|
194
|
+
}[];
|
|
195
|
+
readonly tags?: readonly string[] | undefined;
|
|
196
|
+
};
|
|
197
|
+
} | {
|
|
198
|
+
readonly type: "match";
|
|
199
|
+
readonly matchPath: readonly (string | number)[];
|
|
200
|
+
readonly selectMap: {
|
|
201
|
+
readonly [x: string]: {
|
|
202
|
+
readonly fields: readonly {
|
|
203
|
+
readonly type: "component-field";
|
|
204
|
+
readonly name: string;
|
|
205
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
206
|
+
readonly isOptional: boolean;
|
|
207
|
+
readonly tags?: readonly string[] | undefined;
|
|
208
|
+
}[];
|
|
209
|
+
readonly tags?: readonly string[] | undefined;
|
|
210
|
+
} | null;
|
|
211
|
+
};
|
|
212
|
+
} | {
|
|
213
|
+
readonly type: "unless";
|
|
214
|
+
readonly unlessPath: readonly (string | number)[];
|
|
215
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
216
|
+
readonly payload: {
|
|
217
|
+
readonly fields: readonly {
|
|
218
|
+
readonly type: "component-field";
|
|
219
|
+
readonly name: string;
|
|
220
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
221
|
+
readonly isOptional: boolean;
|
|
222
|
+
readonly tags?: readonly string[] | undefined;
|
|
223
|
+
}[];
|
|
224
|
+
readonly tags?: readonly string[] | undefined;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
228
|
+
readonly tags?: readonly string[] | undefined;
|
|
229
|
+
}[];
|
|
230
|
+
readonly collections: readonly {
|
|
231
|
+
readonly name: string;
|
|
232
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
233
|
+
readonly payload: /*elided*/ any | {
|
|
234
|
+
readonly type: "enable";
|
|
235
|
+
readonly payload: /*elided*/ any;
|
|
236
|
+
} | {
|
|
237
|
+
readonly type: "match";
|
|
238
|
+
readonly matchPath: readonly (string | number)[];
|
|
239
|
+
readonly selectMap: {
|
|
240
|
+
readonly [x: string]: /*elided*/ any | null;
|
|
241
|
+
};
|
|
242
|
+
} | {
|
|
243
|
+
readonly type: "unless";
|
|
244
|
+
readonly unlessPath: readonly (string | number)[];
|
|
245
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
246
|
+
readonly payload: /*elided*/ any;
|
|
247
|
+
};
|
|
248
|
+
readonly tags?: readonly string[] | undefined;
|
|
249
|
+
}[];
|
|
250
|
+
readonly expectations: readonly ({
|
|
251
|
+
readonly name: string;
|
|
252
|
+
readonly kind: "option" | "component" | "collection";
|
|
253
|
+
} & import("../../validate").BuilderValidatedBrand)[];
|
|
254
|
+
readonly tags?: readonly string[] | undefined;
|
|
255
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
256
|
+
readonly min: number;
|
|
257
|
+
readonly max: number;
|
|
258
|
+
readonly tags?: readonly string[] | undefined;
|
|
259
|
+
};
|
|
260
|
+
} | {
|
|
261
|
+
readonly type: "match";
|
|
262
|
+
readonly matchPath: readonly (string | number)[];
|
|
263
|
+
readonly selectMap: {
|
|
264
|
+
readonly [x: string]: {
|
|
265
|
+
readonly model: {
|
|
266
|
+
readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
|
|
267
|
+
readonly options: readonly {
|
|
268
|
+
readonly name: string;
|
|
269
|
+
readonly payload: {
|
|
270
|
+
readonly type: "enable";
|
|
271
|
+
readonly payload: {
|
|
272
|
+
readonly type: "select";
|
|
273
|
+
readonly options: readonly [string, ...string[]];
|
|
274
|
+
readonly defaultValue: string | null;
|
|
275
|
+
readonly isOptional: boolean;
|
|
276
|
+
readonly optionLabels: {
|
|
277
|
+
readonly [x: string]: string;
|
|
278
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
279
|
+
readonly tags?: readonly string[] | undefined;
|
|
280
|
+
} | {
|
|
281
|
+
readonly type: "toggle";
|
|
282
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
283
|
+
readonly defaultValue: string | number | boolean | null;
|
|
284
|
+
readonly isOptional: boolean;
|
|
285
|
+
readonly tags?: readonly string[] | undefined;
|
|
286
|
+
};
|
|
287
|
+
} | {
|
|
288
|
+
readonly type: "match";
|
|
289
|
+
readonly matchPath: readonly (string | number)[];
|
|
290
|
+
readonly selectMap: {
|
|
291
|
+
readonly [x: string]: {
|
|
292
|
+
readonly type: "select";
|
|
293
|
+
readonly options: readonly [string, ...string[]];
|
|
294
|
+
readonly defaultValue: string | null;
|
|
295
|
+
readonly isOptional: boolean;
|
|
296
|
+
readonly optionLabels: {
|
|
297
|
+
readonly [x: string]: string;
|
|
298
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
299
|
+
readonly tags?: readonly string[] | undefined;
|
|
300
|
+
} | {
|
|
301
|
+
readonly type: "toggle";
|
|
302
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
303
|
+
readonly defaultValue: string | number | boolean | null;
|
|
304
|
+
readonly isOptional: boolean;
|
|
305
|
+
readonly tags?: readonly string[] | undefined;
|
|
306
|
+
} | null;
|
|
307
|
+
};
|
|
308
|
+
} | {
|
|
309
|
+
readonly type: "unless";
|
|
310
|
+
readonly unlessPath: readonly (string | number)[];
|
|
311
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
312
|
+
readonly payload: {
|
|
313
|
+
readonly type: "select";
|
|
314
|
+
readonly options: readonly [string, ...string[]];
|
|
315
|
+
readonly defaultValue: string | null;
|
|
316
|
+
readonly isOptional: boolean;
|
|
317
|
+
readonly optionLabels: {
|
|
318
|
+
readonly [x: string]: string;
|
|
319
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
320
|
+
readonly tags?: readonly string[] | undefined;
|
|
321
|
+
} | {
|
|
322
|
+
readonly type: "toggle";
|
|
323
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
324
|
+
readonly defaultValue: string | number | boolean | null;
|
|
325
|
+
readonly isOptional: boolean;
|
|
326
|
+
readonly tags?: readonly string[] | undefined;
|
|
327
|
+
};
|
|
328
|
+
} | {
|
|
329
|
+
readonly type: "select";
|
|
330
|
+
readonly options: readonly [string, ...string[]];
|
|
331
|
+
readonly defaultValue: string | null;
|
|
332
|
+
readonly isOptional: boolean;
|
|
333
|
+
readonly optionLabels: {
|
|
334
|
+
readonly [x: string]: string;
|
|
335
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
336
|
+
readonly tags?: readonly string[] | undefined;
|
|
337
|
+
} | {
|
|
338
|
+
readonly type: "toggle";
|
|
339
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
340
|
+
readonly defaultValue: string | number | boolean | null;
|
|
341
|
+
readonly isOptional: boolean;
|
|
342
|
+
readonly tags?: readonly string[] | undefined;
|
|
343
|
+
};
|
|
344
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
345
|
+
readonly tags?: readonly string[] | undefined;
|
|
346
|
+
}[];
|
|
347
|
+
readonly components: readonly {
|
|
348
|
+
readonly name: string;
|
|
349
|
+
readonly payload: {
|
|
350
|
+
readonly fields: readonly {
|
|
351
|
+
readonly type: "component-field";
|
|
352
|
+
readonly name: string;
|
|
353
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
354
|
+
readonly isOptional: boolean;
|
|
355
|
+
readonly tags?: readonly string[] | undefined;
|
|
356
|
+
}[];
|
|
357
|
+
readonly tags?: readonly string[] | undefined;
|
|
358
|
+
} | {
|
|
359
|
+
readonly type: "enable";
|
|
360
|
+
readonly payload: {
|
|
361
|
+
readonly fields: readonly {
|
|
362
|
+
readonly type: "component-field";
|
|
363
|
+
readonly name: string;
|
|
364
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
365
|
+
readonly isOptional: boolean;
|
|
366
|
+
readonly tags?: readonly string[] | undefined;
|
|
367
|
+
}[];
|
|
368
|
+
readonly tags?: readonly string[] | undefined;
|
|
369
|
+
};
|
|
370
|
+
} | {
|
|
371
|
+
readonly type: "match";
|
|
372
|
+
readonly matchPath: readonly (string | number)[];
|
|
373
|
+
readonly selectMap: {
|
|
374
|
+
readonly [x: string]: {
|
|
375
|
+
readonly fields: readonly {
|
|
376
|
+
readonly type: "component-field";
|
|
377
|
+
readonly name: string;
|
|
378
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
379
|
+
readonly isOptional: boolean;
|
|
380
|
+
readonly tags?: readonly string[] | undefined;
|
|
381
|
+
}[];
|
|
382
|
+
readonly tags?: readonly string[] | undefined;
|
|
383
|
+
} | null;
|
|
384
|
+
};
|
|
385
|
+
} | {
|
|
386
|
+
readonly type: "unless";
|
|
387
|
+
readonly unlessPath: readonly (string | number)[];
|
|
388
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
389
|
+
readonly payload: {
|
|
390
|
+
readonly fields: readonly {
|
|
391
|
+
readonly type: "component-field";
|
|
392
|
+
readonly name: string;
|
|
393
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
394
|
+
readonly isOptional: boolean;
|
|
395
|
+
readonly tags?: readonly string[] | undefined;
|
|
396
|
+
}[];
|
|
397
|
+
readonly tags?: readonly string[] | undefined;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
401
|
+
readonly tags?: readonly string[] | undefined;
|
|
402
|
+
}[];
|
|
403
|
+
readonly collections: readonly {
|
|
404
|
+
readonly name: string;
|
|
405
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
406
|
+
readonly payload: /*elided*/ any | {
|
|
407
|
+
readonly type: "enable";
|
|
408
|
+
readonly payload: /*elided*/ any;
|
|
409
|
+
} | {
|
|
410
|
+
readonly type: "match";
|
|
411
|
+
readonly matchPath: readonly (string | number)[];
|
|
412
|
+
readonly selectMap: /*elided*/ any;
|
|
413
|
+
} | {
|
|
414
|
+
readonly type: "unless";
|
|
415
|
+
readonly unlessPath: readonly (string | number)[];
|
|
416
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
417
|
+
readonly payload: /*elided*/ any;
|
|
418
|
+
};
|
|
419
|
+
readonly tags?: readonly string[] | undefined;
|
|
420
|
+
}[];
|
|
421
|
+
readonly expectations: readonly ({
|
|
422
|
+
readonly name: string;
|
|
423
|
+
readonly kind: "option" | "component" | "collection";
|
|
424
|
+
} & import("../../validate").BuilderValidatedBrand)[];
|
|
425
|
+
readonly tags?: readonly string[] | undefined;
|
|
426
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
427
|
+
readonly min: number;
|
|
428
|
+
readonly max: number;
|
|
429
|
+
readonly tags?: readonly string[] | undefined;
|
|
430
|
+
} | null;
|
|
431
|
+
};
|
|
432
|
+
} | {
|
|
433
|
+
readonly type: "unless";
|
|
434
|
+
readonly unlessPath: readonly (string | number)[];
|
|
435
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
436
|
+
readonly payload: {
|
|
437
|
+
readonly model: {
|
|
438
|
+
readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
|
|
439
|
+
readonly options: readonly {
|
|
440
|
+
readonly name: string;
|
|
441
|
+
readonly payload: {
|
|
442
|
+
readonly type: "enable";
|
|
443
|
+
readonly payload: {
|
|
444
|
+
readonly type: "select";
|
|
445
|
+
readonly options: readonly [string, ...string[]];
|
|
446
|
+
readonly defaultValue: string | null;
|
|
447
|
+
readonly isOptional: boolean;
|
|
448
|
+
readonly optionLabels: {
|
|
449
|
+
readonly [x: string]: string;
|
|
450
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
451
|
+
readonly tags?: readonly string[] | undefined;
|
|
452
|
+
} | {
|
|
453
|
+
readonly type: "toggle";
|
|
454
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
455
|
+
readonly defaultValue: string | number | boolean | null;
|
|
456
|
+
readonly isOptional: boolean;
|
|
457
|
+
readonly tags?: readonly string[] | undefined;
|
|
458
|
+
};
|
|
459
|
+
} | {
|
|
460
|
+
readonly type: "match";
|
|
461
|
+
readonly matchPath: readonly (string | number)[];
|
|
462
|
+
readonly selectMap: {
|
|
463
|
+
readonly [x: string]: {
|
|
464
|
+
readonly type: "select";
|
|
465
|
+
readonly options: readonly [string, ...string[]];
|
|
466
|
+
readonly defaultValue: string | null;
|
|
467
|
+
readonly isOptional: boolean;
|
|
468
|
+
readonly optionLabels: {
|
|
469
|
+
readonly [x: string]: string;
|
|
470
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
471
|
+
readonly tags?: readonly string[] | undefined;
|
|
472
|
+
} | {
|
|
473
|
+
readonly type: "toggle";
|
|
474
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
475
|
+
readonly defaultValue: string | number | boolean | null;
|
|
476
|
+
readonly isOptional: boolean;
|
|
477
|
+
readonly tags?: readonly string[] | undefined;
|
|
478
|
+
} | null;
|
|
479
|
+
};
|
|
480
|
+
} | {
|
|
481
|
+
readonly type: "unless";
|
|
482
|
+
readonly unlessPath: readonly (string | number)[];
|
|
483
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
484
|
+
readonly payload: {
|
|
485
|
+
readonly type: "select";
|
|
486
|
+
readonly options: readonly [string, ...string[]];
|
|
487
|
+
readonly defaultValue: string | null;
|
|
488
|
+
readonly isOptional: boolean;
|
|
489
|
+
readonly optionLabels: {
|
|
490
|
+
readonly [x: string]: string;
|
|
491
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
492
|
+
readonly tags?: readonly string[] | undefined;
|
|
493
|
+
} | {
|
|
494
|
+
readonly type: "toggle";
|
|
495
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
496
|
+
readonly defaultValue: string | number | boolean | null;
|
|
497
|
+
readonly isOptional: boolean;
|
|
498
|
+
readonly tags?: readonly string[] | undefined;
|
|
499
|
+
};
|
|
500
|
+
} | {
|
|
501
|
+
readonly type: "select";
|
|
502
|
+
readonly options: readonly [string, ...string[]];
|
|
503
|
+
readonly defaultValue: string | null;
|
|
504
|
+
readonly isOptional: boolean;
|
|
505
|
+
readonly optionLabels: {
|
|
506
|
+
readonly [x: string]: string;
|
|
507
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
508
|
+
readonly tags?: readonly string[] | undefined;
|
|
509
|
+
} | {
|
|
510
|
+
readonly type: "toggle";
|
|
511
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
512
|
+
readonly defaultValue: string | number | boolean | null;
|
|
513
|
+
readonly isOptional: boolean;
|
|
514
|
+
readonly tags?: readonly string[] | undefined;
|
|
515
|
+
};
|
|
516
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
517
|
+
readonly tags?: readonly string[] | undefined;
|
|
518
|
+
}[];
|
|
519
|
+
readonly components: readonly {
|
|
520
|
+
readonly name: string;
|
|
521
|
+
readonly payload: {
|
|
522
|
+
readonly fields: readonly {
|
|
523
|
+
readonly type: "component-field";
|
|
524
|
+
readonly name: string;
|
|
525
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
526
|
+
readonly isOptional: boolean;
|
|
527
|
+
readonly tags?: readonly string[] | undefined;
|
|
528
|
+
}[];
|
|
529
|
+
readonly tags?: readonly string[] | undefined;
|
|
530
|
+
} | {
|
|
531
|
+
readonly type: "enable";
|
|
532
|
+
readonly payload: {
|
|
533
|
+
readonly fields: readonly {
|
|
534
|
+
readonly type: "component-field";
|
|
535
|
+
readonly name: string;
|
|
536
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
537
|
+
readonly isOptional: boolean;
|
|
538
|
+
readonly tags?: readonly string[] | undefined;
|
|
539
|
+
}[];
|
|
540
|
+
readonly tags?: readonly string[] | undefined;
|
|
541
|
+
};
|
|
542
|
+
} | {
|
|
543
|
+
readonly type: "match";
|
|
544
|
+
readonly matchPath: readonly (string | number)[];
|
|
545
|
+
readonly selectMap: {
|
|
546
|
+
readonly [x: string]: {
|
|
547
|
+
readonly fields: readonly {
|
|
548
|
+
readonly type: "component-field";
|
|
549
|
+
readonly name: string;
|
|
550
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
551
|
+
readonly isOptional: boolean;
|
|
552
|
+
readonly tags?: readonly string[] | undefined;
|
|
553
|
+
}[];
|
|
554
|
+
readonly tags?: readonly string[] | undefined;
|
|
555
|
+
} | null;
|
|
556
|
+
};
|
|
557
|
+
} | {
|
|
558
|
+
readonly type: "unless";
|
|
559
|
+
readonly unlessPath: readonly (string | number)[];
|
|
560
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
561
|
+
readonly payload: {
|
|
562
|
+
readonly fields: readonly {
|
|
563
|
+
readonly type: "component-field";
|
|
564
|
+
readonly name: string;
|
|
565
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
566
|
+
readonly isOptional: boolean;
|
|
567
|
+
readonly tags?: readonly string[] | undefined;
|
|
568
|
+
}[];
|
|
569
|
+
readonly tags?: readonly string[] | undefined;
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
573
|
+
readonly tags?: readonly string[] | undefined;
|
|
574
|
+
}[];
|
|
575
|
+
readonly collections: readonly {
|
|
576
|
+
readonly name: string;
|
|
577
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
578
|
+
readonly payload: /*elided*/ any | {
|
|
579
|
+
readonly type: "enable";
|
|
580
|
+
readonly payload: /*elided*/ any;
|
|
581
|
+
} | {
|
|
582
|
+
readonly type: "match";
|
|
583
|
+
readonly matchPath: readonly (string | number)[];
|
|
584
|
+
readonly selectMap: {
|
|
585
|
+
readonly [x: string]: /*elided*/ any | null;
|
|
586
|
+
};
|
|
587
|
+
} | {
|
|
588
|
+
readonly type: "unless";
|
|
589
|
+
readonly unlessPath: readonly (string | number)[];
|
|
590
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
591
|
+
readonly payload: /*elided*/ any;
|
|
592
|
+
};
|
|
593
|
+
readonly tags?: readonly string[] | undefined;
|
|
594
|
+
}[];
|
|
595
|
+
readonly expectations: readonly ({
|
|
596
|
+
readonly name: string;
|
|
597
|
+
readonly kind: "option" | "component" | "collection";
|
|
598
|
+
} & import("../../validate").BuilderValidatedBrand)[];
|
|
599
|
+
readonly tags?: readonly string[] | undefined;
|
|
600
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
601
|
+
readonly min: number;
|
|
602
|
+
readonly max: number;
|
|
603
|
+
readonly tags?: readonly string[] | undefined;
|
|
604
|
+
};
|
|
605
|
+
}>;
|
|
606
|
+
export declare const validateCollectionSelectMap: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../errors").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
607
|
+
readonly [x: string]: {
|
|
608
|
+
readonly model: {
|
|
609
|
+
readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
|
|
610
|
+
readonly options: readonly {
|
|
611
|
+
readonly name: string;
|
|
612
|
+
readonly payload: {
|
|
613
|
+
readonly type: "enable";
|
|
614
|
+
readonly payload: {
|
|
615
|
+
readonly type: "select";
|
|
616
|
+
readonly options: readonly [string, ...string[]];
|
|
617
|
+
readonly defaultValue: string | null;
|
|
618
|
+
readonly isOptional: boolean;
|
|
619
|
+
readonly optionLabels: {
|
|
620
|
+
readonly [x: string]: string;
|
|
621
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
622
|
+
readonly tags?: readonly string[] | undefined;
|
|
623
|
+
} | {
|
|
624
|
+
readonly type: "toggle";
|
|
625
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
626
|
+
readonly defaultValue: string | number | boolean | null;
|
|
627
|
+
readonly isOptional: boolean;
|
|
628
|
+
readonly tags?: readonly string[] | undefined;
|
|
629
|
+
};
|
|
630
|
+
} | {
|
|
631
|
+
readonly type: "match";
|
|
632
|
+
readonly matchPath: readonly (string | number)[];
|
|
633
|
+
readonly selectMap: {
|
|
634
|
+
readonly [x: string]: {
|
|
635
|
+
readonly type: "select";
|
|
636
|
+
readonly options: readonly [string, ...string[]];
|
|
637
|
+
readonly defaultValue: string | null;
|
|
638
|
+
readonly isOptional: boolean;
|
|
639
|
+
readonly optionLabels: {
|
|
640
|
+
readonly [x: string]: string;
|
|
641
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
642
|
+
readonly tags?: readonly string[] | undefined;
|
|
643
|
+
} | {
|
|
644
|
+
readonly type: "toggle";
|
|
645
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
646
|
+
readonly defaultValue: string | number | boolean | null;
|
|
647
|
+
readonly isOptional: boolean;
|
|
648
|
+
readonly tags?: readonly string[] | undefined;
|
|
649
|
+
} | null;
|
|
650
|
+
};
|
|
651
|
+
} | {
|
|
652
|
+
readonly type: "unless";
|
|
653
|
+
readonly unlessPath: readonly (string | number)[];
|
|
654
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
655
|
+
readonly payload: {
|
|
656
|
+
readonly type: "select";
|
|
657
|
+
readonly options: readonly [string, ...string[]];
|
|
658
|
+
readonly defaultValue: string | null;
|
|
659
|
+
readonly isOptional: boolean;
|
|
660
|
+
readonly optionLabels: {
|
|
661
|
+
readonly [x: string]: string;
|
|
662
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
663
|
+
readonly tags?: readonly string[] | undefined;
|
|
664
|
+
} | {
|
|
665
|
+
readonly type: "toggle";
|
|
666
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
667
|
+
readonly defaultValue: string | number | boolean | null;
|
|
668
|
+
readonly isOptional: boolean;
|
|
669
|
+
readonly tags?: readonly string[] | undefined;
|
|
670
|
+
};
|
|
671
|
+
} | {
|
|
672
|
+
readonly type: "select";
|
|
673
|
+
readonly options: readonly [string, ...string[]];
|
|
674
|
+
readonly defaultValue: string | null;
|
|
675
|
+
readonly isOptional: boolean;
|
|
676
|
+
readonly optionLabels: {
|
|
677
|
+
readonly [x: string]: string;
|
|
678
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
679
|
+
readonly tags?: readonly string[] | undefined;
|
|
680
|
+
} | {
|
|
681
|
+
readonly type: "toggle";
|
|
682
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
683
|
+
readonly defaultValue: string | number | boolean | null;
|
|
684
|
+
readonly isOptional: boolean;
|
|
685
|
+
readonly tags?: readonly string[] | undefined;
|
|
686
|
+
};
|
|
687
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
688
|
+
readonly tags?: readonly string[] | undefined;
|
|
689
|
+
}[];
|
|
690
|
+
readonly components: readonly {
|
|
691
|
+
readonly name: string;
|
|
692
|
+
readonly payload: {
|
|
693
|
+
readonly fields: readonly {
|
|
694
|
+
readonly type: "component-field";
|
|
695
|
+
readonly name: string;
|
|
696
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
697
|
+
readonly isOptional: boolean;
|
|
698
|
+
readonly tags?: readonly string[] | undefined;
|
|
699
|
+
}[];
|
|
700
|
+
readonly tags?: readonly string[] | undefined;
|
|
701
|
+
} | {
|
|
702
|
+
readonly type: "enable";
|
|
703
|
+
readonly payload: {
|
|
704
|
+
readonly fields: readonly {
|
|
705
|
+
readonly type: "component-field";
|
|
706
|
+
readonly name: string;
|
|
707
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
708
|
+
readonly isOptional: boolean;
|
|
709
|
+
readonly tags?: readonly string[] | undefined;
|
|
710
|
+
}[];
|
|
711
|
+
readonly tags?: readonly string[] | undefined;
|
|
712
|
+
};
|
|
713
|
+
} | {
|
|
714
|
+
readonly type: "match";
|
|
715
|
+
readonly matchPath: readonly (string | number)[];
|
|
716
|
+
readonly selectMap: {
|
|
717
|
+
readonly [x: string]: {
|
|
718
|
+
readonly fields: readonly {
|
|
719
|
+
readonly type: "component-field";
|
|
720
|
+
readonly name: string;
|
|
721
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
722
|
+
readonly isOptional: boolean;
|
|
723
|
+
readonly tags?: readonly string[] | undefined;
|
|
724
|
+
}[];
|
|
725
|
+
readonly tags?: readonly string[] | undefined;
|
|
726
|
+
} | null;
|
|
727
|
+
};
|
|
728
|
+
} | {
|
|
729
|
+
readonly type: "unless";
|
|
730
|
+
readonly unlessPath: readonly (string | number)[];
|
|
731
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
732
|
+
readonly payload: {
|
|
733
|
+
readonly fields: readonly {
|
|
734
|
+
readonly type: "component-field";
|
|
735
|
+
readonly name: string;
|
|
736
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
737
|
+
readonly isOptional: boolean;
|
|
738
|
+
readonly tags?: readonly string[] | undefined;
|
|
739
|
+
}[];
|
|
740
|
+
readonly tags?: readonly string[] | undefined;
|
|
741
|
+
};
|
|
742
|
+
};
|
|
743
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
744
|
+
readonly tags?: readonly string[] | undefined;
|
|
745
|
+
}[];
|
|
746
|
+
readonly collections: readonly {
|
|
747
|
+
readonly name: string;
|
|
748
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
749
|
+
readonly payload: /*elided*/ any | {
|
|
750
|
+
readonly type: "enable";
|
|
751
|
+
readonly payload: /*elided*/ any;
|
|
752
|
+
} | {
|
|
753
|
+
readonly type: "match";
|
|
754
|
+
readonly matchPath: readonly (string | number)[];
|
|
755
|
+
readonly selectMap: {
|
|
756
|
+
readonly [x: string]: /*elided*/ any | null;
|
|
757
|
+
};
|
|
758
|
+
} | {
|
|
759
|
+
readonly type: "unless";
|
|
760
|
+
readonly unlessPath: readonly (string | number)[];
|
|
761
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
762
|
+
readonly payload: /*elided*/ any;
|
|
763
|
+
};
|
|
764
|
+
readonly tags?: readonly string[] | undefined;
|
|
765
|
+
}[];
|
|
766
|
+
readonly expectations: readonly ({
|
|
767
|
+
readonly name: string;
|
|
768
|
+
readonly kind: "option" | "component" | "collection";
|
|
769
|
+
} & import("../../validate").BuilderValidatedBrand)[];
|
|
770
|
+
readonly tags?: readonly string[] | undefined;
|
|
771
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
772
|
+
readonly min: number;
|
|
773
|
+
readonly max: number;
|
|
774
|
+
readonly tags?: readonly string[] | undefined;
|
|
775
|
+
} | null;
|
|
776
|
+
}>;
|
|
89
777
|
export type CollectionNamesOf<State extends BuilderModelState | null> = [State] extends [
|
|
90
778
|
BuilderModelState
|
|
91
779
|
] ? State['collections'][number]['name'] : never;
|