@xiwebdesign/xicms-core 5.4.0 → 5.5.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.
Files changed (67) hide show
  1. package/dist/admin/panelRegistry.js +3 -0
  2. package/dist/admin/panelRegistry.js.map +1 -1
  3. package/dist/admin/shop/CategoriesTab.d.ts +3 -0
  4. package/dist/admin/shop/CategoriesTab.js +140 -0
  5. package/dist/admin/shop/CategoriesTab.js.map +1 -0
  6. package/dist/admin/shop/ConnectionsTab.d.ts +9 -0
  7. package/dist/admin/shop/ConnectionsTab.js +158 -0
  8. package/dist/admin/shop/ConnectionsTab.js.map +1 -0
  9. package/dist/admin/shop/OrdersTab.d.ts +3 -0
  10. package/dist/admin/shop/OrdersTab.js +236 -0
  11. package/dist/admin/shop/OrdersTab.js.map +1 -0
  12. package/dist/admin/shop/ProductsTab.d.ts +3 -0
  13. package/dist/admin/shop/ProductsTab.js +397 -0
  14. package/dist/admin/shop/ProductsTab.js.map +1 -0
  15. package/dist/admin/shop/ShopPanel.d.ts +4 -0
  16. package/dist/admin/shop/ShopPanel.js +25 -0
  17. package/dist/admin/shop/ShopPanel.js.map +1 -0
  18. package/dist/admin/shop/lib.d.ts +16 -0
  19. package/dist/admin/shop/lib.js +46 -0
  20. package/dist/admin/shop/lib.js.map +1 -0
  21. package/dist/admin.css +1 -1
  22. package/dist/modules/builtins.d.ts +1 -0
  23. package/dist/modules/builtins.js +4 -0
  24. package/dist/modules/builtins.js.map +1 -1
  25. package/dist/modules/index.d.ts +4 -0
  26. package/dist/modules/index.js +12 -0
  27. package/dist/modules/index.js.map +1 -1
  28. package/dist/modules/shop/blocks/Cart.d.ts +2 -0
  29. package/dist/modules/shop/blocks/Cart.js +91 -0
  30. package/dist/modules/shop/blocks/Cart.js.map +1 -0
  31. package/dist/modules/shop/blocks/Checkout.d.ts +2 -0
  32. package/dist/modules/shop/blocks/Checkout.js +126 -0
  33. package/dist/modules/shop/blocks/Checkout.js.map +1 -0
  34. package/dist/modules/shop/blocks/Donation.d.ts +2 -0
  35. package/dist/modules/shop/blocks/Donation.js +145 -0
  36. package/dist/modules/shop/blocks/Donation.js.map +1 -0
  37. package/dist/modules/shop/blocks/OrderStatus.d.ts +2 -0
  38. package/dist/modules/shop/blocks/OrderStatus.js +40 -0
  39. package/dist/modules/shop/blocks/OrderStatus.js.map +1 -0
  40. package/dist/modules/shop/blocks/ProductDetail.d.ts +2 -0
  41. package/dist/modules/shop/blocks/ProductDetail.js +168 -0
  42. package/dist/modules/shop/blocks/ProductDetail.js.map +1 -0
  43. package/dist/modules/shop/blocks/ProductGrid.d.ts +8 -0
  44. package/dist/modules/shop/blocks/ProductGrid.js +136 -0
  45. package/dist/modules/shop/blocks/ProductGrid.js.map +1 -0
  46. package/dist/modules/shop/blocks/ShopCategories.d.ts +2 -0
  47. package/dist/modules/shop/blocks/ShopCategories.js +69 -0
  48. package/dist/modules/shop/blocks/ShopCategories.js.map +1 -0
  49. package/dist/modules/shop/cartStore.d.ts +22 -0
  50. package/dist/modules/shop/cartStore.js +85 -0
  51. package/dist/modules/shop/cartStore.js.map +1 -0
  52. package/dist/modules/shop/lib.d.ts +25 -0
  53. package/dist/modules/shop/lib.js +61 -0
  54. package/dist/modules/shop/lib.js.map +1 -0
  55. package/dist/modules/shop/module.d.ts +1 -0
  56. package/dist/modules/shop/module.js +39 -0
  57. package/dist/modules/shop/module.js.map +1 -0
  58. package/dist/modules/shop/settings.d.ts +41 -0
  59. package/dist/modules/shop/settings.js +18 -0
  60. package/dist/modules/shop/settings.js.map +1 -0
  61. package/dist/schema/index.d.ts +1 -0
  62. package/dist/schema/index.js +1 -0
  63. package/dist/schema/index.js.map +1 -1
  64. package/dist/schema/shop.d.ts +939 -0
  65. package/dist/schema/shop.js +209 -0
  66. package/dist/schema/shop.js.map +1 -0
  67. package/package.json +1 -1
@@ -0,0 +1,939 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Shop-schema's (5.5) — webwinkel + donaties. Pure Zod: gedeeld door core, admin en Functions.
4
+ *
5
+ * Datamodel per tenant:
6
+ * sites/{siteId}/shopCategories/{id} — categorieën (editor-write, publiek leesbaar)
7
+ * sites/{siteId}/products/{id} — producten (editor-write, publiek leesbaar als actief)
8
+ * sites/{siteId}/orders/{id} — bestellingen (ALLEEN via Functions; editor leest,
9
+ * en mag alleen status/verzendvelden muteren)
10
+ * sites/{siteId}/private/shop — geheimen (Stripe-key, SMTP) — deny-all, alleen Functions
11
+ *
12
+ * Geld is ALTIJD een integer in centen (nooit floats). Publieke shopconfig (verzendkosten,
13
+ * paden, donatie-grenzen) leeft in de module-settings van de `shop`-module
14
+ * (settings/public.modules.shop.config) — zie modules/shop/module.ts.
15
+ */
16
+ export declare const ShopCategorySchema: z.ZodObject<{
17
+ name: z.ZodString;
18
+ slug: z.ZodString;
19
+ description: z.ZodOptional<z.ZodString>;
20
+ imageUrl: z.ZodOptional<z.ZodString>;
21
+ order: z.ZodDefault<z.ZodNumber>;
22
+ visible: z.ZodDefault<z.ZodBoolean>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ name: string;
25
+ slug: string;
26
+ order: number;
27
+ visible: boolean;
28
+ description?: string | undefined;
29
+ imageUrl?: string | undefined;
30
+ }, {
31
+ name: string;
32
+ slug: string;
33
+ description?: string | undefined;
34
+ imageUrl?: string | undefined;
35
+ order?: number | undefined;
36
+ visible?: boolean | undefined;
37
+ }>;
38
+ export type ShopCategory = z.infer<typeof ShopCategorySchema>;
39
+ /** Optie-as, bv. { name: "Maat", values: ["56","62","68","74"] }. Max 3 assen per product. */
40
+ export declare const ProductOptionSchema: z.ZodObject<{
41
+ name: z.ZodString;
42
+ values: z.ZodArray<z.ZodString, "many">;
43
+ }, "strip", z.ZodTypeAny, {
44
+ values: string[];
45
+ name: string;
46
+ }, {
47
+ values: string[];
48
+ name: string;
49
+ }>;
50
+ export type ProductOption = z.infer<typeof ProductOptionSchema>;
51
+ /**
52
+ * Variant = één combinatie van optiewaarden. `key` is de waarden gejoined met "|" in
53
+ * optie-volgorde (bv. "68|Roze"). Alleen aanwezig waar hij afwijkt van de product-defaults.
54
+ */
55
+ export declare const ProductVariantSchema: z.ZodObject<{
56
+ key: z.ZodString;
57
+ priceCents: z.ZodOptional<z.ZodNumber>;
58
+ stock: z.ZodOptional<z.ZodNumber>;
59
+ sku: z.ZodOptional<z.ZodString>;
60
+ active: z.ZodDefault<z.ZodBoolean>;
61
+ }, "strip", z.ZodTypeAny, {
62
+ key: string;
63
+ active: boolean;
64
+ priceCents?: number | undefined;
65
+ stock?: number | undefined;
66
+ sku?: string | undefined;
67
+ }, {
68
+ key: string;
69
+ active?: boolean | undefined;
70
+ priceCents?: number | undefined;
71
+ stock?: number | undefined;
72
+ sku?: string | undefined;
73
+ }>;
74
+ export type ProductVariant = z.infer<typeof ProductVariantSchema>;
75
+ export declare const ProductStatusSchema: z.ZodEnum<["draft", "active", "archived"]>;
76
+ export type ProductStatus = z.infer<typeof ProductStatusSchema>;
77
+ export declare const ProductSchema: z.ZodObject<{
78
+ name: z.ZodString;
79
+ slug: z.ZodString;
80
+ /**
81
+ * Beschrijving als platte tekst (regeleinden blijven behouden). Bewust géén HTML:
82
+ * producten worden client-side door editors geschreven (rules-pad, niet via de
83
+ * publish-sanitizer), dus HTML zou hier een XSS-route zijn.
84
+ */
85
+ description: z.ZodDefault<z.ZodString>;
86
+ categoryIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
87
+ /** Afbeeldings-URL's (via de mediabibliotheek). Eerste = hoofdbeeld. */
88
+ images: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
89
+ /** Prijs incl. btw, in centen. */
90
+ priceCents: z.ZodDefault<z.ZodNumber>;
91
+ /** Doorgestreepte "van"-prijs (optioneel). */
92
+ compareAtCents: z.ZodOptional<z.ZodNumber>;
93
+ /** Btw-tarief (NL): 21, 9 of 0. Prijzen zijn inclusief. */
94
+ vatRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<21>, z.ZodLiteral<9>, z.ZodLiteral<0>]>>;
95
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
96
+ name: z.ZodString;
97
+ values: z.ZodArray<z.ZodString, "many">;
98
+ }, "strip", z.ZodTypeAny, {
99
+ values: string[];
100
+ name: string;
101
+ }, {
102
+ values: string[];
103
+ name: string;
104
+ }>, "many">>;
105
+ variants: z.ZodDefault<z.ZodArray<z.ZodObject<{
106
+ key: z.ZodString;
107
+ priceCents: z.ZodOptional<z.ZodNumber>;
108
+ stock: z.ZodOptional<z.ZodNumber>;
109
+ sku: z.ZodOptional<z.ZodString>;
110
+ active: z.ZodDefault<z.ZodBoolean>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ key: string;
113
+ active: boolean;
114
+ priceCents?: number | undefined;
115
+ stock?: number | undefined;
116
+ sku?: string | undefined;
117
+ }, {
118
+ key: string;
119
+ active?: boolean | undefined;
120
+ priceCents?: number | undefined;
121
+ stock?: number | undefined;
122
+ sku?: string | undefined;
123
+ }>, "many">>;
124
+ /** Voorraad bijhouden? false = altijd bestelbaar (op-maat/print-on-demand). */
125
+ trackStock: z.ZodDefault<z.ZodBoolean>;
126
+ /** Voorraad voor producten zónder varianten (met varianten telt de variant-stock). */
127
+ stock: z.ZodOptional<z.ZodNumber>;
128
+ status: z.ZodDefault<z.ZodEnum<["draft", "active", "archived"]>>;
129
+ /** Sorteervolgorde binnen een categorie (laag = eerst). */
130
+ order: z.ZodDefault<z.ZodNumber>;
131
+ featured: z.ZodDefault<z.ZodBoolean>;
132
+ }, "strip", z.ZodTypeAny, {
133
+ description: string;
134
+ options: {
135
+ values: string[];
136
+ name: string;
137
+ }[];
138
+ status: "draft" | "active" | "archived";
139
+ name: string;
140
+ featured: boolean;
141
+ slug: string;
142
+ order: number;
143
+ variants: {
144
+ key: string;
145
+ active: boolean;
146
+ priceCents?: number | undefined;
147
+ stock?: number | undefined;
148
+ sku?: string | undefined;
149
+ }[];
150
+ priceCents: number;
151
+ categoryIds: string[];
152
+ images: string[];
153
+ vatRate: 0 | 9 | 21;
154
+ trackStock: boolean;
155
+ stock?: number | undefined;
156
+ compareAtCents?: number | undefined;
157
+ }, {
158
+ name: string;
159
+ slug: string;
160
+ description?: string | undefined;
161
+ options?: {
162
+ values: string[];
163
+ name: string;
164
+ }[] | undefined;
165
+ status?: "draft" | "active" | "archived" | undefined;
166
+ featured?: boolean | undefined;
167
+ order?: number | undefined;
168
+ variants?: {
169
+ key: string;
170
+ active?: boolean | undefined;
171
+ priceCents?: number | undefined;
172
+ stock?: number | undefined;
173
+ sku?: string | undefined;
174
+ }[] | undefined;
175
+ priceCents?: number | undefined;
176
+ stock?: number | undefined;
177
+ categoryIds?: string[] | undefined;
178
+ images?: string[] | undefined;
179
+ compareAtCents?: number | undefined;
180
+ vatRate?: 0 | 9 | 21 | undefined;
181
+ trackStock?: boolean | undefined;
182
+ }>;
183
+ export type Product = z.infer<typeof ProductSchema>;
184
+ export declare const OrderStatusSchema: z.ZodEnum<["pending", "paid", "shipped", "cancelled", "refunded"]>;
185
+ export type OrderStatus = z.infer<typeof OrderStatusSchema>;
186
+ /** Orderregel: snapshot van naam/prijs op besteldatum — blijft kloppen als het product wijzigt. */
187
+ export declare const OrderItemSchema: z.ZodObject<{
188
+ kind: z.ZodDefault<z.ZodEnum<["product", "donation"]>>;
189
+ productId: z.ZodOptional<z.ZodString>;
190
+ name: z.ZodString;
191
+ variantKey: z.ZodOptional<z.ZodString>;
192
+ qty: z.ZodNumber;
193
+ unitPriceCents: z.ZodNumber;
194
+ vatRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<21>, z.ZodLiteral<9>, z.ZodLiteral<0>]>>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ name: string;
197
+ kind: "product" | "donation";
198
+ vatRate: 0 | 9 | 21;
199
+ qty: number;
200
+ unitPriceCents: number;
201
+ productId?: string | undefined;
202
+ variantKey?: string | undefined;
203
+ }, {
204
+ name: string;
205
+ qty: number;
206
+ unitPriceCents: number;
207
+ kind?: "product" | "donation" | undefined;
208
+ vatRate?: 0 | 9 | 21 | undefined;
209
+ productId?: string | undefined;
210
+ variantKey?: string | undefined;
211
+ }>;
212
+ export type OrderItem = z.infer<typeof OrderItemSchema>;
213
+ export declare const OrderAddressSchema: z.ZodObject<{
214
+ address: z.ZodString;
215
+ zip: z.ZodString;
216
+ city: z.ZodString;
217
+ country: z.ZodDefault<z.ZodString>;
218
+ }, "strip", z.ZodTypeAny, {
219
+ address: string;
220
+ country: string;
221
+ zip: string;
222
+ city: string;
223
+ }, {
224
+ address: string;
225
+ zip: string;
226
+ city: string;
227
+ country?: string | undefined;
228
+ }>;
229
+ export type OrderAddress = z.infer<typeof OrderAddressSchema>;
230
+ export declare const OrderCustomerSchema: z.ZodObject<{
231
+ email: z.ZodString;
232
+ name: z.ZodString;
233
+ phone: z.ZodOptional<z.ZodString>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ name: string;
236
+ email: string;
237
+ phone?: string | undefined;
238
+ }, {
239
+ name: string;
240
+ email: string;
241
+ phone?: string | undefined;
242
+ }>;
243
+ export type OrderCustomer = z.infer<typeof OrderCustomerSchema>;
244
+ /** Volledige order zoals door Functions geschreven (timestamps komen daarbovenop). */
245
+ export declare const OrderSchema: z.ZodObject<{
246
+ number: z.ZodString;
247
+ status: z.ZodEnum<["pending", "paid", "shipped", "cancelled", "refunded"]>;
248
+ items: z.ZodArray<z.ZodObject<{
249
+ kind: z.ZodDefault<z.ZodEnum<["product", "donation"]>>;
250
+ productId: z.ZodOptional<z.ZodString>;
251
+ name: z.ZodString;
252
+ variantKey: z.ZodOptional<z.ZodString>;
253
+ qty: z.ZodNumber;
254
+ unitPriceCents: z.ZodNumber;
255
+ vatRate: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<21>, z.ZodLiteral<9>, z.ZodLiteral<0>]>>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ name: string;
258
+ kind: "product" | "donation";
259
+ vatRate: 0 | 9 | 21;
260
+ qty: number;
261
+ unitPriceCents: number;
262
+ productId?: string | undefined;
263
+ variantKey?: string | undefined;
264
+ }, {
265
+ name: string;
266
+ qty: number;
267
+ unitPriceCents: number;
268
+ kind?: "product" | "donation" | undefined;
269
+ vatRate?: 0 | 9 | 21 | undefined;
270
+ productId?: string | undefined;
271
+ variantKey?: string | undefined;
272
+ }>, "many">;
273
+ amount: z.ZodObject<{
274
+ itemsCents: z.ZodNumber;
275
+ shippingCents: z.ZodNumber;
276
+ totalCents: z.ZodNumber;
277
+ }, "strip", z.ZodTypeAny, {
278
+ itemsCents: number;
279
+ shippingCents: number;
280
+ totalCents: number;
281
+ }, {
282
+ itemsCents: number;
283
+ shippingCents: number;
284
+ totalCents: number;
285
+ }>;
286
+ customer: z.ZodObject<{
287
+ email: z.ZodString;
288
+ name: z.ZodString;
289
+ phone: z.ZodOptional<z.ZodString>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ name: string;
292
+ email: string;
293
+ phone?: string | undefined;
294
+ }, {
295
+ name: string;
296
+ email: string;
297
+ phone?: string | undefined;
298
+ }>;
299
+ shipping: z.ZodOptional<z.ZodObject<{
300
+ address: z.ZodString;
301
+ zip: z.ZodString;
302
+ city: z.ZodString;
303
+ country: z.ZodDefault<z.ZodString>;
304
+ }, "strip", z.ZodTypeAny, {
305
+ address: string;
306
+ country: string;
307
+ zip: string;
308
+ city: string;
309
+ }, {
310
+ address: string;
311
+ zip: string;
312
+ city: string;
313
+ country?: string | undefined;
314
+ }>>;
315
+ note: z.ZodOptional<z.ZodString>;
316
+ stripe: z.ZodDefault<z.ZodObject<{
317
+ sessionId: z.ZodOptional<z.ZodString>;
318
+ paymentIntentId: z.ZodOptional<z.ZodString>;
319
+ }, "strip", z.ZodTypeAny, {
320
+ sessionId?: string | undefined;
321
+ paymentIntentId?: string | undefined;
322
+ }, {
323
+ sessionId?: string | undefined;
324
+ paymentIntentId?: string | undefined;
325
+ }>>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ number: string;
328
+ status: "pending" | "paid" | "shipped" | "cancelled" | "refunded";
329
+ items: {
330
+ name: string;
331
+ kind: "product" | "donation";
332
+ vatRate: 0 | 9 | 21;
333
+ qty: number;
334
+ unitPriceCents: number;
335
+ productId?: string | undefined;
336
+ variantKey?: string | undefined;
337
+ }[];
338
+ amount: {
339
+ itemsCents: number;
340
+ shippingCents: number;
341
+ totalCents: number;
342
+ };
343
+ customer: {
344
+ name: string;
345
+ email: string;
346
+ phone?: string | undefined;
347
+ };
348
+ stripe: {
349
+ sessionId?: string | undefined;
350
+ paymentIntentId?: string | undefined;
351
+ };
352
+ note?: string | undefined;
353
+ shipping?: {
354
+ address: string;
355
+ country: string;
356
+ zip: string;
357
+ city: string;
358
+ } | undefined;
359
+ }, {
360
+ number: string;
361
+ status: "pending" | "paid" | "shipped" | "cancelled" | "refunded";
362
+ items: {
363
+ name: string;
364
+ qty: number;
365
+ unitPriceCents: number;
366
+ kind?: "product" | "donation" | undefined;
367
+ vatRate?: 0 | 9 | 21 | undefined;
368
+ productId?: string | undefined;
369
+ variantKey?: string | undefined;
370
+ }[];
371
+ amount: {
372
+ itemsCents: number;
373
+ shippingCents: number;
374
+ totalCents: number;
375
+ };
376
+ customer: {
377
+ name: string;
378
+ email: string;
379
+ phone?: string | undefined;
380
+ };
381
+ note?: string | undefined;
382
+ shipping?: {
383
+ address: string;
384
+ zip: string;
385
+ city: string;
386
+ country?: string | undefined;
387
+ } | undefined;
388
+ stripe?: {
389
+ sessionId?: string | undefined;
390
+ paymentIntentId?: string | undefined;
391
+ } | undefined;
392
+ }>;
393
+ export type Order = z.infer<typeof OrderSchema>;
394
+ /**
395
+ * Input van de `createOrder`-callable. Client-prijzen worden NOOIT vertrouwd: de functie
396
+ * herrekent alles tegen de opgeslagen product-docs. Alleen `donationCents` komt van de
397
+ * client (binnen de per-site ingestelde min/max van het donatie-block).
398
+ */
399
+ export declare const CreateOrderItemInputSchema: z.ZodObject<{
400
+ productId: z.ZodOptional<z.ZodString>;
401
+ variantKey: z.ZodOptional<z.ZodString>;
402
+ qty: z.ZodDefault<z.ZodNumber>;
403
+ /** Alleen voor donaties (zonder productId). */
404
+ donationCents: z.ZodOptional<z.ZodNumber>;
405
+ }, "strip", z.ZodTypeAny, {
406
+ qty: number;
407
+ productId?: string | undefined;
408
+ variantKey?: string | undefined;
409
+ donationCents?: number | undefined;
410
+ }, {
411
+ productId?: string | undefined;
412
+ variantKey?: string | undefined;
413
+ qty?: number | undefined;
414
+ donationCents?: number | undefined;
415
+ }>;
416
+ export declare const CreateOrderInputSchema: z.ZodObject<{
417
+ siteId: z.ZodString;
418
+ items: z.ZodArray<z.ZodObject<{
419
+ productId: z.ZodOptional<z.ZodString>;
420
+ variantKey: z.ZodOptional<z.ZodString>;
421
+ qty: z.ZodDefault<z.ZodNumber>;
422
+ /** Alleen voor donaties (zonder productId). */
423
+ donationCents: z.ZodOptional<z.ZodNumber>;
424
+ }, "strip", z.ZodTypeAny, {
425
+ qty: number;
426
+ productId?: string | undefined;
427
+ variantKey?: string | undefined;
428
+ donationCents?: number | undefined;
429
+ }, {
430
+ productId?: string | undefined;
431
+ variantKey?: string | undefined;
432
+ qty?: number | undefined;
433
+ donationCents?: number | undefined;
434
+ }>, "many">;
435
+ customer: z.ZodObject<{
436
+ email: z.ZodString;
437
+ name: z.ZodString;
438
+ phone: z.ZodOptional<z.ZodString>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ name: string;
441
+ email: string;
442
+ phone?: string | undefined;
443
+ }, {
444
+ name: string;
445
+ email: string;
446
+ phone?: string | undefined;
447
+ }>;
448
+ shipping: z.ZodOptional<z.ZodObject<{
449
+ address: z.ZodString;
450
+ zip: z.ZodString;
451
+ city: z.ZodString;
452
+ country: z.ZodDefault<z.ZodString>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ address: string;
455
+ country: string;
456
+ zip: string;
457
+ city: string;
458
+ }, {
459
+ address: string;
460
+ zip: string;
461
+ city: string;
462
+ country?: string | undefined;
463
+ }>>;
464
+ note: z.ZodOptional<z.ZodString>;
465
+ /** Paden op de klantsite waarheen Stripe terug redirect. */
466
+ successPath: z.ZodDefault<z.ZodString>;
467
+ cancelPath: z.ZodDefault<z.ZodString>;
468
+ /** Honeypot — moet leeg zijn (bot-detectie). */
469
+ _hp: z.ZodOptional<z.ZodString>;
470
+ }, "strip", z.ZodTypeAny, {
471
+ items: {
472
+ qty: number;
473
+ productId?: string | undefined;
474
+ variantKey?: string | undefined;
475
+ donationCents?: number | undefined;
476
+ }[];
477
+ siteId: string;
478
+ successPath: string;
479
+ customer: {
480
+ name: string;
481
+ email: string;
482
+ phone?: string | undefined;
483
+ };
484
+ cancelPath: string;
485
+ note?: string | undefined;
486
+ _hp?: string | undefined;
487
+ shipping?: {
488
+ address: string;
489
+ country: string;
490
+ zip: string;
491
+ city: string;
492
+ } | undefined;
493
+ }, {
494
+ items: {
495
+ productId?: string | undefined;
496
+ variantKey?: string | undefined;
497
+ qty?: number | undefined;
498
+ donationCents?: number | undefined;
499
+ }[];
500
+ siteId: string;
501
+ customer: {
502
+ name: string;
503
+ email: string;
504
+ phone?: string | undefined;
505
+ };
506
+ note?: string | undefined;
507
+ _hp?: string | undefined;
508
+ shipping?: {
509
+ address: string;
510
+ zip: string;
511
+ city: string;
512
+ country?: string | undefined;
513
+ } | undefined;
514
+ successPath?: string | undefined;
515
+ cancelPath?: string | undefined;
516
+ }>;
517
+ export type CreateOrderInput = z.infer<typeof CreateOrderInputSchema>;
518
+ export declare const ShopCategoriesBlockSchema: z.ZodObject<{
519
+ _type: z.ZodLiteral<"shopCategories">;
520
+ heading: z.ZodOptional<z.ZodString>;
521
+ columns: z.ZodDefault<z.ZodNumber>;
522
+ _key: z.ZodString;
523
+ _style: z.ZodOptional<z.ZodObject<{
524
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
525
+ background: z.ZodOptional<z.ZodString>;
526
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
527
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
528
+ anchorId: z.ZodOptional<z.ZodString>;
529
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ background?: string | undefined;
532
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
533
+ width?: "container" | "full" | "narrow" | undefined;
534
+ align?: "left" | "center" | "right" | undefined;
535
+ anchorId?: string | undefined;
536
+ animate?: "fade" | "up" | undefined;
537
+ }, {
538
+ background?: string | undefined;
539
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
540
+ width?: "container" | "full" | "narrow" | undefined;
541
+ align?: "left" | "center" | "right" | undefined;
542
+ anchorId?: string | undefined;
543
+ animate?: "fade" | "up" | undefined;
544
+ }>>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ columns: number;
547
+ _type: "shopCategories";
548
+ _key: string;
549
+ heading?: string | undefined;
550
+ _style?: {
551
+ background?: string | undefined;
552
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
553
+ width?: "container" | "full" | "narrow" | undefined;
554
+ align?: "left" | "center" | "right" | undefined;
555
+ anchorId?: string | undefined;
556
+ animate?: "fade" | "up" | undefined;
557
+ } | undefined;
558
+ }, {
559
+ _type: "shopCategories";
560
+ _key: string;
561
+ heading?: string | undefined;
562
+ columns?: number | undefined;
563
+ _style?: {
564
+ background?: string | undefined;
565
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
566
+ width?: "container" | "full" | "narrow" | undefined;
567
+ align?: "left" | "center" | "right" | undefined;
568
+ anchorId?: string | undefined;
569
+ animate?: "fade" | "up" | undefined;
570
+ } | undefined;
571
+ }>;
572
+ export declare const ProductGridBlockSchema: z.ZodObject<{
573
+ _type: z.ZodLiteral<"productGrid">;
574
+ heading: z.ZodOptional<z.ZodString>;
575
+ /** Vast categorie-filter (slug). Leeg + useQueryCategory → filter via `?cat=` in de URL. */
576
+ categorySlug: z.ZodOptional<z.ZodString>;
577
+ useQueryCategory: z.ZodDefault<z.ZodBoolean>;
578
+ featuredOnly: z.ZodDefault<z.ZodBoolean>;
579
+ columns: z.ZodDefault<z.ZodNumber>;
580
+ limit: z.ZodDefault<z.ZodNumber>;
581
+ sort: z.ZodDefault<z.ZodEnum<["order", "name", "priceAsc", "priceDesc"]>>;
582
+ _key: z.ZodString;
583
+ _style: z.ZodOptional<z.ZodObject<{
584
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
585
+ background: z.ZodOptional<z.ZodString>;
586
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
587
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
588
+ anchorId: z.ZodOptional<z.ZodString>;
589
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ background?: string | undefined;
592
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
593
+ width?: "container" | "full" | "narrow" | undefined;
594
+ align?: "left" | "center" | "right" | undefined;
595
+ anchorId?: string | undefined;
596
+ animate?: "fade" | "up" | undefined;
597
+ }, {
598
+ background?: string | undefined;
599
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
600
+ width?: "container" | "full" | "narrow" | undefined;
601
+ align?: "left" | "center" | "right" | undefined;
602
+ anchorId?: string | undefined;
603
+ animate?: "fade" | "up" | undefined;
604
+ }>>;
605
+ }, "strip", z.ZodTypeAny, {
606
+ sort: "name" | "order" | "priceAsc" | "priceDesc";
607
+ columns: number;
608
+ _type: "productGrid";
609
+ _key: string;
610
+ limit: number;
611
+ useQueryCategory: boolean;
612
+ featuredOnly: boolean;
613
+ heading?: string | undefined;
614
+ _style?: {
615
+ background?: string | undefined;
616
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
617
+ width?: "container" | "full" | "narrow" | undefined;
618
+ align?: "left" | "center" | "right" | undefined;
619
+ anchorId?: string | undefined;
620
+ animate?: "fade" | "up" | undefined;
621
+ } | undefined;
622
+ categorySlug?: string | undefined;
623
+ }, {
624
+ _type: "productGrid";
625
+ _key: string;
626
+ sort?: "name" | "order" | "priceAsc" | "priceDesc" | undefined;
627
+ heading?: string | undefined;
628
+ columns?: number | undefined;
629
+ _style?: {
630
+ background?: string | undefined;
631
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
632
+ width?: "container" | "full" | "narrow" | undefined;
633
+ align?: "left" | "center" | "right" | undefined;
634
+ anchorId?: string | undefined;
635
+ animate?: "fade" | "up" | undefined;
636
+ } | undefined;
637
+ limit?: number | undefined;
638
+ categorySlug?: string | undefined;
639
+ useQueryCategory?: boolean | undefined;
640
+ featuredOnly?: boolean | undefined;
641
+ }>;
642
+ export declare const ProductDetailBlockSchema: z.ZodObject<{
643
+ _type: z.ZodLiteral<"productDetail">;
644
+ /** Vast product (slug); leeg → product uit `?p=` in de URL (één generieke detailpagina). */
645
+ slug: z.ZodOptional<z.ZodString>;
646
+ _key: z.ZodString;
647
+ _style: z.ZodOptional<z.ZodObject<{
648
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
649
+ background: z.ZodOptional<z.ZodString>;
650
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
651
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
652
+ anchorId: z.ZodOptional<z.ZodString>;
653
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ background?: string | undefined;
656
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
657
+ width?: "container" | "full" | "narrow" | undefined;
658
+ align?: "left" | "center" | "right" | undefined;
659
+ anchorId?: string | undefined;
660
+ animate?: "fade" | "up" | undefined;
661
+ }, {
662
+ background?: string | undefined;
663
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
664
+ width?: "container" | "full" | "narrow" | undefined;
665
+ align?: "left" | "center" | "right" | undefined;
666
+ anchorId?: string | undefined;
667
+ animate?: "fade" | "up" | undefined;
668
+ }>>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ _type: "productDetail";
671
+ _key: string;
672
+ _style?: {
673
+ background?: string | undefined;
674
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
675
+ width?: "container" | "full" | "narrow" | undefined;
676
+ align?: "left" | "center" | "right" | undefined;
677
+ anchorId?: string | undefined;
678
+ animate?: "fade" | "up" | undefined;
679
+ } | undefined;
680
+ slug?: string | undefined;
681
+ }, {
682
+ _type: "productDetail";
683
+ _key: string;
684
+ _style?: {
685
+ background?: string | undefined;
686
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
687
+ width?: "container" | "full" | "narrow" | undefined;
688
+ align?: "left" | "center" | "right" | undefined;
689
+ anchorId?: string | undefined;
690
+ animate?: "fade" | "up" | undefined;
691
+ } | undefined;
692
+ slug?: string | undefined;
693
+ }>;
694
+ export declare const CartBlockSchema: z.ZodObject<{
695
+ _type: z.ZodLiteral<"cart">;
696
+ heading: z.ZodOptional<z.ZodString>;
697
+ _key: z.ZodString;
698
+ _style: z.ZodOptional<z.ZodObject<{
699
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
700
+ background: z.ZodOptional<z.ZodString>;
701
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
702
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
703
+ anchorId: z.ZodOptional<z.ZodString>;
704
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
705
+ }, "strip", z.ZodTypeAny, {
706
+ background?: string | undefined;
707
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
708
+ width?: "container" | "full" | "narrow" | undefined;
709
+ align?: "left" | "center" | "right" | undefined;
710
+ anchorId?: string | undefined;
711
+ animate?: "fade" | "up" | undefined;
712
+ }, {
713
+ background?: string | undefined;
714
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
715
+ width?: "container" | "full" | "narrow" | undefined;
716
+ align?: "left" | "center" | "right" | undefined;
717
+ anchorId?: string | undefined;
718
+ animate?: "fade" | "up" | undefined;
719
+ }>>;
720
+ }, "strip", z.ZodTypeAny, {
721
+ _type: "cart";
722
+ _key: string;
723
+ heading?: string | undefined;
724
+ _style?: {
725
+ background?: string | undefined;
726
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
727
+ width?: "container" | "full" | "narrow" | undefined;
728
+ align?: "left" | "center" | "right" | undefined;
729
+ anchorId?: string | undefined;
730
+ animate?: "fade" | "up" | undefined;
731
+ } | undefined;
732
+ }, {
733
+ _type: "cart";
734
+ _key: string;
735
+ heading?: string | undefined;
736
+ _style?: {
737
+ background?: string | undefined;
738
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
739
+ width?: "container" | "full" | "narrow" | undefined;
740
+ align?: "left" | "center" | "right" | undefined;
741
+ anchorId?: string | undefined;
742
+ animate?: "fade" | "up" | undefined;
743
+ } | undefined;
744
+ }>;
745
+ export declare const CheckoutBlockSchema: z.ZodObject<{
746
+ _type: z.ZodLiteral<"checkout">;
747
+ heading: z.ZodOptional<z.ZodString>;
748
+ introText: z.ZodOptional<z.ZodString>;
749
+ _key: z.ZodString;
750
+ _style: z.ZodOptional<z.ZodObject<{
751
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
752
+ background: z.ZodOptional<z.ZodString>;
753
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
754
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
755
+ anchorId: z.ZodOptional<z.ZodString>;
756
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
757
+ }, "strip", z.ZodTypeAny, {
758
+ background?: string | undefined;
759
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
760
+ width?: "container" | "full" | "narrow" | undefined;
761
+ align?: "left" | "center" | "right" | undefined;
762
+ anchorId?: string | undefined;
763
+ animate?: "fade" | "up" | undefined;
764
+ }, {
765
+ background?: string | undefined;
766
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
767
+ width?: "container" | "full" | "narrow" | undefined;
768
+ align?: "left" | "center" | "right" | undefined;
769
+ anchorId?: string | undefined;
770
+ animate?: "fade" | "up" | undefined;
771
+ }>>;
772
+ }, "strip", z.ZodTypeAny, {
773
+ _type: "checkout";
774
+ _key: string;
775
+ heading?: string | undefined;
776
+ _style?: {
777
+ background?: string | undefined;
778
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
779
+ width?: "container" | "full" | "narrow" | undefined;
780
+ align?: "left" | "center" | "right" | undefined;
781
+ anchorId?: string | undefined;
782
+ animate?: "fade" | "up" | undefined;
783
+ } | undefined;
784
+ introText?: string | undefined;
785
+ }, {
786
+ _type: "checkout";
787
+ _key: string;
788
+ heading?: string | undefined;
789
+ _style?: {
790
+ background?: string | undefined;
791
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
792
+ width?: "container" | "full" | "narrow" | undefined;
793
+ align?: "left" | "center" | "right" | undefined;
794
+ anchorId?: string | undefined;
795
+ animate?: "fade" | "up" | undefined;
796
+ } | undefined;
797
+ introText?: string | undefined;
798
+ }>;
799
+ export declare const DonationBlockSchema: z.ZodObject<{
800
+ _type: z.ZodLiteral<"donation">;
801
+ heading: z.ZodOptional<z.ZodString>;
802
+ introText: z.ZodOptional<z.ZodString>;
803
+ /** Voorgestelde bedragen in centen. */
804
+ amountsCents: z.ZodDefault<z.ZodArray<z.ZodNumber, "many">>;
805
+ allowCustom: z.ZodDefault<z.ZodBoolean>;
806
+ customMinCents: z.ZodDefault<z.ZodNumber>;
807
+ customMaxCents: z.ZodDefault<z.ZodNumber>;
808
+ buttonLabel: z.ZodDefault<z.ZodString>;
809
+ _key: z.ZodString;
810
+ _style: z.ZodOptional<z.ZodObject<{
811
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
812
+ background: z.ZodOptional<z.ZodString>;
813
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
814
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
815
+ anchorId: z.ZodOptional<z.ZodString>;
816
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ background?: string | undefined;
819
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
820
+ width?: "container" | "full" | "narrow" | undefined;
821
+ align?: "left" | "center" | "right" | undefined;
822
+ anchorId?: string | undefined;
823
+ animate?: "fade" | "up" | undefined;
824
+ }, {
825
+ background?: string | undefined;
826
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
827
+ width?: "container" | "full" | "narrow" | undefined;
828
+ align?: "left" | "center" | "right" | undefined;
829
+ anchorId?: string | undefined;
830
+ animate?: "fade" | "up" | undefined;
831
+ }>>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ _type: "donation";
834
+ _key: string;
835
+ buttonLabel: string;
836
+ amountsCents: number[];
837
+ allowCustom: boolean;
838
+ customMinCents: number;
839
+ customMaxCents: number;
840
+ heading?: string | undefined;
841
+ _style?: {
842
+ background?: string | undefined;
843
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
844
+ width?: "container" | "full" | "narrow" | undefined;
845
+ align?: "left" | "center" | "right" | undefined;
846
+ anchorId?: string | undefined;
847
+ animate?: "fade" | "up" | undefined;
848
+ } | undefined;
849
+ introText?: string | undefined;
850
+ }, {
851
+ _type: "donation";
852
+ _key: string;
853
+ heading?: string | undefined;
854
+ _style?: {
855
+ background?: string | undefined;
856
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
857
+ width?: "container" | "full" | "narrow" | undefined;
858
+ align?: "left" | "center" | "right" | undefined;
859
+ anchorId?: string | undefined;
860
+ animate?: "fade" | "up" | undefined;
861
+ } | undefined;
862
+ buttonLabel?: string | undefined;
863
+ introText?: string | undefined;
864
+ amountsCents?: number[] | undefined;
865
+ allowCustom?: boolean | undefined;
866
+ customMinCents?: number | undefined;
867
+ customMaxCents?: number | undefined;
868
+ }>;
869
+ export declare const OrderStatusBlockSchema: z.ZodObject<{
870
+ _type: z.ZodLiteral<"orderStatus">;
871
+ successTitle: z.ZodDefault<z.ZodString>;
872
+ successText: z.ZodDefault<z.ZodString>;
873
+ cancelledTitle: z.ZodDefault<z.ZodString>;
874
+ cancelledText: z.ZodDefault<z.ZodString>;
875
+ _key: z.ZodString;
876
+ _style: z.ZodOptional<z.ZodObject<{
877
+ paddingY: z.ZodOptional<z.ZodEnum<["none", "sm", "md", "lg", "xl"]>>;
878
+ background: z.ZodOptional<z.ZodString>;
879
+ width: z.ZodOptional<z.ZodEnum<["container", "full", "narrow"]>>;
880
+ align: z.ZodOptional<z.ZodEnum<["left", "center", "right"]>>;
881
+ anchorId: z.ZodOptional<z.ZodString>;
882
+ animate: z.ZodOptional<z.ZodEnum<["fade", "up"]>>;
883
+ }, "strip", z.ZodTypeAny, {
884
+ background?: string | undefined;
885
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
886
+ width?: "container" | "full" | "narrow" | undefined;
887
+ align?: "left" | "center" | "right" | undefined;
888
+ anchorId?: string | undefined;
889
+ animate?: "fade" | "up" | undefined;
890
+ }, {
891
+ background?: string | undefined;
892
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
893
+ width?: "container" | "full" | "narrow" | undefined;
894
+ align?: "left" | "center" | "right" | undefined;
895
+ anchorId?: string | undefined;
896
+ animate?: "fade" | "up" | undefined;
897
+ }>>;
898
+ }, "strip", z.ZodTypeAny, {
899
+ _type: "orderStatus";
900
+ _key: string;
901
+ successTitle: string;
902
+ successText: string;
903
+ cancelledTitle: string;
904
+ cancelledText: string;
905
+ _style?: {
906
+ background?: string | undefined;
907
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
908
+ width?: "container" | "full" | "narrow" | undefined;
909
+ align?: "left" | "center" | "right" | undefined;
910
+ anchorId?: string | undefined;
911
+ animate?: "fade" | "up" | undefined;
912
+ } | undefined;
913
+ }, {
914
+ _type: "orderStatus";
915
+ _key: string;
916
+ _style?: {
917
+ background?: string | undefined;
918
+ paddingY?: "sm" | "md" | "lg" | "xl" | "none" | undefined;
919
+ width?: "container" | "full" | "narrow" | undefined;
920
+ align?: "left" | "center" | "right" | undefined;
921
+ anchorId?: string | undefined;
922
+ animate?: "fade" | "up" | undefined;
923
+ } | undefined;
924
+ successTitle?: string | undefined;
925
+ successText?: string | undefined;
926
+ cancelledTitle?: string | undefined;
927
+ cancelledText?: string | undefined;
928
+ }>;
929
+ /** Variant-key uit gekozen optiewaarden, in optie-volgorde: ["68","Roze"] → "68|Roze". */
930
+ export declare function variantKeyFor(values: string[]): string;
931
+ /** Effectieve prijs van een product(-variant) in centen. */
932
+ export declare function productPriceCents(product: Pick<Product, "priceCents" | "variants">, variantKey?: string): number;
933
+ /** Verzendkosten volgens de publieke shopconfig (flat + gratis-vanaf). Donatie-only = gratis. */
934
+ export declare function shippingCentsFor(itemsCents: number, cfg: {
935
+ shippingFlatCents?: number;
936
+ shippingFreeFromCents?: number;
937
+ }, hasShippableItems: boolean): number;
938
+ /** Centen → "€ 13,95" (nl-NL). */
939
+ export declare function formatCents(cents: number, currency?: string): string;