@shophost/rest-api 2.0.51 → 2.0.53

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 (60) hide show
  1. package/package.json +1 -1
  2. package/schema.prisma +4 -0
  3. package/src/bootstrap.js +1 -1
  4. package/src/bootstrap.js.map +1 -1
  5. package/src/{app-services.d.ts → container.d.ts} +7 -5
  6. package/src/container.js +1 -0
  7. package/src/container.js.map +1 -0
  8. package/src/core/db/__generated__/client/internal/class.js +33 -29
  9. package/src/core/db/__generated__/client/internal/class.js.map +1 -1
  10. package/src/core/db/__generated__/client/internal/prismaNamespace.d.ts +4 -0
  11. package/src/core/db/__generated__/client/internal/prismaNamespace.js +1 -1
  12. package/src/core/db/__generated__/client/internal/prismaNamespace.js.map +1 -1
  13. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.d.ts +4 -0
  14. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js +1 -1
  15. package/src/core/db/__generated__/client/internal/prismaNamespaceBrowser.js.map +1 -1
  16. package/src/core/db/__generated__/client/models/Order.d.ts +178 -1
  17. package/src/core/db/__generated__/client/models/Product.d.ts +75 -1
  18. package/src/core/utils/zod.util.js +1 -1
  19. package/src/core/utils/zod.util.js.map +1 -1
  20. package/src/features/cart/cart.route.d.ts +29 -0
  21. package/src/features/cart/cart.route.js +1 -1
  22. package/src/features/cart/cart.route.js.map +1 -1
  23. package/src/features/cart/cart.schema.d.ts +399 -0
  24. package/src/features/cart/cart.schema.js +1 -1
  25. package/src/features/cart/cart.schema.js.map +1 -1
  26. package/src/features/cart/cart.service.d.ts +30 -3
  27. package/src/features/cart/cart.service.js +1 -1
  28. package/src/features/cart/cart.service.js.map +1 -1
  29. package/src/features/inventory/inventory.service.d.ts +24 -0
  30. package/src/features/inventory/inventory.service.js +1 -0
  31. package/src/features/inventory/inventory.service.js.map +1 -0
  32. package/src/features/order/order.handler.js +1 -1
  33. package/src/features/order/order.handler.js.map +1 -1
  34. package/src/features/order/order.route.d.ts +314 -0
  35. package/src/features/order/order.route.js +1 -1
  36. package/src/features/order/order.route.js.map +1 -1
  37. package/src/features/order/order.schema.d.ts +33 -0
  38. package/src/features/order/order.schema.js +1 -1
  39. package/src/features/order/order.schema.js.map +1 -1
  40. package/src/features/order/order.service.d.ts +55 -1
  41. package/src/features/order/order.service.js +1 -1
  42. package/src/features/order/order.service.js.map +1 -1
  43. package/src/features/payment/payment.service.d.ts +4 -1
  44. package/src/features/payment/payment.service.js +1 -1
  45. package/src/features/payment/payment.service.js.map +1 -1
  46. package/src/features/payment/stripe.service.d.ts +2 -2
  47. package/src/features/payment/stripe.service.js +1 -1
  48. package/src/features/payment/stripe.service.js.map +1 -1
  49. package/src/features/product/product.route.d.ts +10 -0
  50. package/src/features/product/product.schema.d.ts +4 -0
  51. package/src/features/product/product.schema.js +1 -1
  52. package/src/features/product/product.schema.js.map +1 -1
  53. package/src/features/product/product.service.d.ts +8 -0
  54. package/src/features/product/product.service.js +1 -1
  55. package/src/features/product/product.service.js.map +1 -1
  56. package/src/schemas/number.schema.d.ts +1 -0
  57. package/src/schemas/number.schema.js +1 -1
  58. package/src/schemas/number.schema.js.map +1 -1
  59. package/src/app-services.js +0 -1
  60. package/src/app-services.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shophost/rest-api",
3
- "version": "2.0.51",
3
+ "version": "2.0.53",
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())
package/src/bootstrap.js CHANGED
@@ -1 +1 @@
1
- import{__awaiter as l}from"tslib";import{cors as g}from"hono/cors";import{createAppServices as p}from"./app-services";import{createApiRouter as c,createUnavailableAuth as H,handleAppError as h}from"./core/hono/hono";import{registerAccessHandlers as m,registerAnalyticsHandlers as f,registerCartHandlers as O,registerFileHandlers as v,registerHealthHandlers as y,registerIntegrationHandlers as A,registerLocationHandlers as C,registerManufacturerHandlers as T,registerOrderHandlers as P,registerOrganizationHandlers as b,registerPaymentHandlers as E,registerProductCategoryHandlers as S,registerProductHandlers as w,registerReservationHandlers as R,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:s,maps:a,payment:i,prisma:n,resolveAuth:u=()=>H()}={})=>{const e=c(),r=p({maps:a,payment:i,prisma:n});return e.use("*",g(Object.assign(Object.assign({},z),s))),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("/",y()),e.route("/",f(r.analytics)),e.route("/",T(r.manufacturer)),e.route("/",A(r.integration)),e.route("/",b(r.organization)),e.route("/",v(r.file)),e.route("/",S(r.productCategory)),e.route("/",w(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("/",C(r.location)),e.route("/",E(r.payment)),e.route("/",j(r.payment)),e.route("/",R(r.reservation)),e};
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};
@@ -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,iBAAiB,EAAE,MAAM,gBAAgB,CA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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,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,uBAAuB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,2BAA2B,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC;IAElE,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -3,6 +3,7 @@ import { AccessService } from "./features/access/access.service";
3
3
  import { AnalyticsService } from "./features/analytics/analytics.service";
4
4
  import { CartService } from "./features/cart/cart.service";
5
5
  import { FileService } from "./features/file/file.service";
6
+ import { InventoryService } from "./features/inventory/inventory.service";
6
7
  import { IntegrationRegistry } from "./features/integration/integration-registry";
7
8
  import { IntegrationService } from "./features/integration/integration.service";
8
9
  import { LocationService } from "./features/location/location.service";
@@ -15,7 +16,7 @@ import { ProductService } from "./features/product/product.service";
15
16
  import { ReservationService } from "./features/reservation/reservation.service";
16
17
  import { ShippingMethodService } from "./features/shipping-method/shipping-method.service";
17
18
  import { ShippingService } from "./features/shipping/shipping.service";
18
- interface CreateAppServicesOptions {
19
+ interface ContainerOptions {
19
20
  maps?: {
20
21
  google?: {
21
22
  key: string;
@@ -24,11 +25,12 @@ interface CreateAppServicesOptions {
24
25
  payment?: PaymentServiceOptions;
25
26
  prisma?: PrismaClientType | any;
26
27
  }
27
- interface AppServices {
28
+ interface Container {
28
29
  access: AccessService;
29
30
  analytics: AnalyticsService;
30
31
  cart: CartService;
31
32
  file: FileService;
33
+ inventory: InventoryService;
32
34
  integration: IntegrationService;
33
35
  integrationRegistry: IntegrationRegistry;
34
36
  location: LocationService | null;
@@ -42,6 +44,6 @@ interface AppServices {
42
44
  shipping: ShippingService;
43
45
  shippingMethod: ShippingMethodService;
44
46
  }
45
- declare const createAppServices: ({ maps, payment, prisma, }?: CreateAppServicesOptions) => AppServices;
46
- export { createAppServices };
47
- export type { AppServices, CreateAppServicesOptions };
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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