@builder-builder/builder 0.0.27 → 0.0.28
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.js +4 -4
- package/dist/client/client.d.ts +2 -1
- package/dist/client/client.js +4 -1
- package/dist/client/public.d.ts +2 -2
- package/dist/client/public.js +1 -1
- package/dist/client/schema.d.ts +79 -18
- package/dist/client/schema.js +6 -1
- package/dist/components/BuilderRender.svelte.d.ts +2 -2
- package/dist/components/index.js +4377 -4303
- package/dist/components/index.min.js +3 -0
- package/dist/entities/collection/collection.d.ts +66 -66
- package/dist/entities/collection/config.d.ts +17 -17
- package/dist/entities/collection/when.d.ts +1 -1
- package/dist/entities/component/component.d.ts +64 -64
- package/dist/entities/component/config.d.ts +33 -33
- package/dist/entities/component/config.js +18 -16
- package/dist/entities/component/detail.d.ts +61 -0
- package/dist/entities/component/detail.js +71 -0
- package/dist/entities/component/index.d.ts +2 -2
- package/dist/entities/component/index.js +1 -1
- package/dist/entities/component/when.d.ts +2 -2
- package/dist/entities/expectation.d.ts +1 -1
- package/dist/entities/index.d.ts +4 -4
- package/dist/entities/index.js +1 -1
- package/dist/entities/kind.d.ts +3 -3
- package/dist/entities/kind.js +20 -20
- package/dist/entities/model/methods.d.ts +1 -1
- package/dist/entities/option/config.d.ts +7 -7
- package/dist/entities/option/config.js +1 -1
- package/dist/entities/option/index.d.ts +4 -4
- package/dist/entities/option/index.js +2 -2
- package/dist/entities/option/option.d.ts +22 -22
- package/dist/entities/option/select.d.ts +1 -1
- package/dist/entities/option/toggle.d.ts +9 -9
- package/dist/entities/option/toggle.js +15 -10
- package/dist/entities/option/when.d.ts +1 -1
- package/dist/entities/paths.d.ts +2 -2
- package/dist/entities/pricing/expression.d.ts +16 -39
- package/dist/entities/pricing/expression.js +1 -16
- package/dist/entities/pricing/index.d.ts +1 -1
- package/dist/entities/pricing/rates.d.ts +1 -1
- package/dist/entities/references.d.ts +24 -24
- package/dist/entities/serialise.d.ts +31 -32
- package/dist/entities/serialise.js +7 -7
- package/dist/entities/ui/describe.d.ts +1 -1
- package/dist/entities/ui/input.d.ts +1 -1
- package/dist/entities/ui/page.d.ts +1 -1
- package/dist/entities/ui/pages.d.ts +2 -2
- package/dist/entities/validated.d.ts +2 -2
- package/dist/entities/when.d.ts +5 -5
- package/dist/environment.d.ts +2 -2
- package/dist/errors/errors.d.ts +86 -55
- package/dist/errors/errors.js +36 -5
- package/dist/errors/exception.d.ts +3 -3
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/public.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/instance.d.ts +53 -9
- package/dist/instance.js +6 -2
- package/dist/mappers/dependencies.d.ts +3 -0
- package/dist/mappers/dependencies.js +44 -0
- package/dist/mappers/index.d.ts +2 -2
- package/dist/mappers/index.js +2 -1
- package/dist/mappers/instance.js +26 -21
- package/dist/mappers/price.js +6 -4
- package/dist/mappers/variants/index.d.ts +1 -2
- package/dist/mappers/variants/index.js +1 -2
- package/dist/mappers/variants/option-graph.d.ts +1 -2
- package/dist/mappers/variants/option-graph.js +3 -17
- package/dist/mappers/variants/variants.d.ts +3 -6
- package/dist/mappers/variants/variants.js +34 -11
- package/dist/primitive.d.ts +3 -0
- package/dist/primitive.js +2 -0
- package/dist/public.d.ts +8 -8
- package/dist/public.js +1 -1
- package/dist/validate/builder.d.ts +2 -2
- package/dist/validate/builder.js +15 -15
- package/dist/validate/expectations.d.ts +2 -2
- package/dist/validate/expectations.js +3 -3
- package/dist/validate/instance.d.ts +2 -2
- package/dist/validate/instance.js +31 -13
- package/dist/validate/model.d.ts +4 -4
- package/dist/validate/model.js +51 -42
- package/dist/validate/paths.d.ts +2 -2
- package/dist/validate/paths.js +19 -14
- package/dist/validate/pricing.d.ts +4 -4
- package/dist/validate/pricing.js +31 -31
- package/dist/validate/resolve.d.ts +2 -2
- package/dist/validate/resolve.js +18 -18
- package/dist/validate/ui.d.ts +4 -4
- package/dist/validate/ui.js +38 -38
- package/dist/validate/variants.d.ts +3 -3
- package/dist/validate/variants.js +32 -31
- package/package.json +4 -2
- package/dist/entities/component/field.d.ts +0 -59
- package/dist/entities/component/field.js +0 -52
package/dist/bb.js
CHANGED
|
@@ -43,7 +43,7 @@ function bbFactory(environment, references = []) {
|
|
|
43
43
|
string: (input) => throwInProd(validateString(input, references)),
|
|
44
44
|
boolean: (input) => throwInProd(validateBoolean(input, references)),
|
|
45
45
|
instance: (model, instance) => throwInProd(validateInstance(model, instance)),
|
|
46
|
-
variants: (model, input, variantOptions) => throwInProd(validateVariants(model, input, variantOptions))
|
|
46
|
+
variants: (model, input, variantOptions) => throwInProd(validateVariants(model, input, variantOptions, references))
|
|
47
47
|
},
|
|
48
48
|
instance: (entity, partial) => {
|
|
49
49
|
assertValidated(entity);
|
|
@@ -66,17 +66,17 @@ function bbFactory(environment, references = []) {
|
|
|
66
66
|
},
|
|
67
67
|
variants: (entity) => {
|
|
68
68
|
assertValidated(entity);
|
|
69
|
-
return createVariants(entity);
|
|
69
|
+
return createVariants(entity, references);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
72
|
function throwInProd(result) {
|
|
73
|
-
const [entity, errors] = result;
|
|
73
|
+
const [entity, errors, warnings] = result;
|
|
74
74
|
if (environment === 'development') {
|
|
75
75
|
return result;
|
|
76
76
|
}
|
|
77
77
|
if (errors.length > 0) {
|
|
78
78
|
throw new BuilderException({ category: 'validation', errors });
|
|
79
79
|
}
|
|
80
|
-
return [entity, []];
|
|
80
|
+
return [entity, [], warnings];
|
|
81
81
|
}
|
|
82
82
|
}
|
package/dist/client/client.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type { BuilderBuilderClientOptions, BuilderBuilderGetResponse, BuilderBuilderPriceResponse } from './schema.js';
|
|
2
1
|
import type { BuilderInstance } from '../instance.js';
|
|
2
|
+
import type { BuilderBuilderClientOptions, BuilderBuilderGetResponse, BuilderBuilderPriceResponse, BuilderBuilderVariantsResponse } from './schema.js';
|
|
3
3
|
export type BuilderBuilderClient = {
|
|
4
4
|
builder: {
|
|
5
5
|
get(id: string): Promise<BuilderBuilderGetResponse>;
|
|
6
|
+
variants(id: string): Promise<BuilderBuilderVariantsResponse>;
|
|
6
7
|
price(id: string, instance: BuilderInstance): Promise<BuilderBuilderPriceResponse>;
|
|
7
8
|
};
|
|
8
9
|
};
|
package/dist/client/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as v from 'valibot';
|
|
2
2
|
import { BuilderException } from '../errors/index.js';
|
|
3
|
-
import { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceResponseSchema } from './schema.js';
|
|
3
|
+
import { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceResponseSchema, BuilderBuilderVariantsResponseSchema } from './schema.js';
|
|
4
4
|
export function client(options) {
|
|
5
5
|
const { url, apiKey, headers } = v.parse(BuilderBuilderClientOptionsSchema, options);
|
|
6
6
|
const baseHeaders = {
|
|
@@ -12,6 +12,9 @@ export function client(options) {
|
|
|
12
12
|
get: (id) => request(BuilderBuilderGetResponseSchema, `${url}/api/builder/${id}`, {
|
|
13
13
|
headers: baseHeaders
|
|
14
14
|
}),
|
|
15
|
+
variants: (id) => request(BuilderBuilderVariantsResponseSchema, `${url}/api/builder/${id}/variants`, {
|
|
16
|
+
headers: baseHeaders
|
|
17
|
+
}),
|
|
15
18
|
price: (id, instance) => request(BuilderBuilderPriceResponseSchema, `${url}/api/builder/${id}/price`, {
|
|
16
19
|
method: 'POST',
|
|
17
20
|
headers: {
|
package/dist/client/public.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { BuilderBuilderClientOptions, BuilderBuilderGetResponse, BuilderBuilderPriceRequest, BuilderBuilderPriceResponse } from './schema.js';
|
|
1
|
+
export type { BuilderBuilderClientOptions, BuilderBuilderGetResponse, BuilderBuilderPriceRequest, BuilderBuilderPriceResponse, BuilderBuilderVariantsRequest, BuilderBuilderVariantsResponse } from './schema.js';
|
|
2
2
|
export type { BuilderBuilderClient } from './client.js';
|
|
3
|
-
export { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceRequestSchema, BuilderBuilderPriceResponseSchema } from './schema.js';
|
|
3
|
+
export { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceRequestSchema, BuilderBuilderPriceResponseSchema, BuilderBuilderVariantsRequestSchema, BuilderBuilderVariantsResponseSchema } from './schema.js';
|
|
4
4
|
export { client } from './client.js';
|
package/dist/client/public.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceRequestSchema, BuilderBuilderPriceResponseSchema } from './schema.js';
|
|
1
|
+
export { BuilderBuilderClientOptionsSchema, BuilderBuilderGetResponseSchema, BuilderBuilderPriceRequestSchema, BuilderBuilderPriceResponseSchema, BuilderBuilderVariantsRequestSchema, BuilderBuilderVariantsResponseSchema } from './schema.js';
|
|
2
2
|
export { client } from './client.js';
|
package/dist/client/schema.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
21
21
|
tags?: readonly string[] | undefined;
|
|
22
22
|
}> | Readonly<{
|
|
23
23
|
type: "toggle";
|
|
24
|
-
|
|
24
|
+
kind: "string" | "number" | "boolean";
|
|
25
25
|
defaultValue: string | number | boolean | null;
|
|
26
26
|
isOptional: boolean;
|
|
27
27
|
tags?: readonly string[] | undefined;
|
|
@@ -40,7 +40,7 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
40
40
|
tags?: readonly string[] | undefined;
|
|
41
41
|
}>> | Readonly<Readonly<{
|
|
42
42
|
type: "toggle";
|
|
43
|
-
|
|
43
|
+
kind: "string" | "number" | "boolean";
|
|
44
44
|
defaultValue: string | number | boolean | null;
|
|
45
45
|
isOptional: boolean;
|
|
46
46
|
tags?: readonly string[] | undefined;
|
|
@@ -55,12 +55,12 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
55
55
|
tags?: readonly string[] | undefined;
|
|
56
56
|
}>> | Readonly<Readonly<{
|
|
57
57
|
type: "toggle";
|
|
58
|
-
|
|
58
|
+
kind: "string" | "number" | "boolean";
|
|
59
59
|
defaultValue: string | number | boolean | null;
|
|
60
60
|
isOptional: boolean;
|
|
61
61
|
tags?: readonly string[] | undefined;
|
|
62
62
|
}>>> | Readonly<{
|
|
63
|
-
|
|
63
|
+
details: Readonly<{
|
|
64
64
|
type: "parameter";
|
|
65
65
|
id: string;
|
|
66
66
|
name: string;
|
|
@@ -68,9 +68,9 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
68
68
|
type: "ref";
|
|
69
69
|
id: string;
|
|
70
70
|
}> | readonly Readonly<{
|
|
71
|
-
type: "component-
|
|
71
|
+
type: "component-detail";
|
|
72
72
|
name: string;
|
|
73
|
-
|
|
73
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
74
74
|
isOptional: boolean;
|
|
75
75
|
tags?: readonly string[] | undefined;
|
|
76
76
|
}>[];
|
|
@@ -80,7 +80,7 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
80
80
|
id: string;
|
|
81
81
|
name: string;
|
|
82
82
|
}> | Readonly<{
|
|
83
|
-
|
|
83
|
+
details: Readonly<{
|
|
84
84
|
type: "parameter";
|
|
85
85
|
id: string;
|
|
86
86
|
name: string;
|
|
@@ -88,15 +88,15 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
88
88
|
type: "ref";
|
|
89
89
|
id: string;
|
|
90
90
|
}> | readonly Readonly<{
|
|
91
|
-
type: "component-
|
|
91
|
+
type: "component-detail";
|
|
92
92
|
name: string;
|
|
93
|
-
|
|
93
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
94
94
|
isOptional: boolean;
|
|
95
95
|
tags?: readonly string[] | undefined;
|
|
96
96
|
}>[];
|
|
97
97
|
tags?: readonly string[] | undefined;
|
|
98
98
|
}>> | import("../public.js").BuilderWhenSerialised<Readonly<{
|
|
99
|
-
|
|
99
|
+
details: Readonly<{
|
|
100
100
|
type: "parameter";
|
|
101
101
|
id: string;
|
|
102
102
|
name: string;
|
|
@@ -104,9 +104,9 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
104
104
|
type: "ref";
|
|
105
105
|
id: string;
|
|
106
106
|
}> | readonly Readonly<{
|
|
107
|
-
type: "component-
|
|
107
|
+
type: "component-detail";
|
|
108
108
|
name: string;
|
|
109
|
-
|
|
109
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
110
110
|
isOptional: boolean;
|
|
111
111
|
tags?: readonly string[] | undefined;
|
|
112
112
|
}>[];
|
|
@@ -392,34 +392,95 @@ export declare const BuilderBuilderGetResponseSchema: v.ObjectSchema<{
|
|
|
392
392
|
kind: "option" | "component" | "collection";
|
|
393
393
|
}>[]>;
|
|
394
394
|
}, undefined>, undefined>;
|
|
395
|
+
readonly environment: v.PicklistSchema<["development", "staging", "production"], undefined>;
|
|
396
|
+
}, undefined>;
|
|
397
|
+
export type BuilderBuilderGetResponse = v.InferOutput<typeof BuilderBuilderGetResponseSchema>;
|
|
398
|
+
export declare const BuilderBuilderVariantsResponseSchema: v.ObjectSchema<{
|
|
395
399
|
readonly variants: v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
396
400
|
readonly instance: v.GenericSchema<import("../instance.js").BuilderInstance>;
|
|
397
|
-
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.
|
|
401
|
+
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
402
|
+
readonly kind: v.PicklistSchema<["string", "boolean", "number", "price", "image"], undefined>;
|
|
403
|
+
readonly value: v.NullableSchema<v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>;
|
|
404
|
+
}, undefined>, v.ReadonlyAction<{
|
|
405
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
406
|
+
value: string | number | boolean | null;
|
|
407
|
+
}>]>, undefined>, undefined>;
|
|
398
408
|
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
399
409
|
}, undefined>, v.ReadonlyAction<{
|
|
400
410
|
instance: import("../instance.js").BuilderInstance;
|
|
401
411
|
details?: {
|
|
402
|
-
[x: string]:
|
|
412
|
+
readonly [x: string]: Readonly<{
|
|
413
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
414
|
+
value: string | number | boolean | null;
|
|
415
|
+
}>;
|
|
403
416
|
} | undefined;
|
|
404
417
|
tags?: readonly string[] | undefined;
|
|
405
418
|
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
406
419
|
instance: import("../instance.js").BuilderInstance;
|
|
407
420
|
details?: {
|
|
408
|
-
[x: string]:
|
|
421
|
+
readonly [x: string]: Readonly<{
|
|
422
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
423
|
+
value: string | number | boolean | null;
|
|
424
|
+
}>;
|
|
409
425
|
} | undefined;
|
|
410
426
|
tags?: readonly string[] | undefined;
|
|
411
427
|
}>[]>]>, undefined>, v.ReadonlyAction<{
|
|
412
428
|
readonly [x: string]: readonly Readonly<{
|
|
413
429
|
instance: import("../instance.js").BuilderInstance;
|
|
414
430
|
details?: {
|
|
415
|
-
[x: string]:
|
|
431
|
+
readonly [x: string]: Readonly<{
|
|
432
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
433
|
+
value: string | number | boolean | null;
|
|
434
|
+
}>;
|
|
416
435
|
} | undefined;
|
|
417
436
|
tags?: readonly string[] | undefined;
|
|
418
437
|
}>[];
|
|
419
438
|
}>]>;
|
|
420
|
-
readonly environment: v.PicklistSchema<["development", "staging", "production"], undefined>;
|
|
421
439
|
}, undefined>;
|
|
422
|
-
export type
|
|
440
|
+
export type BuilderBuilderVariantsResponse = v.InferOutput<typeof BuilderBuilderVariantsResponseSchema>;
|
|
441
|
+
export declare const BuilderBuilderVariantsRequestSchema: v.ObjectSchema<{
|
|
442
|
+
readonly variants: v.SchemaWithPipe<readonly [v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
443
|
+
readonly instance: v.GenericSchema<import("../instance.js").BuilderInstance>;
|
|
444
|
+
readonly details: v.OptionalSchema<v.RecordSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
445
|
+
readonly kind: v.PicklistSchema<["string", "boolean", "number", "price", "image"], undefined>;
|
|
446
|
+
readonly value: v.NullableSchema<v.NullableSchema<v.UnionSchema<[v.StringSchema<undefined>, v.BooleanSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>, undefined>;
|
|
447
|
+
}, undefined>, v.ReadonlyAction<{
|
|
448
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
449
|
+
value: string | number | boolean | null;
|
|
450
|
+
}>]>, undefined>, undefined>;
|
|
451
|
+
readonly tags: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.ReadonlyAction<string[]>]>, undefined>;
|
|
452
|
+
}, undefined>, v.ReadonlyAction<{
|
|
453
|
+
instance: import("../instance.js").BuilderInstance;
|
|
454
|
+
details?: {
|
|
455
|
+
readonly [x: string]: Readonly<{
|
|
456
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
457
|
+
value: string | number | boolean | null;
|
|
458
|
+
}>;
|
|
459
|
+
} | undefined;
|
|
460
|
+
tags?: readonly string[] | undefined;
|
|
461
|
+
}>]>, undefined>, v.ReadonlyAction<Readonly<{
|
|
462
|
+
instance: import("../instance.js").BuilderInstance;
|
|
463
|
+
details?: {
|
|
464
|
+
readonly [x: string]: Readonly<{
|
|
465
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
466
|
+
value: string | number | boolean | null;
|
|
467
|
+
}>;
|
|
468
|
+
} | undefined;
|
|
469
|
+
tags?: readonly string[] | undefined;
|
|
470
|
+
}>[]>]>, undefined>, v.ReadonlyAction<{
|
|
471
|
+
readonly [x: string]: readonly Readonly<{
|
|
472
|
+
instance: import("../instance.js").BuilderInstance;
|
|
473
|
+
details?: {
|
|
474
|
+
readonly [x: string]: Readonly<{
|
|
475
|
+
kind: "string" | "number" | "boolean" | "price" | "image";
|
|
476
|
+
value: string | number | boolean | null;
|
|
477
|
+
}>;
|
|
478
|
+
} | undefined;
|
|
479
|
+
tags?: readonly string[] | undefined;
|
|
480
|
+
}>[];
|
|
481
|
+
}>]>;
|
|
482
|
+
}, undefined>;
|
|
483
|
+
export type BuilderBuilderVariantsRequest = v.InferOutput<typeof BuilderBuilderVariantsRequestSchema>;
|
|
423
484
|
export declare const BuilderBuilderPriceRequestSchema: v.ObjectSchema<{
|
|
424
485
|
readonly instance: v.GenericSchema<import("../instance.js").BuilderInstance>;
|
|
425
486
|
}, undefined>;
|
package/dist/client/schema.js
CHANGED
|
@@ -11,9 +11,14 @@ export const BuilderBuilderGetResponseSchema = v.object({
|
|
|
11
11
|
name: v.string(),
|
|
12
12
|
serialised: BuilderSerialisedSchema,
|
|
13
13
|
references: BuilderReferencesSchema,
|
|
14
|
-
variants: BuilderVariantsSchema,
|
|
15
14
|
environment: BuilderEnvironmentSchema
|
|
16
15
|
});
|
|
16
|
+
export const BuilderBuilderVariantsResponseSchema = v.object({
|
|
17
|
+
variants: BuilderVariantsSchema
|
|
18
|
+
});
|
|
19
|
+
export const BuilderBuilderVariantsRequestSchema = v.object({
|
|
20
|
+
variants: BuilderVariantsSchema
|
|
21
|
+
});
|
|
17
22
|
export const BuilderBuilderPriceRequestSchema = v.object({
|
|
18
23
|
instance: BuilderInstanceSchema
|
|
19
24
|
});
|
|
@@ -7,7 +7,7 @@ import type { BuilderBuilderPriceProps } from './BuilderPrice.svelte';
|
|
|
7
7
|
export type BuilderBuilderRenderProps = {
|
|
8
8
|
readonly serialised: BuilderSerialised;
|
|
9
9
|
readonly references: BuilderReferences;
|
|
10
|
-
readonly variants: BuilderVariants;
|
|
10
|
+
readonly variants: BuilderVariants | Promise<BuilderVariants> | null;
|
|
11
11
|
readonly environment: BuilderEnvironment;
|
|
12
12
|
readonly layout?: Partial<BuilderBuilderLayoutProps>;
|
|
13
13
|
readonly collections?: Partial<BuilderBuilderCollectionsProps>;
|
|
@@ -16,7 +16,7 @@ export type BuilderBuilderRenderProps = {
|
|
|
16
16
|
};
|
|
17
17
|
export type BuilderBuilderUpdate = {
|
|
18
18
|
readonly instance: BuilderInstance;
|
|
19
|
-
readonly order: BuilderOrder;
|
|
19
|
+
readonly order: BuilderOrder | null;
|
|
20
20
|
readonly price: number | null;
|
|
21
21
|
};
|
|
22
22
|
export type BuilderBuilderRenderUpdateEvent = CustomEvent<BuilderBuilderUpdate>;
|