@medusajs/order 0.1.3-snapshot-20240607093839 → 0.1.3-snapshot-20240701122250
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +1 -3
- package/dist/joiner-config.js +4 -42
- package/dist/joiner-config.js.map +1 -1
- package/dist/migrations/Migration20240604100512.d.ts +4 -0
- package/dist/migrations/Migration20240604100512.js +364 -0
- package/dist/migrations/Migration20240604100512.js.map +1 -0
- package/dist/models/claim-item-image.d.ts +18 -0
- package/dist/models/claim-item-image.js +108 -0
- package/dist/models/claim-item-image.js.map +1 -0
- package/dist/models/claim-item.d.ts +28 -0
- package/dist/models/claim-item.js +156 -0
- package/dist/models/claim-item.js.map +1 -0
- package/dist/models/claim.d.ts +35 -0
- package/dist/models/claim.js +196 -0
- package/dist/models/claim.js.map +1 -0
- package/dist/models/exchange-item.d.ts +23 -0
- package/dist/models/exchange-item.js +138 -0
- package/dist/models/exchange-item.js.map +1 -0
- package/dist/models/exchange.d.ts +33 -0
- package/dist/models/exchange.js +189 -0
- package/dist/models/exchange.js.map +1 -0
- package/dist/models/index.d.ts +7 -0
- package/dist/models/index.js +15 -1
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +2 -1
- package/dist/models/line-item-adjustment.js +1 -1
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +2 -1
- package/dist/models/line-item-tax-line.js +1 -1
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +1 -1
- package/dist/models/line-item.js +3 -3
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +13 -3
- package/dist/models/order-change-action.js +94 -0
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +14 -3
- package/dist/models/order-change.js +107 -3
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +3 -3
- package/dist/models/order-item.js +7 -7
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +12 -3
- package/dist/models/order-shipping-method.js +83 -7
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +3 -2
- package/dist/models/order-summary.js +7 -4
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +3 -3
- package/dist/models/order.js +1 -1
- package/dist/models/order.js.map +1 -1
- package/dist/models/return-item.d.ts +28 -0
- package/dist/models/return-item.js +170 -0
- package/dist/models/return-item.js.map +1 -0
- package/dist/models/return-reason.d.ts +3 -3
- package/dist/models/return-reason.js.map +1 -1
- package/dist/models/return.d.ts +38 -0
- package/dist/models/return.js +213 -0
- package/dist/models/return.js.map +1 -0
- package/dist/models/shipping-method-adjustment.d.ts +2 -1
- package/dist/models/shipping-method-adjustment.js +1 -1
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +2 -1
- package/dist/models/shipping-method-tax-line.js +1 -1
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.js +1 -1
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +11 -2
- package/dist/models/transaction.js +80 -1
- package/dist/models/transaction.js.map +1 -1
- package/dist/repositories/claim.d.ts +8 -0
- package/dist/repositories/claim.js +11 -0
- package/dist/repositories/claim.js.map +1 -0
- package/dist/repositories/exchange.d.ts +8 -0
- package/dist/repositories/exchange.js +11 -0
- package/dist/repositories/exchange.js.map +1 -0
- package/dist/repositories/index.d.ts +3 -1
- package/dist/repositories/index.js +7 -16
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +0 -3
- package/dist/repositories/order.js +2 -83
- package/dist/repositories/order.js.map +1 -1
- package/dist/repositories/return.d.ts +8 -0
- package/dist/repositories/return.js +11 -0
- package/dist/repositories/return.js.map +1 -0
- package/dist/services/actions/cancel-fulfillment.d.ts +2 -0
- package/dist/services/actions/cancel-fulfillment.js +32 -0
- package/dist/services/actions/cancel-fulfillment.js.map +1 -0
- package/dist/services/actions/create-claim.d.ts +2 -0
- package/dist/services/actions/create-claim.js +229 -0
- package/dist/services/actions/create-claim.js.map +1 -0
- package/dist/services/actions/create-exchange.d.ts +2 -0
- package/dist/services/actions/create-exchange.js +194 -0
- package/dist/services/actions/create-exchange.js.map +1 -0
- package/dist/services/actions/create-return.d.ts +2 -0
- package/dist/services/actions/create-return.js +98 -0
- package/dist/services/actions/create-return.js.map +1 -0
- package/dist/services/actions/index.d.ts +7 -0
- package/dist/services/actions/index.js +24 -0
- package/dist/services/actions/index.js.map +1 -0
- package/dist/services/actions/receive-return.d.ts +2 -0
- package/dist/services/actions/receive-return.js +75 -0
- package/dist/services/actions/receive-return.js.map +1 -0
- package/dist/services/actions/register-fulfillment.d.ts +2 -0
- package/dist/services/actions/register-fulfillment.js +30 -0
- package/dist/services/actions/register-fulfillment.js.map +1 -0
- package/dist/services/actions/register-shipment.d.ts +2 -0
- package/dist/services/actions/register-shipment.js +38 -0
- package/dist/services/actions/register-shipment.js.map +1 -0
- package/dist/services/order-change-service.d.ts +6 -6
- package/dist/services/order-change-service.js +4 -3
- package/dist/services/order-change-service.js.map +1 -1
- package/dist/services/order-module-service.d.ts +101 -64
- package/dist/services/order-module-service.js +458 -295
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +4 -4
- package/dist/services/order-service.js +1 -1
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/order-change.d.ts +32 -0
- package/dist/types/order-change.js +34 -0
- package/dist/types/order-change.js.map +1 -0
- package/dist/types/utils/index.d.ts +25 -1
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/actions/cancel-item-fulfillment.js +2 -0
- package/dist/utils/actions/cancel-item-fulfillment.js.map +1 -1
- package/dist/utils/actions/cancel-return.js +2 -0
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/fulfill-item.js +2 -0
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +1 -0
- package/dist/utils/actions/index.js +1 -0
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.js +10 -7
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.js +6 -4
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/receive-damaged-return-item.js +2 -0
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.js +2 -0
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/return-item.js +2 -0
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.js +2 -0
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.js +6 -2
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/write-off-item.js +2 -0
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/apply-order-changes.d.ts +14 -0
- package/dist/utils/apply-order-changes.js +74 -0
- package/dist/utils/apply-order-changes.js.map +1 -0
- package/dist/utils/base-repository-find.d.ts +2 -0
- package/dist/utils/base-repository-find.js +117 -0
- package/dist/utils/base-repository-find.js.map +1 -0
- package/dist/utils/calculate-order-change.js +5 -1
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +3 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/set-action-reference.d.ts +1 -0
- package/dist/utils/set-action-reference.js +11 -0
- package/dist/utils/set-action-reference.js.map +1 -0
- package/dist/utils/transform-order.d.ts +3 -2
- package/dist/utils/transform-order.js +84 -17
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +7 -11
- package/dist/module-definition.d.ts +0 -2
- package/dist/module-definition.js +0 -9
- package/dist/module-definition.js.map +0 -1
- package/dist/scripts/bin/run-seed.d.ts +0 -3
- package/dist/scripts/bin/run-seed.js +0 -49
- 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
|
10
|
-
addressService: ModulesSdkTypes.
|
11
|
-
lineItemService: ModulesSdkTypes.
|
12
|
-
shippingMethodAdjustmentService: ModulesSdkTypes.
|
13
|
-
shippingMethodService: ModulesSdkTypes.
|
14
|
-
lineItemAdjustmentService: ModulesSdkTypes.
|
15
|
-
lineItemTaxLineService: ModulesSdkTypes.
|
16
|
-
shippingMethodTaxLineService: ModulesSdkTypes.
|
17
|
-
transactionService: ModulesSdkTypes.
|
18
|
-
orderChangeService: OrderChangeService
|
19
|
-
orderChangeActionService: ModulesSdkTypes.
|
20
|
-
orderItemService: ModulesSdkTypes.
|
21
|
-
orderSummaryService: ModulesSdkTypes.
|
22
|
-
orderShippingMethodService: ModulesSdkTypes.
|
23
|
-
returnReasonService: ModulesSdkTypes.
|
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 (
|
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
|
73
|
-
protected addressService_: ModulesSdkTypes.
|
74
|
-
protected lineItemService_: ModulesSdkTypes.
|
75
|
-
protected shippingMethodAdjustmentService_: ModulesSdkTypes.
|
76
|
-
protected shippingMethodService_: ModulesSdkTypes.
|
77
|
-
protected lineItemAdjustmentService_: ModulesSdkTypes.
|
78
|
-
protected lineItemTaxLineService_: ModulesSdkTypes.
|
79
|
-
protected shippingMethodTaxLineService_: ModulesSdkTypes.
|
80
|
-
protected transactionService_: ModulesSdkTypes.
|
81
|
-
protected orderChangeService_: OrderChangeService
|
82
|
-
protected orderChangeActionService_: ModulesSdkTypes.
|
83
|
-
protected orderItemService_: ModulesSdkTypes.
|
84
|
-
protected orderSummaryService_: ModulesSdkTypes.
|
85
|
-
protected orderShippingMethodService_: ModulesSdkTypes.
|
86
|
-
protected returnReasonService_: ModulesSdkTypes.
|
87
|
-
|
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
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
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:
|
147
|
-
createOrderChange(data:
|
148
|
-
protected createOrderChange_(data:
|
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):
|
154
|
-
confirmOrderChange(orderChangeId: string[], sharedContext?: Context):
|
155
|
-
confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO, sharedContext?: Context):
|
156
|
-
confirmOrderChange(data: OrderTypes.ConfirmOrderChangeDTO[], sharedContext?: Context):
|
157
|
-
declineOrderChange(orderChangeId: string, sharedContext?: Context):
|
158
|
-
declineOrderChange(orderChangeId: string[], sharedContext?: Context):
|
159
|
-
declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO, sharedContext?: Context):
|
160
|
-
declineOrderChange(data: OrderTypes.DeclineOrderChangeDTO[], sharedContext?: Context):
|
161
|
-
applyPendingOrderActions(orderId: string | string[], sharedContext?: Context): Promise<
|
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 {};
|