@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
|
@@ -2,9 +2,10 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
3
3
|
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
4
4
|
title: z.ZodDefault<z.ZodString>;
|
|
5
|
-
currency: z.ZodString;
|
|
6
|
-
id: z.ZodString;
|
|
7
5
|
createdAt: z.ZodDate;
|
|
6
|
+
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
currency: z.ZodString;
|
|
8
9
|
slug: z.ZodOptional<z.ZodString>;
|
|
9
10
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
10
11
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -22,7 +23,13 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
22
23
|
title: z.ZodNullable<z.ZodDefault<z.ZodString>>;
|
|
23
24
|
id: z.ZodString;
|
|
24
25
|
defaultLocale: z.ZodOptional<z.ZodEnum<{
|
|
26
|
+
hr: "hr";
|
|
27
|
+
th: "th";
|
|
28
|
+
tr: "tr";
|
|
25
29
|
id: "id";
|
|
30
|
+
is: "is";
|
|
31
|
+
mt: "mt";
|
|
32
|
+
ml: "ml";
|
|
26
33
|
af: "af";
|
|
27
34
|
sq: "sq";
|
|
28
35
|
ar_dz: "ar_dz";
|
|
@@ -49,7 +56,6 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
49
56
|
zh_cn: "zh_cn";
|
|
50
57
|
zh_sg: "zh_sg";
|
|
51
58
|
zh_tw: "zh_tw";
|
|
52
|
-
hr: "hr";
|
|
53
59
|
cs: "cs";
|
|
54
60
|
da: "da";
|
|
55
61
|
nl_be: "nl_be";
|
|
@@ -84,7 +90,6 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
84
90
|
he: "he";
|
|
85
91
|
hi: "hi";
|
|
86
92
|
hu: "hu";
|
|
87
|
-
is: "is";
|
|
88
93
|
ga: "ga";
|
|
89
94
|
it: "it";
|
|
90
95
|
it_ch: "it_ch";
|
|
@@ -94,9 +99,7 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
94
99
|
lv: "lv";
|
|
95
100
|
lt: "lt";
|
|
96
101
|
mk: "mk";
|
|
97
|
-
ml: "ml";
|
|
98
102
|
ms: "ms";
|
|
99
|
-
mt: "mt";
|
|
100
103
|
no: "no";
|
|
101
104
|
nb: "nb";
|
|
102
105
|
nn: "nn";
|
|
@@ -127,8 +130,6 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
127
130
|
es: "es";
|
|
128
131
|
sv: "sv";
|
|
129
132
|
sv_fi: "sv_fi";
|
|
130
|
-
th: "th";
|
|
131
|
-
tr: "tr";
|
|
132
133
|
uk: "uk";
|
|
133
134
|
ur: "ur";
|
|
134
135
|
vi: "vi";
|
|
@@ -149,7 +150,6 @@ export declare const CartProductsMappingSchema: z.ZodRecord<z.ZodString, z.ZodOb
|
|
|
149
150
|
id: z.ZodString;
|
|
150
151
|
}, z.core.$strip>>>;
|
|
151
152
|
manufacturerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
152
|
-
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
153
153
|
}, z.core.$strip>>;
|
|
154
154
|
export declare const CartItemSchema: z.ZodObject<{
|
|
155
155
|
productId: z.ZodString;
|
|
@@ -231,9 +231,10 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
231
231
|
products: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
232
232
|
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
233
233
|
title: z.ZodDefault<z.ZodString>;
|
|
234
|
-
currency: z.ZodString;
|
|
235
|
-
id: z.ZodString;
|
|
236
234
|
createdAt: z.ZodDate;
|
|
235
|
+
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
236
|
+
id: z.ZodString;
|
|
237
|
+
currency: z.ZodString;
|
|
237
238
|
slug: z.ZodOptional<z.ZodString>;
|
|
238
239
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
239
240
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -251,7 +252,13 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
251
252
|
title: z.ZodNullable<z.ZodDefault<z.ZodString>>;
|
|
252
253
|
id: z.ZodString;
|
|
253
254
|
defaultLocale: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
hr: "hr";
|
|
256
|
+
th: "th";
|
|
257
|
+
tr: "tr";
|
|
254
258
|
id: "id";
|
|
259
|
+
is: "is";
|
|
260
|
+
mt: "mt";
|
|
261
|
+
ml: "ml";
|
|
255
262
|
af: "af";
|
|
256
263
|
sq: "sq";
|
|
257
264
|
ar_dz: "ar_dz";
|
|
@@ -278,7 +285,6 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
278
285
|
zh_cn: "zh_cn";
|
|
279
286
|
zh_sg: "zh_sg";
|
|
280
287
|
zh_tw: "zh_tw";
|
|
281
|
-
hr: "hr";
|
|
282
288
|
cs: "cs";
|
|
283
289
|
da: "da";
|
|
284
290
|
nl_be: "nl_be";
|
|
@@ -313,7 +319,6 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
313
319
|
he: "he";
|
|
314
320
|
hi: "hi";
|
|
315
321
|
hu: "hu";
|
|
316
|
-
is: "is";
|
|
317
322
|
ga: "ga";
|
|
318
323
|
it: "it";
|
|
319
324
|
it_ch: "it_ch";
|
|
@@ -323,9 +328,7 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
323
328
|
lv: "lv";
|
|
324
329
|
lt: "lt";
|
|
325
330
|
mk: "mk";
|
|
326
|
-
ml: "ml";
|
|
327
331
|
ms: "ms";
|
|
328
|
-
mt: "mt";
|
|
329
332
|
no: "no";
|
|
330
333
|
nb: "nb";
|
|
331
334
|
nn: "nn";
|
|
@@ -356,8 +359,6 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
356
359
|
es: "es";
|
|
357
360
|
sv: "sv";
|
|
358
361
|
sv_fi: "sv_fi";
|
|
359
|
-
th: "th";
|
|
360
|
-
tr: "tr";
|
|
361
362
|
uk: "uk";
|
|
362
363
|
ur: "ur";
|
|
363
364
|
vi: "vi";
|
|
@@ -378,7 +379,6 @@ export declare const CartDataSchema: z.ZodObject<{
|
|
|
378
379
|
id: z.ZodString;
|
|
379
380
|
}, z.core.$strip>>>;
|
|
380
381
|
manufacturerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
381
|
-
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
382
382
|
}, z.core.$strip>>;
|
|
383
383
|
shipping: z.ZodOptional<z.ZodNumber>;
|
|
384
384
|
subtotal: z.ZodNumber;
|
|
@@ -417,9 +417,10 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
417
417
|
products: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
418
418
|
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
419
419
|
title: z.ZodDefault<z.ZodString>;
|
|
420
|
-
currency: z.ZodString;
|
|
421
|
-
id: z.ZodString;
|
|
422
420
|
createdAt: z.ZodDate;
|
|
421
|
+
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
422
|
+
id: z.ZodString;
|
|
423
|
+
currency: z.ZodString;
|
|
423
424
|
slug: z.ZodOptional<z.ZodString>;
|
|
424
425
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
425
426
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -437,7 +438,13 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
437
438
|
title: z.ZodNullable<z.ZodDefault<z.ZodString>>;
|
|
438
439
|
id: z.ZodString;
|
|
439
440
|
defaultLocale: z.ZodOptional<z.ZodEnum<{
|
|
441
|
+
hr: "hr";
|
|
442
|
+
th: "th";
|
|
443
|
+
tr: "tr";
|
|
440
444
|
id: "id";
|
|
445
|
+
is: "is";
|
|
446
|
+
mt: "mt";
|
|
447
|
+
ml: "ml";
|
|
441
448
|
af: "af";
|
|
442
449
|
sq: "sq";
|
|
443
450
|
ar_dz: "ar_dz";
|
|
@@ -464,7 +471,6 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
464
471
|
zh_cn: "zh_cn";
|
|
465
472
|
zh_sg: "zh_sg";
|
|
466
473
|
zh_tw: "zh_tw";
|
|
467
|
-
hr: "hr";
|
|
468
474
|
cs: "cs";
|
|
469
475
|
da: "da";
|
|
470
476
|
nl_be: "nl_be";
|
|
@@ -499,7 +505,6 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
499
505
|
he: "he";
|
|
500
506
|
hi: "hi";
|
|
501
507
|
hu: "hu";
|
|
502
|
-
is: "is";
|
|
503
508
|
ga: "ga";
|
|
504
509
|
it: "it";
|
|
505
510
|
it_ch: "it_ch";
|
|
@@ -509,9 +514,7 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
509
514
|
lv: "lv";
|
|
510
515
|
lt: "lt";
|
|
511
516
|
mk: "mk";
|
|
512
|
-
ml: "ml";
|
|
513
517
|
ms: "ms";
|
|
514
|
-
mt: "mt";
|
|
515
518
|
no: "no";
|
|
516
519
|
nb: "nb";
|
|
517
520
|
nn: "nn";
|
|
@@ -542,8 +545,6 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
542
545
|
es: "es";
|
|
543
546
|
sv: "sv";
|
|
544
547
|
sv_fi: "sv_fi";
|
|
545
|
-
th: "th";
|
|
546
|
-
tr: "tr";
|
|
547
548
|
uk: "uk";
|
|
548
549
|
ur: "ur";
|
|
549
550
|
vi: "vi";
|
|
@@ -564,7 +565,6 @@ export declare const CartConflictSchema: z.ZodObject<{
|
|
|
564
565
|
id: z.ZodString;
|
|
565
566
|
}, z.core.$strip>>>;
|
|
566
567
|
manufacturerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
567
|
-
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
568
568
|
}, z.core.$strip>>;
|
|
569
569
|
shipping: z.ZodOptional<z.ZodNumber>;
|
|
570
570
|
subtotal: z.ZodNumber;
|
|
@@ -45,9 +45,9 @@ declare class CartService {
|
|
|
45
45
|
products: Record<string, {
|
|
46
46
|
description: string | null;
|
|
47
47
|
title: string;
|
|
48
|
-
currency: string;
|
|
49
|
-
id: string;
|
|
50
48
|
createdAt: Date;
|
|
49
|
+
id: string;
|
|
50
|
+
currency: string;
|
|
51
51
|
basePrice: number;
|
|
52
52
|
discountedBasePrice: number | null;
|
|
53
53
|
availableQuantity: number | null;
|
|
@@ -56,7 +56,7 @@ declare class CartService {
|
|
|
56
56
|
id: string;
|
|
57
57
|
selectMin: number;
|
|
58
58
|
selectMax: number;
|
|
59
|
-
defaultLocale?: "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" | "
|
|
59
|
+
defaultLocale?: "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" | undefined;
|
|
60
60
|
modifiers?: {
|
|
61
61
|
title: string;
|
|
62
62
|
price: number;
|
|
@@ -67,6 +67,7 @@ declare class CartService {
|
|
|
67
67
|
categories: {
|
|
68
68
|
id: string;
|
|
69
69
|
}[];
|
|
70
|
+
metadata?: Record<string, string> | null | undefined;
|
|
70
71
|
slug?: string | undefined;
|
|
71
72
|
publishedAt?: Date | null | undefined;
|
|
72
73
|
sku?: string | undefined;
|
|
@@ -78,7 +79,6 @@ declare class CartService {
|
|
|
78
79
|
filename: string;
|
|
79
80
|
}[] | undefined;
|
|
80
81
|
manufacturerId?: string | null | undefined;
|
|
81
|
-
metadata?: Record<string, string> | null | undefined;
|
|
82
82
|
}>;
|
|
83
83
|
subtotal: number;
|
|
84
84
|
total: number;
|
|
@@ -49,7 +49,13 @@ export declare const customerRoute: {
|
|
|
49
49
|
items: z.ZodArray<z.ZodObject<{
|
|
50
50
|
translations: z.ZodArray<z.ZodObject<{
|
|
51
51
|
locale: z.ZodEnum<{
|
|
52
|
+
hr: "hr";
|
|
53
|
+
th: "th";
|
|
54
|
+
tr: "tr";
|
|
52
55
|
id: "id";
|
|
56
|
+
is: "is";
|
|
57
|
+
mt: "mt";
|
|
58
|
+
ml: "ml";
|
|
53
59
|
af: "af";
|
|
54
60
|
sq: "sq";
|
|
55
61
|
ar_dz: "ar_dz";
|
|
@@ -76,7 +82,6 @@ export declare const customerRoute: {
|
|
|
76
82
|
zh_cn: "zh_cn";
|
|
77
83
|
zh_sg: "zh_sg";
|
|
78
84
|
zh_tw: "zh_tw";
|
|
79
|
-
hr: "hr";
|
|
80
85
|
cs: "cs";
|
|
81
86
|
da: "da";
|
|
82
87
|
nl_be: "nl_be";
|
|
@@ -111,7 +116,6 @@ export declare const customerRoute: {
|
|
|
111
116
|
he: "he";
|
|
112
117
|
hi: "hi";
|
|
113
118
|
hu: "hu";
|
|
114
|
-
is: "is";
|
|
115
119
|
ga: "ga";
|
|
116
120
|
it: "it";
|
|
117
121
|
it_ch: "it_ch";
|
|
@@ -121,9 +125,7 @@ export declare const customerRoute: {
|
|
|
121
125
|
lv: "lv";
|
|
122
126
|
lt: "lt";
|
|
123
127
|
mk: "mk";
|
|
124
|
-
ml: "ml";
|
|
125
128
|
ms: "ms";
|
|
126
|
-
mt: "mt";
|
|
127
129
|
no: "no";
|
|
128
130
|
nb: "nb";
|
|
129
131
|
nn: "nn";
|
|
@@ -154,8 +156,6 @@ export declare const customerRoute: {
|
|
|
154
156
|
es: "es";
|
|
155
157
|
sv: "sv";
|
|
156
158
|
sv_fi: "sv_fi";
|
|
157
|
-
th: "th";
|
|
158
|
-
tr: "tr";
|
|
159
159
|
uk: "uk";
|
|
160
160
|
ur: "ur";
|
|
161
161
|
vi: "vi";
|
|
@@ -356,7 +356,7 @@ export declare const customerRoute: {
|
|
|
356
356
|
expiresAt: Date;
|
|
357
357
|
items: {
|
|
358
358
|
translations: {
|
|
359
|
-
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" | "
|
|
359
|
+
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";
|
|
360
360
|
title: string;
|
|
361
361
|
subtitle: string;
|
|
362
362
|
}[];
|
|
@@ -462,7 +462,7 @@ export declare const customerRoute: {
|
|
|
462
462
|
expiresAt: Date;
|
|
463
463
|
items: {
|
|
464
464
|
translations: {
|
|
465
|
-
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" | "
|
|
465
|
+
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";
|
|
466
466
|
title: string;
|
|
467
467
|
subtitle: string;
|
|
468
468
|
}[];
|
|
@@ -636,8 +636,8 @@ export declare const customerRoute: {
|
|
|
636
636
|
} & {
|
|
637
637
|
query: z.ZodObject<{
|
|
638
638
|
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
639
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
640
639
|
search: z.ZodOptional<z.ZodString>;
|
|
640
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
641
641
|
}, z.core.$strip>;
|
|
642
642
|
};
|
|
643
643
|
responses: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
export declare const CustomerListQuerySchema: z.ZodObject<{
|
|
3
3
|
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
4
|
-
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
5
4
|
search: z.ZodOptional<z.ZodString>;
|
|
5
|
+
page: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
7
|
export declare const AdminCustomerSchema: z.ZodObject<{
|
|
8
8
|
id: z.ZodString;
|
|
@@ -44,7 +44,13 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
44
44
|
items: z.ZodArray<z.ZodObject<{
|
|
45
45
|
translations: z.ZodArray<z.ZodObject<{
|
|
46
46
|
locale: z.ZodEnum<{
|
|
47
|
+
hr: "hr";
|
|
48
|
+
th: "th";
|
|
49
|
+
tr: "tr";
|
|
47
50
|
id: "id";
|
|
51
|
+
is: "is";
|
|
52
|
+
mt: "mt";
|
|
53
|
+
ml: "ml";
|
|
48
54
|
af: "af";
|
|
49
55
|
sq: "sq";
|
|
50
56
|
ar_dz: "ar_dz";
|
|
@@ -71,7 +77,6 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
71
77
|
zh_cn: "zh_cn";
|
|
72
78
|
zh_sg: "zh_sg";
|
|
73
79
|
zh_tw: "zh_tw";
|
|
74
|
-
hr: "hr";
|
|
75
80
|
cs: "cs";
|
|
76
81
|
da: "da";
|
|
77
82
|
nl_be: "nl_be";
|
|
@@ -106,7 +111,6 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
106
111
|
he: "he";
|
|
107
112
|
hi: "hi";
|
|
108
113
|
hu: "hu";
|
|
109
|
-
is: "is";
|
|
110
114
|
ga: "ga";
|
|
111
115
|
it: "it";
|
|
112
116
|
it_ch: "it_ch";
|
|
@@ -116,9 +120,7 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
116
120
|
lv: "lv";
|
|
117
121
|
lt: "lt";
|
|
118
122
|
mk: "mk";
|
|
119
|
-
ml: "ml";
|
|
120
123
|
ms: "ms";
|
|
121
|
-
mt: "mt";
|
|
122
124
|
no: "no";
|
|
123
125
|
nb: "nb";
|
|
124
126
|
nn: "nn";
|
|
@@ -149,8 +151,6 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
149
151
|
es: "es";
|
|
150
152
|
sv: "sv";
|
|
151
153
|
sv_fi: "sv_fi";
|
|
152
|
-
th: "th";
|
|
153
|
-
tr: "tr";
|
|
154
154
|
uk: "uk";
|
|
155
155
|
ur: "ur";
|
|
156
156
|
vi: "vi";
|
|
@@ -351,7 +351,7 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
351
351
|
expiresAt: Date;
|
|
352
352
|
items: {
|
|
353
353
|
translations: {
|
|
354
|
-
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" | "
|
|
354
|
+
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";
|
|
355
355
|
title: string;
|
|
356
356
|
subtitle: string;
|
|
357
357
|
}[];
|
|
@@ -457,7 +457,7 @@ export declare const AdminCustomerDetailSchema: z.ZodObject<{
|
|
|
457
457
|
expiresAt: Date;
|
|
458
458
|
items: {
|
|
459
459
|
translations: {
|
|
460
|
-
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" | "
|
|
460
|
+
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";
|
|
461
461
|
title: string;
|
|
462
462
|
subtitle: string;
|
|
463
463
|
}[];
|
|
@@ -49,7 +49,7 @@ declare class CustomerService {
|
|
|
49
49
|
expiresAt: Date;
|
|
50
50
|
items: {
|
|
51
51
|
translations: {
|
|
52
|
-
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" | "
|
|
52
|
+
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";
|
|
53
53
|
title: string;
|
|
54
54
|
subtitle: string;
|
|
55
55
|
}[];
|
|
@@ -7,33 +7,33 @@ declare class IntegrationRegistry {
|
|
|
7
7
|
constructor(prisma?: (PrismaClientType | any) | undefined);
|
|
8
8
|
private loadAll;
|
|
9
9
|
ready(): Promise<void>;
|
|
10
|
-
get(organizationId: string | undefined, type: string):
|
|
10
|
+
get(organizationId: string | undefined, type: string): {
|
|
11
11
|
type: string;
|
|
12
12
|
organizationId: string;
|
|
13
|
-
createdAt: Date;
|
|
14
13
|
config: import("@prisma/client/runtime/client").JsonValue;
|
|
14
|
+
createdAt: Date;
|
|
15
15
|
updatedAt: Date;
|
|
16
16
|
createdBy: string | null;
|
|
17
17
|
updatedBy: string | null;
|
|
18
|
-
} | undefined
|
|
19
|
-
list(organizationId: string):
|
|
18
|
+
} | undefined;
|
|
19
|
+
list(organizationId: string): {
|
|
20
20
|
type: string;
|
|
21
21
|
organizationId: string;
|
|
22
|
-
createdAt: Date;
|
|
23
22
|
config: import("@prisma/client/runtime/client").JsonValue;
|
|
23
|
+
createdAt: Date;
|
|
24
24
|
updatedAt: Date;
|
|
25
25
|
createdBy: string | null;
|
|
26
26
|
updatedBy: string | null;
|
|
27
|
-
}[]
|
|
28
|
-
upsert(integration: Integration):
|
|
27
|
+
}[];
|
|
28
|
+
upsert(integration: Integration): {
|
|
29
29
|
type: string;
|
|
30
30
|
organizationId: string;
|
|
31
|
-
createdAt: Date;
|
|
32
31
|
config: import("@prisma/client/runtime/client").JsonValue;
|
|
32
|
+
createdAt: Date;
|
|
33
33
|
updatedAt: Date;
|
|
34
34
|
createdBy: string | null;
|
|
35
35
|
updatedBy: string | null;
|
|
36
|
-
}
|
|
37
|
-
delete(organizationId: string, type: string):
|
|
36
|
+
};
|
|
37
|
+
delete(organizationId: string, type: string): void;
|
|
38
38
|
}
|
|
39
39
|
export { IntegrationRegistry };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as o}from"tslib";const e=(s,t)=>`${s}:${t}`;class a{constructor(t){this.prisma=t,this.entries=new Map,this.initialLoadPromise=this.loadAll()}loadAll(){return o(this,void 0,void 0,function*(){var t,i;if(!(!((i=(t=this.prisma)===null||t===void 0?void 0:t.integration)===null||i===void 0)&&i.findMany))return;const r=yield this.prisma.integration.findMany();this.entries.clear();for(const n of r)this.entries.set(e(n.organizationId,n.type),n)})}ready(){return o(this,void 0,void 0,function*(){yield this.initialLoadPromise})}get(t,i){if(t)return this.entries.get(e(t,i))}list(t){return[...this.entries.values()].filter(i=>i.organizationId===t).sort((i,r)=>i.type.localeCompare(r.type))}upsert(t){return this.entries.set(e(t.organizationId,t.type),t),t}delete(t,i){this.entries.delete(e(t,i))}}export{a as IntegrationRegistry};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration-registry.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/integration/integration-registry.ts"],"names":[],"mappings":";AAGA,MAAM,iBAAiB,GAAG,CAAC,cAAsB,EAAE,IAAY,EAAE,EAAE,CACjE,GAAG,cAAc,IAAI,IAAI,EAAE,CAAC;AAE9B,MAAM,mBAAmB;IAIvB,YAA6B,MAA+B;QAA/B,WAAM,GAAN,MAAM,CAAyB;QAH3C,YAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;QAIxD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAEa,OAAO;;;YACnB,IAAI,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,0CAAE,QAAQ,CAAA,EAAE,CAAC;gBACxC,OAAO;YACT,CAAC;YAED,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;YAE9D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAErB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;gBACvC,IAAI,CAAC,OAAO,CAAC,GAAG,CACd,iBAAiB,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,EAC/D,WAAW,CACZ,CAAC;YACJ,CAAC;QACH,CAAC;KAAA;IAEY,KAAK;;YAChB,MAAM,IAAI,CAAC,kBAAkB,CAAC;QAChC,CAAC;KAAA;
|
|
1
|
+
{"version":3,"file":"integration-registry.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/integration/integration-registry.ts"],"names":[],"mappings":";AAGA,MAAM,iBAAiB,GAAG,CAAC,cAAsB,EAAE,IAAY,EAAE,EAAE,CACjE,GAAG,cAAc,IAAI,IAAI,EAAE,CAAC;AAE9B,MAAM,mBAAmB;IAIvB,YAA6B,MAA+B;QAA/B,WAAM,GAAN,MAAM,CAAyB;QAH3C,YAAO,GAAG,IAAI,GAAG,EAAuB,CAAC;QAIxD,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC3C,CAAC;IAEa,OAAO;;;YACnB,IAAI,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,WAAW,0CAAE,QAAQ,CAAA,EAAE,CAAC;gBACxC,OAAO;YACT,CAAC;YAED,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;YAE9D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YAErB,KAAK,MAAM,WAA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
|
|
2
2
|
import { PrismaClientType } from "../../core/lib/prisma";
|
|
3
|
+
import { EmailService } from "../../core/notifications/email.service";
|
|
4
|
+
import { StripeService } from "../payment/stripe.service";
|
|
3
5
|
import { UpsertIntegrationSchema } from "./integration.schema";
|
|
4
6
|
import { IntegrationRegistry } from "./integration-registry";
|
|
5
7
|
declare class IntegrationService {
|
|
6
8
|
private readonly prisma;
|
|
7
9
|
private readonly integrationRegistry;
|
|
8
|
-
|
|
10
|
+
private readonly emailService;
|
|
11
|
+
private readonly stripeService;
|
|
12
|
+
constructor(prisma: PrismaClientType, integrationRegistry: IntegrationRegistry, emailService: EmailService, stripeService: StripeService);
|
|
9
13
|
private sanitizeConfig;
|
|
10
14
|
private sanitizeIntegration;
|
|
11
15
|
private ensureOrganizationExists;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as c}from"tslib";import{HttpException as o}from"../../core/exceptions/http-exception";import{IntegrationSchema as S,ResendIntegrationConfigSchema as E,StripeIntegrationConfigSchema as x,UpsertResendIntegrationConfigSchema as z,UpsertStripeIntegrationConfigSchema as k}from"./integration.schema";import{getStoredResendConfig as R,normalizeEmail as b,normalizeSecret as v,normalizeStripePaymentMethods as C,parseResendStoredConfig as y,parseStripeStoredConfig as w}from"./integration-config";class U{constructor(e,i,n,t){this.prisma=e,this.integrationRegistry=i,this.emailService=n,this.stripeService=t}sanitizeConfig(e,i){var n;switch(e){case"stripe":{const t=w(i);return x.parse({paymentMethods:(n=t?.paymentMethods)!==null&&n!==void 0?n:[],hasSecretKey:!!t?.secretKey,hasWebhookSecret:!!t?.webhookSecret})}case"resend":{const t=y(i);return E.parse({hasApiKey:!!t?.apiKey,fromEmail:t?.fromEmail})}default:return i&&typeof i=="object"&&!Array.isArray(i)?i:{}}}sanitizeIntegration(e){return S.parse(Object.assign(Object.assign({},e),{config:this.sanitizeConfig(e.type,e.config)}))}ensureOrganizationExists(e){return c(this,void 0,void 0,function*(){if(!(yield this.prisma.organization.findUnique({where:{id:e,deletedAt:null},select:{id:!0}})))throw new o(404,"Organization not found")})}validateConfig(e,i,n){var t,r,a,l,g,f,m,p;switch(e){case"stripe":{const d=k.safeParse(i);if(!d.success)throw new o(400,(r=(t=d.error.issues[0])===null||t===void 0?void 0:t.message)!==null&&r!==void 0?r:"Invalid Stripe configuration");const s=w(n),u=(a=v(d.data.secretKey))!==null&&a!==void 0?a:s?.secretKey,h=(l=v(d.data.webhookSecret))!==null&&l!==void 0?l:s?.webhookSecret;if(!u)throw new o(400,"Stripe API key is required");if(!h)throw new o(400,"Stripe webhook secret is required");return{paymentMethods:C(d.data.paymentMethods),secretKey:u,webhookSecret:h}}case"resend":{const d=z.safeParse(i);if(!d.success)throw new o(400,(f=(g=d.error.issues[0])===null||g===void 0?void 0:g.message)!==null&&f!==void 0?f:"Invalid Resend configuration");const s=y(n),u=(m=v(d.data.apiKey))!==null&&m!==void 0?m:s?.apiKey,h=(p=b(d.data.fromEmail))!==null&&p!==void 0?p:s?.fromEmail;if(!u)throw new o(400,"Resend API key is required");if(!h)throw new o(400,"Resend sender email is required");return{apiKey:u,fromEmail:h}}default:throw new o(400,`Unsupported integration type: ${e}`)}}getIntegrations(e){return c(this,void 0,void 0,function*(){return yield this.ensureOrganizationExists(e),this.integrationRegistry.list(e).map(n=>this.sanitizeIntegration(n))})}upsertIntegration(e,i,n,t){return c(this,void 0,void 0,function*(){yield this.ensureOrganizationExists(e);const r=this.integrationRegistry.get(e,i),a=this.validateConfig(i,t.config,r?.config),l=yield this.prisma.integration.upsert({where:{organizationId_type:{organizationId:e,type:i}},update:{config:a,updatedBy:n},create:{organization:{connect:{id:e}},type:i,config:a,createdBy:n,updatedBy:n}});return this.integrationRegistry.upsert(l),this.sanitizeIntegration(l)})}deleteIntegration(e,i){return c(this,void 0,void 0,function*(){if(yield this.ensureOrganizationExists(e),(yield this.prisma.integration.deleteMany({where:{organizationId:e,type:i}})).count===0)throw new o(404,"Integration not found");this.integrationRegistry.delete(e,i)})}sendTestEmail(e,i){return c(this,void 0,void 0,function*(){const n=yield this.prisma.organization.findUnique({where:{id:e,deletedAt:null},select:{id:!0,name:!0,email:!0}});if(!n)throw new o(404,"Organization not found");const t=this.integrationRegistry.get(e,"resend"),r=R(t);if(!r?.apiKey)throw new o(400,"Resend API key is not configured. Save the integration first.");if(!r.fromEmail)throw new o(400,"Sender email is not configured. Save the integration first.");try{return yield this.emailService.sendEmail(e,{from:`${n.name} <${r.fromEmail}>`,to:[i],subject:`Test Email from ${n.name}`,html:[`<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 560px; margin: 0 auto; padding: 40px 20px;">`,'<h1 style="font-size: 20px; font-weight: 600; color: #111827; margin: 0 0 16px;">Email integration is working</h1>','<p style="font-size: 14px; line-height: 1.6; color: #6b7280; margin: 0 0 24px;">',`This is a test email sent from <strong style="color: #111827;">${n.name}</strong> to verify that your Resend integration is configured correctly.`,"</p>",'<hr style="border: none; border-top: 1px solid #e5e7eb; margin: 24px 0;" />','<p style="font-size: 12px; color: #9ca3af; margin: 0;">',`Sent via Shophost · Sender: ${r.fromEmail}`,"</p>","</div>"].join("")}),{success:!0,message:`Test email sent to ${i}`}}catch(a){const l=a instanceof Error?a.message:"Unknown error";throw new o(500,`Failed to send test email: ${l}`)}})}createStripeTestCheckout(e,i,n){return c(this,void 0,void 0,function*(){const t=yield this.prisma.organization.findUnique({where:{id:e,deletedAt:null},select:{id:!0,name:!0,configuration:{select:{defaultCurrency:!0}}}});if(!t)throw new o(404,"Organization not found");try{const r=yield this.stripeService.createTestCheckoutSession(e,{cancelUrl:n,customerEmail:i,defaultCurrency:t.configuration.defaultCurrency,organizationName:t.name,successUrl:n});if(!r.url)throw new o(500,"Stripe did not return a checkout URL for the test session.");return{redirectUrl:r.url}}catch(r){if(r instanceof o)throw r;const a=r instanceof Error?r.message:"Unknown error";throw new o(500,`Failed to create Stripe test checkout: ${a}`)}})}}export{U as IntegrationService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/integration/integration.service.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"integration.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/integration/integration.service.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAIrE,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,6BAA6B,EAE7B,mCAAmC,EACnC,mCAAmC,GACpC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,6BAA6B,EAC7B,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,kBAAkB;IACtB,YACmB,MAAwB,EACxB,mBAAwC,EACxC,YAA0B,EAC1B,aAA4B;QAH5B,WAAM,GAAN,MAAM,CAAkB;QACxB,wBAAmB,GAAnB,mBAAmB,CAAqB;QACxC,iBAAY,GAAZ,YAAY,CAAc;QAC1B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAEI,cAAc,CAAC,IAAY,EAAE,MAAe;;QAClD,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACd,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;gBAE/C,OAAO,6BAA6B,CAAC,KAAK,CAAC;oBACzC,cAAc,EAAE,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,cAAc,mCAAI,EAAE;oBAC5C,YAAY,EAAE,OAAO,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAC;oBACxC,gBAAgB,EAAE,OAAO,CAAC,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,CAAC;iB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