@hartl-services/medusa-base 1.0.0 → 2.0.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 (79) hide show
  1. package/.medusa/server/src/admin/index.js +117 -1
  2. package/.medusa/server/src/admin/index.mjs +118 -2
  3. package/.medusa/server/src/documents/plugin-features.js +15 -1
  4. package/.medusa/server/src/documents/templates/financial-document.js +69 -51
  5. package/.medusa/server/src/documents/templates/format.js +44 -2
  6. package/.medusa/server/src/documents/templates/html-factory.js +7 -5
  7. package/.medusa/server/src/documents/templates/html-utils.js +12 -2
  8. package/.medusa/server/src/documents/templates/layout.js +115 -70
  9. package/.medusa/server/src/documents/templates/packing-list.js +10 -8
  10. package/.medusa/server/src/documents/utils/document-merchant.js +5 -5
  11. package/.medusa/server/src/documents/utils/document-render-settings.js +59 -0
  12. package/.medusa/server/src/email/application/handle-invite-event.js +8 -2
  13. package/.medusa/server/src/email/application/handle-password-reset-event.js +16 -4
  14. package/.medusa/server/src/email/domain/order-summary.js +103 -0
  15. package/.medusa/server/src/email/domain/refund-summary.js +43 -0
  16. package/.medusa/server/src/email/domain/return-summary.js +118 -0
  17. package/.medusa/server/src/email/domain/shipment-summary.js +74 -0
  18. package/.medusa/server/src/email/plugin-features.js +9 -1
  19. package/.medusa/server/src/email/rendering/default-templates.js +693 -65
  20. package/.medusa/server/src/email/rendering/load-email-shop-details.js +36 -0
  21. package/.medusa/server/src/email/rendering/render-email.js +16 -3
  22. package/.medusa/server/src/email/rendering/resolve-shop-configuration.js +20 -1
  23. package/.medusa/server/src/email/types/template-data.js +155 -2
  24. package/.medusa/server/src/modules/documents/domain/merchant.js +2 -33
  25. package/.medusa/server/src/modules/documents/domain/options.js +1 -7
  26. package/.medusa/server/src/modules/plugin-features/domain/plugin-settings.js +4 -3
  27. package/.medusa/server/src/public/descriptor.js +3 -1
  28. package/.medusa/server/src/public/shop-master-data.js +7 -7
  29. package/.medusa/server/src/shop-config/build-food-shop-config.js +6 -6
  30. package/.medusa/server/src/shop-config/options.js +5 -15
  31. package/.medusa/server/src/workflows/documents/issue-cancellation-after-refund.js +2 -3
  32. package/.medusa/server/src/workflows/documents/issue-document.js +6 -5
  33. package/.medusa/server/src/workflows/documents/issue-packing-list.js +9 -3
  34. package/.medusa/server/src/workflows/email/dispatch-email-message.js +4 -2
  35. package/.medusa/server/src/workflows/email/prepare-order-canceled-email.js +42 -4
  36. package/.medusa/server/src/workflows/email/prepare-order-received-email.js +31 -5
  37. package/.medusa/server/src/workflows/email/prepare-refund-email.js +25 -1
  38. package/.medusa/server/src/workflows/email/prepare-return-email.js +64 -3
  39. package/.medusa/server/src/workflows/email/prepare-shipment-email.js +36 -3
  40. package/README.md +180 -43
  41. package/dist/admin-components/features/plugin-features/components/ImageSettingInput.d.ts +15 -0
  42. package/dist/admin-components/features/plugin-features/components/ImageSettingInput.js +42 -0
  43. package/dist/admin-components/features/plugin-features/components/PluginSettingsForm.js +4 -2
  44. package/dist/admin-components/features/plugin-features/hooks/usePluginFeatureEnabled.d.ts +1 -1
  45. package/dist/admin-components/features/plugin-features/hooks/usePluginFeatures.d.ts +4 -4
  46. package/dist/admin-components/features/plugin-features/hooks/usePluginSettingsForm.d.ts +1 -1
  47. package/dist/admin-components/features/plugin-features/lib/image-upload.d.ts +6 -0
  48. package/dist/admin-components/features/plugin-features/lib/image-upload.js +17 -0
  49. package/dist/admin-components/features/plugin-features/lib/plugin-features-admin-client.d.ts +4 -4
  50. package/dist/admin-components/i18n/texts.d.ts +6 -0
  51. package/dist/admin-components/i18n/texts.js +6 -0
  52. package/dist/documents/templates/financial-document.d.ts +3 -3
  53. package/dist/documents/templates/financial-document.js +68 -50
  54. package/dist/documents/templates/format.d.ts +14 -0
  55. package/dist/documents/templates/format.js +43 -1
  56. package/dist/documents/templates/html-factory.d.ts +6 -2
  57. package/dist/documents/templates/html-factory.js +6 -4
  58. package/dist/documents/templates/html-utils.d.ts +6 -0
  59. package/dist/documents/templates/html-utils.js +11 -1
  60. package/dist/documents/templates/layout.d.ts +21 -3
  61. package/dist/documents/templates/layout.js +114 -69
  62. package/dist/documents/templates/packing-list.js +9 -7
  63. package/dist/documents/types/documents.d.ts +11 -16
  64. package/dist/documents/types/html-factory.d.ts +1 -0
  65. package/dist/email/types/shop-configuration.d.ts +25 -0
  66. package/dist/email/types/template-data.d.ts +509 -0
  67. package/dist/email/types/template-data.js +154 -1
  68. package/dist/modules/documents/domain/options.d.ts +1 -9
  69. package/dist/modules/documents/domain/options.js +0 -6
  70. package/dist/public/descriptor.js +2 -0
  71. package/dist/public/shop-master-data.d.ts +5 -6
  72. package/dist/public/shop-master-data.js +6 -6
  73. package/dist/public/types.d.ts +2 -1
  74. package/dist/shop-config/build-food-shop-config.js +5 -5
  75. package/dist/shop-config/options.d.ts +13 -8
  76. package/dist/shop-config/options.js +4 -14
  77. package/package.json +2 -2
  78. package/dist/modules/documents/domain/merchant.d.ts +0 -22
  79. package/dist/modules/documents/domain/merchant.js +0 -85
@@ -1,33 +1,357 @@
1
1
  import { z } from "@medusajs/framework/zod";
2
2
  import type { EmailKind } from "./email-kinds";
3
+ declare const OrderSummaryAddressSchema: z.ZodObject<{
4
+ first_name: z.ZodNullable<z.ZodString>;
5
+ last_name: z.ZodNullable<z.ZodString>;
6
+ company: z.ZodNullable<z.ZodString>;
7
+ address_1: z.ZodNullable<z.ZodString>;
8
+ address_2: z.ZodNullable<z.ZodString>;
9
+ postal_code: z.ZodNullable<z.ZodString>;
10
+ city: z.ZodNullable<z.ZodString>;
11
+ country_code: z.ZodNullable<z.ZodString>;
12
+ }, z.core.$strict>;
13
+ /**
14
+ * Snapshot of an order when it was placed. Amounts are Medusa's gross
15
+ * decimal strings: item and shipping rows before discounts, so
16
+ * `original_item_total + original_shipping_total - discount_total` is the
17
+ * `total`, which already contains `tax_total`.
18
+ */
19
+ export declare const OrderSummarySchema: z.ZodObject<{
20
+ display_id: z.ZodNullable<z.ZodNumber>;
21
+ email: z.ZodNullable<z.ZodString>;
22
+ placed_at: z.ZodString;
23
+ currency_code: z.ZodString;
24
+ items: z.ZodArray<z.ZodObject<{
25
+ title: z.ZodString;
26
+ variant_title: z.ZodNullable<z.ZodString>;
27
+ quantity: z.ZodNumber;
28
+ original_total: z.ZodString;
29
+ }, z.core.$strict>>;
30
+ shipping_method_names: z.ZodArray<z.ZodString>;
31
+ original_item_total: z.ZodString;
32
+ original_shipping_total: z.ZodString;
33
+ discount_total: z.ZodString;
34
+ tax_total: z.ZodString;
35
+ total: z.ZodString;
36
+ billing_address: z.ZodNullable<z.ZodObject<{
37
+ first_name: z.ZodNullable<z.ZodString>;
38
+ last_name: z.ZodNullable<z.ZodString>;
39
+ company: z.ZodNullable<z.ZodString>;
40
+ address_1: z.ZodNullable<z.ZodString>;
41
+ address_2: z.ZodNullable<z.ZodString>;
42
+ postal_code: z.ZodNullable<z.ZodString>;
43
+ city: z.ZodNullable<z.ZodString>;
44
+ country_code: z.ZodNullable<z.ZodString>;
45
+ }, z.core.$strict>>;
46
+ shipping_address: z.ZodNullable<z.ZodObject<{
47
+ first_name: z.ZodNullable<z.ZodString>;
48
+ last_name: z.ZodNullable<z.ZodString>;
49
+ company: z.ZodNullable<z.ZodString>;
50
+ address_1: z.ZodNullable<z.ZodString>;
51
+ address_2: z.ZodNullable<z.ZodString>;
52
+ postal_code: z.ZodNullable<z.ZodString>;
53
+ city: z.ZodNullable<z.ZodString>;
54
+ country_code: z.ZodNullable<z.ZodString>;
55
+ }, z.core.$strict>>;
56
+ }, z.core.$strict>;
57
+ export type OrderSummary = Readonly<z.infer<typeof OrderSummarySchema>>;
58
+ export type OrderSummaryAddress = Readonly<z.infer<typeof OrderSummaryAddressSchema>>;
59
+ /**
60
+ * Snapshot of one shipment when it was shipped: the parcel's items (title
61
+ * of the order line, shipped quantity), tracking numbers and links as
62
+ * entered at shipping, and whether more of the order is still to be shipped.
63
+ */
64
+ export declare const ShipmentSummarySchema: z.ZodObject<{
65
+ display_id: z.ZodNullable<z.ZodNumber>;
66
+ shipping_method_name: z.ZodNullable<z.ZodString>;
67
+ tracking: z.ZodArray<z.ZodObject<{
68
+ number: z.ZodNullable<z.ZodString>;
69
+ url: z.ZodNullable<z.ZodString>;
70
+ }, z.core.$strict>>;
71
+ items: z.ZodArray<z.ZodObject<{
72
+ title: z.ZodString;
73
+ variant_title: z.ZodNullable<z.ZodString>;
74
+ quantity: z.ZodNumber;
75
+ }, z.core.$strict>>;
76
+ delivery_address: z.ZodNullable<z.ZodObject<{
77
+ first_name: z.ZodNullable<z.ZodString>;
78
+ last_name: z.ZodNullable<z.ZodString>;
79
+ company: z.ZodNullable<z.ZodString>;
80
+ address_1: z.ZodNullable<z.ZodString>;
81
+ address_2: z.ZodNullable<z.ZodString>;
82
+ postal_code: z.ZodNullable<z.ZodString>;
83
+ city: z.ZodNullable<z.ZodString>;
84
+ country_code: z.ZodNullable<z.ZodString>;
85
+ }, z.core.$strict>>;
86
+ more_to_follow: z.ZodBoolean;
87
+ }, z.core.$strict>;
88
+ export type ShipmentSummary = Readonly<z.infer<typeof ShipmentSummarySchema>>;
89
+ /**
90
+ * Snapshot of a return when it was requested: the return and order numbers,
91
+ * the items to send back (title of the order line, quantity, reason label),
92
+ * the return shipping option and where to send the parcel.
93
+ */
94
+ export declare const ReturnSummarySchema: z.ZodObject<{
95
+ display_id: z.ZodNullable<z.ZodNumber>;
96
+ order_display_id: z.ZodNullable<z.ZodNumber>;
97
+ shipping_method_name: z.ZodNullable<z.ZodString>;
98
+ items: z.ZodArray<z.ZodObject<{
99
+ title: z.ZodString;
100
+ variant_title: z.ZodNullable<z.ZodString>;
101
+ quantity: z.ZodNumber;
102
+ reason: z.ZodNullable<z.ZodString>;
103
+ }, z.core.$strict>>;
104
+ return_address: z.ZodNullable<z.ZodObject<{
105
+ first_name: z.ZodNullable<z.ZodString>;
106
+ last_name: z.ZodNullable<z.ZodString>;
107
+ company: z.ZodNullable<z.ZodString>;
108
+ address_1: z.ZodNullable<z.ZodString>;
109
+ address_2: z.ZodNullable<z.ZodString>;
110
+ postal_code: z.ZodNullable<z.ZodString>;
111
+ city: z.ZodNullable<z.ZodString>;
112
+ country_code: z.ZodNullable<z.ZodString>;
113
+ }, z.core.$strict>>;
114
+ }, z.core.$strict>;
115
+ export type ReturnSummary = Readonly<z.infer<typeof ReturnSummarySchema>>;
116
+ /**
117
+ * Snapshot of a return when it was completely received: the return and
118
+ * order numbers, when it arrived and the received items (title of the order
119
+ * line, received quantity and how much of it arrived damaged).
120
+ */
121
+ export declare const ReturnReceivedSummarySchema: z.ZodObject<{
122
+ display_id: z.ZodNullable<z.ZodNumber>;
123
+ order_display_id: z.ZodNullable<z.ZodNumber>;
124
+ received_at: z.ZodNullable<z.ZodString>;
125
+ items: z.ZodArray<z.ZodObject<{
126
+ title: z.ZodString;
127
+ variant_title: z.ZodNullable<z.ZodString>;
128
+ quantity: z.ZodNumber;
129
+ damaged_quantity: z.ZodNumber;
130
+ }, z.core.$strict>>;
131
+ }, z.core.$strict>;
132
+ export type ReturnReceivedSummary = Readonly<z.infer<typeof ReturnReceivedSummarySchema>>;
133
+ /**
134
+ * Snapshot of one refund when its Documents fact arrived: the order number,
135
+ * the refunded gross amount, when it was refunded and the refund reason
136
+ * chosen in the Admin.
137
+ */
138
+ export declare const RefundSummarySchema: z.ZodObject<{
139
+ order_display_id: z.ZodNullable<z.ZodNumber>;
140
+ amount: z.ZodString;
141
+ currency_code: z.ZodString;
142
+ refunded_at: z.ZodNullable<z.ZodString>;
143
+ reason: z.ZodNullable<z.ZodString>;
144
+ }, z.core.$strict>;
145
+ export type RefundSummary = Readonly<z.infer<typeof RefundSummarySchema>>;
3
146
  export declare const EmailPersistedDataSchemas: {
4
147
  readonly "order.received": z.ZodObject<{
5
148
  order_id: z.ZodString;
149
+ summary: z.ZodOptional<z.ZodObject<{
150
+ display_id: z.ZodNullable<z.ZodNumber>;
151
+ email: z.ZodNullable<z.ZodString>;
152
+ placed_at: z.ZodString;
153
+ currency_code: z.ZodString;
154
+ items: z.ZodArray<z.ZodObject<{
155
+ title: z.ZodString;
156
+ variant_title: z.ZodNullable<z.ZodString>;
157
+ quantity: z.ZodNumber;
158
+ original_total: z.ZodString;
159
+ }, z.core.$strict>>;
160
+ shipping_method_names: z.ZodArray<z.ZodString>;
161
+ original_item_total: z.ZodString;
162
+ original_shipping_total: z.ZodString;
163
+ discount_total: z.ZodString;
164
+ tax_total: z.ZodString;
165
+ total: z.ZodString;
166
+ billing_address: z.ZodNullable<z.ZodObject<{
167
+ first_name: z.ZodNullable<z.ZodString>;
168
+ last_name: z.ZodNullable<z.ZodString>;
169
+ company: z.ZodNullable<z.ZodString>;
170
+ address_1: z.ZodNullable<z.ZodString>;
171
+ address_2: z.ZodNullable<z.ZodString>;
172
+ postal_code: z.ZodNullable<z.ZodString>;
173
+ city: z.ZodNullable<z.ZodString>;
174
+ country_code: z.ZodNullable<z.ZodString>;
175
+ }, z.core.$strict>>;
176
+ shipping_address: z.ZodNullable<z.ZodObject<{
177
+ first_name: z.ZodNullable<z.ZodString>;
178
+ last_name: z.ZodNullable<z.ZodString>;
179
+ company: z.ZodNullable<z.ZodString>;
180
+ address_1: z.ZodNullable<z.ZodString>;
181
+ address_2: z.ZodNullable<z.ZodString>;
182
+ postal_code: z.ZodNullable<z.ZodString>;
183
+ city: z.ZodNullable<z.ZodString>;
184
+ country_code: z.ZodNullable<z.ZodString>;
185
+ }, z.core.$strict>>;
186
+ }, z.core.$strict>>;
6
187
  }, z.core.$strict>;
7
188
  readonly "order.received.admin": z.ZodObject<{
8
189
  order_id: z.ZodString;
190
+ summary: z.ZodOptional<z.ZodObject<{
191
+ display_id: z.ZodNullable<z.ZodNumber>;
192
+ email: z.ZodNullable<z.ZodString>;
193
+ placed_at: z.ZodString;
194
+ currency_code: z.ZodString;
195
+ items: z.ZodArray<z.ZodObject<{
196
+ title: z.ZodString;
197
+ variant_title: z.ZodNullable<z.ZodString>;
198
+ quantity: z.ZodNumber;
199
+ original_total: z.ZodString;
200
+ }, z.core.$strict>>;
201
+ shipping_method_names: z.ZodArray<z.ZodString>;
202
+ original_item_total: z.ZodString;
203
+ original_shipping_total: z.ZodString;
204
+ discount_total: z.ZodString;
205
+ tax_total: z.ZodString;
206
+ total: z.ZodString;
207
+ billing_address: z.ZodNullable<z.ZodObject<{
208
+ first_name: z.ZodNullable<z.ZodString>;
209
+ last_name: z.ZodNullable<z.ZodString>;
210
+ company: z.ZodNullable<z.ZodString>;
211
+ address_1: z.ZodNullable<z.ZodString>;
212
+ address_2: z.ZodNullable<z.ZodString>;
213
+ postal_code: z.ZodNullable<z.ZodString>;
214
+ city: z.ZodNullable<z.ZodString>;
215
+ country_code: z.ZodNullable<z.ZodString>;
216
+ }, z.core.$strict>>;
217
+ shipping_address: z.ZodNullable<z.ZodObject<{
218
+ first_name: z.ZodNullable<z.ZodString>;
219
+ last_name: z.ZodNullable<z.ZodString>;
220
+ company: z.ZodNullable<z.ZodString>;
221
+ address_1: z.ZodNullable<z.ZodString>;
222
+ address_2: z.ZodNullable<z.ZodString>;
223
+ postal_code: z.ZodNullable<z.ZodString>;
224
+ city: z.ZodNullable<z.ZodString>;
225
+ country_code: z.ZodNullable<z.ZodString>;
226
+ }, z.core.$strict>>;
227
+ }, z.core.$strict>>;
9
228
  }, z.core.$strict>;
10
229
  readonly "order.shipped": z.ZodObject<{
11
230
  order_id: z.ZodString;
12
231
  fulfillment_id: z.ZodString;
13
232
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
233
+ shipment: z.ZodOptional<z.ZodObject<{
234
+ display_id: z.ZodNullable<z.ZodNumber>;
235
+ shipping_method_name: z.ZodNullable<z.ZodString>;
236
+ tracking: z.ZodArray<z.ZodObject<{
237
+ number: z.ZodNullable<z.ZodString>;
238
+ url: z.ZodNullable<z.ZodString>;
239
+ }, z.core.$strict>>;
240
+ items: z.ZodArray<z.ZodObject<{
241
+ title: z.ZodString;
242
+ variant_title: z.ZodNullable<z.ZodString>;
243
+ quantity: z.ZodNumber;
244
+ }, z.core.$strict>>;
245
+ delivery_address: z.ZodNullable<z.ZodObject<{
246
+ first_name: z.ZodNullable<z.ZodString>;
247
+ last_name: z.ZodNullable<z.ZodString>;
248
+ company: z.ZodNullable<z.ZodString>;
249
+ address_1: z.ZodNullable<z.ZodString>;
250
+ address_2: z.ZodNullable<z.ZodString>;
251
+ postal_code: z.ZodNullable<z.ZodString>;
252
+ city: z.ZodNullable<z.ZodString>;
253
+ country_code: z.ZodNullable<z.ZodString>;
254
+ }, z.core.$strict>>;
255
+ more_to_follow: z.ZodBoolean;
256
+ }, z.core.$strict>>;
257
+ invoice_attached: z.ZodOptional<z.ZodBoolean>;
14
258
  }, z.core.$strict>;
15
259
  readonly "order.canceled": z.ZodObject<{
16
260
  order_id: z.ZodString;
17
261
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
262
+ summary: z.ZodOptional<z.ZodObject<{
263
+ display_id: z.ZodNullable<z.ZodNumber>;
264
+ email: z.ZodNullable<z.ZodString>;
265
+ placed_at: z.ZodString;
266
+ currency_code: z.ZodString;
267
+ items: z.ZodArray<z.ZodObject<{
268
+ title: z.ZodString;
269
+ variant_title: z.ZodNullable<z.ZodString>;
270
+ quantity: z.ZodNumber;
271
+ original_total: z.ZodString;
272
+ }, z.core.$strict>>;
273
+ shipping_method_names: z.ZodArray<z.ZodString>;
274
+ original_item_total: z.ZodString;
275
+ original_shipping_total: z.ZodString;
276
+ discount_total: z.ZodString;
277
+ tax_total: z.ZodString;
278
+ total: z.ZodString;
279
+ billing_address: z.ZodNullable<z.ZodObject<{
280
+ first_name: z.ZodNullable<z.ZodString>;
281
+ last_name: z.ZodNullable<z.ZodString>;
282
+ company: z.ZodNullable<z.ZodString>;
283
+ address_1: z.ZodNullable<z.ZodString>;
284
+ address_2: z.ZodNullable<z.ZodString>;
285
+ postal_code: z.ZodNullable<z.ZodString>;
286
+ city: z.ZodNullable<z.ZodString>;
287
+ country_code: z.ZodNullable<z.ZodString>;
288
+ }, z.core.$strict>>;
289
+ shipping_address: z.ZodNullable<z.ZodObject<{
290
+ first_name: z.ZodNullable<z.ZodString>;
291
+ last_name: z.ZodNullable<z.ZodString>;
292
+ company: z.ZodNullable<z.ZodString>;
293
+ address_1: z.ZodNullable<z.ZodString>;
294
+ address_2: z.ZodNullable<z.ZodString>;
295
+ postal_code: z.ZodNullable<z.ZodString>;
296
+ city: z.ZodNullable<z.ZodString>;
297
+ country_code: z.ZodNullable<z.ZodString>;
298
+ }, z.core.$strict>>;
299
+ }, z.core.$strict>>;
300
+ canceled_at: z.ZodOptional<z.ZodString>;
301
+ cancellation_attached: z.ZodOptional<z.ZodBoolean>;
18
302
  }, z.core.$strict>;
19
303
  readonly "order.return_requested": z.ZodObject<{
20
304
  order_id: z.ZodString;
21
305
  return_id: z.ZodString;
306
+ summary: z.ZodOptional<z.ZodObject<{
307
+ display_id: z.ZodNullable<z.ZodNumber>;
308
+ order_display_id: z.ZodNullable<z.ZodNumber>;
309
+ shipping_method_name: z.ZodNullable<z.ZodString>;
310
+ items: z.ZodArray<z.ZodObject<{
311
+ title: z.ZodString;
312
+ variant_title: z.ZodNullable<z.ZodString>;
313
+ quantity: z.ZodNumber;
314
+ reason: z.ZodNullable<z.ZodString>;
315
+ }, z.core.$strict>>;
316
+ return_address: z.ZodNullable<z.ZodObject<{
317
+ first_name: z.ZodNullable<z.ZodString>;
318
+ last_name: z.ZodNullable<z.ZodString>;
319
+ company: z.ZodNullable<z.ZodString>;
320
+ address_1: z.ZodNullable<z.ZodString>;
321
+ address_2: z.ZodNullable<z.ZodString>;
322
+ postal_code: z.ZodNullable<z.ZodString>;
323
+ city: z.ZodNullable<z.ZodString>;
324
+ country_code: z.ZodNullable<z.ZodString>;
325
+ }, z.core.$strict>>;
326
+ }, z.core.$strict>>;
22
327
  }, z.core.$strict>;
23
328
  readonly "order.return_received": z.ZodObject<{
24
329
  order_id: z.ZodString;
25
330
  return_id: z.ZodString;
331
+ summary: z.ZodOptional<z.ZodObject<{
332
+ display_id: z.ZodNullable<z.ZodNumber>;
333
+ order_display_id: z.ZodNullable<z.ZodNumber>;
334
+ received_at: z.ZodNullable<z.ZodString>;
335
+ items: z.ZodArray<z.ZodObject<{
336
+ title: z.ZodString;
337
+ variant_title: z.ZodNullable<z.ZodString>;
338
+ quantity: z.ZodNumber;
339
+ damaged_quantity: z.ZodNumber;
340
+ }, z.core.$strict>>;
341
+ }, z.core.$strict>>;
26
342
  }, z.core.$strict>;
27
343
  readonly "order.refunded": z.ZodObject<{
28
344
  order_id: z.ZodString;
29
345
  refund_id: z.ZodString;
30
346
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
347
+ summary: z.ZodOptional<z.ZodObject<{
348
+ order_display_id: z.ZodNullable<z.ZodNumber>;
349
+ amount: z.ZodString;
350
+ currency_code: z.ZodString;
351
+ refunded_at: z.ZodNullable<z.ZodString>;
352
+ reason: z.ZodNullable<z.ZodString>;
353
+ }, z.core.$strict>>;
354
+ cancellation_attached: z.ZodOptional<z.ZodBoolean>;
31
355
  }, z.core.$strict>;
32
356
  readonly "auth.password_reset": z.ZodObject<{
33
357
  locale: z.ZodNullable<z.ZodString>;
@@ -44,37 +368,220 @@ export declare const EmailRenderDataSchemas: {
44
368
  readonly "auth.password_reset": z.ZodObject<{
45
369
  locale: z.ZodNullable<z.ZodString>;
46
370
  reset_url: z.ZodString;
371
+ valid_minutes: z.ZodOptional<z.ZodNumber>;
47
372
  }, z.core.$strict>;
48
373
  readonly "user.invite": z.ZodObject<{
49
374
  invite_url: z.ZodString;
375
+ expires_at: z.ZodOptional<z.ZodString>;
50
376
  }, z.core.$strict>;
51
377
  readonly "order.received": z.ZodObject<{
52
378
  order_id: z.ZodString;
379
+ summary: z.ZodOptional<z.ZodObject<{
380
+ display_id: z.ZodNullable<z.ZodNumber>;
381
+ email: z.ZodNullable<z.ZodString>;
382
+ placed_at: z.ZodString;
383
+ currency_code: z.ZodString;
384
+ items: z.ZodArray<z.ZodObject<{
385
+ title: z.ZodString;
386
+ variant_title: z.ZodNullable<z.ZodString>;
387
+ quantity: z.ZodNumber;
388
+ original_total: z.ZodString;
389
+ }, z.core.$strict>>;
390
+ shipping_method_names: z.ZodArray<z.ZodString>;
391
+ original_item_total: z.ZodString;
392
+ original_shipping_total: z.ZodString;
393
+ discount_total: z.ZodString;
394
+ tax_total: z.ZodString;
395
+ total: z.ZodString;
396
+ billing_address: z.ZodNullable<z.ZodObject<{
397
+ first_name: z.ZodNullable<z.ZodString>;
398
+ last_name: z.ZodNullable<z.ZodString>;
399
+ company: z.ZodNullable<z.ZodString>;
400
+ address_1: z.ZodNullable<z.ZodString>;
401
+ address_2: z.ZodNullable<z.ZodString>;
402
+ postal_code: z.ZodNullable<z.ZodString>;
403
+ city: z.ZodNullable<z.ZodString>;
404
+ country_code: z.ZodNullable<z.ZodString>;
405
+ }, z.core.$strict>>;
406
+ shipping_address: z.ZodNullable<z.ZodObject<{
407
+ first_name: z.ZodNullable<z.ZodString>;
408
+ last_name: z.ZodNullable<z.ZodString>;
409
+ company: z.ZodNullable<z.ZodString>;
410
+ address_1: z.ZodNullable<z.ZodString>;
411
+ address_2: z.ZodNullable<z.ZodString>;
412
+ postal_code: z.ZodNullable<z.ZodString>;
413
+ city: z.ZodNullable<z.ZodString>;
414
+ country_code: z.ZodNullable<z.ZodString>;
415
+ }, z.core.$strict>>;
416
+ }, z.core.$strict>>;
53
417
  }, z.core.$strict>;
54
418
  readonly "order.received.admin": z.ZodObject<{
55
419
  order_id: z.ZodString;
420
+ summary: z.ZodOptional<z.ZodObject<{
421
+ display_id: z.ZodNullable<z.ZodNumber>;
422
+ email: z.ZodNullable<z.ZodString>;
423
+ placed_at: z.ZodString;
424
+ currency_code: z.ZodString;
425
+ items: z.ZodArray<z.ZodObject<{
426
+ title: z.ZodString;
427
+ variant_title: z.ZodNullable<z.ZodString>;
428
+ quantity: z.ZodNumber;
429
+ original_total: z.ZodString;
430
+ }, z.core.$strict>>;
431
+ shipping_method_names: z.ZodArray<z.ZodString>;
432
+ original_item_total: z.ZodString;
433
+ original_shipping_total: z.ZodString;
434
+ discount_total: z.ZodString;
435
+ tax_total: z.ZodString;
436
+ total: z.ZodString;
437
+ billing_address: z.ZodNullable<z.ZodObject<{
438
+ first_name: z.ZodNullable<z.ZodString>;
439
+ last_name: z.ZodNullable<z.ZodString>;
440
+ company: z.ZodNullable<z.ZodString>;
441
+ address_1: z.ZodNullable<z.ZodString>;
442
+ address_2: z.ZodNullable<z.ZodString>;
443
+ postal_code: z.ZodNullable<z.ZodString>;
444
+ city: z.ZodNullable<z.ZodString>;
445
+ country_code: z.ZodNullable<z.ZodString>;
446
+ }, z.core.$strict>>;
447
+ shipping_address: z.ZodNullable<z.ZodObject<{
448
+ first_name: z.ZodNullable<z.ZodString>;
449
+ last_name: z.ZodNullable<z.ZodString>;
450
+ company: z.ZodNullable<z.ZodString>;
451
+ address_1: z.ZodNullable<z.ZodString>;
452
+ address_2: z.ZodNullable<z.ZodString>;
453
+ postal_code: z.ZodNullable<z.ZodString>;
454
+ city: z.ZodNullable<z.ZodString>;
455
+ country_code: z.ZodNullable<z.ZodString>;
456
+ }, z.core.$strict>>;
457
+ }, z.core.$strict>>;
56
458
  }, z.core.$strict>;
57
459
  readonly "order.shipped": z.ZodObject<{
58
460
  order_id: z.ZodString;
59
461
  fulfillment_id: z.ZodString;
60
462
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
463
+ shipment: z.ZodOptional<z.ZodObject<{
464
+ display_id: z.ZodNullable<z.ZodNumber>;
465
+ shipping_method_name: z.ZodNullable<z.ZodString>;
466
+ tracking: z.ZodArray<z.ZodObject<{
467
+ number: z.ZodNullable<z.ZodString>;
468
+ url: z.ZodNullable<z.ZodString>;
469
+ }, z.core.$strict>>;
470
+ items: z.ZodArray<z.ZodObject<{
471
+ title: z.ZodString;
472
+ variant_title: z.ZodNullable<z.ZodString>;
473
+ quantity: z.ZodNumber;
474
+ }, z.core.$strict>>;
475
+ delivery_address: z.ZodNullable<z.ZodObject<{
476
+ first_name: z.ZodNullable<z.ZodString>;
477
+ last_name: z.ZodNullable<z.ZodString>;
478
+ company: z.ZodNullable<z.ZodString>;
479
+ address_1: z.ZodNullable<z.ZodString>;
480
+ address_2: z.ZodNullable<z.ZodString>;
481
+ postal_code: z.ZodNullable<z.ZodString>;
482
+ city: z.ZodNullable<z.ZodString>;
483
+ country_code: z.ZodNullable<z.ZodString>;
484
+ }, z.core.$strict>>;
485
+ more_to_follow: z.ZodBoolean;
486
+ }, z.core.$strict>>;
487
+ invoice_attached: z.ZodOptional<z.ZodBoolean>;
61
488
  }, z.core.$strict>;
62
489
  readonly "order.canceled": z.ZodObject<{
63
490
  order_id: z.ZodString;
64
491
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
492
+ summary: z.ZodOptional<z.ZodObject<{
493
+ display_id: z.ZodNullable<z.ZodNumber>;
494
+ email: z.ZodNullable<z.ZodString>;
495
+ placed_at: z.ZodString;
496
+ currency_code: z.ZodString;
497
+ items: z.ZodArray<z.ZodObject<{
498
+ title: z.ZodString;
499
+ variant_title: z.ZodNullable<z.ZodString>;
500
+ quantity: z.ZodNumber;
501
+ original_total: z.ZodString;
502
+ }, z.core.$strict>>;
503
+ shipping_method_names: z.ZodArray<z.ZodString>;
504
+ original_item_total: z.ZodString;
505
+ original_shipping_total: z.ZodString;
506
+ discount_total: z.ZodString;
507
+ tax_total: z.ZodString;
508
+ total: z.ZodString;
509
+ billing_address: z.ZodNullable<z.ZodObject<{
510
+ first_name: z.ZodNullable<z.ZodString>;
511
+ last_name: z.ZodNullable<z.ZodString>;
512
+ company: z.ZodNullable<z.ZodString>;
513
+ address_1: z.ZodNullable<z.ZodString>;
514
+ address_2: z.ZodNullable<z.ZodString>;
515
+ postal_code: z.ZodNullable<z.ZodString>;
516
+ city: z.ZodNullable<z.ZodString>;
517
+ country_code: z.ZodNullable<z.ZodString>;
518
+ }, z.core.$strict>>;
519
+ shipping_address: z.ZodNullable<z.ZodObject<{
520
+ first_name: z.ZodNullable<z.ZodString>;
521
+ last_name: z.ZodNullable<z.ZodString>;
522
+ company: z.ZodNullable<z.ZodString>;
523
+ address_1: z.ZodNullable<z.ZodString>;
524
+ address_2: z.ZodNullable<z.ZodString>;
525
+ postal_code: z.ZodNullable<z.ZodString>;
526
+ city: z.ZodNullable<z.ZodString>;
527
+ country_code: z.ZodNullable<z.ZodString>;
528
+ }, z.core.$strict>>;
529
+ }, z.core.$strict>>;
530
+ canceled_at: z.ZodOptional<z.ZodString>;
531
+ cancellation_attached: z.ZodOptional<z.ZodBoolean>;
65
532
  }, z.core.$strict>;
66
533
  readonly "order.return_requested": z.ZodObject<{
67
534
  order_id: z.ZodString;
68
535
  return_id: z.ZodString;
536
+ summary: z.ZodOptional<z.ZodObject<{
537
+ display_id: z.ZodNullable<z.ZodNumber>;
538
+ order_display_id: z.ZodNullable<z.ZodNumber>;
539
+ shipping_method_name: z.ZodNullable<z.ZodString>;
540
+ items: z.ZodArray<z.ZodObject<{
541
+ title: z.ZodString;
542
+ variant_title: z.ZodNullable<z.ZodString>;
543
+ quantity: z.ZodNumber;
544
+ reason: z.ZodNullable<z.ZodString>;
545
+ }, z.core.$strict>>;
546
+ return_address: z.ZodNullable<z.ZodObject<{
547
+ first_name: z.ZodNullable<z.ZodString>;
548
+ last_name: z.ZodNullable<z.ZodString>;
549
+ company: z.ZodNullable<z.ZodString>;
550
+ address_1: z.ZodNullable<z.ZodString>;
551
+ address_2: z.ZodNullable<z.ZodString>;
552
+ postal_code: z.ZodNullable<z.ZodString>;
553
+ city: z.ZodNullable<z.ZodString>;
554
+ country_code: z.ZodNullable<z.ZodString>;
555
+ }, z.core.$strict>>;
556
+ }, z.core.$strict>>;
69
557
  }, z.core.$strict>;
70
558
  readonly "order.return_received": z.ZodObject<{
71
559
  order_id: z.ZodString;
72
560
  return_id: z.ZodString;
561
+ summary: z.ZodOptional<z.ZodObject<{
562
+ display_id: z.ZodNullable<z.ZodNumber>;
563
+ order_display_id: z.ZodNullable<z.ZodNumber>;
564
+ received_at: z.ZodNullable<z.ZodString>;
565
+ items: z.ZodArray<z.ZodObject<{
566
+ title: z.ZodString;
567
+ variant_title: z.ZodNullable<z.ZodString>;
568
+ quantity: z.ZodNumber;
569
+ damaged_quantity: z.ZodNumber;
570
+ }, z.core.$strict>>;
571
+ }, z.core.$strict>>;
73
572
  }, z.core.$strict>;
74
573
  readonly "order.refunded": z.ZodObject<{
75
574
  order_id: z.ZodString;
76
575
  refund_id: z.ZodString;
77
576
  documents_fact_fingerprint: z.ZodOptional<z.ZodString>;
577
+ summary: z.ZodOptional<z.ZodObject<{
578
+ order_display_id: z.ZodNullable<z.ZodNumber>;
579
+ amount: z.ZodString;
580
+ currency_code: z.ZodString;
581
+ refunded_at: z.ZodNullable<z.ZodString>;
582
+ reason: z.ZodNullable<z.ZodString>;
583
+ }, z.core.$strict>>;
584
+ cancellation_attached: z.ZodOptional<z.ZodBoolean>;
78
585
  }, z.core.$strict>;
79
586
  readonly "affiliate.consignment_report_due": z.ZodObject<{
80
587
  affiliate_display_name: z.ZodString;
@@ -90,8 +597,10 @@ type EmptyRenderContext = Readonly<Record<never, never>>;
90
597
  export type EmailEphemeralRenderContextMap = {
91
598
  readonly [Kind in EmailKind]: Kind extends "auth.password_reset" ? Readonly<{
92
599
  reset_url: string;
600
+ valid_minutes?: number;
93
601
  }> : Kind extends "user.invite" ? Readonly<{
94
602
  invite_url: string;
603
+ expires_at?: string;
95
604
  }> : EmptyRenderContext;
96
605
  };
97
606
  export type EmailRenderDataMap = {