@shophost/rest-api 2.0.61 → 2.0.62
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/package.json +1 -1
- package/src/bootstrap.js +1 -1
- package/src/bootstrap.js.map +1 -1
- package/src/container.d.ts +4 -0
- package/src/container.js +1 -1
- package/src/container.js.map +1 -1
- package/src/core/lib/prisma.d.ts +24 -24
- package/src/core/notifications/email.service.d.ts +12 -14
- package/src/core/notifications/email.service.js +1 -1
- package/src/core/notifications/email.service.js.map +1 -1
- package/src/features/access/access.route.d.ts +6 -6
- package/src/features/cart/cart.route.d.ts +15 -15
- package/src/features/cart/cart.schema.d.ts +27 -27
- package/src/features/cart/cart.service.d.ts +4 -4
- package/src/features/customer/customer.route.d.ts +9 -9
- package/src/features/customer/customer.schema.d.ts +9 -9
- package/src/features/customer/customer.service.d.ts +1 -1
- package/src/features/integration/integration-registry.d.ts +10 -10
- package/src/features/integration/integration-registry.js +1 -1
- package/src/features/integration/integration-registry.js.map +1 -1
- package/src/features/integration/integration.service.d.ts +5 -1
- package/src/features/integration/integration.service.js +1 -1
- package/src/features/integration/integration.service.js.map +1 -1
- package/src/features/manufacturer/manufacturer.route.d.ts +14 -14
- package/src/features/manufacturer/manufacturer.schema.d.ts +1 -1
- package/src/features/manufacturer/manufacturer.service.d.ts +2 -2
- package/src/features/order/order-fulfillment.service.d.ts +12 -0
- package/src/features/order/order-fulfillment.service.js +1 -0
- package/src/features/order/order-fulfillment.service.js.map +1 -0
- package/src/features/order/order.route.d.ts +61 -61
- package/src/features/order/order.schema.d.ts +14 -14
- package/src/features/order/order.service.d.ts +10 -6
- package/src/features/order/order.service.js +1 -1
- package/src/features/order/order.service.js.map +1 -1
- package/src/features/order/recipient.schema.d.ts +2 -2
- package/src/features/organization/organization-configuration.schema.d.ts +25 -25
- package/src/features/organization/organization.route.d.ts +67 -67
- package/src/features/organization/organization.schema.d.ts +25 -25
- package/src/features/organization/organization.service.d.ts +8 -8
- package/src/features/payment/payment-webhook.service.d.ts +12 -0
- package/src/features/payment/payment-webhook.service.js +1 -0
- package/src/features/payment/payment-webhook.service.js.map +1 -0
- package/src/features/payment/payment.service.d.ts +3 -12
- package/src/features/payment/payment.service.js +1 -1
- package/src/features/payment/payment.service.js.map +1 -1
- package/src/features/payment/stripe.service.d.ts +22 -32
- package/src/features/payment/stripe.service.js +1 -1
- package/src/features/payment/stripe.service.js.map +1 -1
- package/src/features/product/product-modifier.schema.d.ts +30 -30
- package/src/features/product/product.route.d.ts +182 -182
- package/src/features/product/product.schema.d.ts +65 -65
- package/src/features/product/product.service.d.ts +26 -26
- package/src/features/product-category/product-category.route.d.ts +14 -14
- package/src/features/product-category/product-category.schema.d.ts +1 -1
- package/src/features/product-category/product-category.service.d.ts +2 -2
- package/src/features/reservation/reservation.route.d.ts +12 -12
- package/src/features/reservation/reservation.schema.d.ts +6 -6
- package/src/features/reservation/reservation.service.d.ts +3 -5
- package/src/features/reservation/reservation.service.js +1 -1
- package/src/features/reservation/reservation.service.js.map +1 -1
- package/src/features/shipping-method/shipping-method.route.d.ts +6 -6
- package/src/features/webhook/webhook.handler.d.ts +2 -2
- package/src/features/webhook/webhook.handler.js +1 -1
- package/src/features/webhook/webhook.handler.js.map +1 -1
- package/src/schemas/locales.schema.d.ts +6 -6
- package/src/schemas/pagination.schema.d.ts +6 -6
- package/src/schemas/queries.schema.d.ts +6 -6
|
@@ -12,7 +12,13 @@ export declare const OrderStatusSchema: z.ZodEnum<{
|
|
|
12
12
|
export declare const OrderItemSchema: z.ZodObject<{
|
|
13
13
|
translations: z.ZodArray<z.ZodObject<{
|
|
14
14
|
locale: z.ZodEnum<{
|
|
15
|
+
hr: "hr";
|
|
16
|
+
th: "th";
|
|
17
|
+
tr: "tr";
|
|
15
18
|
id: "id";
|
|
19
|
+
is: "is";
|
|
20
|
+
mt: "mt";
|
|
21
|
+
ml: "ml";
|
|
16
22
|
af: "af";
|
|
17
23
|
sq: "sq";
|
|
18
24
|
ar_dz: "ar_dz";
|
|
@@ -39,7 +45,6 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
39
45
|
zh_cn: "zh_cn";
|
|
40
46
|
zh_sg: "zh_sg";
|
|
41
47
|
zh_tw: "zh_tw";
|
|
42
|
-
hr: "hr";
|
|
43
48
|
cs: "cs";
|
|
44
49
|
da: "da";
|
|
45
50
|
nl_be: "nl_be";
|
|
@@ -74,7 +79,6 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
74
79
|
he: "he";
|
|
75
80
|
hi: "hi";
|
|
76
81
|
hu: "hu";
|
|
77
|
-
is: "is";
|
|
78
82
|
ga: "ga";
|
|
79
83
|
it: "it";
|
|
80
84
|
it_ch: "it_ch";
|
|
@@ -84,9 +88,7 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
84
88
|
lv: "lv";
|
|
85
89
|
lt: "lt";
|
|
86
90
|
mk: "mk";
|
|
87
|
-
ml: "ml";
|
|
88
91
|
ms: "ms";
|
|
89
|
-
mt: "mt";
|
|
90
92
|
no: "no";
|
|
91
93
|
nb: "nb";
|
|
92
94
|
nn: "nn";
|
|
@@ -117,8 +119,6 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
117
119
|
es: "es";
|
|
118
120
|
sv: "sv";
|
|
119
121
|
sv_fi: "sv_fi";
|
|
120
|
-
th: "th";
|
|
121
|
-
tr: "tr";
|
|
122
122
|
uk: "uk";
|
|
123
123
|
ur: "ur";
|
|
124
124
|
vi: "vi";
|
|
@@ -175,7 +175,13 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
175
175
|
items: z.ZodArray<z.ZodObject<{
|
|
176
176
|
translations: z.ZodArray<z.ZodObject<{
|
|
177
177
|
locale: z.ZodEnum<{
|
|
178
|
+
hr: "hr";
|
|
179
|
+
th: "th";
|
|
180
|
+
tr: "tr";
|
|
178
181
|
id: "id";
|
|
182
|
+
is: "is";
|
|
183
|
+
mt: "mt";
|
|
184
|
+
ml: "ml";
|
|
179
185
|
af: "af";
|
|
180
186
|
sq: "sq";
|
|
181
187
|
ar_dz: "ar_dz";
|
|
@@ -202,7 +208,6 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
202
208
|
zh_cn: "zh_cn";
|
|
203
209
|
zh_sg: "zh_sg";
|
|
204
210
|
zh_tw: "zh_tw";
|
|
205
|
-
hr: "hr";
|
|
206
211
|
cs: "cs";
|
|
207
212
|
da: "da";
|
|
208
213
|
nl_be: "nl_be";
|
|
@@ -237,7 +242,6 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
237
242
|
he: "he";
|
|
238
243
|
hi: "hi";
|
|
239
244
|
hu: "hu";
|
|
240
|
-
is: "is";
|
|
241
245
|
ga: "ga";
|
|
242
246
|
it: "it";
|
|
243
247
|
it_ch: "it_ch";
|
|
@@ -247,9 +251,7 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
247
251
|
lv: "lv";
|
|
248
252
|
lt: "lt";
|
|
249
253
|
mk: "mk";
|
|
250
|
-
ml: "ml";
|
|
251
254
|
ms: "ms";
|
|
252
|
-
mt: "mt";
|
|
253
255
|
no: "no";
|
|
254
256
|
nb: "nb";
|
|
255
257
|
nn: "nn";
|
|
@@ -280,8 +282,6 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
280
282
|
es: "es";
|
|
281
283
|
sv: "sv";
|
|
282
284
|
sv_fi: "sv_fi";
|
|
283
|
-
th: "th";
|
|
284
|
-
tr: "tr";
|
|
285
285
|
uk: "uk";
|
|
286
286
|
ur: "ur";
|
|
287
287
|
vi: "vi";
|
|
@@ -482,7 +482,7 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
482
482
|
expiresAt: Date;
|
|
483
483
|
items: {
|
|
484
484
|
translations: {
|
|
485
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
485
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
486
486
|
title: string;
|
|
487
487
|
subtitle: string;
|
|
488
488
|
}[];
|
|
@@ -588,7 +588,7 @@ export declare const OrderSchema: z.ZodPipe<z.ZodObject<{
|
|
|
588
588
|
expiresAt: Date;
|
|
589
589
|
items: {
|
|
590
590
|
translations: {
|
|
591
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
591
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
592
592
|
title: string;
|
|
593
593
|
subtitle: string;
|
|
594
594
|
}[];
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
import { HttpException } from "../../core/exceptions/http-exception";
|
|
3
3
|
import { PrismaClientType } from "../../core/lib/prisma";
|
|
4
|
+
import { EmailService } from "../../core/notifications/email.service";
|
|
4
5
|
import { CreateOrderSchema, OrderStatus, User } from "../../schemas";
|
|
5
6
|
import { CartData } from "../cart/cart.schema";
|
|
6
7
|
import { CartService } from "../cart/cart.service";
|
|
@@ -17,7 +18,9 @@ declare class OrderService {
|
|
|
17
18
|
private readonly prisma;
|
|
18
19
|
private readonly paymentService;
|
|
19
20
|
private readonly cartService;
|
|
20
|
-
|
|
21
|
+
private readonly emailService;
|
|
22
|
+
constructor(prisma: PrismaClientType, paymentService: PaymentService, cartService: CartService, emailService: EmailService);
|
|
23
|
+
private safelySendEmail;
|
|
21
24
|
/**
|
|
22
25
|
* Create a draft order
|
|
23
26
|
*/
|
|
@@ -31,7 +34,7 @@ declare class OrderService {
|
|
|
31
34
|
expiresAt: Date;
|
|
32
35
|
items: {
|
|
33
36
|
translations: {
|
|
34
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
37
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
35
38
|
title: string;
|
|
36
39
|
subtitle: string;
|
|
37
40
|
}[];
|
|
@@ -133,6 +136,7 @@ declare class OrderService {
|
|
|
133
136
|
};
|
|
134
137
|
}>;
|
|
135
138
|
private hasCartConflict;
|
|
139
|
+
sendOrderNotifications(orderId: string, userId?: string | null): Promise<void>;
|
|
136
140
|
/**
|
|
137
141
|
* Get a specific order by ID
|
|
138
142
|
*/
|
|
@@ -144,7 +148,7 @@ declare class OrderService {
|
|
|
144
148
|
expiresAt: Date;
|
|
145
149
|
items: {
|
|
146
150
|
translations: {
|
|
147
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
151
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
148
152
|
title: string;
|
|
149
153
|
subtitle: string;
|
|
150
154
|
}[];
|
|
@@ -266,7 +270,7 @@ declare class OrderService {
|
|
|
266
270
|
expiresAt: Date;
|
|
267
271
|
items: {
|
|
268
272
|
translations: {
|
|
269
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
273
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
270
274
|
title: string;
|
|
271
275
|
subtitle: string;
|
|
272
276
|
}[];
|
|
@@ -391,7 +395,7 @@ declare class OrderService {
|
|
|
391
395
|
expiresAt: Date;
|
|
392
396
|
items: {
|
|
393
397
|
translations: {
|
|
394
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
398
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
395
399
|
title: string;
|
|
396
400
|
subtitle: string;
|
|
397
401
|
}[];
|
|
@@ -507,7 +511,7 @@ declare class OrderService {
|
|
|
507
511
|
expiresAt: Date;
|
|
508
512
|
items: {
|
|
509
513
|
translations: {
|
|
510
|
-
locale: "id" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "
|
|
514
|
+
locale: "hr" | "th" | "tr" | "id" | "is" | "mt" | "ml" | "af" | "sq" | "ar_dz" | "ar_bh" | "ar_eg" | "ar_iq" | "ar_jo" | "ar_kw" | "ar_lb" | "ar_ly" | "ar_ma" | "ar_om" | "ar_qa" | "ar_sa" | "ar_sy" | "ar_tn" | "ar_ae" | "ar_ye" | "eu" | "be" | "bg" | "ca" | "zh_hk" | "zh_cn" | "zh_sg" | "zh_tw" | "cs" | "da" | "nl_be" | "nl" | "en" | "en_au" | "en_bz" | "en_ca" | "en_ie" | "en_jm" | "en_nz" | "en_za" | "en_tt" | "en_gb" | "en_us" | "et" | "fo" | "fa" | "fi" | "fr_be" | "fr_ca" | "fr_lu" | "fr" | "fr_ch" | "gd" | "de_at" | "de_li" | "de_lu" | "de" | "de_ch" | "el" | "he" | "hi" | "hu" | "ga" | "it" | "it_ch" | "ja" | "ko" | "ku" | "lv" | "lt" | "mk" | "ms" | "no" | "nb" | "nn" | "pl" | "pt_br" | "pt" | "pa" | "rm" | "ro" | "ro_md" | "ru" | "ru_md" | "sr" | "sk" | "sl" | "sb" | "es_ar" | "es_bo" | "es_cl" | "es_co" | "es_cr" | "es_do" | "es_ec" | "es_sv" | "es_gt" | "es_hn" | "es_mx" | "es" | "sv" | "sv_fi" | "uk" | "ur" | "vi" | "cy" | "ji" | "zu";
|
|
511
515
|
title: string;
|
|
512
516
|
subtitle: string;
|
|
513
517
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as o}from"tslib";import{z as y}from"@hono/zod-openapi";import{customAlphabet as b}from"nanoid";import{HttpException as p}from"../../core/exceptions/http-exception";import{logger as Z}from"../../core/logging/pino";import{OrderSchema as l,OrganizationSchema as k,PaginationMetaSchema as w,UserSchema as O}from"../../schemas";import{transformCartItemToOrderItem as E}from"../cart/cart.util";const A=b("1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ",6);class I extends p{constructor(i){super(409,i.message),this.payload=i}}class j{constructor(i,t,e,n){this.prisma=i,this.paymentService=t,this.cartService=e,this.emailService=n}safelySendEmail(i,t){return o(this,void 0,void 0,function*(){try{yield t()}catch(e){Z.error(Object.assign({err:e},i),"Email delivery failed")}})}createOrder(i,t,e){return o(this,void 0,void 0,function*(){var n,r,s,d,a;const c=yield this.prisma.organization.findFirst({where:{id:i},include:{configuration:!0}});if(!c)throw new p(404,"Organization not found");const h=yield this.cartService.getCartData(i,e,{locale:c.configuration.defaultLocale});if(h.invalidProductIds.length>0||this.hasCartConflict(e.items,h.normalizedItems))throw new I(Object.assign(Object.assign({},h),{message:"Some items in your cart are no longer available in the requested quantity."}));const m=yield this.prisma.address.findFirst({where:{users:{some:{id:t.id}},isDefault:!0}});if(e.fulfilmentMethod==="delivery"&&!m)throw new p(400,"This user does not have a default shipping address");const f=yield Promise.all(h.normalizedItems.map(E(this.prisma))),u=yield this.prisma.shippingMethod.findFirst({where:{id:e.shippingMethodId},include:{shippingZones:!0}}),z=(r=(n=u?.shippingZones[0])===null||n===void 0?void 0:n.price)!==null&&r!==void 0?r:0,v=f.reduce((U,D)=>U+D.totalPrice,0),M=v+z,g=yield this.prisma.order.create({data:Object.assign(Object.assign({token:A(),referenceId:A(),organization:{connect:{id:i}},fulfilmentMethod:e.fulfilmentMethod,shippingMethod:e.shippingMethodId?{connect:{id:e.shippingMethodId}}:void 0,currency:c.configuration.defaultCurrency,sourceIp:"127.0.0.1",items:{create:f}},m?{shippingAddress:{create:Object.assign(Object.assign({},m),{id:void 0})}}:{}),{user:{connect:{id:t.id}},payment:{create:{method:e.payment.method,provider:e.payment.provider,shipping:(d=(s=u?.shippingZones[0])===null||s===void 0?void 0:s.price)!==null&&d!==void 0?d:0,subtotal:v,total:M,discount:0,currency:c.configuration.defaultCurrency}}}),include:{items:{include:{translations:!0,image:!0}},payment:!0,shippingMethod:{include:{shippingZones:!0}}}}),C=l.parse(g);return{redirectUrl:(a=(yield this.paymentService.createCheckoutSession(i,t,C,{locale:"en",successUrl:`${e.checkoutBaseUrl}/account/orders/${g.id}?clearCart=true`,cancelUrl:`${e.checkoutBaseUrl}/checkout/shipping-and-payment`})).redirectUrl)!==null&&a!==void 0?a:void 0,order:l.parse(g)}})}hasCartConflict(i,t){return JSON.stringify(i)!==JSON.stringify(t)}sendOrderNotifications(i,t){return o(this,void 0,void 0,function*(){const e=yield this.prisma.order.findFirst({where:{id:i},include:{items:{include:{translations:!0,image:!0}},payment:!0,organization:{include:{address:!0,configuration:!0,logoFile:!0,members:{include:{user:!0}}}},shippingAddress:!0,shippingMethod:{include:{shippingZones:!0}}}}),n=t??e?.userId,r=n?yield this.prisma.user.findFirst({where:{id:n}}):null;if(!e||!r)return;const s=O.parse(r),d=k.parse(e.organization),a=l.parse(e);yield this.safelySendEmail({emailType:"order-confirmation",orderId:e.id,organizationId:e.organizationId,userId:r.id},()=>this.emailService.sendOrderConfirmationEmail(e.organizationId,s,d,a));for(const c of e.organization.members)yield this.safelySendEmail({emailType:"order-notification",memberId:c.user.id,orderId:e.id,organizationId:e.organizationId,userId:r.id},()=>this.emailService.sendOrderNotificationEmail(e.organizationId,s,O.parse(c.user),d,a))})}getOrder(i,t,e){return o(this,void 0,void 0,function*(){const n=yield this.prisma.order.findUnique({where:{id:e,organizationId:t,deletedAt:null,user:{id:i.id}},include:{items:{include:{translations:!0,image:!0}},shippingAddress:!0,shippingMethod:{include:{shippingZones:!0}},payment:!0}});if(!n)throw new p(404,"Order not found");return l.parse(n)})}getMyOrders(i,t,e){return o(this,void 0,void 0,function*(){const{page:n=1,limit:r=10,search:s}=e,[d,a]=yield this.prisma.order.paginate({where:Object.assign({organizationId:t,userId:i,deletedAt:null},s?{referenceId:{contains:s,mode:"insensitive"}}:{}),include:{items:{include:{translations:!0,image:!0}},shippingAddress:!0,shippingMethod:{include:{shippingZones:!0}},payment:!0},orderBy:{createdAt:"desc"}}).withPages({page:n,limit:r});return{meta:w.parse(a),list:y.array(l).parse(d)}})}getOrders(i,t){return o(this,void 0,void 0,function*(){const{page:e=1,limit:n=10}=t,[r,s]=yield this.prisma.order.paginate({where:{organizationId:i,deletedAt:null},include:{items:{include:{translations:!0,image:!0}},shippingAddress:!0,shippingMethod:{include:{shippingZones:!0}},payment:!0},orderBy:{createdAt:"desc"}}).withPages({page:e,limit:n});return{meta:w.parse(s),list:y.array(l).parse(r)}})}deleteOrder(i,t,e){return o(this,void 0,void 0,function*(){if(!(yield this.prisma.order.findUnique({where:{id:t,organizationId:i,deletedAt:null}})))throw new p(404,"Order not found");yield this.prisma.order.update({where:{id:t,organizationId:i,deletedAt:null},data:{deletedAt:new Date,deletedBy:e}})})}updateStatus(i,t,e){return o(this,void 0,void 0,function*(){if(!(yield this.prisma.order.findUnique({where:{id:t,organizationId:i,deletedAt:null},include:{items:!0,shippingMethod:{include:{shippingZones:!0}}}})))throw new p(404,"Order not found");let r={};switch(e){case"accepted":r={acceptedAt:new Date};break;case"ready-for-dispatch":r={readyForDispatchAt:new Date};break;case"dispatched":r={dispatchedAt:new Date};break;case"completed":r={completedAt:new Date};break;case"cancelled":r={cancelledAt:new Date};break}const s=yield this.prisma.order.update({where:{id:t},data:r,include:{items:{include:{translations:!0,image:!0}},shippingAddress:!0,shippingMethod:{include:{shippingZones:!0}},payment:!0}});return l.parse(s)})}}export{j as OrderService};export{I as OrderInventoryConflictError};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/order/order.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAEL,WAAW,EAEX,oBAAoB,GAErB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAKjE,MAAM,MAAM,GAAG,cAAc,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;AAEzE,MAAM,2BAA4B,SAAQ,aAAa;IACrD,YAA4B,OAAuC;QACjE,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QADF,YAAO,GAAP,OAAO,CAAgC;IAEnE,CAAC;CACF;AAED,MAAM,YAAY;IAChB,YACmB,MAAwB,EACxB,cAA8B,EAC9B,WAAwB;QAFx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,EAAE,IAAI;yBACZ;qBACF;oBACD,eAAe,EAAE,IAAI;oBACrB,cAAc,EAAE;wBACd,OAAO,EAAE;4BACP,aAAa,EAAE,IAAI;yBACpB;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd;aACF,CAAC,CAAC;YAEH,OAAO,WAAW,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACzC,CAAC;KAAA;CACF;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"order.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/order/order.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,OAAO,EAEL,WAAW,EACX,kBAAkB,EAElB,oBAAoB,EAEpB,UAAU,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAKjE,MAAM,MAAM,GAAG,cAAc,CAAC,sCAAsC,EAAE,CAAC,CAAC,CAAC;AAEzE,MAAM,2BAA4B,SAAQ,aAAa;IACrD,YAA4B,OAAuC;QACjE,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QADF,YAAO,GAAP,OAAO,CAAgC;IAEnE,CAAC;CACF;AAED,MAAM,YAAY;IAChB,YACmB,MAAwB,EACxB,cAA8B,EAC9B,WAAwB,EACxB,YAA0B;QAH1B,WAAM,GAAN,MAAM,CAAkB;QACxB,mBAAc,GAAd,cAAc,CAAgB;QAC9B,gBAAW,GAAX,WAAW,CAAa;QACxB,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAEU,eAAe,CAC3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AAY,EAAE,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -22,8 +22,8 @@ export declare const RecipientSchema: z.ZodObject<{
|
|
|
22
22
|
updatedAt: z.ZodDate;
|
|
23
23
|
}, z.core.$strip>;
|
|
24
24
|
export declare const CreateRecipientSchema: z.ZodObject<{
|
|
25
|
-
firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
25
|
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
26
|
+
firstname: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
27
|
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
28
|
address: z.ZodObject<{
|
|
29
29
|
addressLineOne: z.ZodString;
|
|
@@ -36,8 +36,8 @@ export declare const CreateRecipientSchema: z.ZodObject<{
|
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
}, z.core.$strip>;
|
|
38
38
|
export declare const UpdateCustomerSchema: z.ZodObject<{
|
|
39
|
-
firstname: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
40
39
|
email: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
40
|
+
firstname: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
41
41
|
phone: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
42
42
|
address: z.ZodOptional<z.ZodObject<{
|
|
43
43
|
addressLineOne: z.ZodString;
|
|
@@ -19,7 +19,13 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
19
19
|
isAcceptingReservations: z.ZodBoolean;
|
|
20
20
|
isOpen: z.ZodDefault<z.ZodBoolean>;
|
|
21
21
|
defaultLocale: z.ZodEnum<{
|
|
22
|
+
hr: "hr";
|
|
23
|
+
th: "th";
|
|
24
|
+
tr: "tr";
|
|
22
25
|
id: "id";
|
|
26
|
+
is: "is";
|
|
27
|
+
mt: "mt";
|
|
28
|
+
ml: "ml";
|
|
23
29
|
af: "af";
|
|
24
30
|
sq: "sq";
|
|
25
31
|
ar_dz: "ar_dz";
|
|
@@ -46,7 +52,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
46
52
|
zh_cn: "zh_cn";
|
|
47
53
|
zh_sg: "zh_sg";
|
|
48
54
|
zh_tw: "zh_tw";
|
|
49
|
-
hr: "hr";
|
|
50
55
|
cs: "cs";
|
|
51
56
|
da: "da";
|
|
52
57
|
nl_be: "nl_be";
|
|
@@ -81,7 +86,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
81
86
|
he: "he";
|
|
82
87
|
hi: "hi";
|
|
83
88
|
hu: "hu";
|
|
84
|
-
is: "is";
|
|
85
89
|
ga: "ga";
|
|
86
90
|
it: "it";
|
|
87
91
|
it_ch: "it_ch";
|
|
@@ -91,9 +95,7 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
91
95
|
lv: "lv";
|
|
92
96
|
lt: "lt";
|
|
93
97
|
mk: "mk";
|
|
94
|
-
ml: "ml";
|
|
95
98
|
ms: "ms";
|
|
96
|
-
mt: "mt";
|
|
97
99
|
no: "no";
|
|
98
100
|
nb: "nb";
|
|
99
101
|
nn: "nn";
|
|
@@ -124,8 +126,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
124
126
|
es: "es";
|
|
125
127
|
sv: "sv";
|
|
126
128
|
sv_fi: "sv_fi";
|
|
127
|
-
th: "th";
|
|
128
|
-
tr: "tr";
|
|
129
129
|
uk: "uk";
|
|
130
130
|
ur: "ur";
|
|
131
131
|
vi: "vi";
|
|
@@ -134,7 +134,13 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
134
134
|
zu: "zu";
|
|
135
135
|
}>;
|
|
136
136
|
supportedLocales: z.ZodArray<z.ZodEnum<{
|
|
137
|
+
hr: "hr";
|
|
138
|
+
th: "th";
|
|
139
|
+
tr: "tr";
|
|
137
140
|
id: "id";
|
|
141
|
+
is: "is";
|
|
142
|
+
mt: "mt";
|
|
143
|
+
ml: "ml";
|
|
138
144
|
af: "af";
|
|
139
145
|
sq: "sq";
|
|
140
146
|
ar_dz: "ar_dz";
|
|
@@ -161,7 +167,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
161
167
|
zh_cn: "zh_cn";
|
|
162
168
|
zh_sg: "zh_sg";
|
|
163
169
|
zh_tw: "zh_tw";
|
|
164
|
-
hr: "hr";
|
|
165
170
|
cs: "cs";
|
|
166
171
|
da: "da";
|
|
167
172
|
nl_be: "nl_be";
|
|
@@ -196,7 +201,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
196
201
|
he: "he";
|
|
197
202
|
hi: "hi";
|
|
198
203
|
hu: "hu";
|
|
199
|
-
is: "is";
|
|
200
204
|
ga: "ga";
|
|
201
205
|
it: "it";
|
|
202
206
|
it_ch: "it_ch";
|
|
@@ -206,9 +210,7 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
206
210
|
lv: "lv";
|
|
207
211
|
lt: "lt";
|
|
208
212
|
mk: "mk";
|
|
209
|
-
ml: "ml";
|
|
210
213
|
ms: "ms";
|
|
211
|
-
mt: "mt";
|
|
212
214
|
no: "no";
|
|
213
215
|
nb: "nb";
|
|
214
216
|
nn: "nn";
|
|
@@ -239,8 +241,6 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
239
241
|
es: "es";
|
|
240
242
|
sv: "sv";
|
|
241
243
|
sv_fi: "sv_fi";
|
|
242
|
-
th: "th";
|
|
243
|
-
tr: "tr";
|
|
244
244
|
uk: "uk";
|
|
245
245
|
ur: "ur";
|
|
246
246
|
vi: "vi";
|
|
@@ -307,6 +307,7 @@ export declare const OrganizationConfigurationSchema: z.ZodObject<{
|
|
|
307
307
|
createdAt: z.ZodDate;
|
|
308
308
|
}, z.core.$strip>;
|
|
309
309
|
export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
310
|
+
hostname: z.ZodOptional<z.ZodOptional<z.ZodCoercedString<unknown>>>;
|
|
310
311
|
openingTimes: z.ZodOptional<z.ZodOptional<z.ZodObject<{
|
|
311
312
|
monday: z.ZodNullable<z.ZodString>;
|
|
312
313
|
tuesday: z.ZodNullable<z.ZodString>;
|
|
@@ -326,7 +327,13 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
326
327
|
sunday: z.ZodNullable<z.ZodString>;
|
|
327
328
|
}, z.core.$strip>>>;
|
|
328
329
|
defaultLocale: z.ZodOptional<z.ZodEnum<{
|
|
330
|
+
hr: "hr";
|
|
331
|
+
th: "th";
|
|
332
|
+
tr: "tr";
|
|
329
333
|
id: "id";
|
|
334
|
+
is: "is";
|
|
335
|
+
mt: "mt";
|
|
336
|
+
ml: "ml";
|
|
330
337
|
af: "af";
|
|
331
338
|
sq: "sq";
|
|
332
339
|
ar_dz: "ar_dz";
|
|
@@ -353,7 +360,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
353
360
|
zh_cn: "zh_cn";
|
|
354
361
|
zh_sg: "zh_sg";
|
|
355
362
|
zh_tw: "zh_tw";
|
|
356
|
-
hr: "hr";
|
|
357
363
|
cs: "cs";
|
|
358
364
|
da: "da";
|
|
359
365
|
nl_be: "nl_be";
|
|
@@ -388,7 +394,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
388
394
|
he: "he";
|
|
389
395
|
hi: "hi";
|
|
390
396
|
hu: "hu";
|
|
391
|
-
is: "is";
|
|
392
397
|
ga: "ga";
|
|
393
398
|
it: "it";
|
|
394
399
|
it_ch: "it_ch";
|
|
@@ -398,9 +403,7 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
398
403
|
lv: "lv";
|
|
399
404
|
lt: "lt";
|
|
400
405
|
mk: "mk";
|
|
401
|
-
ml: "ml";
|
|
402
406
|
ms: "ms";
|
|
403
|
-
mt: "mt";
|
|
404
407
|
no: "no";
|
|
405
408
|
nb: "nb";
|
|
406
409
|
nn: "nn";
|
|
@@ -431,8 +434,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
431
434
|
es: "es";
|
|
432
435
|
sv: "sv";
|
|
433
436
|
sv_fi: "sv_fi";
|
|
434
|
-
th: "th";
|
|
435
|
-
tr: "tr";
|
|
436
437
|
uk: "uk";
|
|
437
438
|
ur: "ur";
|
|
438
439
|
vi: "vi";
|
|
@@ -440,7 +441,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
440
441
|
ji: "ji";
|
|
441
442
|
zu: "zu";
|
|
442
443
|
}>>;
|
|
443
|
-
hostname: z.ZodOptional<z.ZodOptional<z.ZodCoercedString<unknown>>>;
|
|
444
444
|
countriesShipping: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
445
445
|
stripeAccountId: z.ZodOptional<z.ZodOptional<z.ZodCoercedString<unknown>>>;
|
|
446
446
|
enableHostCheckout: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -448,7 +448,13 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
448
448
|
isAcceptingOrders: z.ZodOptional<z.ZodBoolean>;
|
|
449
449
|
isAcceptingReservations: z.ZodOptional<z.ZodBoolean>;
|
|
450
450
|
supportedLocales: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
451
|
+
hr: "hr";
|
|
452
|
+
th: "th";
|
|
453
|
+
tr: "tr";
|
|
451
454
|
id: "id";
|
|
455
|
+
is: "is";
|
|
456
|
+
mt: "mt";
|
|
457
|
+
ml: "ml";
|
|
452
458
|
af: "af";
|
|
453
459
|
sq: "sq";
|
|
454
460
|
ar_dz: "ar_dz";
|
|
@@ -475,7 +481,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
475
481
|
zh_cn: "zh_cn";
|
|
476
482
|
zh_sg: "zh_sg";
|
|
477
483
|
zh_tw: "zh_tw";
|
|
478
|
-
hr: "hr";
|
|
479
484
|
cs: "cs";
|
|
480
485
|
da: "da";
|
|
481
486
|
nl_be: "nl_be";
|
|
@@ -510,7 +515,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
510
515
|
he: "he";
|
|
511
516
|
hi: "hi";
|
|
512
517
|
hu: "hu";
|
|
513
|
-
is: "is";
|
|
514
518
|
ga: "ga";
|
|
515
519
|
it: "it";
|
|
516
520
|
it_ch: "it_ch";
|
|
@@ -520,9 +524,7 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
520
524
|
lv: "lv";
|
|
521
525
|
lt: "lt";
|
|
522
526
|
mk: "mk";
|
|
523
|
-
ml: "ml";
|
|
524
527
|
ms: "ms";
|
|
525
|
-
mt: "mt";
|
|
526
528
|
no: "no";
|
|
527
529
|
nb: "nb";
|
|
528
530
|
nn: "nn";
|
|
@@ -553,8 +555,6 @@ export declare const UpdateOrganizationConfigurationSchema: z.ZodObject<{
|
|
|
553
555
|
es: "es";
|
|
554
556
|
sv: "sv";
|
|
555
557
|
sv_fi: "sv_fi";
|
|
556
|
-
th: "th";
|
|
557
|
-
tr: "tr";
|
|
558
558
|
uk: "uk";
|
|
559
559
|
ur: "ur";
|
|
560
560
|
vi: "vi";
|