@shophost/rest-api 2.0.58 → 2.0.59

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shophost/rest-api",
3
- "version": "2.0.58",
3
+ "version": "2.0.59",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "shophost-rest-api": "./scripts/shophost-rest-api.mjs"
package/src/bootstrap.js CHANGED
@@ -1 +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};
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 C,registerCustomerHandlers as O,registerFileHandlers as y,registerHealthHandlers as v,registerIntegrationHandlers as A,registerLocationHandlers as T,registerManufacturerHandlers as P,registerOrderHandlers as b,registerOrganizationHandlers as E,registerPaymentHandlers as w,registerProductCategoryHandlers as R,registerProductHandlers as S,registerReservationHandlers as q,registerShippingHandlers as M,registerShippingMethodHandlers as j,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:s,maps:a,payment:i,prisma:n,resolveAuth:u=()=>H()}={})=>{const e=p(),r=c({maps:a,payment:i,prisma:n});return e.use("*",g(Object.assign(Object.assign({},L),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("/",v()),e.route("/",f(r.analytics)),e.route("/",P(r.manufacturer)),e.route("/",A(r.integration)),e.route("/",E(r.organization)),e.route("/",y(r.file)),e.route("/",R(r.productCategory)),e.route("/",S(r.product)),e.route("/",m(r.access)),e.route("/",j(r.shippingMethod)),e.route("/",b(r.order)),e.route("/",C(r.cart)),e.route("/",O(r.customer)),e.route("/",M(r.shipping)),e.route("/",T(r.location)),e.route("/",w(r.payment)),e.route("/",z(r.payment)),e.route("/",q(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,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,GAAG,EAAE,CAAC,qBAAqB,EAAE,MACvB,EAAE,EAAE,EAAE;IAC1B,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAG,eAAe,CAAC;QAC/B,IAAI;QACJ,OAAO;QACP,MAAM;KACP,CAAC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,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,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"}
@@ -2,10 +2,11 @@ import type { PrismaClientType } from "./core/lib/prisma";
2
2
  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
+ import { CustomerService } from "./features/customer/customer.service";
5
6
  import { FileService } from "./features/file/file.service";
6
- import { InventoryService } from "./features/inventory/inventory.service";
7
7
  import { IntegrationRegistry } from "./features/integration/integration-registry";
8
8
  import { IntegrationService } from "./features/integration/integration.service";
9
+ import { InventoryService } from "./features/inventory/inventory.service";
9
10
  import { LocationService } from "./features/location/location.service";
10
11
  import { ManufacturerService } from "./features/manufacturer/manufacturer.service";
11
12
  import { OrderService } from "./features/order/order.service";
@@ -29,6 +30,7 @@ interface Container {
29
30
  access: AccessService;
30
31
  analytics: AnalyticsService;
31
32
  cart: CartService;
33
+ customer: CustomerService;
32
34
  file: FileService;
33
35
  inventory: InventoryService;
34
36
  integration: IntegrationService;
package/src/container.js CHANGED
@@ -1 +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};
1
+ import{AccessService as f}from"./features/access/access.service";import{AnalyticsService as m}from"./features/analytics/analytics.service";import{CartService as g}from"./features/cart/cart.service";import{CustomerService as w}from"./features/customer/customer.service";import{FileService as l}from"./features/file/file.service";import{IntegrationRegistry as u}from"./features/integration/integration-registry";import{IntegrationService as d}from"./features/integration/integration.service";import{InventoryService as y}from"./features/inventory/inventory.service";import{LocationService as a}from"./features/location/location.service";import{ManufacturerService as p}from"./features/manufacturer/manufacturer.service";import{OrderService as h}from"./features/order/order.service";import{OrganizationService as C}from"./features/organization/organization.service";import{PaymentService as I}from"./features/payment/payment.service";import{ProductCategoryService as M}from"./features/product-category/product-category.service";import{ProductService as P}from"./features/product/product.service";import{ReservationService as R}from"./features/reservation/reservation.service";import{ShippingMethodService as k}from"./features/shipping-method/shipping-method.service";import{ShippingService as z}from"./features/shipping/shipping.service";const A=({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 y(e),r=new u(e),v=new I(e,t??{},r,c),S=new g(e,c);return{access:new f(e),analytics:new m(e),cart:S,customer:new w(e),file:new l(e),inventory:c,integration:new d(e,r),integrationRegistry:r,location:i,manufacturer:new p(e),order:new h(e,v,S),organization:new C(e,i),payment:v,product:new P(e),productCategory:new M(e),reservation:new R(e,r),shipping:new z(e,i),shippingMethod:new k(e)}};export{A as createContainer};
@@ -1 +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;AAChF,OAAO,EAAE,e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jC,SAAS,EAAE,IAAI,gBAAgB,CAAC,MAAM,CAAC;QACvC,IAAI,EAAE,WAAW;QACjB,QAAQ,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;QACrC,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC;QAC7B,SAAS,EAAE,gBAAgB;QAC3B,WAAW,EAAE,IAAI,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,CAAC;QAChE,mBAAmB;QACnB,QAAQ;QACR,YAAY,EAAE,IAAI,mBAAmB,CAAC,MAAM,CAAC;QAC7C,KAAK,EAAE,IAAI,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,WAAW,CAAC;QAC5D,YAAY,EAAE,IAAI,mBAAmB,CAAC,MAAM,EAAE,QAAQ,CAAC;QACvD,OAAO,EAAE,cAAc;QACvB,OAAO,EAAE,IAAI,cAAc,CAAC,MAAM,CAAC;QACnC,eAAe,EAAE,IAAI,sBAAsB,CAAC,MAAM,CAAC;QACnD,WAAW,EAAE,IAAI,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,CAAC;QAChE,QAAQ,EAAE,IAAI,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC;QAC/C,cAAc,EAAE,IAAI,qBAAqB,CAAC,MAAM,CAAC;KAClD,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { CustomerService } from "./customer.service";
2
+ export declare const registerCustomerHandlers: (service: CustomerService) => import("@hono/zod-openapi").OpenAPIHono<import("../../core/hono/hono").AppBindings, {}, "/">;
@@ -0,0 +1 @@
1
+ import{__awaiter as n}from"tslib";import{createApiRouter as u}from"../../core/hono/hono";import{customerRoute as s}from"./customer.route";export const registerCustomerHandlers=i=>{const r=u();return r.openapi(s.getCustomers,t=>n(void 0,void 0,void 0,function*(){const e=t.get("auth"),o=t.req.valid("param"),a=t.req.valid("query");yield e.isGranted("read");const d=yield i.getCustomers(o.organizationId,a);return t.json(d,200)})),r.openapi(s.getCustomer,t=>n(void 0,void 0,void 0,function*(){const e=t.get("auth"),o=t.req.valid("param");yield e.isGranted("read");const a=yield i.getCustomer(o.organizationId,o.id);return t.json(a,200)})),r};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customer.handler.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/customer/customer.handler.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,OAAwB,EAAE,EAAE;IACnE,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;IAE9B,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY,EAAE,CAAO,CAAC,EAAE,EAAE;QAClD,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACpC,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAEnC,MAAM,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE7B,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;QAE3E,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAChC,CAAC,CAAA,CAAC,CAAC;IAEH,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,WAAW,EAAE,CAAO,CAAC,EAAE,EAAE;QACjD,MAAM,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC3B,MAAM,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;Q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