@medusajs/order 0.1.3-snapshot-20240607093839 → 0.1.3-snapshot-20240703074611

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. package/dist/index.d.ts +2 -1
  2. package/dist/index.js +7 -2
  3. package/dist/index.js.map +1 -1
  4. package/dist/joiner-config.d.ts +1 -3
  5. package/dist/joiner-config.js +4 -42
  6. package/dist/joiner-config.js.map +1 -1
  7. package/dist/migrations/Migration20240604100512.d.ts +4 -0
  8. package/dist/migrations/Migration20240604100512.js +364 -0
  9. package/dist/migrations/Migration20240604100512.js.map +1 -0
  10. package/dist/models/claim-item-image.d.ts +18 -0
  11. package/dist/models/claim-item-image.js +108 -0
  12. package/dist/models/claim-item-image.js.map +1 -0
  13. package/dist/models/claim-item.d.ts +28 -0
  14. package/dist/models/claim-item.js +156 -0
  15. package/dist/models/claim-item.js.map +1 -0
  16. package/dist/models/claim.d.ts +35 -0
  17. package/dist/models/claim.js +196 -0
  18. package/dist/models/claim.js.map +1 -0
  19. package/dist/models/exchange-item.d.ts +23 -0
  20. package/dist/models/exchange-item.js +138 -0
  21. package/dist/models/exchange-item.js.map +1 -0
  22. package/dist/models/exchange.d.ts +33 -0
  23. package/dist/models/exchange.js +189 -0
  24. package/dist/models/exchange.js.map +1 -0
  25. package/dist/models/index.d.ts +7 -0
  26. package/dist/models/index.js +15 -1
  27. package/dist/models/index.js.map +1 -1
  28. package/dist/models/line-item-adjustment.d.ts +2 -1
  29. package/dist/models/line-item-adjustment.js +1 -1
  30. package/dist/models/line-item-adjustment.js.map +1 -1
  31. package/dist/models/line-item-tax-line.d.ts +2 -1
  32. package/dist/models/line-item-tax-line.js +1 -1
  33. package/dist/models/line-item-tax-line.js.map +1 -1
  34. package/dist/models/line-item.d.ts +1 -1
  35. package/dist/models/line-item.js +3 -3
  36. package/dist/models/line-item.js.map +1 -1
  37. package/dist/models/order-change-action.d.ts +13 -3
  38. package/dist/models/order-change-action.js +94 -0
  39. package/dist/models/order-change-action.js.map +1 -1
  40. package/dist/models/order-change.d.ts +14 -3
  41. package/dist/models/order-change.js +107 -3
  42. package/dist/models/order-change.js.map +1 -1
  43. package/dist/models/order-item.d.ts +3 -3
  44. package/dist/models/order-item.js +7 -7
  45. package/dist/models/order-item.js.map +1 -1
  46. package/dist/models/order-shipping-method.d.ts +12 -3
  47. package/dist/models/order-shipping-method.js +83 -7
  48. package/dist/models/order-shipping-method.js.map +1 -1
  49. package/dist/models/order-summary.d.ts +3 -2
  50. package/dist/models/order-summary.js +7 -4
  51. package/dist/models/order-summary.js.map +1 -1
  52. package/dist/models/order.d.ts +3 -3
  53. package/dist/models/order.js +1 -1
  54. package/dist/models/order.js.map +1 -1
  55. package/dist/models/return-item.d.ts +28 -0
  56. package/dist/models/return-item.js +170 -0
  57. package/dist/models/return-item.js.map +1 -0
  58. package/dist/models/return-reason.d.ts +3 -3
  59. package/dist/models/return-reason.js.map +1 -1
  60. package/dist/models/return.d.ts +38 -0
  61. package/dist/models/return.js +213 -0
  62. package/dist/models/return.js.map +1 -0
  63. package/dist/models/shipping-method-adjustment.d.ts +2 -1
  64. package/dist/models/shipping-method-adjustment.js +1 -1
  65. package/dist/models/shipping-method-adjustment.js.map +1 -1
  66. package/dist/models/shipping-method-tax-line.d.ts +2 -1
  67. package/dist/models/shipping-method-tax-line.js +1 -1
  68. package/dist/models/shipping-method-tax-line.js.map +1 -1
  69. package/dist/models/shipping-method.js +1 -1
  70. package/dist/models/shipping-method.js.map +1 -1
  71. package/dist/models/tax-line.js.map +1 -1
  72. package/dist/models/transaction.d.ts +11 -2
  73. package/dist/models/transaction.js +80 -1
  74. package/dist/models/transaction.js.map +1 -1
  75. package/dist/repositories/claim.d.ts +8 -0
  76. package/dist/repositories/claim.js +11 -0
  77. package/dist/repositories/claim.js.map +1 -0
  78. package/dist/repositories/exchange.d.ts +8 -0
  79. package/dist/repositories/exchange.js +11 -0
  80. package/dist/repositories/exchange.js.map +1 -0
  81. package/dist/repositories/index.d.ts +3 -1
  82. package/dist/repositories/index.js +7 -16
  83. package/dist/repositories/index.js.map +1 -1
  84. package/dist/repositories/order.d.ts +0 -3
  85. package/dist/repositories/order.js +2 -83
  86. package/dist/repositories/order.js.map +1 -1
  87. package/dist/repositories/return.d.ts +8 -0
  88. package/dist/repositories/return.js +11 -0
  89. package/dist/repositories/return.js.map +1 -0
  90. package/dist/services/actions/cancel-fulfillment.d.ts +2 -0
  91. package/dist/services/actions/cancel-fulfillment.js +32 -0
  92. package/dist/services/actions/cancel-fulfillment.js.map +1 -0
  93. package/dist/services/actions/create-claim.d.ts +2 -0
  94. package/dist/services/actions/create-claim.js +229 -0
  95. package/dist/services/actions/create-claim.js.map +1 -0
  96. package/dist/services/actions/create-exchange.d.ts +2 -0
  97. package/dist/services/actions/create-exchange.js +194 -0
  98. package/dist/services/actions/create-exchange.js.map +1 -0
  99. package/dist/services/actions/create-return.d.ts +2 -0
  100. package/dist/services/actions/create-return.js +98 -0
  101. package/dist/services/actions/create-return.js.map +1 -0
  102. package/dist/services/actions/index.d.ts +7 -0
  103. package/dist/services/actions/index.js +24 -0
  104. package/dist/services/actions/index.js.map +1 -0
  105. package/dist/services/actions/receive-return.d.ts +2 -0
  106. package/dist/services/actions/receive-return.js +75 -0
  107. package/dist/services/actions/receive-return.js.map +1 -0
  108. package/dist/services/actions/register-fulfillment.d.ts +2 -0
  109. package/dist/services/actions/register-fulfillment.js +30 -0
  110. package/dist/services/actions/register-fulfillment.js.map +1 -0
  111. package/dist/services/actions/register-shipment.d.ts +2 -0
  112. package/dist/services/actions/register-shipment.js +38 -0
  113. package/dist/services/actions/register-shipment.js.map +1 -0
  114. package/dist/services/order-change-service.d.ts +6 -6
  115. package/dist/services/order-change-service.js +4 -3
  116. package/dist/services/order-change-service.js.map +1 -1
  117. package/dist/services/order-module-service.d.ts +101 -64
  118. package/dist/services/order-module-service.js +458 -295
  119. package/dist/services/order-module-service.js.map +1 -1
  120. package/dist/services/order-service.d.ts +4 -4
  121. package/dist/services/order-service.js +1 -1
  122. package/dist/services/order-service.js.map +1 -1
  123. package/dist/types/index.d.ts +1 -0
  124. package/dist/types/index.js +1 -0
  125. package/dist/types/index.js.map +1 -1
  126. package/dist/types/order-change.d.ts +32 -0
  127. package/dist/types/order-change.js +34 -0
  128. package/dist/types/order-change.js.map +1 -0
  129. package/dist/types/utils/index.d.ts +25 -1
  130. package/dist/types/utils/index.js.map +1 -1
  131. package/dist/utils/actions/cancel-item-fulfillment.js +2 -0
  132. package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -1
  133. package/dist/utils/actions/cancel-return.js +2 -0
  134. package/dist/utils/actions/cancel-return.js.map +1 -1
  135. package/dist/utils/actions/fulfill-item.js +2 -0
  136. package/dist/utils/actions/fulfill-item.js.map +1 -1
  137. package/dist/utils/actions/index.d.ts +1 -0
  138. package/dist/utils/actions/index.js +1 -0
  139. package/dist/utils/actions/index.js.map +1 -1
  140. package/dist/utils/actions/item-add.js +10 -7
  141. package/dist/utils/actions/item-add.js.map +1 -1
  142. package/dist/utils/actions/item-remove.js +6 -4
  143. package/dist/utils/actions/item-remove.js.map +1 -1
  144. package/dist/utils/actions/receive-damaged-return-item.js +2 -0
  145. package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
  146. package/dist/utils/actions/receive-return-item.js +2 -0
  147. package/dist/utils/actions/receive-return-item.js.map +1 -1
  148. package/dist/utils/actions/return-item.js +2 -0
  149. package/dist/utils/actions/return-item.js.map +1 -1
  150. package/dist/utils/actions/ship-item.js +2 -0
  151. package/dist/utils/actions/ship-item.js.map +1 -1
  152. package/dist/utils/actions/shipping-add.js +6 -2
  153. package/dist/utils/actions/shipping-add.js.map +1 -1
  154. package/dist/utils/actions/write-off-item.js +2 -0
  155. package/dist/utils/actions/write-off-item.js.map +1 -1
  156. package/dist/utils/apply-order-changes.d.ts +14 -0
  157. package/dist/utils/apply-order-changes.js +74 -0
  158. package/dist/utils/apply-order-changes.js.map +1 -0
  159. package/dist/utils/base-repository-find.d.ts +2 -0
  160. package/dist/utils/base-repository-find.js +117 -0
  161. package/dist/utils/base-repository-find.js.map +1 -0
  162. package/dist/utils/calculate-order-change.js +5 -1
  163. package/dist/utils/calculate-order-change.js.map +1 -1
  164. package/dist/utils/index.d.ts +3 -0
  165. package/dist/utils/index.js +3 -0
  166. package/dist/utils/index.js.map +1 -1
  167. package/dist/utils/set-action-reference.d.ts +1 -0
  168. package/dist/utils/set-action-reference.js +11 -0
  169. package/dist/utils/set-action-reference.js.map +1 -0
  170. package/dist/utils/transform-order.d.ts +3 -2
  171. package/dist/utils/transform-order.js +84 -17
  172. package/dist/utils/transform-order.js.map +1 -1
  173. package/package.json +7 -11
  174. package/dist/module-definition.d.ts +0 -2
  175. package/dist/module-definition.js +0 -9
  176. package/dist/module-definition.js.map +0 -1
  177. package/dist/scripts/bin/run-seed.d.ts +0 -3
  178. package/dist/scripts/bin/run-seed.js +0 -49
  179. package/dist/scripts/bin/run-seed.js.map +0 -1
@@ -1,28 +1,35 @@
1
1
  import { Context, DAL, FindConfig, InternalModuleDeclaration, IOrderModuleService, ModuleJoinerConfig, ModulesSdkTypes, OrderDTO, OrderTypes, RestoreReturn, SoftDeleteReturn } from "@medusajs/types";
2
2
  import { ModulesSdkUtils } from "@medusajs/utils";
3
- import { Address, LineItem, LineItemAdjustment, LineItemTaxLine, Order, OrderChange, OrderChangeAction, OrderItem, OrderShippingMethod, OrderSummary, ReturnReason, ShippingMethod, ShippingMethodAdjustment, ShippingMethodTaxLine, Transaction } from "../models";
4
- import { CreateOrderLineItemDTO, CreateOrderShippingMethodDTO } from "../types";
3
+ import { Address, LineItem, LineItemAdjustment, LineItemTaxLine, Order, OrderChange, OrderChangeAction, OrderClaim, OrderExchange, OrderItem, OrderShippingMethod, OrderSummary, Return, ReturnItem, ReturnReason, ShippingMethod, ShippingMethodAdjustment, ShippingMethodTaxLine, Transaction } from "../models";
4
+ import { CreateOrderChangeDTO, CreateOrderLineItemDTO, CreateOrderShippingMethodDTO } from "../types";
5
5
  import OrderChangeService from "./order-change-service";
6
6
  import OrderService from "./order-service";
7
7
  type InjectedDependencies = {
8
8
  baseRepository: DAL.RepositoryService;
9
- orderService: OrderService<any>;
10
- addressService: ModulesSdkTypes.InternalModuleService<any>;
11
- lineItemService: ModulesSdkTypes.InternalModuleService<any>;
12
- shippingMethodAdjustmentService: ModulesSdkTypes.InternalModuleService<any>;
13
- shippingMethodService: ModulesSdkTypes.InternalModuleService<any>;
14
- lineItemAdjustmentService: ModulesSdkTypes.InternalModuleService<any>;
15
- lineItemTaxLineService: ModulesSdkTypes.InternalModuleService<any>;
16
- shippingMethodTaxLineService: ModulesSdkTypes.InternalModuleService<any>;
17
- transactionService: ModulesSdkTypes.InternalModuleService<any>;
18
- orderChangeService: OrderChangeService<any>;
19
- orderChangeActionService: ModulesSdkTypes.InternalModuleService<any>;
20
- orderItemService: ModulesSdkTypes.InternalModuleService<any>;
21
- orderSummaryService: ModulesSdkTypes.InternalModuleService<any>;
22
- orderShippingMethodService: ModulesSdkTypes.InternalModuleService<any>;
23
- returnReasonService: ModulesSdkTypes.InternalModuleService<any>;
9
+ orderService: OrderService;
10
+ addressService: ModulesSdkTypes.IMedusaInternalService<any>;
11
+ lineItemService: ModulesSdkTypes.IMedusaInternalService<any>;
12
+ shippingMethodAdjustmentService: ModulesSdkTypes.IMedusaInternalService<any>;
13
+ shippingMethodService: ModulesSdkTypes.IMedusaInternalService<any>;
14
+ lineItemAdjustmentService: ModulesSdkTypes.IMedusaInternalService<any>;
15
+ lineItemTaxLineService: ModulesSdkTypes.IMedusaInternalService<any>;
16
+ shippingMethodTaxLineService: ModulesSdkTypes.IMedusaInternalService<any>;
17
+ transactionService: ModulesSdkTypes.IMedusaInternalService<any>;
18
+ orderChangeService: OrderChangeService;
19
+ orderChangeActionService: ModulesSdkTypes.IMedusaInternalService<any>;
20
+ orderItemService: ModulesSdkTypes.IMedusaInternalService<any>;
21
+ orderSummaryService: ModulesSdkTypes.IMedusaInternalService<any>;
22
+ orderShippingMethodService: ModulesSdkTypes.IMedusaInternalService<any>;
23
+ returnReasonService: ModulesSdkTypes.IMedusaInternalService<any>;
24
+ returnService: ModulesSdkTypes.IMedusaInternalService<any>;
25
+ returnItemService: ModulesSdkTypes.IMedusaInternalService<any>;
26
+ orderClaimService: ModulesSdkTypes.IMedusaInternalService<any>;
27
+ orderExchangeService: ModulesSdkTypes.IMedusaInternalService<any>;
24
28
  };
25
- declare const OrderModuleService_base: new (container: InjectedDependencies) => ModulesSdkUtils.AbstractModuleService<InjectedDependencies, OrderDTO, {
29
+ declare const OrderModuleService_base: new (...args: any[]) => ModulesSdkUtils.AbstractModuleService<{
30
+ Order: {
31
+ dto: OrderTypes.OrderDTO;
32
+ };
26
33
  Address: {
27
34
  dto: OrderTypes.OrderAddressDTO;
28
35
  };
@@ -65,39 +72,64 @@ declare const OrderModuleService_base: new (container: InjectedDependencies) =>
65
72
  Transaction: {
66
73
  dto: OrderTypes.OrderTransactionDTO;
67
74
  };
75
+ Return: {
76
+ dto: any;
77
+ };
78
+ ReturnItem: {
79
+ dto: any;
80
+ };
81
+ OrderClaim: {
82
+ dto: any;
83
+ };
84
+ OrderExchange: {
85
+ dto: any;
86
+ };
68
87
  }>;
69
- export default class OrderModuleService<TOrder extends Order = Order, TAddress extends Address = Address, TLineItem extends LineItem = LineItem, TLineItemAdjustment extends LineItemAdjustment = LineItemAdjustment, TLineItemTaxLine extends LineItemTaxLine = LineItemTaxLine, TShippingMethodAdjustment extends ShippingMethodAdjustment = ShippingMethodAdjustment, TShippingMethodTaxLine extends ShippingMethodTaxLine = ShippingMethodTaxLine, TShippingMethod extends ShippingMethod = ShippingMethod, TTransaction extends Transaction = Transaction, TOrderChange extends OrderChange = OrderChange, TOrderChangeAction extends OrderChangeAction = OrderChangeAction, TOrderItem extends OrderItem = OrderItem, TOrderSummary extends OrderSummary = OrderSummary, TOrderShippingMethod extends OrderShippingMethod = OrderShippingMethod, TReturnReason extends ReturnReason = ReturnReason> extends OrderModuleService_base implements IOrderModuleService {
88
+ export default class OrderModuleService<TOrder extends Order = Order, TAddress extends Address = Address, TLineItem extends LineItem = LineItem, TLineItemAdjustment extends LineItemAdjustment = LineItemAdjustment, TLineItemTaxLine extends LineItemTaxLine = LineItemTaxLine, TShippingMethodAdjustment extends ShippingMethodAdjustment = ShippingMethodAdjustment, TShippingMethodTaxLine extends ShippingMethodTaxLine = ShippingMethodTaxLine, TShippingMethod extends ShippingMethod = ShippingMethod, TTransaction extends Transaction = Transaction, TOrderChange extends OrderChange = OrderChange, TOrderChangeAction extends OrderChangeAction = OrderChangeAction, TOrderItem extends OrderItem = OrderItem, TOrderSummary extends OrderSummary = OrderSummary, TOrderShippingMethod extends OrderShippingMethod = OrderShippingMethod, TReturnReason extends ReturnReason = ReturnReason, TReturn extends Return = Return, TReturnItem extends ReturnItem = ReturnItem, TClaim extends OrderClaim = OrderClaim, TExchange extends OrderExchange = OrderExchange> extends OrderModuleService_base implements IOrderModuleService {
70
89
  protected readonly moduleDeclaration: InternalModuleDeclaration;
71
90
  protected baseRepository_: DAL.RepositoryService;
72
- protected orderService_: OrderService<TOrder>;
73
- protected addressService_: ModulesSdkTypes.InternalModuleService<TAddress>;
74
- protected lineItemService_: ModulesSdkTypes.InternalModuleService<TLineItem>;
75
- protected shippingMethodAdjustmentService_: ModulesSdkTypes.InternalModuleService<TShippingMethodAdjustment>;
76
- protected shippingMethodService_: ModulesSdkTypes.InternalModuleService<TShippingMethod>;
77
- protected lineItemAdjustmentService_: ModulesSdkTypes.InternalModuleService<TLineItemAdjustment>;
78
- protected lineItemTaxLineService_: ModulesSdkTypes.InternalModuleService<TLineItemTaxLine>;
79
- protected shippingMethodTaxLineService_: ModulesSdkTypes.InternalModuleService<TShippingMethodTaxLine>;
80
- protected transactionService_: ModulesSdkTypes.InternalModuleService<TTransaction>;
81
- protected orderChangeService_: OrderChangeService<TOrderChange>;
82
- protected orderChangeActionService_: ModulesSdkTypes.InternalModuleService<TOrderChangeAction>;
83
- protected orderItemService_: ModulesSdkTypes.InternalModuleService<TOrderItem>;
84
- protected orderSummaryService_: ModulesSdkTypes.InternalModuleService<TOrderSummary>;
85
- protected orderShippingMethodService_: ModulesSdkTypes.InternalModuleService<TOrderShippingMethod>;
86
- protected returnReasonService_: ModulesSdkTypes.InternalModuleService<TReturnReason>;
87
- constructor({ baseRepository, orderService, addressService, lineItemService, shippingMethodAdjustmentService, shippingMethodService, lineItemAdjustmentService, shippingMethodTaxLineService, lineItemTaxLineService, transactionService, orderChangeService, orderChangeActionService, orderItemService, orderSummaryService, orderShippingMethodService, returnReasonService, }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
91
+ protected orderService_: OrderService;
92
+ protected addressService_: ModulesSdkTypes.IMedusaInternalService<TAddress>;
93
+ protected lineItemService_: ModulesSdkTypes.IMedusaInternalService<TLineItem>;
94
+ protected shippingMethodAdjustmentService_: ModulesSdkTypes.IMedusaInternalService<TShippingMethodAdjustment>;
95
+ protected shippingMethodService_: ModulesSdkTypes.IMedusaInternalService<TShippingMethod>;
96
+ protected lineItemAdjustmentService_: ModulesSdkTypes.IMedusaInternalService<TLineItemAdjustment>;
97
+ protected lineItemTaxLineService_: ModulesSdkTypes.IMedusaInternalService<TLineItemTaxLine>;
98
+ protected shippingMethodTaxLineService_: ModulesSdkTypes.IMedusaInternalService<TShippingMethodTaxLine>;
99
+ protected transactionService_: ModulesSdkTypes.IMedusaInternalService<TTransaction>;
100
+ protected orderChangeService_: OrderChangeService;
101
+ protected orderChangeActionService_: ModulesSdkTypes.IMedusaInternalService<TOrderChangeAction>;
102
+ protected orderItemService_: ModulesSdkTypes.IMedusaInternalService<TOrderItem>;
103
+ protected orderSummaryService_: ModulesSdkTypes.IMedusaInternalService<TOrderSummary>;
104
+ protected orderShippingMethodService_: ModulesSdkTypes.IMedusaInternalService<TOrderShippingMethod>;
105
+ protected returnReasonService_: ModulesSdkTypes.IMedusaInternalService<TReturnReason>;
106
+ protected returnService_: ModulesSdkTypes.IMedusaInternalService<TReturn>;
107
+ protected returnItemService_: ModulesSdkTypes.IMedusaInternalService<TReturnItem>;
108
+ protected orderClaimService_: ModulesSdkTypes.IMedusaInternalService<TClaim>;
109
+ protected orderExchangeService_: ModulesSdkTypes.IMedusaInternalService<TExchange>;
110
+ constructor({ baseRepository, orderService, addressService, lineItemService, shippingMethodAdjustmentService, shippingMethodService, lineItemAdjustmentService, shippingMethodTaxLineService, lineItemTaxLineService, transactionService, orderChangeService, orderChangeActionService, orderItemService, orderSummaryService, orderShippingMethodService, returnReasonService, returnService, returnItemService, orderClaimService, orderExchangeService, }: InjectedDependencies, moduleDeclaration: InternalModuleDeclaration);
88
111
  __joinerConfig(): ModuleJoinerConfig;
89
112
  private shouldIncludeTotals;
90
113
  private addRelationsToCalculateTotals;
91
- retrieve(id: string, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderDTO>;
92
- list(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderDTO[]>;
93
- listAndCount(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<[OrderTypes.OrderDTO[], number]>;
94
- create(data: OrderTypes.CreateOrderDTO[], sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
95
- create(data: OrderTypes.CreateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
96
- protected create_(data: OrderTypes.CreateOrderDTO[], sharedContext?: Context): Promise<Order[]>;
97
- update(data: OrderTypes.UpdateOrderDTO[]): Promise<OrderTypes.OrderDTO[]>;
98
- update(orderId: string, data: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
99
- update(selector: Partial<OrderTypes.FilterableOrderProps>, data: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
100
- protected update_(dataOrIdOrSelector: OrderTypes.UpdateOrderDTO[] | string | Partial<OrderTypes.FilterableOrderProps>, data?: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<TOrder[]>;
114
+ retrieveOrder(id: string, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderDTO>;
115
+ listOrders(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderDTO[]>;
116
+ listAndCountOrders(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<[OrderTypes.OrderDTO[], number]>;
117
+ retrieveReturn(id: string, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.ReturnDTO>;
118
+ listReturns(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.ReturnDTO[]>;
119
+ listAndCountReturns(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<[OrderTypes.ReturnDTO[], number]>;
120
+ retrieveOrderClaim(id: string, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderClaimDTO>;
121
+ listOrderClaims(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderClaimDTO[]>;
122
+ listAndCountOrderClaims(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<[OrderTypes.OrderClaimDTO[], number]>;
123
+ retrieveOrderExchange(id: string, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderExchangeDTO>;
124
+ listOrderExchanges(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<OrderTypes.OrderExchangeDTO[]>;
125
+ listAndCountOrderExchanges(filters?: any, config?: FindConfig<any> | undefined, sharedContext?: Context | undefined): Promise<[OrderTypes.OrderExchangeDTO[], number]>;
126
+ createOrders(data: OrderTypes.CreateOrderDTO[], sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
127
+ createOrders(data: OrderTypes.CreateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
128
+ protected createOrders_(data: OrderTypes.CreateOrderDTO[], sharedContext?: Context): Promise<Order[]>;
129
+ updateOrders(data: OrderTypes.UpdateOrderDTO[]): Promise<OrderTypes.OrderDTO[]>;
130
+ updateOrders(orderId: string, data: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
131
+ updateOrders(selector: Partial<OrderTypes.FilterableOrderProps>, data: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
132
+ protected updateOrders_(dataOrIdOrSelector: OrderTypes.UpdateOrderDTO[] | string | Partial<OrderTypes.FilterableOrderProps>, data?: OrderTypes.UpdateOrderDTO, sharedContext?: Context): Promise<Order[]>;
101
133
  createLineItems(data: OrderTypes.CreateOrderLineItemForOrderDTO): Promise<OrderTypes.OrderLineItemDTO[]>;
102
134
  createLineItems(data: OrderTypes.CreateOrderLineItemForOrderDTO[]): Promise<OrderTypes.OrderLineItemDTO[]>;
103
135
  createLineItems(orderId: string, items: OrderTypes.CreateOrderLineItemDTO[], sharedContext?: Context): Promise<OrderTypes.OrderLineItemDTO[]>;
@@ -114,10 +146,10 @@ export default class OrderModuleService<TOrder extends Order = Order, TAddress e
114
146
  protected updateOrderItemWithSelector_(updates: OrderTypes.UpdateOrderItemWithSelectorDTO[], sharedContext?: Context): Promise<OrderItem[]>;
115
147
  createAddresses(data: OrderTypes.CreateOrderAddressDTO, sharedContext?: Context): Promise<OrderTypes.OrderAddressDTO>;
116
148
  createAddresses(data: OrderTypes.CreateOrderAddressDTO[], sharedContext?: Context): Promise<OrderTypes.OrderAddressDTO[]>;
117
- protected createAddresses_(data: OrderTypes.CreateOrderAddressDTO[], sharedContext?: Context): Promise<TAddress[]>;
149
+ protected createAddresses_(data: OrderTypes.CreateOrderAddressDTO[], sharedContext?: Context): Promise<import("@medusajs/types").InferEntityType<TAddress>[]>;
118
150
  updateAddresses(data: OrderTypes.UpdateOrderAddressDTO, sharedContext?: Context): Promise<OrderTypes.OrderAddressDTO>;
119
151
  updateAddresses(data: OrderTypes.UpdateOrderAddressDTO[], sharedContext?: Context): Promise<OrderTypes.OrderAddressDTO[]>;
120
- protected updateAddresses_(data: OrderTypes.UpdateOrderAddressDTO[], sharedContext?: Context): Promise<TAddress[]>;
152
+ protected updateAddresses_(data: OrderTypes.UpdateOrderAddressDTO[], sharedContext?: Context): Promise<import("@medusajs/types").InferEntityType<TAddress>[]>;
121
153
  createShippingMethods(data: OrderTypes.CreateOrderShippingMethodDTO): Promise<OrderTypes.OrderShippingMethodDTO>;
122
154
  createShippingMethods(data: OrderTypes.CreateOrderShippingMethodDTO[]): Promise<OrderTypes.OrderShippingMethodDTO[]>;
123
155
  createShippingMethods(orderId: string, methods: OrderTypes.CreateOrderShippingMethodDTO[], sharedContext?: Context): Promise<OrderTypes.OrderShippingMethodDTO[]>;
@@ -143,32 +175,28 @@ export default class OrderModuleService<TOrder extends Order = Order, TAddress e
143
175
  createShippingMethodTaxLines(taxLine: OrderTypes.CreateOrderShippingMethodTaxLineDTO): Promise<OrderTypes.OrderShippingMethodTaxLineDTO>;
144
176
  createShippingMethodTaxLines(orderId: string, taxLines: OrderTypes.CreateOrderShippingMethodTaxLineDTO[] | OrderTypes.CreateOrderShippingMethodTaxLineDTO, sharedContext?: Context): Promise<OrderTypes.OrderShippingMethodTaxLineDTO[]>;
145
177
  setShippingMethodTaxLines(orderId: string, taxLines: (OrderTypes.CreateOrderShippingMethodTaxLineDTO | OrderTypes.UpdateOrderShippingMethodTaxLineDTO)[], sharedContext?: Context): Promise<OrderTypes.OrderShippingMethodTaxLineDTO[]>;
146
- createOrderChange(data: OrderTypes.CreateOrderChangeDTO, sharedContext?: Context): Promise<OrderTypes.OrderChangeDTO>;
147
- createOrderChange(data: OrderTypes.CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderTypes.OrderChangeDTO[]>;
148
- protected createOrderChange_(data: OrderTypes.CreateOrderChangeDTO | OrderTypes.CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderChange[]>;
178
+ createOrderChange(data: CreateOrderChangeDTO, sharedContext?: Context): Promise<OrderTypes.OrderChangeDTO>;
179
+ createOrderChange(data: CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderTypes.OrderChangeDTO[]>;
180
+ protected createOrderChange_(data: CreateOrderChangeDTO | CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderChange[]>;
149
181
  cancelOrderChange(orderId: string, sharedContext?: Context): Promise<void>;
150
182
  cancelOrderChange(orderId: string[], sharedContext?: Context): Promise<void>;
151
183
  cancelOrderChange(data: OrderTypes.CancelOrderChangeDTO, sharedContext?: Context): Promise<void>;
152
184
  cancelOrderChange(data: OrderTypes.CancelOrderChangeDTO[], sharedContext?: Context): Promise<void>;
153
- confirmOrderChange(orderChangeId: string, sharedContext?: Context): Promise<void>;
154
- confirmOrderChange(orderChangeId: string[], sharedContext?: Context): Promise<void>;
155
- confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO, sharedContext?: Context): Promise<void>;
156
- confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO[], sharedContext?: Context): Promise<void>;
157
- declineOrderChange(orderChangeId: string, sharedContext?: Context): Promise<void>;
158
- declineOrderChange(orderChangeId: string[], sharedContext?: Context): Promise<void>;
159
- declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO, sharedContext?: Context): Promise<void>;
160
- declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO[], sharedContext?: Context): Promise<void>;
161
- applyPendingOrderActions(orderId: string | string[], sharedContext?: Context): Promise<void>;
185
+ confirmOrderChange(orderChangeId: string, sharedContext?: Context): any;
186
+ confirmOrderChange(orderChangeId: string[], sharedContext?: Context): any;
187
+ confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO, sharedContext?: Context): any;
188
+ confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO[], sharedContext?: Context): any;
189
+ declineOrderChange(orderChangeId: string, sharedContext?: Context): any;
190
+ declineOrderChange(orderChangeId: string[], sharedContext?: Context): any;
191
+ declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO, sharedContext?: Context): any;
192
+ declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO[], sharedContext?: Context): any;
193
+ applyPendingOrderActions(orderId: string | string[], sharedContext?: Context): Promise<OrderTypes.OrderChangeReturn>;
162
194
  revertLastVersion(orderId: string, sharedContext?: Context): Promise<void>;
163
195
  protected revertLastChange_(order: OrderDTO, sharedContext?: Context): Promise<void>;
164
196
  private getAndValidateOrderChange_;
165
197
  addOrderAction(data: OrderTypes.CreateOrderChangeActionDTO, sharedContext?: Context): Promise<OrderTypes.OrderChangeActionDTO>;
166
198
  addOrderAction(data: OrderTypes.CreateOrderChangeActionDTO[], sharedContext?: Context): Promise<OrderTypes.OrderChangeActionDTO[]>;
167
199
  private applyOrderChanges_;
168
- registerFulfillment(data: OrderTypes.RegisterOrderFulfillmentDTO, sharedContext?: Context): Promise<void>;
169
- cancelFulfillment(data: OrderTypes.CancelOrderFulfillmentDTO, sharedContext?: Context): Promise<void>;
170
- registerShipment(data: OrderTypes.RegisterOrderShipmentDTO, sharedContext?: Context): Promise<void>;
171
- createReturn(data: OrderTypes.CreateOrderReturnDTO, sharedContext?: Context): Promise<void>;
172
200
  addTransactions(transactionData: OrderTypes.CreateOrderTransactionDTO, sharedContext?: Context): Promise<OrderTypes.OrderTransactionDTO>;
173
201
  addTransactions(transactionData: OrderTypes.CreateOrderTransactionDTO[], sharedContext?: Context): Promise<OrderTypes.OrderTransactionDTO[]>;
174
202
  deleteTransactions(transactionIds: string | object | string[] | object[], sharedContext?: Context): Promise<void>;
@@ -182,12 +210,21 @@ export default class OrderModuleService<TOrder extends Order = Order, TAddress e
182
210
  updateReturnReasons(id: string, data: Partial<OrderTypes.UpdateOrderReturnReasonDTO>, sharedContext?: Context): Promise<OrderTypes.OrderReturnReasonDTO>;
183
211
  protected updateReturnReason_(reasonId: string, data: Partial<OrderTypes.UpdateOrderReturnReasonDTO>, sharedContext?: Context): Promise<ReturnReason>;
184
212
  protected updateReturnReasonsWithSelector_(updates: OrderTypes.UpdateOrderReturnReasonWithSelectorDTO[], sharedContext?: Context): Promise<ReturnReason[]>;
185
- receiveReturn(data: OrderTypes.ReceiveOrderReturnDTO, sharedContext?: Context): Promise<void>;
186
213
  archive(orderId: string, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
187
214
  archive(orderId: string[], sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
188
215
  completeOrder(orderId: string, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
189
216
  completeOrder(orderId: string[], sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
190
217
  cancel(orderId: string, sharedContext?: Context): Promise<OrderTypes.OrderDTO>;
191
218
  cancel(orderId: string[], sharedContext?: Context): Promise<OrderTypes.OrderDTO[]>;
219
+ createReturn(data: OrderTypes.CreateOrderReturnDTO, sharedContext?: Context): Promise<any>;
220
+ receiveReturn(data: OrderTypes.ReceiveOrderReturnDTO, sharedContext?: Context): Promise<any>;
221
+ private receiveReturn_;
222
+ createClaim(data: OrderTypes.CreateOrderClaimDTO, sharedContext?: Context): Promise<any>;
223
+ createExchange_(data: OrderTypes.CreateOrderExchangeDTO, sharedContext?: Context): Promise<any>;
224
+ createExchange(data: OrderTypes.CreateOrderExchangeDTO, sharedContext?: Context): Promise<any>;
225
+ createClaim_(data: OrderTypes.CreateOrderClaimDTO, sharedContext?: Context): Promise<any>;
226
+ registerFulfillment(data: OrderTypes.RegisterOrderFulfillmentDTO, sharedContext?: Context): Promise<void>;
227
+ cancelFulfillment(data: OrderTypes.CancelOrderFulfillmentDTO, sharedContext?: Context): Promise<void>;
228
+ registerShipment(data: OrderTypes.RegisterOrderShipmentDTO, sharedContext?: Context): Promise<void>;
192
229
  }
193
230
  export {};