@shophost/rest-api 2.0.50 → 2.0.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +3 -3
  2. package/package.json +1 -1
  3. package/schema.prisma +4 -0
  4. package/src/{app.d.ts → bootstrap.d.ts} +2 -4
  5. package/src/bootstrap.js +1 -0
  6. package/src/bootstrap.js.map +1 -0
  7. package/src/container.d.ts +49 -0
  8. package/src/container.js +1 -0
  9. package/src/container.js.map +1 -0
  10. package/src/core/db/__generated__/client/internal/class.js +33 -29
  11. package/src/core/db/__generated__/client/internal/class.js.map +1 -1
  12. package/src/core/db/__generated__/client/internal/prismaNamespace.d.ts +4 -0
  13. package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -1
  14. package/src/core/db/__generated__/client/internal/prismaNamespace.js.map +1 -1
  15. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.d.ts +4 -0
  16. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -1
  17. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js.map +1 -1
  18. package/src/core/db/__generated__/client/models/Order.d.ts +178 -1
  19. package/src/core/db/__generated__/client/models/Product.d.ts +75 -1
  20. package/src/core/lib/prisma.d.ts +62 -62
  21. package/src/core/notifications/email.service.d.ts +8 -2
  22. package/src/core/notifications/email.service.js +1 -1
  23. package/src/core/notifications/email.service.js.map +1 -1
  24. package/src/core/openapi/openapi.lib.d.ts +2 -2
  25. package/src/core/openapi/openapi.lib.js +1 -1
  26. package/src/core/openapi/openapi.lib.js.map +1 -1
  27. package/src/core/utils/zod.util.js +1 -1
  28. package/src/core/utils/zod.util.js.map +1 -1
  29. package/src/features/access/access.handler.d.ts +2 -2
  30. package/src/features/access/access.handler.js +1 -1
  31. package/src/features/access/access.handler.js.map +1 -1
  32. package/src/features/analytics/analytics.handler.d.ts +2 -2
  33. package/src/features/analytics/analytics.handler.js +1 -1
  34. package/src/features/analytics/analytics.handler.js.map +1 -1
  35. package/src/features/cart/cart.handler.d.ts +2 -2
  36. package/src/features/cart/cart.handler.js +1 -1
  37. package/src/features/cart/cart.handler.js.map +1 -1
  38. package/src/features/cart/cart.route.d.ts +29 -0
  39. package/src/features/cart/cart.route.js +1 -1
  40. package/src/features/cart/cart.route.js.map +1 -1
  41. package/src/features/cart/cart.schema.d.ts +399 -0
  42. package/src/features/cart/cart.schema.js +1 -1
  43. package/src/features/cart/cart.schema.js.map +1 -1
  44. package/src/features/cart/cart.service.d.ts +30 -3
  45. package/src/features/cart/cart.service.js +1 -1
  46. package/src/features/cart/cart.service.js.map +1 -1
  47. package/src/features/file/file.handler.d.ts +2 -2
  48. package/src/features/file/file.handler.js +1 -1
  49. package/src/features/file/file.handler.js.map +1 -1
  50. package/src/features/health/health.handler.d.ts +1 -1
  51. package/src/features/health/health.handler.js +1 -1
  52. package/src/features/health/health.handler.js.map +1 -1
  53. package/src/features/index.d.ts +17 -17
  54. package/src/features/index.js +1 -1
  55. package/src/features/index.js.map +1 -1
  56. package/src/features/integration/integration-config.d.ts +25 -0
  57. package/src/features/integration/integration-config.js +1 -0
  58. package/src/features/integration/integration-config.js.map +1 -0
  59. package/src/features/integration/integration-registry.d.ts +39 -0
  60. package/src/features/integration/integration-registry.js +1 -0
  61. package/src/features/integration/integration-registry.js.map +1 -0
  62. package/src/features/integration/integration.handler.d.ts +2 -2
  63. package/src/features/integration/integration.handler.js +1 -1
  64. package/src/features/integration/integration.handler.js.map +1 -1
  65. package/src/features/integration/integration.schema.d.ts +15 -0
  66. package/src/features/integration/integration.schema.js +1 -1
  67. package/src/features/integration/integration.schema.js.map +1 -1
  68. package/src/features/integration/integration.service.d.ts +3 -4
  69. package/src/features/integration/integration.service.js +1 -1
  70. package/src/features/integration/integration.service.js.map +1 -1
  71. package/src/features/inventory/inventory.service.d.ts +24 -0
  72. package/src/features/inventory/inventory.service.js +1 -0
  73. package/src/features/inventory/inventory.service.js.map +1 -0
  74. package/src/features/location/location.handler.d.ts +2 -7
  75. package/src/features/location/location.handler.js +1 -1
  76. package/src/features/location/location.handler.js.map +1 -1
  77. package/src/features/manufacturer/manufacturer.handler.d.ts +2 -2
  78. package/src/features/manufacturer/manufacturer.handler.js +1 -1
  79. package/src/features/manufacturer/manufacturer.handler.js.map +1 -1
  80. package/src/features/order/order.handler.d.ts +2 -4
  81. package/src/features/order/order.handler.js +1 -1
  82. package/src/features/order/order.handler.js.map +1 -1
  83. package/src/features/order/order.route.d.ts +314 -0
  84. package/src/features/order/order.route.js +1 -1
  85. package/src/features/order/order.route.js.map +1 -1
  86. package/src/features/order/order.schema.d.ts +33 -0
  87. package/src/features/order/order.schema.js +1 -1
  88. package/src/features/order/order.schema.js.map +1 -1
  89. package/src/features/order/order.service.d.ts +57 -6
  90. package/src/features/order/order.service.js +1 -1
  91. package/src/features/order/order.service.js.map +1 -1
  92. package/src/features/organization/organization-configuration.schema.d.ts +18 -18
  93. package/src/features/organization/organization.handler.d.ts +2 -2
  94. package/src/features/organization/organization.handler.js +1 -1
  95. package/src/features/organization/organization.handler.js.map +1 -1
  96. package/src/features/organization/organization.route.d.ts +18 -18
  97. package/src/features/organization/organization.schema.d.ts +18 -18
  98. package/src/features/organization/organization.service.d.ts +4 -2
  99. package/src/features/organization/organization.service.js +1 -1
  100. package/src/features/organization/organization.service.js.map +1 -1
  101. package/src/features/payment/payment.handler.d.ts +2 -3
  102. package/src/features/payment/payment.handler.js +1 -1
  103. package/src/features/payment/payment.handler.js.map +1 -1
  104. package/src/features/payment/payment.service.d.ts +9 -8
  105. package/src/features/payment/payment.service.js +1 -1
  106. package/src/features/payment/payment.service.js.map +1 -1
  107. package/src/features/payment/stripe.service.d.ts +3 -2
  108. package/src/features/payment/stripe.service.js +1 -1
  109. package/src/features/payment/stripe.service.js.map +1 -1
  110. package/src/features/product/product.handler.d.ts +2 -2
  111. package/src/features/product/product.handler.js +1 -1
  112. package/src/features/product/product.handler.js.map +1 -1
  113. package/src/features/product/product.route.d.ts +10 -0
  114. package/src/features/product/product.schema.d.ts +4 -0
  115. package/src/features/product/product.schema.js +1 -1
  116. package/src/features/product/product.schema.js.map +1 -1
  117. package/src/features/product/product.service.d.ts +8 -0
  118. package/src/features/product/product.service.js +1 -1
  119. package/src/features/product/product.service.js.map +1 -1
  120. package/src/features/product-category/product-category.handler.d.ts +2 -2
  121. package/src/features/product-category/product-category.handler.js +1 -1
  122. package/src/features/product-category/product-category.handler.js.map +1 -1
  123. package/src/features/reservation/reservation.handler.d.ts +2 -2
  124. package/src/features/reservation/reservation.handler.js +1 -1
  125. package/src/features/reservation/reservation.handler.js.map +1 -1
  126. package/src/features/reservation/reservation.service.d.ts +5 -2
  127. package/src/features/reservation/reservation.service.js +1 -1
  128. package/src/features/reservation/reservation.service.js.map +1 -1
  129. package/src/features/shipping/shipping.handler.d.ts +2 -2
  130. package/src/features/shipping/shipping.handler.js +1 -1
  131. package/src/features/shipping/shipping.handler.js.map +1 -1
  132. package/src/features/shipping/shipping.service.d.ts +4 -2
  133. package/src/features/shipping/shipping.service.js +1 -1
  134. package/src/features/shipping/shipping.service.js.map +1 -1
  135. package/src/features/shipping-method/shipping-method.handler.d.ts +2 -2
  136. package/src/features/shipping-method/shipping-method.handler.js +1 -1
  137. package/src/features/shipping-method/shipping-method.handler.js.map +1 -1
  138. package/src/features/webhook/webhook.handler.d.ts +2 -4
  139. package/src/features/webhook/webhook.handler.js +1 -1
  140. package/src/features/webhook/webhook.handler.js.map +1 -1
  141. package/src/index.d.ts +1 -2
  142. package/src/index.js +1 -1
  143. package/src/index.js.map +1 -1
  144. package/src/integrations/next.d.ts +2 -4
  145. package/src/integrations/next.js +1 -1
  146. package/src/integrations/next.js.map +1 -1
  147. package/src/schemas/number.schema.d.ts +1 -0
  148. package/src/schemas/number.schema.js +1 -1
  149. package/src/schemas/number.schema.js.map +1 -1
  150. package/src/app.js +0 -1
  151. package/src/app.js.map +0 -1
  152. package/src/core/notifications/notification-options.d.ts +0 -3
  153. package/src/core/notifications/notification-options.js +0 -1
  154. package/src/core/notifications/notification-options.js.map +0 -1
package/README.md CHANGED
@@ -58,14 +58,14 @@ const handler = createNextHandler({
58
58
  },
59
59
  },
60
60
  },
61
- notifications: {
62
- resendApiKey: process.env.RESEND_API_KEY!,
63
- },
64
61
  });
65
62
 
66
63
  export { handler as GET, handler as POST, handler as PUT, handler as PATCH, handler as DELETE, handler as OPTIONS };
67
64
  ```
68
65
 
66
+ You can configure Resend per organization from the admin UI under
67
+ `Settings -> Integrations -> Resend`.
68
+
69
69
  ## Database Schema Sync
70
70
 
71
71
  The published package ships the Prisma schema and a CLI so a consuming app can
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shophost/rest-api",
3
- "version": "2.0.50",
3
+ "version": "2.0.52",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "shophost-rest-api": "./scripts/shophost-rest-api.mjs"
package/schema.prisma CHANGED
@@ -500,6 +500,7 @@ model Product {
500
500
  content String?
501
501
  slug String?
502
502
  sku String?
503
+ availableQuantity Int?
503
504
  basePrice Float
504
505
  discountedBasePrice Float?
505
506
  currency String
@@ -623,6 +624,9 @@ model Order {
623
624
  dispatchedAt DateTime?
624
625
  completedAt DateTime?
625
626
  cancelledAt DateTime?
627
+ inventoryDeductedAt DateTime?
628
+ inventoryConflictAt DateTime?
629
+ inventoryConflictItems Json?
626
630
  deletedAt DateTime?
627
631
  deletedBy String?
628
632
  createdAt DateTime @default(now())
@@ -1,18 +1,16 @@
1
1
  import { cors } from "hono/cors";
2
- import { NotificationOptions } from "./core/notifications/notification-options";
3
2
  import { type AuthContext } from "./core/hono/hono";
4
3
  import type { PrismaClientType } from "./core/lib/prisma";
5
4
  import { PaymentServiceOptions } from "./features/payment/payment.service";
6
- export interface BuildApiAppOptions {
5
+ export interface BootstrapOptions {
7
6
  corsOptions?: Parameters<typeof cors>[0];
8
7
  maps?: {
9
8
  google?: {
10
9
  key: string;
11
10
  };
12
11
  };
13
- notifications?: NotificationOptions;
14
12
  payment?: PaymentServiceOptions;
15
13
  prisma?: PrismaClientType | any;
16
14
  resolveAuth?: (request: Request, path: string) => AuthContext;
17
15
  }
18
- export declare const buildApiApp: ({ corsOptions, maps, notifications, payment, prisma, resolveAuth, }?: BuildApiAppOptions) => import("@hono/zod-openapi").OpenAPIHono<import("./core/hono/hono").AppBindings, {}, "/">;
16
+ export declare const bootstrap: ({ corsOptions, maps, payment, prisma, resolveAuth, }?: BootstrapOptions) => import("@hono/zod-openapi").OpenAPIHono<import("./core/hono/hono").AppBindings, {}, "/">;
@@ -0,0 +1 @@
1
+ import{__awaiter as l}from"tslib";import{cors as g}from"hono/cors";import{createContainer as c}from"./container";import{createApiRouter as p,createUnavailableAuth as H,handleAppError as h}from"./core/hono/hono";import{registerAccessHandlers as m,registerAnalyticsHandlers as f,registerCartHandlers as O,registerFileHandlers as y,registerHealthHandlers as C,registerIntegrationHandlers as v,registerLocationHandlers as A,registerManufacturerHandlers as T,registerOrderHandlers as P,registerOrganizationHandlers as b,registerPaymentHandlers as E,registerProductCategoryHandlers as w,registerProductHandlers as R,registerReservationHandlers as S,registerShippingHandlers as q,registerShippingMethodHandlers as M,registerWebhookHandlers as j}from"./features";const z={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:s,payment:i,prisma:n,resolveAuth:u=()=>H()}={})=>{const e=p(),r=c({maps:s,payment:i,prisma:n});return e.use("*",g(Object.assign(Object.assign({},z),a))),e.use("*",(t,d)=>l(void 0,void 0,void 0,function*(){const o=u(t.req.raw,t.req.path);t.set("auth",o),Object.assign(t.req.raw,{auth:o}),yield d()})),e.onError(t=>h(t)),e.route("/",C()),e.route("/",f(r.analytics)),e.route("/",T(r.manufacturer)),e.route("/",v(r.integration)),e.route("/",b(r.organization)),e.route("/",y(r.file)),e.route("/",w(r.productCategory)),e.route("/",R(r.product)),e.route("/",m(r.access)),e.route("/",M(r.shippingMethod)),e.route("/",P(r.order)),e.route("/",O(r.cart)),e.route("/",q(r.shipping)),e.route("/",A(r.location)),e.route("/",E(r.payment)),e.route("/",j(r.payment)),e.route("/",S(r.reservation)),e};
@@ -0,0 +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,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,wBAAwB,EACxB,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,+BAA+B,EAC/B,uBAAuB,EACvB,2BAA2B,EAC3B,wBAAwB,EACxB,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAGpB,MAAM,kBAAkB,GAAG;IACzB,YAAY,EAAE;QACZ,cAAc;QACd,eAAe;QACf,kBAAkB;QAClB,QAAQ;QACR,QAAQ;QACR,cAAc;KACf;IACD,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC;IAClE,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,CAAC,gBAAgB,EAAE,iBAAiB,CAAC;IACpD,MAAM,EAAE,CAAC,uBAAuB,CAAC;CAClC,CAAC;AAcF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,WAAW,EACX,IAAI,EACJ,OAAO,EACP,MAAM,EACN,WAAW,GAAG,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}
@@ -0,0 +1,49 @@
1
+ import type { PrismaClientType } from "./core/lib/prisma";
2
+ import { AccessService } from "./features/access/access.service";
3
+ import { AnalyticsService } from "./features/analytics/analytics.service";
4
+ import { CartService } from "./features/cart/cart.service";
5
+ import { FileService } from "./features/file/file.service";
6
+ import { InventoryService } from "./features/inventory/inventory.service";
7
+ import { IntegrationRegistry } from "./features/integration/integration-registry";
8
+ import { IntegrationService } from "./features/integration/integration.service";
9
+ import { LocationService } from "./features/location/location.service";
10
+ import { ManufacturerService } from "./features/manufacturer/manufacturer.service";
11
+ import { OrderService } from "./features/order/order.service";
12
+ import { OrganizationService } from "./features/organization/organization.service";
13
+ import { PaymentService, type PaymentServiceOptions } from "./features/payment/payment.service";
14
+ import { ProductCategoryService } from "./features/product-category/product-category.service";
15
+ import { ProductService } from "./features/product/product.service";
16
+ import { ReservationService } from "./features/reservation/reservation.service";
17
+ import { ShippingMethodService } from "./features/shipping-method/shipping-method.service";
18
+ import { ShippingService } from "./features/shipping/shipping.service";
19
+ interface ContainerOptions {
20
+ maps?: {
21
+ google?: {
22
+ key: string;
23
+ };
24
+ };
25
+ payment?: PaymentServiceOptions;
26
+ prisma?: PrismaClientType | any;
27
+ }
28
+ interface Container {
29
+ access: AccessService;
30
+ analytics: AnalyticsService;
31
+ cart: CartService;
32
+ file: FileService;
33
+ inventory: InventoryService;
34
+ integration: IntegrationService;
35
+ integrationRegistry: IntegrationRegistry;
36
+ location: LocationService | null;
37
+ manufacturer: ManufacturerService;
38
+ order: OrderService;
39
+ organization: OrganizationService;
40
+ payment: PaymentService;
41
+ product: ProductService;
42
+ productCategory: ProductCategoryService;
43
+ reservation: ReservationService;
44
+ shipping: ShippingService;
45
+ shippingMethod: ShippingMethodService;
46
+ }
47
+ declare const createContainer: ({ maps, payment, prisma, }?: ContainerOptions) => Container;
48
+ export { createContainer };
49
+ export type { Container, ContainerOptions };
@@ -0,0 +1 @@
1
+ import{AccessService as f}from"./features/access/access.service";import{AnalyticsService as g}from"./features/analytics/analytics.service";import{CartService as m}from"./features/cart/cart.service";import{FileService as w}from"./features/file/file.service";import{InventoryService as l}from"./features/inventory/inventory.service";import{IntegrationRegistry as d}from"./features/integration/integration-registry";import{IntegrationService as u}from"./features/integration/integration.service";import{LocationService as a}from"./features/location/location.service";import{ManufacturerService as y}from"./features/manufacturer/manufacturer.service";import{OrderService as p}from"./features/order/order.service";import{OrganizationService as h}from"./features/organization/organization.service";import{PaymentService as C}from"./features/payment/payment.service";import{ProductCategoryService as I}from"./features/product-category/product-category.service";import{ProductService as M}from"./features/product/product.service";import{ReservationService as P}from"./features/reservation/reservation.service";import{ShippingMethodService as R}from"./features/shipping-method/shipping-method.service";import{ShippingService as k}from"./features/shipping/shipping.service";const z=({maps:o,payment:t,prisma:e}={})=>{var n;const i=!((n=o?.google)===null||n===void 0)&&n.key?new a(o.google.key):null,c=new l(e),r=new d(e),v=new C(e,t??{},r,c),S=new m(e,c);return{access:new f(e),analytics:new g(e),cart:S,file:new w(e),inventory:c,integration:new u(e,r),integrationRegistry:r,location:i,manufacturer:new y(e),order:new p(e,v,S),organization:new h(e,i),payment:v,product:new M(e),productCategory:new I(e),reservation:new P(e,r),shipping:new k(e,i),shippingMethod:new R(e)}};export{z as createContainer};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.js","sourceRoot":"","sources":["../../../../packages/rest-api/src/container.ts"],"names":[],"mappings":"AACA,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,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AA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