@xiwebdesign/xicms-core 5.5.2 → 5.6.0
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/admin/shop/ConnectionsTab.js +1 -1
- package/dist/admin/shop/ConnectionsTab.js.map +1 -1
- package/dist/admin/shop/DiscountsTab.d.ts +4 -0
- package/dist/admin/shop/DiscountsTab.js +168 -0
- package/dist/admin/shop/DiscountsTab.js.map +1 -0
- package/dist/admin/shop/EmailsTab.d.ts +8 -0
- package/dist/admin/shop/EmailsTab.js +88 -0
- package/dist/admin/shop/EmailsTab.js.map +1 -0
- package/dist/admin/shop/OrdersTab.js +271 -139
- package/dist/admin/shop/OrdersTab.js.map +1 -1
- package/dist/admin/shop/ProductsTab.js +152 -28
- package/dist/admin/shop/ProductsTab.js.map +1 -1
- package/dist/admin/shop/ShopPanel.d.ts +4 -1
- package/dist/admin/shop/ShopPanel.js +9 -0
- package/dist/admin/shop/ShopPanel.js.map +1 -1
- package/dist/admin/shop/ShopSettingsTab.d.ts +3 -0
- package/dist/admin/shop/ShopSettingsTab.js +86 -0
- package/dist/admin/shop/ShopSettingsTab.js.map +1 -0
- package/dist/admin.css +1 -1
- package/dist/blocks/context.d.ts +6 -0
- package/dist/blocks/context.js +15 -1
- package/dist/blocks/context.js.map +1 -1
- package/dist/modules/shop/blocks/Cart.js +22 -14
- package/dist/modules/shop/blocks/Cart.js.map +1 -1
- package/dist/modules/shop/blocks/Checkout.js +75 -23
- package/dist/modules/shop/blocks/Checkout.js.map +1 -1
- package/dist/modules/shop/blocks/Donation.js +8 -7
- package/dist/modules/shop/blocks/Donation.js.map +1 -1
- package/dist/modules/shop/blocks/ProductDetail.js +296 -102
- package/dist/modules/shop/blocks/ProductDetail.js.map +1 -1
- package/dist/modules/shop/blocks/ProductGrid.d.ts +9 -0
- package/dist/modules/shop/blocks/ProductGrid.js +151 -29
- package/dist/modules/shop/blocks/ProductGrid.js.map +1 -1
- package/dist/modules/shop/blocks/ShopCategories.js +7 -2
- package/dist/modules/shop/blocks/ShopCategories.js.map +1 -1
- package/dist/modules/shop/cartStore.d.ts +13 -2
- package/dist/modules/shop/cartStore.js +10 -5
- package/dist/modules/shop/cartStore.js.map +1 -1
- package/dist/modules/shop/lib.d.ts +24 -1
- package/dist/modules/shop/lib.js +49 -0
- package/dist/modules/shop/lib.js.map +1 -1
- package/dist/modules/shop/module.js +6 -1
- package/dist/modules/shop/module.js.map +1 -1
- package/dist/modules/shop/settings.d.ts +18 -0
- package/dist/modules/shop/settings.js +8 -1
- package/dist/modules/shop/settings.js.map +1 -1
- package/dist/modules/shop/strings.d.ts +65 -0
- package/dist/modules/shop/strings.js +136 -0
- package/dist/modules/shop/strings.js.map +1 -0
- package/dist/modules/shop/types.d.ts +18 -0
- package/dist/modules/shop/types.js +1 -0
- package/dist/modules/shop/types.js.map +1 -0
- package/dist/render/PublishedPage.d.ts +6 -1
- package/dist/render/PublishedPage.js +4 -3
- package/dist/render/PublishedPage.js.map +1 -1
- package/dist/schema/shop.d.ts +413 -2
- package/dist/schema/shop.js +95 -6
- package/dist/schema/shop.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +14 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/shop.d.ts +46 -0
- package/dist/server/shop.js +181 -0
- package/dist/server/shop.js.map +1 -0
- package/dist/styles.css +76 -0
- package/package.json +1 -1
package/dist/schema/shop.d.ts
CHANGED
|
@@ -40,14 +40,71 @@ export type ShopCategory = z.infer<typeof ShopCategorySchema>;
|
|
|
40
40
|
export declare const ProductOptionSchema: z.ZodObject<{
|
|
41
41
|
name: z.ZodString;
|
|
42
42
|
values: z.ZodArray<z.ZodString, "many">;
|
|
43
|
+
/**
|
|
44
|
+
* 5.6: afbeelding per optieWAARDE (praktijk: de kleur-as) — `{ "Roze": "https://…" }`.
|
|
45
|
+
* De detailpagina wisselt het hoofdbeeld mee met de keuze; bewust per as en niet per
|
|
46
|
+
* variant-combinatie (maat × kleur zou het aantal afbeeldingen laten exploderen).
|
|
47
|
+
*/
|
|
48
|
+
images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
43
49
|
}, "strip", z.ZodTypeAny, {
|
|
44
50
|
values: string[];
|
|
45
51
|
name: string;
|
|
52
|
+
images?: Record<string, string> | undefined;
|
|
46
53
|
}, {
|
|
47
54
|
values: string[];
|
|
48
55
|
name: string;
|
|
56
|
+
images?: Record<string, string> | undefined;
|
|
49
57
|
}>;
|
|
50
58
|
export type ProductOption = z.infer<typeof ProductOptionSchema>;
|
|
59
|
+
/**
|
|
60
|
+
* Personalisatie-veld (5.6): de klant geeft eigen tekst of een eigen afbeelding op
|
|
61
|
+
* (bv. "rompertje met naam"). Meerprijs telt server-side mee in `createOrder`.
|
|
62
|
+
*/
|
|
63
|
+
export declare const PersonalizationFieldSchema: z.ZodObject<{
|
|
64
|
+
key: z.ZodString;
|
|
65
|
+
label: z.ZodString;
|
|
66
|
+
type: z.ZodEnum<["text", "image"]>;
|
|
67
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
68
|
+
/** Alleen voor type "text". */
|
|
69
|
+
maxLength: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
/** Meerprijs in centen (per stuk). */
|
|
71
|
+
priceCents: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
type: "image" | "text";
|
|
75
|
+
label: string;
|
|
76
|
+
maxLength: number;
|
|
77
|
+
key: string;
|
|
78
|
+
required: boolean;
|
|
79
|
+
priceCents: number;
|
|
80
|
+
helpText?: string | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
type: "image" | "text";
|
|
83
|
+
label: string;
|
|
84
|
+
key: string;
|
|
85
|
+
maxLength?: number | undefined;
|
|
86
|
+
required?: boolean | undefined;
|
|
87
|
+
priceCents?: number | undefined;
|
|
88
|
+
helpText?: string | undefined;
|
|
89
|
+
}>;
|
|
90
|
+
export type PersonalizationField = z.infer<typeof PersonalizationFieldSchema>;
|
|
91
|
+
/** Ingevulde personalisatie op een orderregel/cartregel: per veld-key tekst of upload-pad. */
|
|
92
|
+
export declare const PersonalizationValueSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
93
|
+
text: z.ZodOptional<z.ZodString>;
|
|
94
|
+
/** Storage-pad uit de uploadPersonalization-callable (géén vrije URL). */
|
|
95
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
96
|
+
/** Oorspronkelijke bestandsnaam (weergave in beheer/mail). */
|
|
97
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
text?: string | undefined;
|
|
100
|
+
imagePath?: string | undefined;
|
|
101
|
+
fileName?: string | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
text?: string | undefined;
|
|
104
|
+
imagePath?: string | undefined;
|
|
105
|
+
fileName?: string | undefined;
|
|
106
|
+
}>>;
|
|
107
|
+
export type PersonalizationValue = z.infer<typeof PersonalizationValueSchema>;
|
|
51
108
|
/**
|
|
52
109
|
* Variant = één combinatie van optiewaarden. `key` is de waarden gejoined met "|" in
|
|
53
110
|
* optie-volgorde (bv. "68|Roze"). Alleen aanwezig waar hij afwijkt van de product-defaults.
|
|
@@ -95,12 +152,20 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
95
152
|
options: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
96
153
|
name: z.ZodString;
|
|
97
154
|
values: z.ZodArray<z.ZodString, "many">;
|
|
155
|
+
/**
|
|
156
|
+
* 5.6: afbeelding per optieWAARDE (praktijk: de kleur-as) — `{ "Roze": "https://…" }`.
|
|
157
|
+
* De detailpagina wisselt het hoofdbeeld mee met de keuze; bewust per as en niet per
|
|
158
|
+
* variant-combinatie (maat × kleur zou het aantal afbeeldingen laten exploderen).
|
|
159
|
+
*/
|
|
160
|
+
images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
98
161
|
}, "strip", z.ZodTypeAny, {
|
|
99
162
|
values: string[];
|
|
100
163
|
name: string;
|
|
164
|
+
images?: Record<string, string> | undefined;
|
|
101
165
|
}, {
|
|
102
166
|
values: string[];
|
|
103
167
|
name: string;
|
|
168
|
+
images?: Record<string, string> | undefined;
|
|
104
169
|
}>, "many">>;
|
|
105
170
|
variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
106
171
|
key: z.ZodString;
|
|
@@ -129,11 +194,40 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
129
194
|
/** Sorteervolgorde binnen een categorie (laag = eerst). */
|
|
130
195
|
order: z.ZodDefault<z.ZodNumber>;
|
|
131
196
|
featured: z.ZodDefault<z.ZodBoolean>;
|
|
197
|
+
/** 5.6: personalisatie-velden (eigen naam/logo) — max 3 per product. */
|
|
198
|
+
personalization: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
+
key: z.ZodString;
|
|
200
|
+
label: z.ZodString;
|
|
201
|
+
type: z.ZodEnum<["text", "image"]>;
|
|
202
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
203
|
+
/** Alleen voor type "text". */
|
|
204
|
+
maxLength: z.ZodDefault<z.ZodNumber>;
|
|
205
|
+
/** Meerprijs in centen (per stuk). */
|
|
206
|
+
priceCents: z.ZodDefault<z.ZodNumber>;
|
|
207
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
type: "image" | "text";
|
|
210
|
+
label: string;
|
|
211
|
+
maxLength: number;
|
|
212
|
+
key: string;
|
|
213
|
+
required: boolean;
|
|
214
|
+
priceCents: number;
|
|
215
|
+
helpText?: string | undefined;
|
|
216
|
+
}, {
|
|
217
|
+
type: "image" | "text";
|
|
218
|
+
label: string;
|
|
219
|
+
key: string;
|
|
220
|
+
maxLength?: number | undefined;
|
|
221
|
+
required?: boolean | undefined;
|
|
222
|
+
priceCents?: number | undefined;
|
|
223
|
+
helpText?: string | undefined;
|
|
224
|
+
}>, "many">>;
|
|
132
225
|
}, "strip", z.ZodTypeAny, {
|
|
133
226
|
description: string;
|
|
134
227
|
options: {
|
|
135
228
|
values: string[];
|
|
136
229
|
name: string;
|
|
230
|
+
images?: Record<string, string> | undefined;
|
|
137
231
|
}[];
|
|
138
232
|
status: "draft" | "active" | "archived";
|
|
139
233
|
name: string;
|
|
@@ -147,13 +241,22 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
147
241
|
stock?: number | undefined;
|
|
148
242
|
sku?: string | undefined;
|
|
149
243
|
}[];
|
|
244
|
+
images: string[];
|
|
150
245
|
priceCents: number;
|
|
151
246
|
categoryIds: string[];
|
|
152
|
-
images: string[];
|
|
153
247
|
vatRate: 0 | 9 | 21;
|
|
154
248
|
trackStock: boolean;
|
|
155
249
|
stock?: number | undefined;
|
|
156
250
|
compareAtCents?: number | undefined;
|
|
251
|
+
personalization?: {
|
|
252
|
+
type: "image" | "text";
|
|
253
|
+
label: string;
|
|
254
|
+
maxLength: number;
|
|
255
|
+
key: string;
|
|
256
|
+
required: boolean;
|
|
257
|
+
priceCents: number;
|
|
258
|
+
helpText?: string | undefined;
|
|
259
|
+
}[] | undefined;
|
|
157
260
|
}, {
|
|
158
261
|
name: string;
|
|
159
262
|
slug: string;
|
|
@@ -161,6 +264,7 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
161
264
|
options?: {
|
|
162
265
|
values: string[];
|
|
163
266
|
name: string;
|
|
267
|
+
images?: Record<string, string> | undefined;
|
|
164
268
|
}[] | undefined;
|
|
165
269
|
status?: "draft" | "active" | "archived" | undefined;
|
|
166
270
|
featured?: boolean | undefined;
|
|
@@ -172,15 +276,141 @@ export declare const ProductSchema: z.ZodObject<{
|
|
|
172
276
|
stock?: number | undefined;
|
|
173
277
|
sku?: string | undefined;
|
|
174
278
|
}[] | undefined;
|
|
279
|
+
images?: string[] | undefined;
|
|
175
280
|
priceCents?: number | undefined;
|
|
176
281
|
stock?: number | undefined;
|
|
177
282
|
categoryIds?: string[] | undefined;
|
|
178
|
-
images?: string[] | undefined;
|
|
179
283
|
compareAtCents?: number | undefined;
|
|
180
284
|
vatRate?: 0 | 9 | 21 | undefined;
|
|
181
285
|
trackStock?: boolean | undefined;
|
|
286
|
+
personalization?: {
|
|
287
|
+
type: "image" | "text";
|
|
288
|
+
label: string;
|
|
289
|
+
key: string;
|
|
290
|
+
maxLength?: number | undefined;
|
|
291
|
+
required?: boolean | undefined;
|
|
292
|
+
priceCents?: number | undefined;
|
|
293
|
+
helpText?: string | undefined;
|
|
294
|
+
}[] | undefined;
|
|
182
295
|
}>;
|
|
183
296
|
export type Product = z.infer<typeof ProductSchema>;
|
|
297
|
+
/** `sites/{siteId}/discountCodes/{CODE}` (doc-id = code in hoofdletters; editor beheert). */
|
|
298
|
+
export declare const DiscountCodeSchema: z.ZodObject<{
|
|
299
|
+
code: z.ZodString;
|
|
300
|
+
type: z.ZodEnum<["percent", "fixed"]>;
|
|
301
|
+
/** percent: 1–100; fixed: bedrag in centen. */
|
|
302
|
+
value: z.ZodNumber;
|
|
303
|
+
minOrderCents: z.ZodDefault<z.ZodNumber>;
|
|
304
|
+
freeShipping: z.ZodDefault<z.ZodBoolean>;
|
|
305
|
+
active: z.ZodDefault<z.ZodBoolean>;
|
|
306
|
+
/** ISO-datums (yyyy-mm-dd); leeg = geen grens. */
|
|
307
|
+
startsAt: z.ZodOptional<z.ZodString>;
|
|
308
|
+
endsAt: z.ZodOptional<z.ZodString>;
|
|
309
|
+
/** 0 = onbeperkt. `usedCount` wordt door de webhook transactioneel opgehoogd. */
|
|
310
|
+
maxUses: z.ZodDefault<z.ZodNumber>;
|
|
311
|
+
usedCount: z.ZodDefault<z.ZodNumber>;
|
|
312
|
+
}, "strip", z.ZodTypeAny, {
|
|
313
|
+
value: number;
|
|
314
|
+
code: string;
|
|
315
|
+
type: "fixed" | "percent";
|
|
316
|
+
active: boolean;
|
|
317
|
+
minOrderCents: number;
|
|
318
|
+
freeShipping: boolean;
|
|
319
|
+
maxUses: number;
|
|
320
|
+
usedCount: number;
|
|
321
|
+
startsAt?: string | undefined;
|
|
322
|
+
endsAt?: string | undefined;
|
|
323
|
+
}, {
|
|
324
|
+
value: number;
|
|
325
|
+
code: string;
|
|
326
|
+
type: "fixed" | "percent";
|
|
327
|
+
active?: boolean | undefined;
|
|
328
|
+
minOrderCents?: number | undefined;
|
|
329
|
+
freeShipping?: boolean | undefined;
|
|
330
|
+
startsAt?: string | undefined;
|
|
331
|
+
endsAt?: string | undefined;
|
|
332
|
+
maxUses?: number | undefined;
|
|
333
|
+
usedCount?: number | undefined;
|
|
334
|
+
}>;
|
|
335
|
+
export type DiscountCode = z.infer<typeof DiscountCodeSchema>;
|
|
336
|
+
export declare const MAIL_TEMPLATE_KEYS: readonly ["orderConfirmation", "orderShipped", "orderCancelled", "orderRefunded", "donationThanks", "formConfirmation"];
|
|
337
|
+
export type MailTemplateKey = (typeof MAIL_TEMPLATE_KEYS)[number];
|
|
338
|
+
/**
|
|
339
|
+
* `sites/{siteId}/settings/mailTemplates` — per template onderwerp + platte tekst met
|
|
340
|
+
* `{{placeholders}}` ({{naam}}, {{ordernummer}}, {{regels}}, {{totaal}}, {{verzendadres}},
|
|
341
|
+
* {{trackingUrl}}, {{sitenaam}}, {{notitie}}). Ontbrekend veld → ingebouwde default.
|
|
342
|
+
*/
|
|
343
|
+
export declare const MailTemplateSchema: z.ZodObject<{
|
|
344
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
345
|
+
bodyText: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
subject?: string | undefined;
|
|
348
|
+
bodyText?: string | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
subject?: string | undefined;
|
|
351
|
+
bodyText?: string | undefined;
|
|
352
|
+
}>;
|
|
353
|
+
export declare const MailTemplatesSchema: z.ZodObject<Record<"orderConfirmation" | "orderShipped" | "orderCancelled" | "orderRefunded" | "donationThanks" | "formConfirmation", z.ZodOptional<z.ZodObject<{
|
|
354
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
355
|
+
bodyText: z.ZodOptional<z.ZodString>;
|
|
356
|
+
}, "strip", z.ZodTypeAny, {
|
|
357
|
+
subject?: string | undefined;
|
|
358
|
+
bodyText?: string | undefined;
|
|
359
|
+
}, {
|
|
360
|
+
subject?: string | undefined;
|
|
361
|
+
bodyText?: string | undefined;
|
|
362
|
+
}>>>, "strip", z.ZodTypeAny, {
|
|
363
|
+
orderConfirmation?: {
|
|
364
|
+
subject?: string | undefined;
|
|
365
|
+
bodyText?: string | undefined;
|
|
366
|
+
} | undefined;
|
|
367
|
+
orderShipped?: {
|
|
368
|
+
subject?: string | undefined;
|
|
369
|
+
bodyText?: string | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
orderCancelled?: {
|
|
372
|
+
subject?: string | undefined;
|
|
373
|
+
bodyText?: string | undefined;
|
|
374
|
+
} | undefined;
|
|
375
|
+
orderRefunded?: {
|
|
376
|
+
subject?: string | undefined;
|
|
377
|
+
bodyText?: string | undefined;
|
|
378
|
+
} | undefined;
|
|
379
|
+
donationThanks?: {
|
|
380
|
+
subject?: string | undefined;
|
|
381
|
+
bodyText?: string | undefined;
|
|
382
|
+
} | undefined;
|
|
383
|
+
formConfirmation?: {
|
|
384
|
+
subject?: string | undefined;
|
|
385
|
+
bodyText?: string | undefined;
|
|
386
|
+
} | undefined;
|
|
387
|
+
}, {
|
|
388
|
+
orderConfirmation?: {
|
|
389
|
+
subject?: string | undefined;
|
|
390
|
+
bodyText?: string | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
orderShipped?: {
|
|
393
|
+
subject?: string | undefined;
|
|
394
|
+
bodyText?: string | undefined;
|
|
395
|
+
} | undefined;
|
|
396
|
+
orderCancelled?: {
|
|
397
|
+
subject?: string | undefined;
|
|
398
|
+
bodyText?: string | undefined;
|
|
399
|
+
} | undefined;
|
|
400
|
+
orderRefunded?: {
|
|
401
|
+
subject?: string | undefined;
|
|
402
|
+
bodyText?: string | undefined;
|
|
403
|
+
} | undefined;
|
|
404
|
+
donationThanks?: {
|
|
405
|
+
subject?: string | undefined;
|
|
406
|
+
bodyText?: string | undefined;
|
|
407
|
+
} | undefined;
|
|
408
|
+
formConfirmation?: {
|
|
409
|
+
subject?: string | undefined;
|
|
410
|
+
bodyText?: string | undefined;
|
|
411
|
+
} | undefined;
|
|
412
|
+
}>;
|
|
413
|
+
export type MailTemplates = z.infer<typeof MailTemplatesSchema>;
|
|
184
414
|
export declare const OrderStatusSchema: z.ZodEnum<["pending", "paid", "shipped", "cancelled", "refunded"]>;
|
|
185
415
|
export type OrderStatus = z.infer<typeof OrderStatusSchema>;
|
|
186
416
|
/** Orderregel: snapshot van naam/prijs op besteldatum — blijft kloppen als het product wijzigt. */
|
|
@@ -190,14 +420,36 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
190
420
|
name: z.ZodString;
|
|
191
421
|
variantKey: z.ZodOptional<z.ZodString>;
|
|
192
422
|
qty: z.ZodNumber;
|
|
423
|
+
/** Incl. eventuele personalisatie-meerprijs. */
|
|
193
424
|
unitPriceCents: z.ZodNumber;
|
|
194
425
|
vatRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<21>, z.ZodLiteral<9>, z.ZodLiteral<0>]>>;
|
|
426
|
+
/** 5.6: ingevulde personalisatie ("Naam: Boaz", upload-pad). */
|
|
427
|
+
personalization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
428
|
+
text: z.ZodOptional<z.ZodString>;
|
|
429
|
+
/** Storage-pad uit de uploadPersonalization-callable (géén vrije URL). */
|
|
430
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
431
|
+
/** Oorspronkelijke bestandsnaam (weergave in beheer/mail). */
|
|
432
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
433
|
+
}, "strip", z.ZodTypeAny, {
|
|
434
|
+
text?: string | undefined;
|
|
435
|
+
imagePath?: string | undefined;
|
|
436
|
+
fileName?: string | undefined;
|
|
437
|
+
}, {
|
|
438
|
+
text?: string | undefined;
|
|
439
|
+
imagePath?: string | undefined;
|
|
440
|
+
fileName?: string | undefined;
|
|
441
|
+
}>>>;
|
|
195
442
|
}, "strip", z.ZodTypeAny, {
|
|
196
443
|
name: string;
|
|
197
444
|
kind: "product" | "donation";
|
|
198
445
|
vatRate: 0 | 9 | 21;
|
|
199
446
|
qty: number;
|
|
200
447
|
unitPriceCents: number;
|
|
448
|
+
personalization?: Record<string, {
|
|
449
|
+
text?: string | undefined;
|
|
450
|
+
imagePath?: string | undefined;
|
|
451
|
+
fileName?: string | undefined;
|
|
452
|
+
}> | undefined;
|
|
201
453
|
productId?: string | undefined;
|
|
202
454
|
variantKey?: string | undefined;
|
|
203
455
|
}, {
|
|
@@ -206,6 +458,11 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
206
458
|
unitPriceCents: number;
|
|
207
459
|
kind?: "product" | "donation" | undefined;
|
|
208
460
|
vatRate?: 0 | 9 | 21 | undefined;
|
|
461
|
+
personalization?: Record<string, {
|
|
462
|
+
text?: string | undefined;
|
|
463
|
+
imagePath?: string | undefined;
|
|
464
|
+
fileName?: string | undefined;
|
|
465
|
+
}> | undefined;
|
|
209
466
|
productId?: string | undefined;
|
|
210
467
|
variantKey?: string | undefined;
|
|
211
468
|
}>;
|
|
@@ -251,14 +508,36 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
251
508
|
name: z.ZodString;
|
|
252
509
|
variantKey: z.ZodOptional<z.ZodString>;
|
|
253
510
|
qty: z.ZodNumber;
|
|
511
|
+
/** Incl. eventuele personalisatie-meerprijs. */
|
|
254
512
|
unitPriceCents: z.ZodNumber;
|
|
255
513
|
vatRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<21>, z.ZodLiteral<9>, z.ZodLiteral<0>]>>;
|
|
514
|
+
/** 5.6: ingevulde personalisatie ("Naam: Boaz", upload-pad). */
|
|
515
|
+
personalization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
516
|
+
text: z.ZodOptional<z.ZodString>;
|
|
517
|
+
/** Storage-pad uit de uploadPersonalization-callable (géén vrije URL). */
|
|
518
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
519
|
+
/** Oorspronkelijke bestandsnaam (weergave in beheer/mail). */
|
|
520
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
521
|
+
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
text?: string | undefined;
|
|
523
|
+
imagePath?: string | undefined;
|
|
524
|
+
fileName?: string | undefined;
|
|
525
|
+
}, {
|
|
526
|
+
text?: string | undefined;
|
|
527
|
+
imagePath?: string | undefined;
|
|
528
|
+
fileName?: string | undefined;
|
|
529
|
+
}>>>;
|
|
256
530
|
}, "strip", z.ZodTypeAny, {
|
|
257
531
|
name: string;
|
|
258
532
|
kind: "product" | "donation";
|
|
259
533
|
vatRate: 0 | 9 | 21;
|
|
260
534
|
qty: number;
|
|
261
535
|
unitPriceCents: number;
|
|
536
|
+
personalization?: Record<string, {
|
|
537
|
+
text?: string | undefined;
|
|
538
|
+
imagePath?: string | undefined;
|
|
539
|
+
fileName?: string | undefined;
|
|
540
|
+
}> | undefined;
|
|
262
541
|
productId?: string | undefined;
|
|
263
542
|
variantKey?: string | undefined;
|
|
264
543
|
}, {
|
|
@@ -267,22 +546,48 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
267
546
|
unitPriceCents: number;
|
|
268
547
|
kind?: "product" | "donation" | undefined;
|
|
269
548
|
vatRate?: 0 | 9 | 21 | undefined;
|
|
549
|
+
personalization?: Record<string, {
|
|
550
|
+
text?: string | undefined;
|
|
551
|
+
imagePath?: string | undefined;
|
|
552
|
+
fileName?: string | undefined;
|
|
553
|
+
}> | undefined;
|
|
270
554
|
productId?: string | undefined;
|
|
271
555
|
variantKey?: string | undefined;
|
|
272
556
|
}>, "many">;
|
|
273
557
|
amount: z.ZodObject<{
|
|
274
558
|
itemsCents: z.ZodNumber;
|
|
275
559
|
shippingCents: z.ZodNumber;
|
|
560
|
+
/** 5.6: toegepaste korting (0 = geen). */
|
|
561
|
+
discountCents: z.ZodDefault<z.ZodNumber>;
|
|
276
562
|
totalCents: z.ZodNumber;
|
|
277
563
|
}, "strip", z.ZodTypeAny, {
|
|
278
564
|
itemsCents: number;
|
|
279
565
|
shippingCents: number;
|
|
566
|
+
discountCents: number;
|
|
280
567
|
totalCents: number;
|
|
281
568
|
}, {
|
|
282
569
|
itemsCents: number;
|
|
283
570
|
shippingCents: number;
|
|
284
571
|
totalCents: number;
|
|
572
|
+
discountCents?: number | undefined;
|
|
285
573
|
}>;
|
|
574
|
+
/** 5.6: toegepaste kortingscode (snapshot). */
|
|
575
|
+
discount: z.ZodOptional<z.ZodObject<{
|
|
576
|
+
code: z.ZodString;
|
|
577
|
+
type: z.ZodEnum<["percent", "fixed"]>;
|
|
578
|
+
value: z.ZodNumber;
|
|
579
|
+
freeShipping: z.ZodDefault<z.ZodBoolean>;
|
|
580
|
+
}, "strip", z.ZodTypeAny, {
|
|
581
|
+
value: number;
|
|
582
|
+
code: string;
|
|
583
|
+
type: "fixed" | "percent";
|
|
584
|
+
freeShipping: boolean;
|
|
585
|
+
}, {
|
|
586
|
+
value: number;
|
|
587
|
+
code: string;
|
|
588
|
+
type: "fixed" | "percent";
|
|
589
|
+
freeShipping?: boolean | undefined;
|
|
590
|
+
}>>;
|
|
286
591
|
customer: z.ZodObject<{
|
|
287
592
|
email: z.ZodString;
|
|
288
593
|
name: z.ZodString;
|
|
@@ -313,6 +618,10 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
313
618
|
country?: string | undefined;
|
|
314
619
|
}>>;
|
|
315
620
|
note: z.ZodOptional<z.ZodString>;
|
|
621
|
+
/** 5.6: track & trace-link (gezet bij "verzonden"). */
|
|
622
|
+
trackingUrl: z.ZodOptional<z.ZodString>;
|
|
623
|
+
/** 5.6: factuur-pad in Storage (gezet door de webhook). */
|
|
624
|
+
invoicePath: z.ZodOptional<z.ZodString>;
|
|
316
625
|
stripe: z.ZodDefault<z.ZodObject<{
|
|
317
626
|
sessionId: z.ZodOptional<z.ZodString>;
|
|
318
627
|
paymentIntentId: z.ZodOptional<z.ZodString>;
|
|
@@ -332,12 +641,18 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
332
641
|
vatRate: 0 | 9 | 21;
|
|
333
642
|
qty: number;
|
|
334
643
|
unitPriceCents: number;
|
|
644
|
+
personalization?: Record<string, {
|
|
645
|
+
text?: string | undefined;
|
|
646
|
+
imagePath?: string | undefined;
|
|
647
|
+
fileName?: string | undefined;
|
|
648
|
+
}> | undefined;
|
|
335
649
|
productId?: string | undefined;
|
|
336
650
|
variantKey?: string | undefined;
|
|
337
651
|
}[];
|
|
338
652
|
amount: {
|
|
339
653
|
itemsCents: number;
|
|
340
654
|
shippingCents: number;
|
|
655
|
+
discountCents: number;
|
|
341
656
|
totalCents: number;
|
|
342
657
|
};
|
|
343
658
|
customer: {
|
|
@@ -356,6 +671,14 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
356
671
|
zip: string;
|
|
357
672
|
city: string;
|
|
358
673
|
} | undefined;
|
|
674
|
+
discount?: {
|
|
675
|
+
value: number;
|
|
676
|
+
code: string;
|
|
677
|
+
type: "fixed" | "percent";
|
|
678
|
+
freeShipping: boolean;
|
|
679
|
+
} | undefined;
|
|
680
|
+
trackingUrl?: string | undefined;
|
|
681
|
+
invoicePath?: string | undefined;
|
|
359
682
|
}, {
|
|
360
683
|
number: string;
|
|
361
684
|
status: "pending" | "paid" | "shipped" | "cancelled" | "refunded";
|
|
@@ -365,6 +688,11 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
365
688
|
unitPriceCents: number;
|
|
366
689
|
kind?: "product" | "donation" | undefined;
|
|
367
690
|
vatRate?: 0 | 9 | 21 | undefined;
|
|
691
|
+
personalization?: Record<string, {
|
|
692
|
+
text?: string | undefined;
|
|
693
|
+
imagePath?: string | undefined;
|
|
694
|
+
fileName?: string | undefined;
|
|
695
|
+
}> | undefined;
|
|
368
696
|
productId?: string | undefined;
|
|
369
697
|
variantKey?: string | undefined;
|
|
370
698
|
}[];
|
|
@@ -372,6 +700,7 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
372
700
|
itemsCents: number;
|
|
373
701
|
shippingCents: number;
|
|
374
702
|
totalCents: number;
|
|
703
|
+
discountCents?: number | undefined;
|
|
375
704
|
};
|
|
376
705
|
customer: {
|
|
377
706
|
name: string;
|
|
@@ -385,6 +714,14 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
385
714
|
city: string;
|
|
386
715
|
country?: string | undefined;
|
|
387
716
|
} | undefined;
|
|
717
|
+
discount?: {
|
|
718
|
+
value: number;
|
|
719
|
+
code: string;
|
|
720
|
+
type: "fixed" | "percent";
|
|
721
|
+
freeShipping?: boolean | undefined;
|
|
722
|
+
} | undefined;
|
|
723
|
+
trackingUrl?: string | undefined;
|
|
724
|
+
invoicePath?: string | undefined;
|
|
388
725
|
stripe?: {
|
|
389
726
|
sessionId?: string | undefined;
|
|
390
727
|
paymentIntentId?: string | undefined;
|
|
@@ -402,12 +739,38 @@ export declare const CreateOrderItemInputSchema: z.ZodObject<{
|
|
|
402
739
|
qty: z.ZodDefault<z.ZodNumber>;
|
|
403
740
|
/** Alleen voor donaties (zonder productId). */
|
|
404
741
|
donationCents: z.ZodOptional<z.ZodNumber>;
|
|
742
|
+
/** 5.6: personalisatie-invoer (gevalideerd tegen product.personalization). */
|
|
743
|
+
personalization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
744
|
+
text: z.ZodOptional<z.ZodString>;
|
|
745
|
+
/** Storage-pad uit de uploadPersonalization-callable (géén vrije URL). */
|
|
746
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
747
|
+
/** Oorspronkelijke bestandsnaam (weergave in beheer/mail). */
|
|
748
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
749
|
+
}, "strip", z.ZodTypeAny, {
|
|
750
|
+
text?: string | undefined;
|
|
751
|
+
imagePath?: string | undefined;
|
|
752
|
+
fileName?: string | undefined;
|
|
753
|
+
}, {
|
|
754
|
+
text?: string | undefined;
|
|
755
|
+
imagePath?: string | undefined;
|
|
756
|
+
fileName?: string | undefined;
|
|
757
|
+
}>>>;
|
|
405
758
|
}, "strip", z.ZodTypeAny, {
|
|
406
759
|
qty: number;
|
|
760
|
+
personalization?: Record<string, {
|
|
761
|
+
text?: string | undefined;
|
|
762
|
+
imagePath?: string | undefined;
|
|
763
|
+
fileName?: string | undefined;
|
|
764
|
+
}> | undefined;
|
|
407
765
|
productId?: string | undefined;
|
|
408
766
|
variantKey?: string | undefined;
|
|
409
767
|
donationCents?: number | undefined;
|
|
410
768
|
}, {
|
|
769
|
+
personalization?: Record<string, {
|
|
770
|
+
text?: string | undefined;
|
|
771
|
+
imagePath?: string | undefined;
|
|
772
|
+
fileName?: string | undefined;
|
|
773
|
+
}> | undefined;
|
|
411
774
|
productId?: string | undefined;
|
|
412
775
|
variantKey?: string | undefined;
|
|
413
776
|
qty?: number | undefined;
|
|
@@ -421,12 +784,38 @@ export declare const CreateOrderInputSchema: z.ZodObject<{
|
|
|
421
784
|
qty: z.ZodDefault<z.ZodNumber>;
|
|
422
785
|
/** Alleen voor donaties (zonder productId). */
|
|
423
786
|
donationCents: z.ZodOptional<z.ZodNumber>;
|
|
787
|
+
/** 5.6: personalisatie-invoer (gevalideerd tegen product.personalization). */
|
|
788
|
+
personalization: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
789
|
+
text: z.ZodOptional<z.ZodString>;
|
|
790
|
+
/** Storage-pad uit de uploadPersonalization-callable (géén vrije URL). */
|
|
791
|
+
imagePath: z.ZodOptional<z.ZodString>;
|
|
792
|
+
/** Oorspronkelijke bestandsnaam (weergave in beheer/mail). */
|
|
793
|
+
fileName: z.ZodOptional<z.ZodString>;
|
|
794
|
+
}, "strip", z.ZodTypeAny, {
|
|
795
|
+
text?: string | undefined;
|
|
796
|
+
imagePath?: string | undefined;
|
|
797
|
+
fileName?: string | undefined;
|
|
798
|
+
}, {
|
|
799
|
+
text?: string | undefined;
|
|
800
|
+
imagePath?: string | undefined;
|
|
801
|
+
fileName?: string | undefined;
|
|
802
|
+
}>>>;
|
|
424
803
|
}, "strip", z.ZodTypeAny, {
|
|
425
804
|
qty: number;
|
|
805
|
+
personalization?: Record<string, {
|
|
806
|
+
text?: string | undefined;
|
|
807
|
+
imagePath?: string | undefined;
|
|
808
|
+
fileName?: string | undefined;
|
|
809
|
+
}> | undefined;
|
|
426
810
|
productId?: string | undefined;
|
|
427
811
|
variantKey?: string | undefined;
|
|
428
812
|
donationCents?: number | undefined;
|
|
429
813
|
}, {
|
|
814
|
+
personalization?: Record<string, {
|
|
815
|
+
text?: string | undefined;
|
|
816
|
+
imagePath?: string | undefined;
|
|
817
|
+
fileName?: string | undefined;
|
|
818
|
+
}> | undefined;
|
|
430
819
|
productId?: string | undefined;
|
|
431
820
|
variantKey?: string | undefined;
|
|
432
821
|
qty?: number | undefined;
|
|
@@ -462,6 +851,8 @@ export declare const CreateOrderInputSchema: z.ZodObject<{
|
|
|
462
851
|
country?: string | undefined;
|
|
463
852
|
}>>;
|
|
464
853
|
note: z.ZodOptional<z.ZodString>;
|
|
854
|
+
/** 5.6: kortingscode (server-side gevalideerd en verrekend). */
|
|
855
|
+
discountCode: z.ZodOptional<z.ZodString>;
|
|
465
856
|
/** Paden op de klantsite waarheen Stripe terug redirect. */
|
|
466
857
|
successPath: z.ZodDefault<z.ZodString>;
|
|
467
858
|
cancelPath: z.ZodDefault<z.ZodString>;
|
|
@@ -470,6 +861,11 @@ export declare const CreateOrderInputSchema: z.ZodObject<{
|
|
|
470
861
|
}, "strip", z.ZodTypeAny, {
|
|
471
862
|
items: {
|
|
472
863
|
qty: number;
|
|
864
|
+
personalization?: Record<string, {
|
|
865
|
+
text?: string | undefined;
|
|
866
|
+
imagePath?: string | undefined;
|
|
867
|
+
fileName?: string | undefined;
|
|
868
|
+
}> | undefined;
|
|
473
869
|
productId?: string | undefined;
|
|
474
870
|
variantKey?: string | undefined;
|
|
475
871
|
donationCents?: number | undefined;
|
|
@@ -490,8 +886,14 @@ export declare const CreateOrderInputSchema: z.ZodObject<{
|
|
|
490
886
|
zip: string;
|
|
491
887
|
city: string;
|
|
492
888
|
} | undefined;
|
|
889
|
+
discountCode?: string | undefined;
|
|
493
890
|
}, {
|
|
494
891
|
items: {
|
|
892
|
+
personalization?: Record<string, {
|
|
893
|
+
text?: string | undefined;
|
|
894
|
+
imagePath?: string | undefined;
|
|
895
|
+
fileName?: string | undefined;
|
|
896
|
+
}> | undefined;
|
|
495
897
|
productId?: string | undefined;
|
|
496
898
|
variantKey?: string | undefined;
|
|
497
899
|
qty?: number | undefined;
|
|
@@ -512,6 +914,7 @@ export declare const CreateOrderInputSchema: z.ZodObject<{
|
|
|
512
914
|
country?: string | undefined;
|
|
513
915
|
} | undefined;
|
|
514
916
|
successPath?: string | undefined;
|
|
917
|
+
discountCode?: string | undefined;
|
|
515
918
|
cancelPath?: string | undefined;
|
|
516
919
|
}>;
|
|
517
920
|
export type CreateOrderInput = z.infer<typeof CreateOrderInputSchema>;
|
|
@@ -579,6 +982,8 @@ export declare const ProductGridBlockSchema: z.ZodObject<{
|
|
|
579
982
|
columns: z.ZodDefault<z.ZodNumber>;
|
|
580
983
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
581
984
|
sort: z.ZodDefault<z.ZodEnum<["order", "name", "priceAsc", "priceDesc"]>>;
|
|
985
|
+
/** 5.6: filterchips (kleur/maat) + sorteerkeuze boven het grid. */
|
|
986
|
+
showFilters: z.ZodDefault<z.ZodBoolean>;
|
|
582
987
|
_key: z.ZodString;
|
|
583
988
|
_style: z.ZodOptional<z.ZodObject<{
|
|
584
989
|
paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
|
|
@@ -610,6 +1015,7 @@ export declare const ProductGridBlockSchema: z.ZodObject<{
|
|
|
610
1015
|
limit: number;
|
|
611
1016
|
useQueryCategory: boolean;
|
|
612
1017
|
featuredOnly: boolean;
|
|
1018
|
+
showFilters: boolean;
|
|
613
1019
|
heading?: string | undefined;
|
|
614
1020
|
_style?: {
|
|
615
1021
|
background?: string | undefined;
|
|
@@ -638,11 +1044,14 @@ export declare const ProductGridBlockSchema: z.ZodObject<{
|
|
|
638
1044
|
categorySlug?: string | undefined;
|
|
639
1045
|
useQueryCategory?: boolean | undefined;
|
|
640
1046
|
featuredOnly?: boolean | undefined;
|
|
1047
|
+
showFilters?: boolean | undefined;
|
|
641
1048
|
}>;
|
|
642
1049
|
export declare const ProductDetailBlockSchema: z.ZodObject<{
|
|
643
1050
|
_type: z.ZodLiteral<"productDetail">;
|
|
644
1051
|
/** Vast product (slug); leeg → product uit `?p=` in de URL (één generieke detailpagina). */
|
|
645
1052
|
slug: z.ZodOptional<z.ZodString>;
|
|
1053
|
+
/** 5.6: "Ook leuk"-rij met producten uit dezelfde categorie. */
|
|
1054
|
+
showRelated: z.ZodDefault<z.ZodBoolean>;
|
|
646
1055
|
_key: z.ZodString;
|
|
647
1056
|
_style: z.ZodOptional<z.ZodObject<{
|
|
648
1057
|
paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
|
|
@@ -669,6 +1078,7 @@ export declare const ProductDetailBlockSchema: z.ZodObject<{
|
|
|
669
1078
|
}, "strip", z.ZodTypeAny, {
|
|
670
1079
|
_type: "productDetail";
|
|
671
1080
|
_key: string;
|
|
1081
|
+
showRelated: boolean;
|
|
672
1082
|
_style?: {
|
|
673
1083
|
background?: string | undefined;
|
|
674
1084
|
paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
|
|
@@ -690,6 +1100,7 @@ export declare const ProductDetailBlockSchema: z.ZodObject<{
|
|
|
690
1100
|
animate?: "fade" | "up" | undefined;
|
|
691
1101
|
} | undefined;
|
|
692
1102
|
slug?: string | undefined;
|
|
1103
|
+
showRelated?: boolean | undefined;
|
|
693
1104
|
}>;
|
|
694
1105
|
export declare const CartBlockSchema: z.ZodObject<{
|
|
695
1106
|
_type: z.ZodLiteral<"cart">;
|