@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
package/package.json
CHANGED
package/src/bootstrap.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as i}from"tslib";import{cors as c}from"hono/cors";import{createContainer as p}from"./container";import{createApiRouter as H,createUnavailableAuth as h,handleAppError as m}from"./core/hono/hono";import{registerAccessHandlers as y,registerAnalyticsHandlers as v,registerCartHandlers as f,registerCustomerHandlers as C,registerFileHandlers as O,registerHealthHandlers as A,registerIntegrationHandlers as T,registerLocationHandlers as b,registerManufacturerHandlers as P,registerOrderHandlers as R,registerOrganizationHandlers as E,registerPaymentHandlers as w,registerProductCategoryHandlers as S,registerProductHandlers as q,registerReservationHandlers as M,registerShippingHandlers as j,registerShippingMethodHandlers as k,registerWebhookHandlers as z}from"./features";const L={allowHeaders:["Content-Type","Authorization","X-Requested-With","Accept","Origin","X-CSRF-Token"],allowMethods:["GET","POST","PUT","DELETE","OPTIONS","PATCH"],credentials:!0,exposeHeaders:["Content-Length","X-Kuma-Revision"],origin:["http://localhost:3000"]};export const bootstrap=({corsOptions:a,maps:n,payment:d,prisma:u,resolveAuth:l=()=>h()}={})=>{const e=H(),r=p({maps:n,payment:d,prisma:u}),g=r.integrationRegistry.ready();return e.use("*",c(Object.assign(Object.assign({},L),a))),e.use("*",(t,o)=>i(void 0,void 0,void 0,function*(){yield g,yield o()})),e.use("*",(t,o)=>i(void 0,void 0,void 0,function*(){const s=l(t.req.raw,t.req.path);t.set("auth",s),Object.assign(t.req.raw,{auth:s}),yield o()})),e.onError(t=>m(t)),e.route("/",A()),e.route("/",v(r.analytics)),e.route("/",P(r.manufacturer)),e.route("/",T(r.integration)),e.route("/",E(r.organization)),e.route("/",O(r.file)),e.route("/",S(r.productCategory)),e.route("/",q(r.product)),e.route("/",y(r.access)),e.route("/",k(r.shippingMethod)),e.route("/",R(r.order)),e.route("/",f(r.cart)),e.route("/",C(r.customer)),e.route("/",j(r.shipping)),e.route("/",b(r.location)),e.route("/",w(r.payment)),e.route("/",z(r.paymentWebhook)),e.route("/",M(r.reservation)),e};
|
package/src/bootstrap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../../../../packages/rest-api/src/bootstrap.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAEL,eAAe,EACf,qBAAqB,EACrB,cAAc,GACf,MAAM,kBAAkB,CAAC;AAE1B,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,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,sBAAsB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,8BAA8B,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;IACxE,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;IACtD,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,wBAAwB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,wBAAwB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,wBAAwB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC5D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC;IACjE,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,2BAA2B,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAElE,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
|
package/src/container.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EmailService } from "./core/notifications/email.service";
|
|
1
2
|
import type { PrismaClientType } from "./core/lib/prisma";
|
|
2
3
|
import { AccessService } from "./features/access/access.service";
|
|
3
4
|
import { AnalyticsService } from "./features/analytics/analytics.service";
|
|
@@ -12,6 +13,7 @@ import { ManufacturerService } from "./features/manufacturer/manufacturer.servic
|
|
|
12
13
|
import { OrderService } from "./features/order/order.service";
|
|
13
14
|
import { OrganizationService } from "./features/organization/organization.service";
|
|
14
15
|
import { PaymentService, type PaymentServiceOptions } from "./features/payment/payment.service";
|
|
16
|
+
import { PaymentWebhookService } from "./features/payment/payment-webhook.service";
|
|
15
17
|
import { ProductCategoryService } from "./features/product-category/product-category.service";
|
|
16
18
|
import { ProductService } from "./features/product/product.service";
|
|
17
19
|
import { ReservationService } from "./features/reservation/reservation.service";
|
|
@@ -31,6 +33,7 @@ interface Container {
|
|
|
31
33
|
analytics: AnalyticsService;
|
|
32
34
|
cart: CartService;
|
|
33
35
|
customer: CustomerService;
|
|
36
|
+
email: EmailService;
|
|
34
37
|
file: FileService;
|
|
35
38
|
inventory: InventoryService;
|
|
36
39
|
integration: IntegrationService;
|
|
@@ -45,6 +48,7 @@ interface Container {
|
|
|
45
48
|
reservation: ReservationService;
|
|
46
49
|
shipping: ShippingService;
|
|
47
50
|
shippingMethod: ShippingMethodService;
|
|
51
|
+
paymentWebhook: PaymentWebhookService;
|
|
48
52
|
}
|
|
49
53
|
declare const createContainer: ({ maps, payment, prisma, }?: ContainerOptions) => Container;
|
|
50
54
|
export { createContainer };
|
package/src/container.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AccessService as
|
|
1
|
+
import{EmailService as p}from"./core/notifications/email.service";import{AccessService as u}from"./features/access/access.service";import{AnalyticsService as a}from"./features/analytics/analytics.service";import{CartService as d}from"./features/cart/cart.service";import{CustomerService as y}from"./features/customer/customer.service";import{FileService as h}from"./features/file/file.service";import{IntegrationRegistry as s}from"./features/integration/integration-registry";import{IntegrationService as k}from"./features/integration/integration.service";import{InventoryService as C}from"./features/inventory/inventory.service";import{OrderFulfillmentService as P}from"./features/order/order-fulfillment.service";import{LocationService as b}from"./features/location/location.service";import{ManufacturerService as F}from"./features/manufacturer/manufacturer.service";import{OrderService as I}from"./features/order/order.service";import{OrganizationService as M}from"./features/organization/organization.service";import{PaymentService as O}from"./features/payment/payment.service";import{PaymentWebhookService as R}from"./features/payment/payment-webhook.service";import{StripeService as W}from"./features/payment/stripe.service";import{ProductCategoryService as z}from"./features/product-category/product-category.service";import{ProductService as A}from"./features/product/product.service";import{ReservationService as x}from"./features/reservation/reservation.service";import{ShippingMethodService as E}from"./features/shipping-method/shipping-method.service";import{ShippingService as L}from"./features/shipping/shipping.service";const _=({maps:r,payment:i,prisma:e}={})=>{var n;const c=!((n=r?.google)===null||n===void 0)&&n.key?new b(r.google.key):null,v=new C(e),o=new s(e),t=new p(o),m=new W(o),S=new O(e,i??{},m),f=new d(e,v),l=new I(e,S,f,t),w=new P(v,l),g=new R(e,m,w);return{access:new u(e),analytics:new a(e),cart:f,customer:new y(e),email:t,file:new h(e),inventory:v,integration:new k(e,o,t,m),integrationRegistry:o,location:c,manufacturer:new F(e),order:l,organization:new M(e,c),payment:S,product:new A(e),productCategory:new z(e),reservation:new x(e,t),shipping:new L(e,c),shippingMethod:new E(e),paymentWebhook:g}};export{_ as createContainer};
|
package/src/container.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../packages/rest-api/src/container.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../packages/rest-api/src/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;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,sBAAsB,CAAC,MAAM,CAAC;QACnD,WAAW,EAAE,IAAI,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC;QACzD,QAAQ,EAAE,IAAI,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC/C,cAAc,EAAE,IAAI,qBAAqB,CAAC,MAAM,CAAC;QACjD,cAAc,EAAE,qBAAqB;KACtC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
package/src/core/lib/prisma.d.ts
CHANGED
|
@@ -26,6 +26,18 @@ export declare const createPrismaClient: (options: CreatePrismaClientOptions) =>
|
|
|
26
26
|
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
27
27
|
};
|
|
28
28
|
};
|
|
29
|
+
file: {
|
|
30
|
+
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
31
|
+
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
32
|
+
limit?: P["limit"] | undefined;
|
|
33
|
+
}) | undefined) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").PageNumberPaginationMeta<TOptions extends {
|
|
34
|
+
includePageCount: boolean;
|
|
35
|
+
} ? TOptions["includePageCount"] : true>]>;
|
|
36
|
+
withCursor: <TOptions extends Omit<P_1, "limit">, P_1 extends import("prisma-extension-pagination").CursorPaginationOptions<import("@prisma/client/runtime/client").Result<T, A, "findMany">[number], NonNullable<import("@prisma/client/runtime/client").Args<T, "findMany">["cursor"]>>>(options: TOptions & {
|
|
37
|
+
limit: P_1["limit"];
|
|
38
|
+
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
29
41
|
user: {
|
|
30
42
|
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
31
43
|
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
@@ -182,18 +194,6 @@ export declare const createPrismaClient: (options: CreatePrismaClientOptions) =>
|
|
|
182
194
|
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
183
195
|
};
|
|
184
196
|
};
|
|
185
|
-
file: {
|
|
186
|
-
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
187
|
-
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
188
|
-
limit?: P["limit"] | undefined;
|
|
189
|
-
}) | undefined) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").PageNumberPaginationMeta<TOptions extends {
|
|
190
|
-
includePageCount: boolean;
|
|
191
|
-
} ? TOptions["includePageCount"] : true>]>;
|
|
192
|
-
withCursor: <TOptions extends Omit<P_1, "limit">, P_1 extends import("prisma-extension-pagination").CursorPaginationOptions<import("@prisma/client/runtime/client").Result<T, A, "findMany">[number], NonNullable<import("@prisma/client/runtime/client").Args<T, "findMany">["cursor"]>>>(options: TOptions & {
|
|
193
|
-
limit: P_1["limit"];
|
|
194
|
-
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
195
|
-
};
|
|
196
|
-
};
|
|
197
197
|
manufacturer: {
|
|
198
198
|
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
199
199
|
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
@@ -440,6 +440,18 @@ export declare const createPrismaClient: (options: CreatePrismaClientOptions) =>
|
|
|
440
440
|
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
441
441
|
};
|
|
442
442
|
};
|
|
443
|
+
file: {
|
|
444
|
+
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
445
|
+
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
446
|
+
limit?: P["limit"] | undefined;
|
|
447
|
+
}) | undefined) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").PageNumberPaginationMeta<TOptions extends {
|
|
448
|
+
includePageCount: boolean;
|
|
449
|
+
} ? TOptions["includePageCount"] : true>]>;
|
|
450
|
+
withCursor: <TOptions extends Omit<P_1, "limit">, P_1 extends import("prisma-extension-pagination").CursorPaginationOptions<import("@prisma/client/runtime/client").Result<T, A, "findMany">[number], NonNullable<import("@prisma/client/runtime/client").Args<T, "findMany">["cursor"]>>>(options: TOptions & {
|
|
451
|
+
limit: P_1["limit"];
|
|
452
|
+
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
453
|
+
};
|
|
454
|
+
};
|
|
443
455
|
user: {
|
|
444
456
|
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
445
457
|
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
@@ -596,18 +608,6 @@ export declare const createPrismaClient: (options: CreatePrismaClientOptions) =>
|
|
|
596
608
|
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
597
609
|
};
|
|
598
610
|
};
|
|
599
|
-
file: {
|
|
600
|
-
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
601
|
-
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
602
|
-
limit?: P["limit"] | undefined;
|
|
603
|
-
}) | undefined) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").PageNumberPaginationMeta<TOptions extends {
|
|
604
|
-
includePageCount: boolean;
|
|
605
|
-
} ? TOptions["includePageCount"] : true>]>;
|
|
606
|
-
withCursor: <TOptions extends Omit<P_1, "limit">, P_1 extends import("prisma-extension-pagination").CursorPaginationOptions<import("@prisma/client/runtime/client").Result<T, A, "findMany">[number], NonNullable<import("@prisma/client/runtime/client").Args<T, "findMany">["cursor"]>>>(options: TOptions & {
|
|
607
|
-
limit: P_1["limit"];
|
|
608
|
-
}) => Promise<[import("@prisma/client/runtime/client").Result<T, A, "findMany">, import("prisma-extension-pagination").CursorPaginationMeta]>;
|
|
609
|
-
};
|
|
610
|
-
};
|
|
611
611
|
manufacturer: {
|
|
612
612
|
paginate: () => <T, A>(this: T, args?: import("@prisma/client/runtime/client").Exact<A, Omit<import("@prisma/client/runtime/client").Args<T, "findMany">, "cursor" | "take" | "skip">> | undefined) => {
|
|
613
613
|
withPages: <TOptions extends Omit<P, "limit">, P extends import("prisma-extension-pagination").PageNumberPaginationOptions>(options?: (TOptions & {
|
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import { CreateEmailOptions, CreateEmailRequestOptions } from "resend";
|
|
2
|
+
import { IntegrationRegistry } from "../../features/integration/integration-registry";
|
|
2
3
|
import { Order, Organization, Reservation, User } from "../../schemas";
|
|
3
4
|
interface ReservationWithRelations extends Reservation {
|
|
4
5
|
user: User | null;
|
|
5
6
|
organization: Organization;
|
|
6
7
|
}
|
|
7
|
-
interface EmailServiceOptions {
|
|
8
|
-
apiKey?: string;
|
|
9
|
-
fromEmail?: string;
|
|
10
|
-
}
|
|
11
8
|
declare class EmailService {
|
|
12
|
-
private
|
|
13
|
-
private
|
|
14
|
-
constructor(
|
|
9
|
+
private readonly integrationRegistry;
|
|
10
|
+
private readonly runtimes;
|
|
11
|
+
constructor(integrationRegistry: IntegrationRegistry);
|
|
12
|
+
private getRuntime;
|
|
15
13
|
private getFromAddress;
|
|
16
14
|
/**
|
|
17
15
|
* Sends an email
|
|
18
16
|
*/
|
|
19
|
-
sendEmail(payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<import("resend").CreateEmailResponseSuccess | null | undefined>;
|
|
17
|
+
sendEmail(organizationId: string, payload: CreateEmailOptions, options?: CreateEmailRequestOptions): Promise<import("resend").CreateEmailResponseSuccess | null | undefined>;
|
|
20
18
|
/**
|
|
21
19
|
* Sends an order confirmation email
|
|
22
20
|
*/
|
|
23
|
-
sendOrderConfirmationEmail(user: User, organization: Organization, order: Order): Promise<void>;
|
|
21
|
+
sendOrderConfirmationEmail(organizationId: string, user: User, organization: Organization, order: Order): Promise<void>;
|
|
24
22
|
/**
|
|
25
23
|
* Sends an order confirmation email
|
|
26
24
|
*/
|
|
27
|
-
sendOrderNotificationEmail(user: User, member: User, organization: Organization, order: Order): Promise<void>;
|
|
28
|
-
sendReservationConfirmationEmail(reservation: ReservationWithRelations): Promise<void>;
|
|
25
|
+
sendOrderNotificationEmail(organizationId: string, user: User, member: User, organization: Organization, order: Order): Promise<void>;
|
|
26
|
+
sendReservationConfirmationEmail(organizationId: string, reservation: ReservationWithRelations): Promise<void>;
|
|
29
27
|
/**
|
|
30
28
|
* Sends a reservation cancellation email
|
|
31
29
|
*/
|
|
32
|
-
sendReservationCancellationEmail(reservation: ReservationWithRelations): Promise<void>;
|
|
30
|
+
sendReservationCancellationEmail(organizationId: string, reservation: ReservationWithRelations): Promise<void>;
|
|
33
31
|
/**
|
|
34
32
|
* Sends a reservation notification email to an organization member
|
|
35
33
|
*/
|
|
36
|
-
sendReservationNotificationEmail(member: User, reservation: ReservationWithRelations): Promise<void>;
|
|
37
|
-
sendReservationUpdatedEmail(reservation: ReservationWithRelations): Promise<void>;
|
|
34
|
+
sendReservationNotificationEmail(organizationId: string, member: User, reservation: ReservationWithRelations): Promise<void>;
|
|
35
|
+
sendReservationUpdatedEmail(organizationId: string, reservation: ReservationWithRelations): Promise<void>;
|
|
38
36
|
}
|
|
39
37
|
export { EmailService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__awaiter as r}from"tslib";import{Resend as m}from"resend";import{getStoredResendConfig as l}from"../../features/integration/integration-config";import{OrderConfirmationEmail as a}from"../../features/order/emails/order-confirmation.email";import u from"../../features/order/emails/order-notification.email";import{ReservationCancellationEmail as c}from"../../features/reservation/emails/reservation-cancellation.email";import{ReservationConfirmationEmail as f}from"../../features/reservation/emails/reservation-confirmation.email";import v from"../../features/reservation/emails/reservation-notification.email";import{ReservationUpdatedEmail as h}from"../../features/reservation/emails/reservation-updated.email";import{logger as d}from"../logging/pino";class g{constructor(o){this.integrationRegistry=o,this.runtimes=new Map}getRuntime(o){return r(this,void 0,void 0,function*(){const e=l(this.integrationRegistry.get(o,"resend")),i=JSON.stringify(e??null),t=this.runtimes.get(o);if(t?.signature===i)return t;const n={fromEmail:e?.fromEmail,resend:e?.apiKey?new m(e.apiKey):void 0,signature:i};return this.runtimes.set(o,n),n})}getFromAddress(o,e){return r(this,void 0,void 0,function*(){var i,t;const s=(t=(i=(yield this.getRuntime(o)).fromEmail)!==null&&i!==void 0?i:e.email)!==null&&t!==void 0?t:"info@shophost.io";return`${e.name} <${s}>`})}sendEmail(o,e,i){return r(this,void 0,void 0,function*(){const t=yield this.getRuntime(o);if(!t.resend)return;const{data:n,error:s}=yield t.resend.emails.send(e,i);if(s)throw d.error({resendError:s,from:e.from,subject:e.subject,to:e.to},"Failed to send email with Resend"),new Error(`Resend send failed: ${s.name}: ${s.message}`);return d.info({emailId:n?.id,subject:e.subject,to:e.to},"Email sent with Resend"),n})}sendOrderConfirmationEmail(o,e,i,t){return r(this,void 0,void 0,function*(){console.log(`Sending order confirmation email to ${e.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,i),to:[e.email],subject:`Order Confirmation - Order #${t.referenceId} | ${i.name}`,react:a({user:e,organization:i,order:t})})})}sendOrderNotificationEmail(o,e,i,t,n){return r(this,void 0,void 0,function*(){console.log(`Sending order notification email to ${i.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,t),to:[i.email],subject:`You have received a new order | ${t.name}`,react:u({user:e,organization:t,order:n})})})}sendReservationConfirmationEmail(o,e){return r(this,void 0,void 0,function*(){const i=e.user,t=e.organization;i?.email&&(console.log(`Sending reservation confirmation email to ${i.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,t),to:[i.email],subject:`Reservation Confirmation - ${t.name}`,react:f({user:i,organization:t,reservation:e})}))})}sendReservationCancellationEmail(o,e){return r(this,void 0,void 0,function*(){const i=e.user,t=e.organization;i?.email&&(console.log(`Sending reservation cancellation email to ${i.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,t),to:[i.email],subject:`Reservation Cancelled - ${t.name}`,react:c({user:i,organization:t,reservation:e})}))})}sendReservationNotificationEmail(o,e,i){return r(this,void 0,void 0,function*(){const t=i.user,n=i.organization;t&&(console.log(`Sending reservation notification email to ${e.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,n),to:[e.email],subject:`New Reservation Request | ${n.name}`,react:v({user:t,member:e,organization:n,reservation:i})}))})}sendReservationUpdatedEmail(o,e){return r(this,void 0,void 0,function*(){const i=e.user,t=e.organization;i?.email&&(console.log(`Sending reservation updated email to ${i.email}`),yield this.sendEmail(o,{from:yield this.getFromAddress(o,t),to:[i.email],subject:`Reservation Updated - ${t.name}`,react:h({user:i,organization:t,reservation:e})}))})}}export{g as EmailService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/core/notifications/email.service.ts"],"names":[],"mappings":";AACA,OAAO,EAAiD,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,sBAAsB,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAChH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAChH,OAAO,4BAA4B,MAAM,kEAAkE,CAAC;AAC5G,OAAO,EAAE,uBAAuB,EAAE,MAAM,6DAA6D,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"email.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/core/notifications/email.service.ts"],"names":[],"mappings":";AACA,OAAO,EAAiD,MAAM,EAAE,MAAM,QAAQ,CAAC;AAE/E,OAAO,EACL,qBAAqB,GACtB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sDAAsD,CAAC;AAC9F,OAAO,sBAAsB,MAAM,sDAAsD,CAAC;AAC1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAChH,OAAO,EAAE,4BAA4B,EAAE,MAAM,kEAAkE,CAAC;AAChH,OAAO,4BAA4B,MAAM,kEAAkE,CAAC;AAC5G,OAAO,EA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ean<unknown>>;
|
|
23
23
|
locale: z.ZodOptional<z.ZodEnum<{
|
|
24
|
+
hr: "hr";
|
|
25
|
+
th: "th";
|
|
26
|
+
tr: "tr";
|
|
24
27
|
id: "id";
|
|
28
|
+
is: "is";
|
|
29
|
+
mt: "mt";
|
|
30
|
+
ml: "ml";
|
|
25
31
|
af: "af";
|
|
26
32
|
sq: "sq";
|
|
27
33
|
ar_dz: "ar_dz";
|
|
@@ -48,7 +54,6 @@ export declare const accessRoute: {
|
|
|
48
54
|
zh_cn: "zh_cn";
|
|
49
55
|
zh_sg: "zh_sg";
|
|
50
56
|
zh_tw: "zh_tw";
|
|
51
|
-
hr: "hr";
|
|
52
57
|
cs: "cs";
|
|
53
58
|
da: "da";
|
|
54
59
|
nl_be: "nl_be";
|
|
@@ -83,7 +88,6 @@ export declare const accessRoute: {
|
|
|
83
88
|
he: "he";
|
|
84
89
|
hi: "hi";
|
|
85
90
|
hu: "hu";
|
|
86
|
-
is: "is";
|
|
87
91
|
ga: "ga";
|
|
88
92
|
it: "it";
|
|
89
93
|
it_ch: "it_ch";
|
|
@@ -93,9 +97,7 @@ export declare const accessRoute: {
|
|
|
93
97
|
lv: "lv";
|
|
94
98
|
lt: "lt";
|
|
95
99
|
mk: "mk";
|
|
96
|
-
ml: "ml";
|
|
97
100
|
ms: "ms";
|
|
98
|
-
mt: "mt";
|
|
99
101
|
no: "no";
|
|
100
102
|
nb: "nb";
|
|
101
103
|
nn: "nn";
|
|
@@ -126,8 +128,6 @@ export declare const accessRoute: {
|
|
|
126
128
|
es: "es";
|
|
127
129
|
sv: "sv";
|
|
128
130
|
sv_fi: "sv_fi";
|
|
129
|
-
th: "th";
|
|
130
|
-
tr: "tr";
|
|
131
131
|
uk: "uk";
|
|
132
132
|
ur: "ur";
|
|
133
133
|
vi: "vi";
|
|
@@ -39,7 +39,13 @@ export declare const cartRoute: {
|
|
|
39
39
|
} & {
|
|
40
40
|
query: z.ZodObject<{
|
|
41
41
|
locale: z.ZodDefault<z.ZodEnum<{
|
|
42
|
+
hr: "hr";
|
|
43
|
+
th: "th";
|
|
44
|
+
tr: "tr";
|
|
42
45
|
id: "id";
|
|
46
|
+
is: "is";
|
|
47
|
+
mt: "mt";
|
|
48
|
+
ml: "ml";
|
|
43
49
|
af: "af";
|
|
44
50
|
sq: "sq";
|
|
45
51
|
ar_dz: "ar_dz";
|
|
@@ -66,7 +72,6 @@ export declare const cartRoute: {
|
|
|
66
72
|
zh_cn: "zh_cn";
|
|
67
73
|
zh_sg: "zh_sg";
|
|
68
74
|
zh_tw: "zh_tw";
|
|
69
|
-
hr: "hr";
|
|
70
75
|
cs: "cs";
|
|
71
76
|
da: "da";
|
|
72
77
|
nl_be: "nl_be";
|
|
@@ -101,7 +106,6 @@ export declare const cartRoute: {
|
|
|
101
106
|
he: "he";
|
|
102
107
|
hi: "hi";
|
|
103
108
|
hu: "hu";
|
|
104
|
-
is: "is";
|
|
105
109
|
ga: "ga";
|
|
106
110
|
it: "it";
|
|
107
111
|
it_ch: "it_ch";
|
|
@@ -111,9 +115,7 @@ export declare const cartRoute: {
|
|
|
111
115
|
lv: "lv";
|
|
112
116
|
lt: "lt";
|
|
113
117
|
mk: "mk";
|
|
114
|
-
ml: "ml";
|
|
115
118
|
ms: "ms";
|
|
116
|
-
mt: "mt";
|
|
117
119
|
no: "no";
|
|
118
120
|
nb: "nb";
|
|
119
121
|
nn: "nn";
|
|
@@ -144,8 +146,6 @@ export declare const cartRoute: {
|
|
|
144
146
|
es: "es";
|
|
145
147
|
sv: "sv";
|
|
146
148
|
sv_fi: "sv_fi";
|
|
147
|
-
th: "th";
|
|
148
|
-
tr: "tr";
|
|
149
149
|
uk: "uk";
|
|
150
150
|
ur: "ur";
|
|
151
151
|
vi: "vi";
|
|
@@ -192,9 +192,10 @@ export declare const cartRoute: {
|
|
|
192
192
|
products: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
193
193
|
description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
194
194
|
title: z.ZodDefault<z.ZodString>;
|
|
195
|
-
currency: z.ZodString;
|
|
196
|
-
id: z.ZodString;
|
|
197
195
|
createdAt: z.ZodDate;
|
|
196
|
+
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
197
|
+
id: z.ZodString;
|
|
198
|
+
currency: z.ZodString;
|
|
198
199
|
slug: z.ZodOptional<z.ZodString>;
|
|
199
200
|
publishedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
200
201
|
sku: z.ZodOptional<z.ZodString>;
|
|
@@ -212,7 +213,13 @@ export declare const cartRoute: {
|
|
|
212
213
|
title: z.ZodNullable<z.ZodDefault<z.ZodString>>;
|
|
213
214
|
id: z.ZodString;
|
|
214
215
|
defaultLocale: z.ZodOptional<z.ZodEnum<{
|
|
216
|
+
hr: "hr";
|
|
217
|
+
th: "th";
|
|
218
|
+
tr: "tr";
|
|
215
219
|
id: "id";
|
|
220
|
+
is: "is";
|
|
221
|
+
mt: "mt";
|
|
222
|
+
ml: "ml";
|
|
216
223
|
af: "af";
|
|
217
224
|
sq: "sq";
|
|
218
225
|
ar_dz: "ar_dz";
|
|
@@ -239,7 +246,6 @@ export declare const cartRoute: {
|
|
|
239
246
|
zh_cn: "zh_cn";
|
|
240
247
|
zh_sg: "zh_sg";
|
|
241
248
|
zh_tw: "zh_tw";
|
|
242
|
-
hr: "hr";
|
|
243
249
|
cs: "cs";
|
|
244
250
|
da: "da";
|
|
245
251
|
nl_be: "nl_be";
|
|
@@ -274,7 +280,6 @@ export declare const cartRoute: {
|
|
|
274
280
|
he: "he";
|
|
275
281
|
hi: "hi";
|
|
276
282
|
hu: "hu";
|
|
277
|
-
is: "is";
|
|
278
283
|
ga: "ga";
|
|
279
284
|
it: "it";
|
|
280
285
|
it_ch: "it_ch";
|
|
@@ -284,9 +289,7 @@ export declare const cartRoute: {
|
|
|
284
289
|
lv: "lv";
|
|
285
290
|
lt: "lt";
|
|
286
291
|
mk: "mk";
|
|
287
|
-
ml: "ml";
|
|
288
292
|
ms: "ms";
|
|
289
|
-
mt: "mt";
|
|
290
293
|
no: "no";
|
|
291
294
|
nb: "nb";
|
|
292
295
|
nn: "nn";
|
|
@@ -317,8 +320,6 @@ export declare const cartRoute: {
|
|
|
317
320
|
es: "es";
|
|
318
321
|
sv: "sv";
|
|
319
322
|
sv_fi: "sv_fi";
|
|
320
|
-
th: "th";
|
|
321
|
-
tr: "tr";
|
|
322
323
|
uk: "uk";
|
|
323
324
|
ur: "ur";
|
|
324
325
|
vi: "vi";
|
|
@@ -339,7 +340,6 @@ export declare const cartRoute: {
|
|
|
339
340
|
id: z.ZodString;
|
|
340
341
|
}, z.core.$strip>>>;
|
|
341
342
|
manufacturerId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
342
|
-
metadata: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
343
343
|
}, z.core.$strip>>;
|
|
344
344
|
shipping: z.ZodOptional<z.ZodNumber>;
|
|
345
345
|
subtotal: z.ZodNumber;
|