@shophost/rest-api 2.0.61 → 2.0.63

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 (70) hide show
  1. package/package.json +1 -1
  2. package/src/bootstrap.js +1 -1
  3. package/src/bootstrap.js.map +1 -1
  4. package/src/container.d.ts +4 -0
  5. package/src/container.js +1 -1
  6. package/src/container.js.map +1 -1
  7. package/src/core/lib/prisma.d.ts +24 -24
  8. package/src/core/notifications/email.service.d.ts +12 -14
  9. package/src/core/notifications/email.service.js +1 -1
  10. package/src/core/notifications/email.service.js.map +1 -1
  11. package/src/features/access/access.route.d.ts +6 -6
  12. package/src/features/cart/cart.route.d.ts +15 -15
  13. package/src/features/cart/cart.schema.d.ts +27 -27
  14. package/src/features/cart/cart.service.d.ts +4 -4
  15. package/src/features/customer/customer.route.d.ts +9 -9
  16. package/src/features/customer/customer.schema.d.ts +9 -9
  17. package/src/features/customer/customer.service.d.ts +1 -1
  18. package/src/features/integration/integration-registry.d.ts +10 -10
  19. package/src/features/integration/integration-registry.js +1 -1
  20. package/src/features/integration/integration-registry.js.map +1 -1
  21. package/src/features/integration/integration.service.d.ts +5 -1
  22. package/src/features/integration/integration.service.js +1 -1
  23. package/src/features/integration/integration.service.js.map +1 -1
  24. package/src/features/manufacturer/manufacturer.route.d.ts +14 -14
  25. package/src/features/manufacturer/manufacturer.schema.d.ts +1 -1
  26. package/src/features/manufacturer/manufacturer.service.d.ts +2 -2
  27. package/src/features/order/order-fulfillment.service.d.ts +12 -0
  28. package/src/features/order/order-fulfillment.service.js +1 -0
  29. package/src/features/order/order-fulfillment.service.js.map +1 -0
  30. package/src/features/order/order.route.d.ts +61 -61
  31. package/src/features/order/order.schema.d.ts +14 -14
  32. package/src/features/order/order.service.d.ts +9 -6
  33. package/src/features/order/order.service.js +1 -1
  34. package/src/features/order/order.service.js.map +1 -1
  35. package/src/features/order/recipient.schema.d.ts +2 -2
  36. package/src/features/organization/organization-configuration.schema.d.ts +25 -25
  37. package/src/features/organization/organization.route.d.ts +67 -67
  38. package/src/features/organization/organization.schema.d.ts +25 -25
  39. package/src/features/organization/organization.service.d.ts +8 -8
  40. package/src/features/payment/payment-webhook.service.d.ts +14 -0
  41. package/src/features/payment/payment-webhook.service.js +1 -0
  42. package/src/features/payment/payment-webhook.service.js.map +1 -0
  43. package/src/features/payment/payment.service.d.ts +3 -12
  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 +22 -32
  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-modifier.schema.d.ts +30 -30
  50. package/src/features/product/product.route.d.ts +182 -182
  51. package/src/features/product/product.schema.d.ts +65 -65
  52. package/src/features/product/product.service.d.ts +26 -26
  53. package/src/features/product-category/product-category.route.d.ts +14 -14
  54. package/src/features/product-category/product-category.schema.d.ts +1 -1
  55. package/src/features/product-category/product-category.service.d.ts +2 -2
  56. package/src/features/reservation/reservation.route.d.ts +12 -12
  57. package/src/features/reservation/reservation.schema.d.ts +6 -6
  58. package/src/features/reservation/reservation.service.d.ts +3 -5
  59. package/src/features/reservation/reservation.service.js +1 -1
  60. package/src/features/reservation/reservation.service.js.map +1 -1
  61. package/src/features/shipping-method/shipping-method.route.d.ts +6 -6
  62. package/src/features/webhook/webhook.handler.d.ts +2 -2
  63. package/src/features/webhook/webhook.handler.js +1 -1
  64. package/src/features/webhook/webhook.handler.js.map +1 -1
  65. package/src/features/webhook/webhook.route.d.ts +2 -2
  66. package/src/features/webhook/webhook.route.js +1 -1
  67. package/src/features/webhook/webhook.route.js.map +1 -1
  68. package/src/schemas/locales.schema.d.ts +6 -6
  69. package/src/schemas/pagination.schema.d.ts +6 -6
  70. package/src/schemas/queries.schema.d.ts +6 -6
@@ -21,7 +21,13 @@ export declare const manufacturerRoute: {
21
21
  search: z.ZodOptional<z.ZodString>;
22
22
  published: z.ZodOptional<z.ZodCoercedBoolean<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 manufacturerRoute: {
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 manufacturerRoute: {
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 manufacturerRoute: {
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 manufacturerRoute: {
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";
@@ -158,9 +158,9 @@ export declare const manufacturerRoute: {
158
158
  about: z.ZodOptional<z.ZodNullable<z.ZodString>>;
159
159
  }, z.core.$strip>>>;
160
160
  }, z.core.$strip>, z.ZodObject<{
161
- id: z.ZodString;
162
161
  createdAt: z.ZodDate;
163
162
  name: z.ZodString;
163
+ id: z.ZodString;
164
164
  logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
165
165
  id: z.ZodString;
166
166
  url: z.ZodString;
@@ -332,7 +332,13 @@ export declare const manufacturerRoute: {
332
332
  } & {
333
333
  query: z.ZodObject<{
334
334
  locale: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
335
+ hr: "hr";
336
+ th: "th";
337
+ tr: "tr";
335
338
  id: "id";
339
+ is: "is";
340
+ mt: "mt";
341
+ ml: "ml";
336
342
  af: "af";
337
343
  sq: "sq";
338
344
  ar_dz: "ar_dz";
@@ -359,7 +365,6 @@ export declare const manufacturerRoute: {
359
365
  zh_cn: "zh_cn";
360
366
  zh_sg: "zh_sg";
361
367
  zh_tw: "zh_tw";
362
- hr: "hr";
363
368
  cs: "cs";
364
369
  da: "da";
365
370
  nl_be: "nl_be";
@@ -394,7 +399,6 @@ export declare const manufacturerRoute: {
394
399
  he: "he";
395
400
  hi: "hi";
396
401
  hu: "hu";
397
- is: "is";
398
402
  ga: "ga";
399
403
  it: "it";
400
404
  it_ch: "it_ch";
@@ -404,9 +408,7 @@ export declare const manufacturerRoute: {
404
408
  lv: "lv";
405
409
  lt: "lt";
406
410
  mk: "mk";
407
- ml: "ml";
408
411
  ms: "ms";
409
- mt: "mt";
410
412
  no: "no";
411
413
  nb: "nb";
412
414
  nn: "nn";
@@ -437,8 +439,6 @@ export declare const manufacturerRoute: {
437
439
  es: "es";
438
440
  sv: "sv";
439
441
  sv_fi: "sv_fi";
440
- th: "th";
441
- tr: "tr";
442
442
  uk: "uk";
443
443
  ur: "ur";
444
444
  vi: "vi";
@@ -468,9 +468,9 @@ export declare const manufacturerRoute: {
468
468
  about: z.ZodOptional<z.ZodNullable<z.ZodString>>;
469
469
  }, z.core.$strip>>>;
470
470
  }, z.core.$strip>, z.ZodObject<{
471
- id: z.ZodString;
472
471
  createdAt: z.ZodDate;
473
472
  name: z.ZodString;
473
+ id: z.ZodString;
474
474
  logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
475
475
  id: z.ZodString;
476
476
  url: z.ZodString;
@@ -16,9 +16,9 @@ export declare const ManufacturerSchema: z.ZodObject<{
16
16
  }, z.core.$strip>>>;
17
17
  }, z.core.$strip>;
18
18
  export declare const LocalizedManufacturerSchema: z.ZodObject<{
19
- id: z.ZodString;
20
19
  createdAt: z.ZodDate;
21
20
  name: z.ZodString;
21
+ id: z.ZodString;
22
22
  logo: z.ZodOptional<z.ZodNullable<z.ZodObject<{
23
23
  id: z.ZodString;
24
24
  url: z.ZodString;
@@ -49,9 +49,9 @@ declare class ManufacturerService {
49
49
  about?: string | null | undefined;
50
50
  }[] | undefined;
51
51
  } | {
52
- id: string;
53
52
  createdAt: Date;
54
53
  name: string;
54
+ id: string;
55
55
  about: string | null;
56
56
  logo?: {
57
57
  id: string;
@@ -106,9 +106,9 @@ declare class ManufacturerService {
106
106
  totalCount: number;
107
107
  };
108
108
  list: {
109
- id: string;
110
109
  createdAt: Date;
111
110
  name: string;
111
+ id: string;
112
112
  about: string | null;
113
113
  logo?: {
114
114
  id: string;
@@ -0,0 +1,12 @@
1
+ import { InventoryService } from "../inventory/inventory.service";
2
+ import { OrderService } from "./order.service";
3
+ declare class OrderFulfillmentService {
4
+ private readonly inventoryService;
5
+ private readonly orderService;
6
+ constructor(inventoryService: InventoryService, orderService: Pick<OrderService, "sendOrderNotifications">);
7
+ fulfillPaidOrder(orderId: string, userId?: string | null): Promise<{
8
+ conflictItems?: import("./order.schema").InventoryConflictItem[];
9
+ status: "already_processed" | "conflict" | "deducted";
10
+ }>;
11
+ }
12
+ export { OrderFulfillmentService };
@@ -0,0 +1 @@
1
+ import{__awaiter as t}from"tslib";class n{constructor(r,e){this.inventoryService=r,this.orderService=e}fulfillPaidOrder(r,e){return t(this,void 0,void 0,function*(){const i=yield this.inventoryService.processPaidOrderInventory(r);return i.status==="conflict"||(yield this.orderService.sendOrderNotifications(r,e)),i})}}export{n as OrderFulfillmentService};
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-fulfillment.service.js","sourceRoot":"","sources":["../../../../../../packages/rest-api/src/features/order/order-fulfillment.service.ts"],"names":[],"mappings":";AAGA,MAAM,uBAAuB;IAC3B,YACmB,gBAAkC,EAClC,YAA0D;QAD1D,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,iBAAY,GAAZ,YAAY,CAA8C;IAC1E,CAAC;IAES,gBAAgB,CAAC,OAAe,EAAE,MAAsB;;YACnE,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,yBAAyB,CAC3E,OAAO,CACR,CAAC;YAEF,IAAI,eAAe,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;gBAC1C,OAAO,eAAe,CAAC;YACzB,CAAC;YAED,MAAM,IAAI,CAAC,YAAY,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAEhE,OAAO,eAAe,CAAC;QACzB,CAAC;KAAA;CACF;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC"}