@builder-builder/builder 0.0.20 → 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 +10 -11
- package/dist/bb.js +25 -2
- package/dist/entities/builder/bind.d.ts +1 -1
- 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 +189 -0
- package/dist/entities/collection/config.js +12 -2
- package/dist/entities/collection/expectation.d.ts +1 -1
- package/dist/entities/collection/index.d.ts +2 -2
- package/dist/entities/collection/index.js +2 -2
- package/dist/entities/collection/when.d.ts +1 -1
- package/dist/entities/component/component.d.ts +61 -7
- package/dist/entities/component/component.js +5 -2
- package/dist/entities/component/config.d.ts +10 -0
- package/dist/entities/component/config.js +19 -2
- package/dist/entities/component/field.js +1 -1
- package/dist/entities/component/index.d.ts +2 -2
- package/dist/entities/component/index.js +2 -2
- package/dist/entities/component/when.d.ts +1 -1
- package/dist/entities/expectation.d.ts +4 -0
- package/dist/entities/expectation.js +3 -1
- package/dist/entities/index.d.ts +15 -13
- 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/methods.d.ts +4 -4
- package/dist/entities/model/model.js +1 -1
- package/dist/entities/option/index.d.ts +3 -3
- package/dist/entities/option/index.js +3 -3
- package/dist/entities/option/option.d.ts +85 -7
- package/dist/entities/option/option.js +5 -2
- package/dist/entities/option/select.d.ts +10 -0
- package/dist/entities/option/select.js +12 -1
- package/dist/entities/option/toggle.d.ts +7 -0
- package/dist/entities/option/toggle.js +12 -1
- package/dist/entities/option/when.d.ts +1 -1
- 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 -6
- package/dist/entities/references.js +7 -1
- package/dist/entities/serialise.d.ts +48 -42
- package/dist/entities/serialise.js +9 -3
- 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 +11 -1
- 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 +1 -1
- package/dist/entities/ui/ui.js +2 -2
- package/dist/entities/ui/uis.js +1 -1
- 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 +14 -14
- package/dist/index.js +3 -2
- package/dist/instance.d.ts +7 -7
- package/dist/instance.js +4 -4
- package/dist/mappers/instance.js +1 -1
- package/dist/mappers/order.d.ts +4 -4
- package/dist/mappers/order.js +1 -1
- package/dist/mappers/price.js +18 -18
- package/dist/mappers/render/render.js +1 -1
- package/dist/mappers/resolve.d.ts +1 -2
- package/dist/mappers/resolve.js +3 -20
- package/dist/mappers/variants/option-graph.d.ts +1 -2
- 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 +2 -3
- package/dist/validate/builder.js +2 -3
- package/dist/validate/expectations.d.ts +1 -1
- package/dist/validate/index.d.ts +4 -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 +2 -3
- 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 +2 -3
- package/dist/validate/pricing.js +2 -3
- package/dist/validate/resolve.d.ts +1 -1
- package/dist/validate/resolve.js +1 -1
- package/dist/validate/ui.d.ts +2 -3
- package/dist/validate/ui.js +13 -4
- package/dist/validate/variants.d.ts +4 -5
- package/dist/validate/variants.js +4 -5
- package/package.json +7 -2
- 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,7 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { BuilderPathsSchema } from '../../paths.js';
|
|
3
2
|
import { paramable } from '../../references.js';
|
|
4
|
-
import {
|
|
3
|
+
import { createEntityValidator } from '../kind.js';
|
|
4
|
+
import { BuilderPathsSchema } from '../paths.js';
|
|
5
|
+
import { serialisable } from '../serialisable.js';
|
|
5
6
|
import { BuilderTagsSchema } from '../tags.js';
|
|
6
7
|
import { createSelectMapSerialisedSchema, createWhenSerialisedSchema } from '../when.js';
|
|
7
8
|
import { BuilderCollectionConfigSerialisedSchema } from './config.js';
|
|
@@ -30,3 +31,5 @@ export const BuilderCollectionSerialisedSchema = serialisable(v.object({
|
|
|
30
31
|
tags: v.optional(BuilderTagsSchema)
|
|
31
32
|
}));
|
|
32
33
|
export const BuilderCollectionsSerialisedSchema = v.pipe(v.array(BuilderCollectionSerialisedSchema), v.readonly());
|
|
34
|
+
export const validateCollectionWhen = createEntityValidator('collectionWhen', BuilderCollectionWhenSerialisedSchema);
|
|
35
|
+
export const validateCollectionSelectMap = createEntityValidator('collectionSelectMap', BuilderCollectionSelectMapSerialisedSchema);
|
|
@@ -189,3 +189,192 @@ export declare const BuilderCollectionConfigsSerialisedSchema: v.SchemaWithPipe<
|
|
|
189
189
|
}>[]>]>;
|
|
190
190
|
export type BuilderCollectionConfigsSerialised = v.InferOutput<typeof BuilderCollectionConfigsSerialisedSchema>;
|
|
191
191
|
export declare function collectionConfig<Model extends Paramable<BuilderModelGeneric> = Paramable<BuilderModelGeneric>, Min extends Paramable<number> = Paramable<number>, Max extends Paramable<number> = Paramable<number>>(model: Model, min: Min, max: Max): BuilderCollectionConfig<Model, Min, Max>;
|
|
192
|
+
export declare const validateCollectionConfig: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../errors").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
193
|
+
readonly model: {
|
|
194
|
+
readonly models: readonly (/*elided*/ any & import("../../validate").BuilderValidatedBrand)[];
|
|
195
|
+
readonly options: readonly {
|
|
196
|
+
readonly name: string;
|
|
197
|
+
readonly payload: {
|
|
198
|
+
readonly type: "enable";
|
|
199
|
+
readonly payload: {
|
|
200
|
+
readonly type: "select";
|
|
201
|
+
readonly options: readonly [string, ...string[]];
|
|
202
|
+
readonly defaultValue: string | null;
|
|
203
|
+
readonly isOptional: boolean;
|
|
204
|
+
readonly optionLabels: {
|
|
205
|
+
readonly [x: string]: string;
|
|
206
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
207
|
+
readonly tags?: readonly string[] | undefined;
|
|
208
|
+
} | {
|
|
209
|
+
readonly type: "toggle";
|
|
210
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
211
|
+
readonly defaultValue: string | number | boolean | null;
|
|
212
|
+
readonly isOptional: boolean;
|
|
213
|
+
readonly tags?: readonly string[] | undefined;
|
|
214
|
+
};
|
|
215
|
+
} | {
|
|
216
|
+
readonly type: "match";
|
|
217
|
+
readonly matchPath: readonly (string | number)[];
|
|
218
|
+
readonly selectMap: {
|
|
219
|
+
readonly [x: string]: {
|
|
220
|
+
readonly type: "select";
|
|
221
|
+
readonly options: readonly [string, ...string[]];
|
|
222
|
+
readonly defaultValue: string | null;
|
|
223
|
+
readonly isOptional: boolean;
|
|
224
|
+
readonly optionLabels: {
|
|
225
|
+
readonly [x: string]: string;
|
|
226
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
227
|
+
readonly tags?: readonly string[] | undefined;
|
|
228
|
+
} | {
|
|
229
|
+
readonly type: "toggle";
|
|
230
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
231
|
+
readonly defaultValue: string | number | boolean | null;
|
|
232
|
+
readonly isOptional: boolean;
|
|
233
|
+
readonly tags?: readonly string[] | undefined;
|
|
234
|
+
} | null;
|
|
235
|
+
};
|
|
236
|
+
} | {
|
|
237
|
+
readonly type: "unless";
|
|
238
|
+
readonly unlessPath: readonly (string | number)[];
|
|
239
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
240
|
+
readonly payload: {
|
|
241
|
+
readonly type: "select";
|
|
242
|
+
readonly options: readonly [string, ...string[]];
|
|
243
|
+
readonly defaultValue: string | null;
|
|
244
|
+
readonly isOptional: boolean;
|
|
245
|
+
readonly optionLabels: {
|
|
246
|
+
readonly [x: string]: string;
|
|
247
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
248
|
+
readonly tags?: readonly string[] | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
readonly type: "toggle";
|
|
251
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
252
|
+
readonly defaultValue: string | number | boolean | null;
|
|
253
|
+
readonly isOptional: boolean;
|
|
254
|
+
readonly tags?: readonly string[] | undefined;
|
|
255
|
+
};
|
|
256
|
+
} | {
|
|
257
|
+
readonly type: "select";
|
|
258
|
+
readonly options: readonly [string, ...string[]];
|
|
259
|
+
readonly defaultValue: string | null;
|
|
260
|
+
readonly isOptional: boolean;
|
|
261
|
+
readonly optionLabels: {
|
|
262
|
+
readonly [x: string]: string;
|
|
263
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
264
|
+
readonly tags?: readonly string[] | undefined;
|
|
265
|
+
} | {
|
|
266
|
+
readonly type: "toggle";
|
|
267
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
268
|
+
readonly defaultValue: string | number | boolean | null;
|
|
269
|
+
readonly isOptional: boolean;
|
|
270
|
+
readonly tags?: readonly string[] | undefined;
|
|
271
|
+
};
|
|
272
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
273
|
+
readonly tags?: readonly string[] | undefined;
|
|
274
|
+
}[];
|
|
275
|
+
readonly components: readonly {
|
|
276
|
+
readonly name: string;
|
|
277
|
+
readonly payload: {
|
|
278
|
+
readonly fields: readonly {
|
|
279
|
+
readonly type: "component-field";
|
|
280
|
+
readonly name: string;
|
|
281
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
282
|
+
readonly isOptional: boolean;
|
|
283
|
+
readonly tags?: readonly string[] | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
readonly tags?: readonly string[] | undefined;
|
|
286
|
+
} | {
|
|
287
|
+
readonly type: "enable";
|
|
288
|
+
readonly payload: {
|
|
289
|
+
readonly fields: readonly {
|
|
290
|
+
readonly type: "component-field";
|
|
291
|
+
readonly name: string;
|
|
292
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
293
|
+
readonly isOptional: boolean;
|
|
294
|
+
readonly tags?: readonly string[] | undefined;
|
|
295
|
+
}[];
|
|
296
|
+
readonly tags?: readonly string[] | undefined;
|
|
297
|
+
};
|
|
298
|
+
} | {
|
|
299
|
+
readonly type: "match";
|
|
300
|
+
readonly matchPath: readonly (string | number)[];
|
|
301
|
+
readonly selectMap: {
|
|
302
|
+
readonly [x: string]: {
|
|
303
|
+
readonly fields: readonly {
|
|
304
|
+
readonly type: "component-field";
|
|
305
|
+
readonly name: string;
|
|
306
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
307
|
+
readonly isOptional: boolean;
|
|
308
|
+
readonly tags?: readonly string[] | undefined;
|
|
309
|
+
}[];
|
|
310
|
+
readonly tags?: readonly string[] | undefined;
|
|
311
|
+
} | null;
|
|
312
|
+
};
|
|
313
|
+
} | {
|
|
314
|
+
readonly type: "unless";
|
|
315
|
+
readonly unlessPath: readonly (string | number)[];
|
|
316
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
317
|
+
readonly payload: {
|
|
318
|
+
readonly fields: readonly {
|
|
319
|
+
readonly type: "component-field";
|
|
320
|
+
readonly name: string;
|
|
321
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
322
|
+
readonly isOptional: boolean;
|
|
323
|
+
readonly tags?: readonly string[] | undefined;
|
|
324
|
+
}[];
|
|
325
|
+
readonly tags?: readonly string[] | undefined;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
329
|
+
readonly tags?: readonly string[] | undefined;
|
|
330
|
+
}[];
|
|
331
|
+
readonly collections: readonly {
|
|
332
|
+
readonly name: string;
|
|
333
|
+
readonly paths?: readonly (readonly (string | number)[])[] | undefined;
|
|
334
|
+
readonly payload: {
|
|
335
|
+
readonly model: /*elided*/ any & import("../../validate").BuilderValidatedBrand;
|
|
336
|
+
readonly min: number;
|
|
337
|
+
readonly max: number;
|
|
338
|
+
readonly tags?: readonly string[] | undefined;
|
|
339
|
+
} | {
|
|
340
|
+
readonly type: "enable";
|
|
341
|
+
readonly payload: {
|
|
342
|
+
readonly model: /*elided*/ any & import("../../validate").BuilderValidatedBrand;
|
|
343
|
+
readonly min: number;
|
|
344
|
+
readonly max: number;
|
|
345
|
+
readonly tags?: readonly string[] | undefined;
|
|
346
|
+
};
|
|
347
|
+
} | {
|
|
348
|
+
readonly type: "match";
|
|
349
|
+
readonly matchPath: readonly (string | number)[];
|
|
350
|
+
readonly selectMap: {
|
|
351
|
+
readonly [x: string]: {
|
|
352
|
+
readonly model: /*elided*/ any & import("../../validate").BuilderValidatedBrand;
|
|
353
|
+
readonly min: number;
|
|
354
|
+
readonly max: number;
|
|
355
|
+
readonly tags?: readonly string[] | undefined;
|
|
356
|
+
} | null;
|
|
357
|
+
};
|
|
358
|
+
} | {
|
|
359
|
+
readonly type: "unless";
|
|
360
|
+
readonly unlessPath: readonly (string | number)[];
|
|
361
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
362
|
+
readonly payload: {
|
|
363
|
+
readonly model: /*elided*/ any & import("../../validate").BuilderValidatedBrand;
|
|
364
|
+
readonly min: number;
|
|
365
|
+
readonly max: number;
|
|
366
|
+
readonly tags?: readonly string[] | undefined;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
readonly tags?: readonly string[] | undefined;
|
|
370
|
+
}[];
|
|
371
|
+
readonly expectations: readonly ({
|
|
372
|
+
readonly name: string;
|
|
373
|
+
readonly kind: "option" | "component" | "collection";
|
|
374
|
+
} & import("../../validate").BuilderValidatedBrand)[];
|
|
375
|
+
readonly tags?: readonly string[] | undefined;
|
|
376
|
+
} & import("../../validate").BuilderValidatedBrand;
|
|
377
|
+
readonly min: number;
|
|
378
|
+
readonly max: number;
|
|
379
|
+
readonly tags?: readonly string[] | undefined;
|
|
380
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { paramable } from '../../references.js';
|
|
3
|
-
import {
|
|
2
|
+
import { isParamable, paramable } from '../../references.js';
|
|
3
|
+
import { createEntityValidator } from '../kind.js';
|
|
4
4
|
import { BuilderModelSerialisedSchema } from '../model/index.js';
|
|
5
|
+
import { serialisable } from '../serialisable.js';
|
|
5
6
|
import { BuilderTagsSchema } from '../tags.js';
|
|
6
7
|
export class BuilderCollectionConfig {
|
|
7
8
|
model;
|
|
@@ -29,3 +30,12 @@ export const BuilderCollectionConfigsSerialisedSchema = v.pipe(v.array(BuilderCo
|
|
|
29
30
|
export function collectionConfig(model, min, max) {
|
|
30
31
|
return new BuilderCollectionConfig(model, min, max);
|
|
31
32
|
}
|
|
33
|
+
export const validateCollectionConfig = createEntityValidator('collectionConfig', BuilderCollectionConfigSerialisedSchema, (input, errors) => {
|
|
34
|
+
const { min, max } = input;
|
|
35
|
+
if (isParamable(min) || isParamable(max)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (min < 0 || max <= 0 || max < min) {
|
|
39
|
+
errors.invalidCollectionBounds(min, max);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderModelState } from '../model/index';
|
|
2
1
|
import type { BuilderExpectations } from '../expectation';
|
|
2
|
+
import type { BuilderModelState } from '../model/index';
|
|
3
3
|
import type { BuilderCollection } from './collection';
|
|
4
4
|
import { BuilderExpectation } from '../expectation.js';
|
|
5
5
|
export declare function collectionExpectation<const Name extends string>(name: Name): BuilderExpectation<Name, never, "collection">;
|
|
@@ -2,7 +2,7 @@ export type { BuilderCollectionPayload, BuilderCollections, BuilderCollectionSer
|
|
|
2
2
|
export type { BuilderCollectionConfigSerialised, BuilderCollectionConfigsSerialised } from './config';
|
|
3
3
|
export type { CollectionsAsserted } from './expectation';
|
|
4
4
|
export type { BuilderCollectionWhen } from './when';
|
|
5
|
-
export { BuilderCollection, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema } from './collection.js';
|
|
6
|
-
export { BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, collectionConfig } from './config.js';
|
|
5
|
+
export { BuilderCollection, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, validateCollectionSelectMap, validateCollectionWhen } from './collection.js';
|
|
6
|
+
export { BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, collectionConfig, validateCollectionConfig } from './config.js';
|
|
7
7
|
export { collectionExpectation } from './expectation.js';
|
|
8
8
|
export { collectionWhen } from './when.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BuilderCollection, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema } from './collection.js';
|
|
2
|
-
export { BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, collectionConfig } from './config.js';
|
|
1
|
+
export { BuilderCollection, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, validateCollectionSelectMap, validateCollectionWhen } from './collection.js';
|
|
2
|
+
export { BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, collectionConfig, validateCollectionConfig } from './config.js';
|
|
3
3
|
export { collectionExpectation } from './expectation.js';
|
|
4
4
|
export { collectionWhen } from './when.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderPath } from '../../paths';
|
|
2
1
|
import type { Paramable } from '../../references';
|
|
2
|
+
import type { BuilderPath } from '../paths';
|
|
3
3
|
import type { BuilderWhen } from '../when';
|
|
4
4
|
import type { BuilderCollectionConfig } from './config';
|
|
5
5
|
export type BuilderCollectionWhen = BuilderWhen<Paramable<BuilderCollectionConfig>, Paramable<BuilderPath>, Paramable<Record<string, Paramable<BuilderCollectionConfig> | null>>, Paramable<BuilderPath>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { BuilderPaths } from '../../paths';
|
|
2
1
|
import type { Paramable } from '../../references';
|
|
2
|
+
import type { BuilderPaths } from '../paths';
|
|
3
3
|
import type { BuilderTags } from '../tags';
|
|
4
4
|
import type { BuilderWhenSerialised } from '../when';
|
|
5
5
|
import type { BuilderComponentConfig, BuilderComponentConfigSerialised } from './config';
|
|
@@ -198,14 +198,14 @@ export declare const BuilderComponentSerialisedSchema: v.SchemaWithPipe<readonly
|
|
|
198
198
|
}>[];
|
|
199
199
|
tags?: readonly string[] | undefined;
|
|
200
200
|
}>>;
|
|
201
|
-
paths?:
|
|
201
|
+
paths?: Readonly<{
|
|
202
202
|
type: "parameter";
|
|
203
203
|
id: string;
|
|
204
204
|
name: string;
|
|
205
205
|
}> | Readonly<{
|
|
206
206
|
type: "ref";
|
|
207
207
|
id: string;
|
|
208
|
-
}> | undefined;
|
|
208
|
+
}> | readonly (readonly (string | number)[])[] | undefined;
|
|
209
209
|
tags?: readonly string[] | undefined;
|
|
210
210
|
}>]>;
|
|
211
211
|
export type BuilderComponentSerialised = v.InferOutput<typeof BuilderComponentSerialisedSchema>;
|
|
@@ -351,14 +351,14 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
351
351
|
}>[];
|
|
352
352
|
tags?: readonly string[] | undefined;
|
|
353
353
|
}>>;
|
|
354
|
-
paths?:
|
|
354
|
+
paths?: Readonly<{
|
|
355
355
|
type: "parameter";
|
|
356
356
|
id: string;
|
|
357
357
|
name: string;
|
|
358
358
|
}> | Readonly<{
|
|
359
359
|
type: "ref";
|
|
360
360
|
id: string;
|
|
361
|
-
}> | undefined;
|
|
361
|
+
}> | readonly (readonly (string | number)[])[] | undefined;
|
|
362
362
|
tags?: readonly string[] | undefined;
|
|
363
363
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
364
364
|
name: string;
|
|
@@ -402,14 +402,68 @@ export declare const BuilderComponentsSerialisedSchema: v.SchemaWithPipe<readonl
|
|
|
402
402
|
}>[];
|
|
403
403
|
tags?: readonly string[] | undefined;
|
|
404
404
|
}>>;
|
|
405
|
-
paths?:
|
|
405
|
+
paths?: Readonly<{
|
|
406
406
|
type: "parameter";
|
|
407
407
|
id: string;
|
|
408
408
|
name: string;
|
|
409
409
|
}> | Readonly<{
|
|
410
410
|
type: "ref";
|
|
411
411
|
id: string;
|
|
412
|
-
}> | undefined;
|
|
412
|
+
}> | readonly (readonly (string | number)[])[] | undefined;
|
|
413
413
|
tags?: readonly string[] | undefined;
|
|
414
414
|
}>[]>]>;
|
|
415
415
|
export type BuilderComponentsSerialised = v.InferOutput<typeof BuilderComponentsSerialisedSchema>;
|
|
416
|
+
export declare const validateComponentWhen: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../errors").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
417
|
+
readonly type: "enable";
|
|
418
|
+
readonly payload: {
|
|
419
|
+
readonly fields: readonly {
|
|
420
|
+
readonly type: "component-field";
|
|
421
|
+
readonly name: string;
|
|
422
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
423
|
+
readonly isOptional: boolean;
|
|
424
|
+
readonly tags?: readonly string[] | undefined;
|
|
425
|
+
}[];
|
|
426
|
+
readonly tags?: readonly string[] | undefined;
|
|
427
|
+
};
|
|
428
|
+
} | {
|
|
429
|
+
readonly type: "match";
|
|
430
|
+
readonly matchPath: readonly (string | number)[];
|
|
431
|
+
readonly selectMap: {
|
|
432
|
+
readonly [x: string]: {
|
|
433
|
+
readonly fields: readonly {
|
|
434
|
+
readonly type: "component-field";
|
|
435
|
+
readonly name: string;
|
|
436
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
437
|
+
readonly isOptional: boolean;
|
|
438
|
+
readonly tags?: readonly string[] | undefined;
|
|
439
|
+
}[];
|
|
440
|
+
readonly tags?: readonly string[] | undefined;
|
|
441
|
+
} | null;
|
|
442
|
+
};
|
|
443
|
+
} | {
|
|
444
|
+
readonly type: "unless";
|
|
445
|
+
readonly unlessPath: readonly (string | number)[];
|
|
446
|
+
readonly disabledValues: readonly (string | number | boolean | null)[];
|
|
447
|
+
readonly payload: {
|
|
448
|
+
readonly fields: readonly {
|
|
449
|
+
readonly type: "component-field";
|
|
450
|
+
readonly name: string;
|
|
451
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
452
|
+
readonly isOptional: boolean;
|
|
453
|
+
readonly tags?: readonly string[] | undefined;
|
|
454
|
+
}[];
|
|
455
|
+
readonly tags?: readonly string[] | undefined;
|
|
456
|
+
};
|
|
457
|
+
}>;
|
|
458
|
+
export declare const validateComponentSelectMap: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../errors").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
459
|
+
readonly [x: string]: {
|
|
460
|
+
readonly fields: readonly {
|
|
461
|
+
readonly type: "component-field";
|
|
462
|
+
readonly name: string;
|
|
463
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
464
|
+
readonly isOptional: boolean;
|
|
465
|
+
readonly tags?: readonly string[] | undefined;
|
|
466
|
+
}[];
|
|
467
|
+
readonly tags?: readonly string[] | undefined;
|
|
468
|
+
} | null;
|
|
469
|
+
}>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { BuilderPathsSchema } from '../../paths.js';
|
|
3
2
|
import { paramable } from '../../references.js';
|
|
4
|
-
import {
|
|
3
|
+
import { createEntityValidator } from '../kind.js';
|
|
4
|
+
import { BuilderPathsSchema } from '../paths.js';
|
|
5
|
+
import { serialisable } from '../serialisable.js';
|
|
5
6
|
import { BuilderTagsSchema } from '../tags.js';
|
|
6
7
|
import { createSelectMapSerialisedSchema, createWhenSerialisedSchema } from '../when.js';
|
|
7
8
|
import { BuilderComponentConfigSerialisedSchema } from './config.js';
|
|
@@ -30,3 +31,5 @@ export const BuilderComponentSerialisedSchema = serialisable(v.object({
|
|
|
30
31
|
tags: v.optional(BuilderTagsSchema)
|
|
31
32
|
}));
|
|
32
33
|
export const BuilderComponentsSerialisedSchema = v.pipe(v.array(BuilderComponentSerialisedSchema), v.readonly());
|
|
34
|
+
export const validateComponentWhen = createEntityValidator('componentWhen', BuilderComponentWhenSerialisedSchema);
|
|
35
|
+
export const validateComponentSelectMap = createEntityValidator('componentSelectMap', BuilderComponentSelectMapSerialisedSchema);
|
|
@@ -133,3 +133,13 @@ export declare const BuilderComponentConfigsSerialisedSchema: v.SchemaWithPipe<r
|
|
|
133
133
|
}>[]>]>;
|
|
134
134
|
export type BuilderComponentConfigsSerialised = v.InferOutput<typeof BuilderComponentConfigsSerialisedSchema>;
|
|
135
135
|
export declare function componentConfig<const Fields extends BuilderComponentFields>(...fields: Fields): BuilderComponentConfig<Fields>;
|
|
136
|
+
export declare const validateComponentConfig: (input: unknown, references?: import("..").BuilderReferences, errors?: import("../../validate").BuilderValidateErrors) => import("..").ValidationResult<{
|
|
137
|
+
readonly fields: readonly {
|
|
138
|
+
readonly type: "component-field";
|
|
139
|
+
readonly name: string;
|
|
140
|
+
readonly valueType: "string" | "number" | "boolean";
|
|
141
|
+
readonly isOptional: boolean;
|
|
142
|
+
readonly tags?: readonly string[] | undefined;
|
|
143
|
+
}[];
|
|
144
|
+
readonly tags?: readonly string[] | undefined;
|
|
145
|
+
}>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
+
import { check } from '../../errors/index.js';
|
|
2
3
|
import { paramable } from '../../references.js';
|
|
3
|
-
import {
|
|
4
|
+
import { createEntityValidator } from '../kind.js';
|
|
5
|
+
import { serialisable } from '../serialisable.js';
|
|
4
6
|
import { BuilderTagsSchema } from '../tags.js';
|
|
5
|
-
import { BuilderComponentFieldsSerialisedSchema } from './field.js';
|
|
7
|
+
import { BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSerialisedSchema } from './field.js';
|
|
6
8
|
export class BuilderComponentConfig {
|
|
7
9
|
fields;
|
|
8
10
|
tags;
|
|
@@ -23,3 +25,18 @@ export const BuilderComponentConfigsSerialisedSchema = v.pipe(v.array(BuilderCom
|
|
|
23
25
|
export function componentConfig(...fields) {
|
|
24
26
|
return new BuilderComponentConfig(fields);
|
|
25
27
|
}
|
|
28
|
+
export const validateComponentConfig = createEntityValidator('componentConfig', BuilderComponentConfigSerialisedSchema, (input, errors) => {
|
|
29
|
+
if (!check.is(BuilderComponentFieldsSerialisedSchema, input.fields)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const seen = new Set();
|
|
33
|
+
input.fields.forEach((field) => {
|
|
34
|
+
if (!check.is(BuilderComponentFieldSerialisedSchema, field)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (seen.has(field.name)) {
|
|
38
|
+
errors.duplicateName(field.name);
|
|
39
|
+
}
|
|
40
|
+
seen.add(field.name);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import { serialisable } from '
|
|
2
|
+
import { serialisable } from '../serialisable.js';
|
|
3
3
|
import { BuilderTagsSchema } from '../tags.js';
|
|
4
4
|
export const BuilderComponentFieldValueTypeSchema = v.picklist(['string', 'boolean', 'number']);
|
|
5
5
|
export class BuilderComponentField {
|
|
@@ -3,8 +3,8 @@ export type { BuilderComponentConfigSerialised, BuilderComponentConfigsSerialise
|
|
|
3
3
|
export type { ComponentAsserted } from './expectation';
|
|
4
4
|
export type { BuilderComponentFields, BuilderComponentFieldsSerialised, BuilderComponentFieldSerialised, BuilderComponentFieldValueType } from './field';
|
|
5
5
|
export type { BuilderComponentWhen } from './when';
|
|
6
|
-
export { BuilderComponent, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema } from './component.js';
|
|
7
|
-
export { BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, componentConfig } from './config.js';
|
|
6
|
+
export { BuilderComponent, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, validateComponentSelectMap, validateComponentWhen } from './component.js';
|
|
7
|
+
export { BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, componentConfig, validateComponentConfig } from './config.js';
|
|
8
8
|
export { componentExpectation } from './expectation.js';
|
|
9
9
|
export { BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, detailBoolean, detailNumber, detailString, detailValueSchema } from './field.js';
|
|
10
10
|
export { componentWhen } from './when.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BuilderComponent, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema } from './component.js';
|
|
2
|
-
export { BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, componentConfig } from './config.js';
|
|
1
|
+
export { BuilderComponent, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, validateComponentSelectMap, validateComponentWhen } from './component.js';
|
|
2
|
+
export { BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, componentConfig, validateComponentConfig } from './config.js';
|
|
3
3
|
export { componentExpectation } from './expectation.js';
|
|
4
4
|
export { BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, detailBoolean, detailNumber, detailString, detailValueSchema } from './field.js';
|
|
5
5
|
export { componentWhen } from './when.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { BuilderPath } from '../../paths';
|
|
2
1
|
import type { BuilderPrimitives } from '../../primitive';
|
|
3
2
|
import type { Paramable } from '../../references';
|
|
3
|
+
import type { BuilderPath } from '../paths';
|
|
4
4
|
import type { BuilderEnableConfig, BuilderMatchConfig, BuilderMatchSelectMap, BuilderUnlessConfig, BuilderWhen } from '../when';
|
|
5
5
|
import type { BuilderComponentConfig } from './config';
|
|
6
6
|
export type BuilderComponentWhen = BuilderWhen<Paramable<BuilderComponentConfig>, Paramable<BuilderPath>, Paramable<Record<string, Paramable<BuilderComponentConfig> | null>>, Paramable<BuilderPath>>;
|
|
@@ -30,3 +30,7 @@ export declare const BuilderExpectationsSerialisedSchema: v.SchemaWithPipe<reado
|
|
|
30
30
|
kind: "option" | "component" | "collection";
|
|
31
31
|
}>[]>]>;
|
|
32
32
|
export type BuilderExpectationsSerialised = v.InferOutput<typeof BuilderExpectationsSerialisedSchema>;
|
|
33
|
+
export declare const validateExpectations: (input: unknown, references?: import("./references.js").BuilderReferences, errors?: import("../errors/errors.js").BuilderValidateErrors) => import("./validated.js").ValidationResult<readonly ({
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly kind: "option" | "component" | "collection";
|
|
36
|
+
} & import("../validate/brand.js").BuilderValidatedBrand)[]>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
|
-
import {
|
|
2
|
+
import { createEntityValidator } from './kind.js';
|
|
3
|
+
import { serialisable } from './serialisable.js';
|
|
3
4
|
export const BuilderExpectationKindSchema = v.picklist(['option', 'component', 'collection']);
|
|
4
5
|
export class BuilderExpectation {
|
|
5
6
|
name;
|
|
@@ -16,3 +17,4 @@ export const BuilderExpectationSerialisedSchema = serialisable(v.object({
|
|
|
16
17
|
kind: BuilderExpectationKindSchema
|
|
17
18
|
}));
|
|
18
19
|
export const BuilderExpectationsSerialisedSchema = v.pipe(v.array(BuilderExpectationSerialisedSchema), v.readonly());
|
|
20
|
+
export const validateExpectations = createEntityValidator('expectations', BuilderExpectationsSerialisedSchema);
|
package/dist/entities/index.d.ts
CHANGED
|
@@ -5,22 +5,24 @@ export type { BuilderExpectationKind, BuilderExpectations, BuilderExpectationSer
|
|
|
5
5
|
export type { BuilderEntityKind, BuilderEntitySerialised } from './kind.js';
|
|
6
6
|
export type { BuilderInstanceOf, BuilderModelGeneric, BuilderModels, BuilderModelSerialised, BuilderModelState, BuilderModelStateEmpty, BuilderModelStateOf } from './model/index';
|
|
7
7
|
export { BuilderModel, BuilderModelSchema, BuilderModelSerialisedSchema, model, modelsMerge } from './model/index.js';
|
|
8
|
-
export type {
|
|
8
|
+
export type { BuilderOptionConfig, BuilderOptionConfigSerialised, BuilderOptionConfigsSerialised, BuilderOptionPayload, BuilderOptions, BuilderOptionSerialised, BuilderOptionsSerialised, BuilderOptionWhen, BuilderOptionWhenSerialised, BuilderSelectConfigLabels, BuilderSelectConfigSerialised, BuilderSelectConfigValues, BuilderToggleConfigSerialised, BuilderToggleValueType } from './option/index';
|
|
9
|
+
export type { BuilderPath, BuilderPaths } from './paths.js';
|
|
9
10
|
export type { BuilderPricingExpression, BuilderPricingLookupKey, BuilderPricingReduce, BuilderPricingSerialised, BuilderRates } from './pricing/index';
|
|
10
11
|
export type { BuilderReference, BuilderReferences } from './references.js';
|
|
11
12
|
export type { BuilderTags } from './tags';
|
|
12
|
-
export type { BuilderDescription, BuilderDescriptionItem, BuilderUIDescribeSerialised, BuilderUIInputMetadata, BuilderUIInputMetadataSerialised, BuilderUIInputs,
|
|
13
|
-
export type { BuilderCollectionConfigValidated, BuilderCollectionsValidated, BuilderCollectionValidated, BuilderComponentConfigValidated, BuilderComponentsValidated, BuilderComponentValidated,
|
|
13
|
+
export type { BuilderDescription, BuilderDescriptionItem, BuilderUIDescribeSerialised, BuilderUIInputMetadata, BuilderUIInputMetadataSerialised, BuilderUIInputs, BuilderUIInputSerialised, BuilderUIInputsSerialised, BuilderUIItem, BuilderUIItems, BuilderUIItemSerialised, BuilderUIItemsSerialised, BuilderUIPageSerialised, BuilderUIPagesSerialised, BuilderUIs, BuilderUISerialised, BuilderUIsSerialised } from './ui/index';
|
|
14
|
+
export type { BuilderCollectionConfigValidated, BuilderCollectionsValidated, BuilderCollectionValidated, BuilderComponentConfigValidated, BuilderComponentsValidated, BuilderComponentValidated, BuilderInstancesValidated, BuilderInstanceValidated, BuilderModelValidated, BuilderOptionConfigValidated, BuilderOptionsValidated, BuilderOptionValidated, BuilderPricingValidated, BuilderUIDescribeValidated, BuilderUIItemsValidated, BuilderUIPageValidated, BuilderUIValidated, BuilderValidated, BuilderValidatedMap, BuilderVariantsValidated, Validated, ValidationResult } from './validated';
|
|
14
15
|
export type { BuilderEnableConfig, BuilderMatchConfig, BuilderMatchSelectMap, BuilderUnlessConfig, BuilderWhen, BuilderWhenConfig, BuilderWhenSerialised } from './when';
|
|
15
16
|
export { Builder, builder, BuilderSchema, BuilderSerialisedSchema } from './builder/index.js';
|
|
16
|
-
export { BuilderCollection, BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, collectionConfig, collectionExpectation, collectionWhen } from './collection/index.js';
|
|
17
|
-
export { BuilderComponent, BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, componentConfig, componentExpectation, componentWhen, detailBoolean, detailNumber, detailString, detailValueSchema } from './component/index.js';
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
17
|
+
export { BuilderCollection, BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, collectionConfig, collectionExpectation, collectionWhen, validateCollectionConfig, validateCollectionSelectMap, validateCollectionWhen } from './collection/index.js';
|
|
18
|
+
export { BuilderComponent, BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, componentConfig, componentExpectation, componentWhen, detailBoolean, detailNumber, detailString, detailValueSchema, validateComponentConfig, validateComponentSelectMap, validateComponentWhen } from './component/index.js';
|
|
19
|
+
export { BuilderExpectation, BuilderExpectationKindSchema, BuilderExpectationSchema, BuilderExpectationSerialisedSchema, BuilderExpectationsSchema, BuilderExpectationsSerialisedSchema, validateExpectations } from './expectation.js';
|
|
20
|
+
export { createEntityValidator } from './kind.js';
|
|
21
|
+
export { BuilderOption, BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectConfig, BuilderSelectConfigSchema, BuilderSelectConfigSerialisedSchema, BuilderToggleConfig, BuilderToggleConfigSchema, BuilderToggleConfigSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString, validateOptionSelectMap, validateOptionWhen, validateSelect, validateToggle } from './option/index.js';
|
|
22
|
+
export { BuilderPathSchema, BuilderPathsSchema, validatePath, validatePaths } from './paths.js';
|
|
23
|
+
export { BuilderPricing, BuilderPricingExpressionSchema, BuilderPricingLookupKeySchema, BuilderPricingReduceSchema, BuilderPricingSchema, BuilderPricingSerialisedSchema, BuilderRatesSchema, pricing, validatePricingRates } from './pricing/index.js';
|
|
24
|
+
export { BuilderReferenceSchema, BuilderReferencesSchema } from './references.js';
|
|
25
|
+
export { BuilderEntityKindSchema, BuilderEntitySerialisedSchema, entitiesMap, serialise, validateBoolean, validateNumber, validateString } from './serialise.js';
|
|
20
26
|
export { BuilderTagsSchema } from './tags.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectConfig, BuilderSelectConfigSchema, BuilderSelectConfigSerialisedSchema, BuilderToggleConfig, BuilderToggleConfigSchema, BuilderToggleConfigSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString } from './option/index.js';
|
|
24
|
-
export { serialise } from './serialise.js';
|
|
25
|
-
export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis } from './ui/index.js';
|
|
26
|
-
export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema } from './when.js';
|
|
27
|
+
export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis, validateUIDescribe, validateUIInput, validateUIItems, validateUIPage, validateUIPages } from './ui/index.js';
|
|
28
|
+
export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema, whenBranches } from './when.js';
|
package/dist/entities/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export { BuilderModel, BuilderModelSchema, BuilderModelSerialisedSchema, model, modelsMerge } from './model/index.js';
|
|
2
2
|
export { Builder, builder, BuilderSchema, BuilderSerialisedSchema } from './builder/index.js';
|
|
3
|
-
export { BuilderCollection, BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, collectionConfig, collectionExpectation, collectionWhen } from './collection/index.js';
|
|
4
|
-
export { BuilderComponent, BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, componentConfig, componentExpectation, componentWhen, detailBoolean, detailNumber, detailString, detailValueSchema } from './component/index.js';
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
3
|
+
export { BuilderCollection, BuilderCollectionConfig, BuilderCollectionConfigSchema, BuilderCollectionConfigSerialisedSchema, BuilderCollectionConfigsSerialisedSchema, BuilderCollectionSchema, BuilderCollectionSelectMapSerialisedSchema, BuilderCollectionSerialisedSchema, BuilderCollectionsSerialisedSchema, BuilderCollectionWhenSerialisedSchema, collectionConfig, collectionExpectation, collectionWhen, validateCollectionConfig, validateCollectionSelectMap, validateCollectionWhen } from './collection/index.js';
|
|
4
|
+
export { BuilderComponent, BuilderComponentConfig, BuilderComponentConfigSchema, BuilderComponentConfigSerialisedSchema, BuilderComponentConfigsSerialisedSchema, BuilderComponentField, BuilderComponentFieldSchema, BuilderComponentFieldSerialisedSchema, BuilderComponentFieldsSchema, BuilderComponentFieldsSerialisedSchema, BuilderComponentFieldValueTypeSchema, BuilderComponentSchema, BuilderComponentSelectMapSerialisedSchema, BuilderComponentSerialisedSchema, BuilderComponentsSerialisedSchema, BuilderComponentWhenSerialisedSchema, componentConfig, componentExpectation, componentWhen, detailBoolean, detailNumber, detailString, detailValueSchema, validateComponentConfig, validateComponentSelectMap, validateComponentWhen } from './component/index.js';
|
|
5
|
+
export { BuilderExpectation, BuilderExpectationKindSchema, BuilderExpectationSchema, BuilderExpectationSerialisedSchema, BuilderExpectationsSchema, BuilderExpectationsSerialisedSchema, validateExpectations } from './expectation.js';
|
|
6
|
+
export { createEntityValidator } from './kind.js';
|
|
7
|
+
export { BuilderOption, BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectConfig, BuilderSelectConfigSchema, BuilderSelectConfigSerialisedSchema, BuilderToggleConfig, BuilderToggleConfigSchema, BuilderToggleConfigSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString, validateOptionSelectMap, validateOptionWhen, validateSelect, validateToggle } from './option/index.js';
|
|
8
|
+
export { BuilderPathSchema, BuilderPathsSchema, validatePath, validatePaths } from './paths.js';
|
|
9
|
+
export { BuilderPricing, BuilderPricingExpressionSchema, BuilderPricingLookupKeySchema, BuilderPricingReduceSchema, BuilderPricingSchema, BuilderPricingSerialisedSchema, BuilderRatesSchema, pricing, validatePricingRates } from './pricing/index.js';
|
|
10
|
+
export { BuilderReferenceSchema, BuilderReferencesSchema } from './references.js';
|
|
11
|
+
export { BuilderEntityKindSchema, BuilderEntitySerialisedSchema, entitiesMap, serialise, validateBoolean, validateNumber, validateString } from './serialise.js';
|
|
7
12
|
export { BuilderTagsSchema } from './tags.js';
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export { BuilderOption, BuilderOptionSchema, BuilderOptionSelectMapSerialisedSchema, BuilderOptionSerialisedSchema, BuilderOptionsSerialisedSchema, BuilderOptionConfigSchema, BuilderOptionConfigSerialisedSchema, BuilderOptionConfigsSerialisedSchema, BuilderOptionWhenSerialisedSchema, BuilderSelectConfig, BuilderSelectConfigSchema, BuilderSelectConfigSerialisedSchema, BuilderToggleConfig, BuilderToggleConfigSchema, BuilderToggleConfigSerialisedSchema, optionExpectation, optionValueSchema, optionWhen, select, toggleBoolean, toggleNumber, toggleString } from './option/index.js';
|
|
11
|
-
export { serialise } from './serialise.js';
|
|
12
|
-
export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis } from './ui/index.js';
|
|
13
|
-
export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema } from './when.js';
|
|
13
|
+
export { BuilderDescriptionItemSchema, BuilderDescriptionSchema, BuilderUI, BuilderUIDescribe, BuilderUIDescribeSchema, BuilderUIDescribeSerialisedSchema, BuilderUIInput, BuilderUIInputMetadataSchema, BuilderUIInputSchema, BuilderUIInputSerialisedSchema, BuilderUIInputsSerialisedSchema, BuilderUIItemSerialisedSchema, BuilderUIItemsSerialisedSchema, BuilderUIPage, BuilderUIPages, BuilderUIPageSchema, BuilderUIPageSerialisedSchema, BuilderUIPagesSchema, BuilderUIPagesSerialisedSchema, BuilderUISchema, BuilderUISerialisedSchema, input, uis, validateUIDescribe, validateUIInput, validateUIItems, validateUIPage, validateUIPages } from './ui/index.js';
|
|
14
|
+
export { BuilderWhenConfigSchema, BuilderWhenEnableSchema, BuilderWhenMatchSchema, BuilderWhenSerialisedSchema, BuilderWhenUnlessSchema, createWhenFactories, createWhenSerialisedSchema, whenBranches } from './when.js';
|