@medusajs/types 1.12.0-snapshot-20240322174858 → 1.12.0-snapshot-20240328175402
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth/common/provider.d.ts +4 -0
- package/dist/auth/common/provider.d.ts.map +1 -1
- package/dist/common/config-module.d.ts +7 -4
- package/dist/common/config-module.d.ts.map +1 -1
- package/dist/dal/index.d.ts +11 -0
- package/dist/dal/index.d.ts.map +1 -1
- package/dist/dal/index.js.map +1 -1
- package/dist/dal/repository-service.d.ts +2 -1
- package/dist/dal/repository-service.d.ts.map +1 -1
- package/dist/inventory/common/inventory-level.d.ts +5 -5
- package/dist/inventory/common/inventory-level.d.ts.map +1 -1
- package/dist/inventory/mutations/inventory-level.d.ts +1 -1
- package/dist/inventory/mutations/inventory-level.d.ts.map +1 -1
- package/dist/modules-sdk/internal-module-service.d.ts +2 -1
- package/dist/modules-sdk/internal-module-service.d.ts.map +1 -1
- package/dist/order/service.d.ts +1450 -0
- package/dist/order/service.d.ts.map +1 -1
- package/dist/pricing/common/index.d.ts +1 -1
- package/dist/pricing/common/index.d.ts.map +1 -1
- package/dist/pricing/common/index.js +1 -1
- package/dist/pricing/common/index.js.map +1 -1
- package/dist/pricing/common/money-amount.d.ts +0 -5
- package/dist/pricing/common/money-amount.d.ts.map +1 -1
- package/dist/pricing/common/price-list.d.ts +2 -2
- package/dist/pricing/common/price-list.d.ts.map +1 -1
- package/dist/pricing/common/price-rule.d.ts +7 -7
- package/dist/pricing/common/price-rule.d.ts.map +1 -1
- package/dist/pricing/common/price-set-rule-type.d.ts +2 -2
- package/dist/pricing/common/price-set-rule-type.d.ts.map +1 -1
- package/dist/pricing/common/price.d.ts +137 -0
- package/dist/pricing/common/price.d.ts.map +1 -0
- package/dist/pricing/common/{price-set-money-amount.js → price.js} +1 -1
- package/dist/pricing/common/price.js.map +1 -0
- package/dist/pricing/service.d.ts +68 -68
- package/dist/pricing/service.d.ts.map +1 -1
- package/dist/sales-channel/mutations.d.ts +5 -1
- package/dist/sales-channel/mutations.d.ts.map +1 -1
- package/dist/sales-channel/service.d.ts +127 -62
- package/dist/sales-channel/service.d.ts.map +1 -1
- package/dist/stock-location/common.d.ts +11 -10
- package/dist/stock-location/common.d.ts.map +1 -1
- package/dist/stock-location/service-next.d.ts +22 -3
- package/dist/stock-location/service-next.d.ts.map +1 -1
- package/dist/workflow/invite/accept-invite.d.ts +1 -0
- package/dist/workflow/invite/accept-invite.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/pricing/common/price-set-money-amount.d.ts +0 -93
- package/dist/pricing/common/price-set-money-amount.d.ts.map +0 -1
- package/dist/pricing/common/price-set-money-amount.js.map +0 -1
package/dist/order/service.d.ts
CHANGED
@@ -3,93 +3,1543 @@ import { IModuleService } from "../modules-sdk";
|
|
3
3
|
import { Context } from "../shared-context";
|
4
4
|
import { FilterableOrderAddressProps, FilterableOrderLineItemAdjustmentProps, FilterableOrderLineItemProps, FilterableOrderLineItemTaxLineProps, FilterableOrderProps, FilterableOrderShippingMethodAdjustmentProps, FilterableOrderShippingMethodProps, FilterableOrderShippingMethodTaxLineProps, OrderAddressDTO, OrderChangeDTO, OrderDTO, OrderItemDTO, OrderLineItemAdjustmentDTO, OrderLineItemDTO, OrderLineItemTaxLineDTO, OrderShippingMethodAdjustmentDTO, OrderShippingMethodDTO, OrderShippingMethodTaxLineDTO } from "./common";
|
5
5
|
import { CancelOrderChangeDTO, ConfirmOrderChangeDTO, CreateOrderAddressDTO, CreateOrderAdjustmentDTO, CreateOrderChangeDTO, CreateOrderDTO, CreateOrderLineItemDTO, CreateOrderLineItemForOrderDTO, CreateOrderLineItemTaxLineDTO, CreateOrderShippingMethodAdjustmentDTO, CreateOrderShippingMethodDTO, CreateOrderShippingMethodTaxLineDTO, DeclineOrderChangeDTO, UpdateOrderAddressDTO, UpdateOrderDTO, UpdateOrderItemDTO, UpdateOrderItemWithSelectorDTO, UpdateOrderLineItemDTO, UpdateOrderLineItemTaxLineDTO, UpdateOrderLineItemWithSelectorDTO, UpdateOrderShippingMethodAdjustmentDTO, UpdateOrderShippingMethodTaxLineDTO, UpsertOrderLineItemAdjustmentDTO } from "./mutations";
|
6
|
+
/**
|
7
|
+
* {summary}
|
8
|
+
*/
|
6
9
|
export interface IOrderModuleService extends IModuleService {
|
10
|
+
/**
|
11
|
+
* This method retrieves a {return type} by its ID.
|
12
|
+
*
|
13
|
+
* @param {string} orderId - The order's ID.
|
14
|
+
* @param {FindConfig<OrderDTO>} config - The configurations determining how the order is retrieved. Its properties, such as `select` or `relations`, accept the
|
15
|
+
* attributes or relations associated with a order.
|
16
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
17
|
+
* @returns {Promise<OrderDTO>} The retrieved {return type}(s).
|
18
|
+
*
|
19
|
+
* @example
|
20
|
+
* ```typescript
|
21
|
+
* const result = await orderModuleService.retrieve("orderId123");
|
22
|
+
* ```
|
23
|
+
*
|
24
|
+
*/
|
7
25
|
retrieve(orderId: string, config?: FindConfig<OrderDTO>, sharedContext?: Context): Promise<OrderDTO>;
|
26
|
+
/**
|
27
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
28
|
+
*
|
29
|
+
* @param {FilterableOrderProps} filters - The filters to apply on the retrieved order.
|
30
|
+
* @param {FindConfig<OrderDTO>} config - The configurations determining how the order is retrieved. Its properties, such as `select` or `relations`, accept the
|
31
|
+
* attributes or relations associated with a order.
|
32
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
33
|
+
* @returns {Promise<OrderDTO[]>} The list of {return type}(s).
|
34
|
+
*
|
35
|
+
* @example
|
36
|
+
* ```typescript
|
37
|
+
* const orderDTOs = await orderModuleService.list();
|
38
|
+
* ```
|
39
|
+
*
|
40
|
+
*/
|
8
41
|
list(filters?: FilterableOrderProps, config?: FindConfig<OrderDTO>, sharedContext?: Context): Promise<OrderDTO[]>;
|
42
|
+
/**
|
43
|
+
* This method retrieves a paginated list of {return type} along with the total count of available {return type}(s) satisfying the provided filters.
|
44
|
+
*
|
45
|
+
* @param {FilterableOrderProps} filters - The filters to apply on the retrieved order.
|
46
|
+
* @param {FindConfig<OrderDTO>} config - The configurations determining how the order is retrieved. Its properties, such as `select` or `relations`, accept the
|
47
|
+
* attributes or relations associated with a order.
|
48
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
49
|
+
* @returns {Promise<[OrderDTO[], number]>} The list of {return type}(s) along with their total count.
|
50
|
+
*
|
51
|
+
* @example
|
52
|
+
* ```typescript
|
53
|
+
* await orderModuleService.listAndCount();
|
54
|
+
* ```
|
55
|
+
*
|
56
|
+
*/
|
9
57
|
listAndCount(filters?: FilterableOrderProps, config?: FindConfig<OrderDTO>, sharedContext?: Context): Promise<[OrderDTO[], number]>;
|
58
|
+
/**
|
59
|
+
* This method creates {return type}(s)
|
60
|
+
*
|
61
|
+
* @param {CreateOrderDTO[]} data - The order to be created.
|
62
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
63
|
+
* @returns {Promise<OrderDTO[]>} The created {return type}(s).
|
64
|
+
*
|
65
|
+
* @example
|
66
|
+
* ```typescript
|
67
|
+
* const orderData: CreateOrderDTO[] = [
|
68
|
+
* {
|
69
|
+
* currency_code: "USD",
|
70
|
+
* items: [
|
71
|
+
* {
|
72
|
+
* title: "Product Name",
|
73
|
+
* quantity: 1,
|
74
|
+
* unit_price: 1999, // Assuming type is an integer for price in cents
|
75
|
+
* }
|
76
|
+
* ]
|
77
|
+
* }
|
78
|
+
* ];
|
79
|
+
*
|
80
|
+
* const result = await orderModuleService.create(orderData);
|
81
|
+
* ```
|
82
|
+
*
|
83
|
+
*/
|
10
84
|
create(data: CreateOrderDTO[], sharedContext?: Context): Promise<OrderDTO[]>;
|
85
|
+
/**
|
86
|
+
* This method creates {return type}(s)
|
87
|
+
*
|
88
|
+
* @param {CreateOrderDTO} data - The order to be created.
|
89
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
90
|
+
* @returns {Promise<OrderDTO>} The created {return type}(s).
|
91
|
+
*
|
92
|
+
* @example
|
93
|
+
* ```typescript
|
94
|
+
* // Example execution of the create method of IOrderModuleService
|
95
|
+
* const orderData: CreateOrderDTO = {
|
96
|
+
* currency_code: "USD"
|
97
|
+
* };
|
98
|
+
*
|
99
|
+
* const createdOrder = await orderModuleService.create(orderData);
|
100
|
+
* ```
|
101
|
+
*
|
102
|
+
*/
|
11
103
|
create(data: CreateOrderDTO, sharedContext?: Context): Promise<OrderDTO>;
|
104
|
+
/**
|
105
|
+
* This method updates existing {return type}(s).
|
106
|
+
*
|
107
|
+
* @param {UpdateOrderDTO[]} data - The attributes to update in the order.
|
108
|
+
* @returns {Promise<OrderDTO[]>} The updated {return type}(s).
|
109
|
+
*
|
110
|
+
* @example
|
111
|
+
* ```typescript
|
112
|
+
* const updatedOrders = await orderModuleService.update([
|
113
|
+
* {
|
114
|
+
* id: "order_id_1",
|
115
|
+
* status: "shipped"
|
116
|
+
* },
|
117
|
+
* {
|
118
|
+
* id: "order_id_2",
|
119
|
+
* status: "delivered"
|
120
|
+
* }
|
121
|
+
* ]);
|
122
|
+
* ```
|
123
|
+
*
|
124
|
+
*/
|
12
125
|
update(data: UpdateOrderDTO[]): Promise<OrderDTO[]>;
|
126
|
+
/**
|
127
|
+
* This method updates existing {return type}(s).
|
128
|
+
*
|
129
|
+
* @param {string} orderId - The order's ID.
|
130
|
+
* @param {UpdateOrderDTO} data - The attributes to update in the order.
|
131
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
132
|
+
* @returns {Promise<OrderDTO>} The updated {return type}(s).
|
133
|
+
*
|
134
|
+
* @example
|
135
|
+
* ```typescript
|
136
|
+
* await orderModuleService.update("orderId123", {
|
137
|
+
* status: "shipped"
|
138
|
+
* });
|
139
|
+
* ```
|
140
|
+
*
|
141
|
+
*/
|
13
142
|
update(orderId: string, data: UpdateOrderDTO, sharedContext?: Context): Promise<OrderDTO>;
|
143
|
+
/**
|
144
|
+
* This method updates existing {return type}(s).
|
145
|
+
*
|
146
|
+
* @param {Partial<OrderDTO>} selector - Make all properties in T optional
|
147
|
+
* @param {UpdateOrderDTO} data - The attributes to update in the order.
|
148
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
149
|
+
* @returns {Promise<OrderDTO[]>} The updated {return type}(s).
|
150
|
+
*
|
151
|
+
* @example
|
152
|
+
* ```typescript
|
153
|
+
* await orderModuleService.update(
|
154
|
+
* { id: "order-123" },
|
155
|
+
* { status: "completed" }
|
156
|
+
* );
|
157
|
+
* ```
|
158
|
+
*
|
159
|
+
*/
|
14
160
|
update(selector: Partial<OrderDTO>, data: UpdateOrderDTO, sharedContext?: Context): Promise<OrderDTO[]>;
|
161
|
+
/**
|
162
|
+
* This method deletes {return type} by its ID.
|
163
|
+
*
|
164
|
+
* @param {string[]} orderIds - The list of {summary}
|
165
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
166
|
+
* @returns {Promise<void>} Resolves when {summary}
|
167
|
+
*
|
168
|
+
* @example
|
169
|
+
* ```typescript
|
170
|
+
* await orderModuleService.delete(["12345abc", "67890def"]);
|
171
|
+
* ```
|
172
|
+
*
|
173
|
+
*/
|
15
174
|
delete(orderIds: string[], sharedContext?: Context): Promise<void>;
|
175
|
+
/**
|
176
|
+
* This method deletes {return type} by its ID.
|
177
|
+
*
|
178
|
+
* @param {string} orderId - The order's ID.
|
179
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
180
|
+
* @returns {Promise<void>} Resolves when {summary}
|
181
|
+
*
|
182
|
+
* @example
|
183
|
+
* ```typescript
|
184
|
+
* await orderModuleService.delete("orderId");
|
185
|
+
* ```
|
186
|
+
*
|
187
|
+
*/
|
16
188
|
delete(orderId: string, sharedContext?: Context): Promise<void>;
|
189
|
+
/**
|
190
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
191
|
+
*
|
192
|
+
* @param {FilterableOrderAddressProps} filters - The filters to apply on the retrieved order address.
|
193
|
+
* @param {FindConfig<OrderAddressDTO>} config - The configurations determining how the order address is retrieved. Its properties, such as `select` or `relations`, accept the
|
194
|
+
* attributes or relations associated with a order address.
|
195
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
196
|
+
* @returns {Promise<OrderAddressDTO[]>} The list of {return type}(s).
|
197
|
+
*
|
198
|
+
* @example
|
199
|
+
* ```typescript
|
200
|
+
* await orderModuleService.listAddresses();
|
201
|
+
* ```
|
202
|
+
*
|
203
|
+
*/
|
17
204
|
listAddresses(filters?: FilterableOrderAddressProps, config?: FindConfig<OrderAddressDTO>, sharedContext?: Context): Promise<OrderAddressDTO[]>;
|
205
|
+
/**
|
206
|
+
* This method creates {return type}(s)
|
207
|
+
*
|
208
|
+
* @param {CreateOrderAddressDTO[]} data - The order address to be created.
|
209
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
210
|
+
* @returns {Promise<OrderAddressDTO[]>} The created {return type}(s).
|
211
|
+
*
|
212
|
+
* @example
|
213
|
+
* ```typescript
|
214
|
+
* await orderModuleService.createAddresses([
|
215
|
+
* {
|
216
|
+
* first_name: "John",
|
217
|
+
* last_name: "Doe",
|
218
|
+
* address_1: "123 Main St",
|
219
|
+
* city: "Anytown",
|
220
|
+
* country_code: "US",
|
221
|
+
* province: "AnyState",
|
222
|
+
* postal_code: "12345"
|
223
|
+
* }
|
224
|
+
* ]);
|
225
|
+
* ```
|
226
|
+
*
|
227
|
+
*/
|
18
228
|
createAddresses(data: CreateOrderAddressDTO[], sharedContext?: Context): Promise<OrderAddressDTO[]>;
|
229
|
+
/**
|
230
|
+
* This method creates {return type}(s)
|
231
|
+
*
|
232
|
+
* @param {CreateOrderAddressDTO} data - The order address to be created.
|
233
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
234
|
+
* @returns {Promise<OrderAddressDTO>} The created {return type}(s).
|
235
|
+
*
|
236
|
+
* @example
|
237
|
+
* ```typescript
|
238
|
+
* const orderAddressData: CreateOrderAddressDTO = {
|
239
|
+
* orderId: '123',
|
240
|
+
* line1: '123 Main St',
|
241
|
+
* city: 'Metropolis',
|
242
|
+
* state: 'NY',
|
243
|
+
* postalCode: '12345',
|
244
|
+
* country: 'USA'
|
245
|
+
* };
|
246
|
+
*
|
247
|
+
* const result = await orderModuleService.createAddresses(orderAddressData);
|
248
|
+
* ```
|
249
|
+
*
|
250
|
+
*/
|
19
251
|
createAddresses(data: CreateOrderAddressDTO, sharedContext?: Context): Promise<OrderAddressDTO>;
|
252
|
+
/**
|
253
|
+
* This method updates existing {return type}(s).
|
254
|
+
*
|
255
|
+
* @param {UpdateOrderAddressDTO[]} data - The attributes to update in the order address.
|
256
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
257
|
+
* @returns {Promise<OrderAddressDTO[]>} The updated {return type}(s).
|
258
|
+
*
|
259
|
+
* @example
|
260
|
+
* ```typescript
|
261
|
+
* const updatedAddress: UpdateOrderAddressDTO[] = [
|
262
|
+
* {
|
263
|
+
* id: "address1",
|
264
|
+
* first_name: "John",
|
265
|
+
* last_name: "Doe",
|
266
|
+
* address_1: "123 Main St",
|
267
|
+
* city: "Anytown",
|
268
|
+
* country_code: "US",
|
269
|
+
* province: "AnyState",
|
270
|
+
* postal_code: "12345"
|
271
|
+
* }
|
272
|
+
* ];
|
273
|
+
*
|
274
|
+
* const result = await orderModuleService.updateAddresses(updatedAddress);
|
275
|
+
* ```
|
276
|
+
*
|
277
|
+
*/
|
20
278
|
updateAddresses(data: UpdateOrderAddressDTO[], sharedContext?: Context): Promise<OrderAddressDTO[]>;
|
279
|
+
/**
|
280
|
+
* This method updates existing {return type}(s).
|
281
|
+
*
|
282
|
+
* @param {UpdateOrderAddressDTO} data - The attributes to update in the order address.
|
283
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
284
|
+
* @returns {Promise<OrderAddressDTO>} The updated {return type}(s).
|
285
|
+
*
|
286
|
+
* @example
|
287
|
+
* ```typescript
|
288
|
+
* const updateOrderAddressData: UpdateOrderAddressDTO = {
|
289
|
+
* id: '123',
|
290
|
+
* address_1: '123 Main St',
|
291
|
+
* city: 'Metropolis',
|
292
|
+
* province: 'NY',
|
293
|
+
* postal_code: '12345',
|
294
|
+
* };
|
295
|
+
*
|
296
|
+
* const updatedAddress = await orderModuleService.updateAddresses(updateOrderAddressData);
|
297
|
+
* ```
|
298
|
+
*
|
299
|
+
*/
|
21
300
|
updateAddresses(data: UpdateOrderAddressDTO, sharedContext?: Context): Promise<OrderAddressDTO>;
|
301
|
+
/**
|
302
|
+
* This method deletes {return type} by its ID.
|
303
|
+
*
|
304
|
+
* @param {string[]} ids - The list of {summary}
|
305
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
306
|
+
* @returns {Promise<void>} Resolves when {summary}
|
307
|
+
*
|
308
|
+
* @example
|
309
|
+
* ```typescript
|
310
|
+
* await orderModuleService.deleteAddresses(["your_address_id_1", "your_address_id_2"]);
|
311
|
+
* ```
|
312
|
+
*
|
313
|
+
*/
|
22
314
|
deleteAddresses(ids: string[], sharedContext?: Context): Promise<void>;
|
315
|
+
/**
|
316
|
+
* This method deletes {return type} by its ID.
|
317
|
+
*
|
318
|
+
* @param {string} ids - {summary}
|
319
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
320
|
+
* @returns {Promise<void>} Resolves when {summary}
|
321
|
+
*
|
322
|
+
* @example
|
323
|
+
* ```typescript
|
324
|
+
* await orderModuleService.deleteAddresses("123456");
|
325
|
+
* ```
|
326
|
+
*
|
327
|
+
*/
|
23
328
|
deleteAddresses(ids: string, sharedContext?: Context): Promise<void>;
|
329
|
+
/**
|
330
|
+
* This method retrieves a {return type} by its ID.
|
331
|
+
*
|
332
|
+
* @param {string} itemId - The item's ID.
|
333
|
+
* @param {FindConfig<OrderLineItemDTO>} config - The configurations determining how the order line item is retrieved. Its properties, such as `select` or `relations`, accept the
|
334
|
+
* attributes or relations associated with a order line item.
|
335
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
336
|
+
* @returns {Promise<OrderLineItemDTO>} The retrieved {return type}(s).
|
337
|
+
*
|
338
|
+
* @example
|
339
|
+
* ```typescript
|
340
|
+
* await orderModuleService.retrieveLineItem("12345");
|
341
|
+
* ```
|
342
|
+
*
|
343
|
+
*/
|
24
344
|
retrieveLineItem(itemId: string, config?: FindConfig<OrderLineItemDTO>, sharedContext?: Context): Promise<OrderLineItemDTO>;
|
345
|
+
/**
|
346
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
347
|
+
*
|
348
|
+
* @param {FilterableOrderLineItemProps} filters - The filters to apply on the retrieved order line item.
|
349
|
+
* @param {FindConfig<OrderLineItemDTO>} config - The configurations determining how the order line item is retrieved. Its properties, such as `select` or `relations`, accept the
|
350
|
+
* attributes or relations associated with a order line item.
|
351
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
352
|
+
* @returns {Promise<OrderLineItemDTO[]>} The list of {return type}(s).
|
353
|
+
*
|
354
|
+
* @example
|
355
|
+
* ```typescript
|
356
|
+
* const result = await orderModuleService.listLineItems({
|
357
|
+
* title: "Sample Product Title",
|
358
|
+
* });
|
359
|
+
* ```
|
360
|
+
*
|
361
|
+
*/
|
25
362
|
listLineItems(filters: FilterableOrderLineItemProps, config?: FindConfig<OrderLineItemDTO>, sharedContext?: Context): Promise<OrderLineItemDTO[]>;
|
363
|
+
/**
|
364
|
+
* This method Represents the completion of an asynchronous operation
|
365
|
+
*
|
366
|
+
* @param {CreateOrderLineItemForOrderDTO} data - The order line item for order to be created.
|
367
|
+
* @returns {Promise<OrderLineItemDTO[]>} Represents the completion of an asynchronous operation
|
368
|
+
*
|
369
|
+
* @example
|
370
|
+
* ```typescript
|
371
|
+
* await orderModuleService.addLineItems({
|
372
|
+
* order_id: "123456",
|
373
|
+
* {
|
374
|
+
* product_id: "abc123",
|
375
|
+
* quantity: 2,
|
376
|
+
* unit_price: 1999, // Assuming type is an integer for price in cents
|
377
|
+
* }
|
378
|
+
* });
|
379
|
+
* ```
|
380
|
+
*
|
381
|
+
*/
|
26
382
|
addLineItems(data: CreateOrderLineItemForOrderDTO): Promise<OrderLineItemDTO[]>;
|
383
|
+
/**
|
384
|
+
* This method Represents the completion of an asynchronous operation
|
385
|
+
*
|
386
|
+
* @param {CreateOrderLineItemForOrderDTO[]} data - The order line item for order to be created.
|
387
|
+
* @returns {Promise<OrderLineItemDTO[]>} Represents the completion of an asynchronous operation
|
388
|
+
*
|
389
|
+
* @example
|
390
|
+
* ```typescript
|
391
|
+
* const lineItems: CreateOrderLineItemForOrderDTO[] = [{
|
392
|
+
* order_id: "order_123",
|
393
|
+
* product_id: "prod_456",
|
394
|
+
* quantity: 2,
|
395
|
+
* unit_price: 1999
|
396
|
+
* }];
|
397
|
+
*
|
398
|
+
* const result = await orderModuleService.addLineItems(lineItems);
|
399
|
+
* ```
|
400
|
+
*
|
401
|
+
*/
|
27
402
|
addLineItems(data: CreateOrderLineItemForOrderDTO[]): Promise<OrderLineItemDTO[]>;
|
403
|
+
/**
|
404
|
+
* This method Represents the completion of an asynchronous operation
|
405
|
+
*
|
406
|
+
* @param {string} orderId - The order's ID.
|
407
|
+
* @param {CreateOrderLineItemDTO[]} items - The order line item to be created.
|
408
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
409
|
+
* @returns {Promise<OrderLineItemDTO[]>} Represents the completion of an asynchronous operation
|
410
|
+
*
|
411
|
+
* @example
|
412
|
+
* ```typescript
|
413
|
+
* const result = await orderModuleService.addLineItems("orderIdValue", [
|
414
|
+
* {
|
415
|
+
* title: "Item Title",
|
416
|
+
* requires_shipping: true,
|
417
|
+
* is_discountable: true,
|
418
|
+
* is_tax_inclusive: true,
|
419
|
+
* unit_price: 100,
|
420
|
+
* }
|
421
|
+
* ]);
|
422
|
+
* ```
|
423
|
+
*
|
424
|
+
*/
|
28
425
|
addLineItems(orderId: string, items: CreateOrderLineItemDTO[], sharedContext?: Context): Promise<OrderLineItemDTO[]>;
|
426
|
+
/**
|
427
|
+
* This method updates existing {return type}(s).
|
428
|
+
*
|
429
|
+
* @param {UpdateOrderLineItemWithSelectorDTO[]} data - The attributes to update in the order line item with selector.
|
430
|
+
* @returns {Promise<OrderLineItemDTO[]>} The updated {return type}(s).
|
431
|
+
*
|
432
|
+
* @example
|
433
|
+
* ```typescript
|
434
|
+
* const updateOrderLineItems: UpdateOrderLineItemWithSelectorDTO[] = [
|
435
|
+
* {
|
436
|
+
* selector: {
|
437
|
+
* id: "line-item-id-1"
|
438
|
+
* },
|
439
|
+
* data: {
|
440
|
+
* id: "line-item-id-1",
|
441
|
+
* quantity: 2,
|
442
|
+
* unit_price: 1999
|
443
|
+
* }
|
444
|
+
* }
|
445
|
+
* ];
|
446
|
+
*
|
447
|
+
* const updatedLineItems = await orderModuleService.updateLineItems(updateOrderLineItems);
|
448
|
+
* ```
|
449
|
+
*
|
450
|
+
*/
|
29
451
|
updateLineItems(data: UpdateOrderLineItemWithSelectorDTO[]): Promise<OrderLineItemDTO[]>;
|
452
|
+
/**
|
453
|
+
* This method updates existing {return type}(s).
|
454
|
+
*
|
455
|
+
* @param {Partial<OrderLineItemDTO>} selector - Make all properties in T optional
|
456
|
+
* @param {Partial<UpdateOrderLineItemDTO>} data - Make all properties in T optional
|
457
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
458
|
+
* @returns {Promise<OrderLineItemDTO[]>} The updated {return type}(s).
|
459
|
+
*
|
460
|
+
* @example
|
461
|
+
* ```typescript
|
462
|
+
* const result = await orderModuleService.updateLineItems(
|
463
|
+
* { id: "line-item-id-1" },
|
464
|
+
* { quantity: 10 }
|
465
|
+
* );
|
466
|
+
* ```
|
467
|
+
*
|
468
|
+
*/
|
30
469
|
updateLineItems(selector: Partial<OrderLineItemDTO>, data: Partial<UpdateOrderLineItemDTO>, sharedContext?: Context): Promise<OrderLineItemDTO[]>;
|
470
|
+
/**
|
471
|
+
* This method updates existing {return type}(s).
|
472
|
+
*
|
473
|
+
* @param {string} lineId - The line's ID.
|
474
|
+
* @param {Partial<UpdateOrderLineItemDTO>} data - Make all properties in T optional
|
475
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
476
|
+
* @returns {Promise<OrderLineItemDTO>} The updated {return type}(s).
|
477
|
+
*
|
478
|
+
* @example
|
479
|
+
* ```typescript
|
480
|
+
* const result = await orderModuleService.updateLineItems(
|
481
|
+
* "lineIdExample",
|
482
|
+
* {
|
483
|
+
* quantity: 10,
|
484
|
+
* }
|
485
|
+
* );
|
486
|
+
* ```
|
487
|
+
*
|
488
|
+
*/
|
31
489
|
updateLineItems(lineId: string, data: Partial<UpdateOrderLineItemDTO>, sharedContext?: Context): Promise<OrderLineItemDTO>;
|
490
|
+
/**
|
491
|
+
* This method Represents the completion of an asynchronous operation
|
492
|
+
*
|
493
|
+
* @param {string[]} itemIds - The list of {summary}
|
494
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
495
|
+
* @returns {Promise<void>} Resolves when {summary}
|
496
|
+
*
|
497
|
+
* @example
|
498
|
+
* ```typescript
|
499
|
+
* await orderModuleService.removeLineItems(["itemId1", "itemId2"]);
|
500
|
+
* ```
|
501
|
+
*
|
502
|
+
*/
|
32
503
|
removeLineItems(itemIds: string[], sharedContext?: Context): Promise<void>;
|
504
|
+
/**
|
505
|
+
* This method Represents the completion of an asynchronous operation
|
506
|
+
*
|
507
|
+
* @param {string} itemIds - {summary}
|
508
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
509
|
+
* @returns {Promise<void>} Resolves when {summary}
|
510
|
+
*
|
511
|
+
* @example
|
512
|
+
* ```typescript
|
513
|
+
* await orderModuleService.removeLineItems(itemId1);
|
514
|
+
* ```
|
515
|
+
*
|
516
|
+
*/
|
33
517
|
removeLineItems(itemIds: string, sharedContext?: Context): Promise<void>;
|
518
|
+
/**
|
519
|
+
* This method Represents the completion of an asynchronous operation
|
520
|
+
*
|
521
|
+
* @param {Partial<OrderLineItemDTO>} selector - Make all properties in T optional
|
522
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
523
|
+
* @returns {Promise<void>} Resolves when {summary}
|
524
|
+
*
|
525
|
+
* @example
|
526
|
+
* ```typescript
|
527
|
+
* await orderModuleService.removeLineItems({ id: 'item-123' });
|
528
|
+
* ```
|
529
|
+
*
|
530
|
+
*/
|
34
531
|
removeLineItems(selector: Partial<OrderLineItemDTO>, sharedContext?: Context): Promise<void>;
|
532
|
+
/**
|
533
|
+
* This method updates existing {return type}(s).
|
534
|
+
*
|
535
|
+
* @param {Partial<OrderItemDTO>} selector - Make all properties in T optional
|
536
|
+
* @param {UpdateOrderItemDTO} data - The attributes to update in the order item.
|
537
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
538
|
+
* @returns {Promise<OrderItemDTO[]>} The updated {return type}(s).
|
539
|
+
*
|
540
|
+
* @example
|
541
|
+
* ```typescript
|
542
|
+
* await orderModuleService.updateOrderItem(
|
543
|
+
* { id: "item123" },
|
544
|
+
* { quantity: "2" }
|
545
|
+
* );
|
546
|
+
* ```
|
547
|
+
*
|
548
|
+
*/
|
35
549
|
updateOrderItem(selector: Partial<OrderItemDTO>, data: UpdateOrderItemDTO, sharedContext?: Context): Promise<OrderItemDTO[]>;
|
550
|
+
/**
|
551
|
+
* This method updates existing {return type}(s).
|
552
|
+
*
|
553
|
+
* @param {string} orderDetailId - The order detail's ID.
|
554
|
+
* @param {Partial<UpdateOrderItemDTO>} data - Make all properties in T optional
|
555
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
556
|
+
* @returns {Promise<OrderItemDTO>} The updated {return type}(s).
|
557
|
+
*
|
558
|
+
* @example
|
559
|
+
* ```typescript
|
560
|
+
* await orderModuleService.updateOrderItem(
|
561
|
+
* 'orderDetailId123',
|
562
|
+
* {
|
563
|
+
* item_id: 'item123',
|
564
|
+
* quantity: 2
|
565
|
+
* }
|
566
|
+
* );
|
567
|
+
* ```
|
568
|
+
*
|
569
|
+
*/
|
36
570
|
updateOrderItem(orderDetailId: string, data: Partial<UpdateOrderItemDTO>, sharedContext?: Context): Promise<OrderItemDTO>;
|
571
|
+
/**
|
572
|
+
* This method updates existing {return type}(s).
|
573
|
+
*
|
574
|
+
* @param {string | Partial<OrderItemDTO> | UpdateOrderItemWithSelectorDTO[]} orderDetailIdOrDataOrSelector - The string | partial< order item d t o> | update order item with selector details.
|
575
|
+
* @param {UpdateOrderItemDTO | Partial<UpdateOrderItemDTO>} data - {summary}
|
576
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
577
|
+
* @returns {Promise<OrderItemDTO | OrderItemDTO[]>} The updated {return type}(s).
|
578
|
+
*
|
579
|
+
* @example
|
580
|
+
* ```typescript
|
581
|
+
* await orderModuleService.updateOrderItem(
|
582
|
+
* "order-detail-id",
|
583
|
+
* {
|
584
|
+
* quantity: 2,
|
585
|
+
* item_id: 'item123',
|
586
|
+
* }
|
587
|
+
* );
|
588
|
+
* ```
|
589
|
+
*
|
590
|
+
*/
|
37
591
|
updateOrderItem(orderDetailIdOrDataOrSelector: string | UpdateOrderItemWithSelectorDTO[] | Partial<OrderItemDTO>, data?: UpdateOrderItemDTO | Partial<UpdateOrderItemDTO>, sharedContext?: Context): Promise<OrderItemDTO[] | OrderItemDTO>;
|
592
|
+
/**
|
593
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
594
|
+
*
|
595
|
+
* @param {FilterableOrderShippingMethodProps} filters - The filters to apply on the retrieved order shipping method.
|
596
|
+
* @param {FindConfig<OrderShippingMethodDTO>} config - The configurations determining how the order shipping method is retrieved. Its properties, such as `select` or `relations`, accept the
|
597
|
+
* attributes or relations associated with a order shipping method.
|
598
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
599
|
+
* @returns {Promise<OrderShippingMethodDTO[]>} The list of {return type}(s).
|
600
|
+
*
|
601
|
+
* @example
|
602
|
+
* ```typescript
|
603
|
+
* await orderModuleService.listShippingMethods(
|
604
|
+
* { order_id: "order_123" },
|
605
|
+
* { limit: 10, offset: 0 }
|
606
|
+
* );
|
607
|
+
* ```
|
608
|
+
*
|
609
|
+
*/
|
38
610
|
listShippingMethods(filters: FilterableOrderShippingMethodProps, config: FindConfig<OrderShippingMethodDTO>, sharedContext?: Context): Promise<OrderShippingMethodDTO[]>;
|
611
|
+
/**
|
612
|
+
* This method Represents the completion of an asynchronous operation
|
613
|
+
*
|
614
|
+
* @param {CreateOrderShippingMethodDTO} data - The order shipping method to be created.
|
615
|
+
* @returns {Promise<OrderShippingMethodDTO>} Represents the completion of an asynchronous operation
|
616
|
+
*
|
617
|
+
* @example
|
618
|
+
* ```typescript
|
619
|
+
* const result = await orderModuleService.addShippingMethods({
|
620
|
+
* name: "Standard Shipping",
|
621
|
+
* shipping_method_id: "1",
|
622
|
+
* order_id: "123",
|
623
|
+
* amount: 1000
|
624
|
+
* });
|
625
|
+
* ```
|
626
|
+
*
|
627
|
+
*/
|
39
628
|
addShippingMethods(data: CreateOrderShippingMethodDTO): Promise<OrderShippingMethodDTO>;
|
629
|
+
/**
|
630
|
+
* This method Represents the completion of an asynchronous operation
|
631
|
+
*
|
632
|
+
* @param {CreateOrderShippingMethodDTO[]} data - The order shipping method to be created.
|
633
|
+
* @returns {Promise<OrderShippingMethodDTO[]>} Represents the completion of an asynchronous operation
|
634
|
+
*
|
635
|
+
* @example
|
636
|
+
* ```typescript
|
637
|
+
* const shippingMethods: CreateOrderShippingMethodDTO[] = [
|
638
|
+
* {
|
639
|
+
* name: 'Standard Shipping',
|
640
|
+
* shipping_method_id: 'std_ship_001',
|
641
|
+
* order_id: 'order_12345',
|
642
|
+
* amount: 1000
|
643
|
+
* },
|
644
|
+
* {
|
645
|
+
* name: 'Express Shipping',
|
646
|
+
* shipping_method_id: 'exp_ship_002',
|
647
|
+
* order_id: 'order_12345',
|
648
|
+
* amount: 1000
|
649
|
+
* }
|
650
|
+
* ];
|
651
|
+
*
|
652
|
+
* const addedShippingMethods = await orderModuleService.addShippingMethods(shippingMethods);
|
653
|
+
* ```
|
654
|
+
*
|
655
|
+
*/
|
40
656
|
addShippingMethods(data: CreateOrderShippingMethodDTO[]): Promise<OrderShippingMethodDTO[]>;
|
657
|
+
/**
|
658
|
+
* This method Represents the completion of an asynchronous operation
|
659
|
+
*
|
660
|
+
* @param {string} orderId - The order's ID.
|
661
|
+
* @param {CreateOrderShippingMethodDTO[]} methods - The order shipping method to be created.
|
662
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
663
|
+
* @returns {Promise<OrderShippingMethodDTO[]>} Represents the completion of an asynchronous operation
|
664
|
+
*
|
665
|
+
* @example
|
666
|
+
* ```typescript
|
667
|
+
* const createOrderShippingMethodDTOs: CreateOrderShippingMethodDTO[] = [{
|
668
|
+
* name: "Standard Shipping",
|
669
|
+
* shipping_method_id: "123",
|
670
|
+
* order_id: "abc",
|
671
|
+
* amount: 1000
|
672
|
+
* }];
|
673
|
+
*
|
674
|
+
* await orderModuleService.addShippingMethods("orderId123", createOrderShippingMethodDTOs);
|
675
|
+
* ```
|
676
|
+
*
|
677
|
+
*/
|
41
678
|
addShippingMethods(orderId: string, methods: CreateOrderShippingMethodDTO[], sharedContext?: Context): Promise<OrderShippingMethodDTO[]>;
|
679
|
+
/**
|
680
|
+
* This method Represents the completion of an asynchronous operation
|
681
|
+
*
|
682
|
+
* @param {string[]} methodIds - The list of {summary}
|
683
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
684
|
+
* @returns {Promise<void>} Resolves when {summary}
|
685
|
+
*
|
686
|
+
* @example
|
687
|
+
* ```typescript
|
688
|
+
* await orderModuleService.removeShippingMethods(['method1', 'method2']);
|
689
|
+
* ```
|
690
|
+
*
|
691
|
+
*/
|
42
692
|
removeShippingMethods(methodIds: string[], sharedContext?: Context): Promise<void>;
|
693
|
+
/**
|
694
|
+
* This method Represents the completion of an asynchronous operation
|
695
|
+
*
|
696
|
+
* @param {string} methodIds - {summary}
|
697
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
698
|
+
* @returns {Promise<void>} Resolves when {summary}
|
699
|
+
*
|
700
|
+
* @example
|
701
|
+
* ```typescript
|
702
|
+
* await orderModuleService.removeShippingMethods("methodId12345");
|
703
|
+
* ```
|
704
|
+
*
|
705
|
+
*/
|
43
706
|
removeShippingMethods(methodIds: string, sharedContext?: Context): Promise<void>;
|
707
|
+
/**
|
708
|
+
* This method Represents the completion of an asynchronous operation
|
709
|
+
*
|
710
|
+
* @param {Partial<OrderShippingMethodDTO>} selector - Make all properties in T optional
|
711
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
712
|
+
* @returns {Promise<void>} Resolves when {summary}
|
713
|
+
*
|
714
|
+
* @example
|
715
|
+
* ```typescript
|
716
|
+
* await orderModuleService.removeShippingMethods({
|
717
|
+
* id: "shipping-method-123",
|
718
|
+
* });
|
719
|
+
* ```
|
720
|
+
*
|
721
|
+
*/
|
44
722
|
removeShippingMethods(selector: Partial<OrderShippingMethodDTO>, sharedContext?: Context): Promise<void>;
|
723
|
+
/**
|
724
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
725
|
+
*
|
726
|
+
* @param {FilterableOrderLineItemAdjustmentProps} filters - The filters to apply on the retrieved order line item adjustment.
|
727
|
+
* @param {FindConfig<OrderLineItemAdjustmentDTO>} config - The configurations determining how the order line item adjustment is retrieved. Its properties, such as `select` or `relations`, accept the
|
728
|
+
* attributes or relations associated with a order line item adjustment.
|
729
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
730
|
+
* @returns {Promise<OrderLineItemAdjustmentDTO[]>} The list of {return type}(s).
|
731
|
+
*
|
732
|
+
* @example
|
733
|
+
* ```typescript
|
734
|
+
* const orderLineItemAdjustments = await orderModuleService.listLineItemAdjustments({ item_id: "order-line-item-123" });
|
735
|
+
* ```
|
736
|
+
*
|
737
|
+
*/
|
45
738
|
listLineItemAdjustments(filters: FilterableOrderLineItemAdjustmentProps, config?: FindConfig<OrderLineItemAdjustmentDTO>, sharedContext?: Context): Promise<OrderLineItemAdjustmentDTO[]>;
|
739
|
+
/**
|
740
|
+
* This method Represents the completion of an asynchronous operation
|
741
|
+
*
|
742
|
+
* @param {CreateOrderAdjustmentDTO[]} data - The order adjustment to be created.
|
743
|
+
* @returns {Promise<OrderLineItemAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
744
|
+
*
|
745
|
+
* @example
|
746
|
+
* ```typescript
|
747
|
+
* await orderModuleService.addLineItemAdjustments([
|
748
|
+
* {
|
749
|
+
* amount: 1000,
|
750
|
+
* }
|
751
|
+
* ]);
|
752
|
+
* ```
|
753
|
+
*
|
754
|
+
*/
|
46
755
|
addLineItemAdjustments(data: CreateOrderAdjustmentDTO[]): Promise<OrderLineItemAdjustmentDTO[]>;
|
756
|
+
/**
|
757
|
+
* This method Represents the completion of an asynchronous operation
|
758
|
+
*
|
759
|
+
* @param {CreateOrderAdjustmentDTO} data - The order adjustment to be created.
|
760
|
+
* @returns {Promise<OrderLineItemAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
761
|
+
*
|
762
|
+
* @example
|
763
|
+
* ```typescript
|
764
|
+
* await orderModuleService.addLineItemAdjustments({
|
765
|
+
* amount: 1000,
|
766
|
+
* });
|
767
|
+
* ```
|
768
|
+
*
|
769
|
+
*/
|
47
770
|
addLineItemAdjustments(data: CreateOrderAdjustmentDTO): Promise<OrderLineItemAdjustmentDTO[]>;
|
771
|
+
/**
|
772
|
+
* This method Represents the completion of an asynchronous operation
|
773
|
+
*
|
774
|
+
* @param {string} orderId - The order's ID.
|
775
|
+
* @param {CreateOrderAdjustmentDTO[]} data - The order adjustment to be created.
|
776
|
+
* @returns {Promise<OrderLineItemAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
777
|
+
*
|
778
|
+
* @example
|
779
|
+
* ```typescript
|
780
|
+
* await orderModuleService.addLineItemAdjustments("12345", [
|
781
|
+
* {
|
782
|
+
* amount: 1000,
|
783
|
+
* }
|
784
|
+
* ]);
|
785
|
+
* ```
|
786
|
+
*
|
787
|
+
*/
|
48
788
|
addLineItemAdjustments(orderId: string, data: CreateOrderAdjustmentDTO[]): Promise<OrderLineItemAdjustmentDTO[]>;
|
789
|
+
/**
|
790
|
+
* This method Represents the completion of an asynchronous operation
|
791
|
+
*
|
792
|
+
* @param {string} orderId - The order's ID.
|
793
|
+
* @param {UpsertOrderLineItemAdjustmentDTO[]} data - The upsert order line item adjustment details.
|
794
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
795
|
+
* @returns {Promise<OrderLineItemAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
796
|
+
*
|
797
|
+
* @example
|
798
|
+
* ```typescript
|
799
|
+
* const adjustmentsData: UpsertOrderLineItemAdjustmentDTO[] = [{
|
800
|
+
* item_id: "item123",
|
801
|
+
* amount: 1000
|
802
|
+
* }];
|
803
|
+
*
|
804
|
+
* const result = await orderModuleService.setLineItemAdjustments("order456", adjustmentsData);
|
805
|
+
* ```
|
806
|
+
*
|
807
|
+
*/
|
49
808
|
setLineItemAdjustments(orderId: string, data: UpsertOrderLineItemAdjustmentDTO[], sharedContext?: Context): Promise<OrderLineItemAdjustmentDTO[]>;
|
809
|
+
/**
|
810
|
+
* This method Represents the completion of an asynchronous operation
|
811
|
+
*
|
812
|
+
* @param {string[]} adjustmentIds - The list of {summary}
|
813
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
814
|
+
* @returns {Promise<void>} Resolves when {summary}
|
815
|
+
*
|
816
|
+
* @example
|
817
|
+
* ```typescript
|
818
|
+
* await orderModuleService.removeLineItemAdjustments(["adjustmentId1", "adjustmentId2"]);
|
819
|
+
*
|
820
|
+
*/
|
50
821
|
removeLineItemAdjustments(adjustmentIds: string[], sharedContext?: Context): Promise<void>;
|
822
|
+
/**
|
823
|
+
* This method Represents the completion of an asynchronous operation
|
824
|
+
*
|
825
|
+
* @param {string} adjustmentIds - {summary}
|
826
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
827
|
+
* @returns {Promise<void>} Resolves when {summary}
|
828
|
+
*
|
829
|
+
* @example
|
830
|
+
* ```typescript
|
831
|
+
* await orderModuleService.removeLineItemAdjustments("adjustmentId123");
|
832
|
+
* ```
|
833
|
+
*
|
834
|
+
*/
|
51
835
|
removeLineItemAdjustments(adjustmentIds: string, sharedContext?: Context): Promise<void>;
|
836
|
+
/**
|
837
|
+
* This method Represents the completion of an asynchronous operation
|
838
|
+
*
|
839
|
+
* @param {Partial<OrderLineItemAdjustmentDTO>} selector - Make all properties in T optional
|
840
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
841
|
+
* @returns {Promise<void>} Resolves when {summary}
|
842
|
+
*
|
843
|
+
* @example
|
844
|
+
* ```typescript
|
845
|
+
* await orderModuleService.removeLineItemAdjustments({
|
846
|
+
* item_id: "123"
|
847
|
+
* });
|
848
|
+
* ```
|
849
|
+
*
|
850
|
+
*/
|
52
851
|
removeLineItemAdjustments(selector: Partial<OrderLineItemAdjustmentDTO>, sharedContext?: Context): Promise<void>;
|
852
|
+
/**
|
853
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
854
|
+
*
|
855
|
+
* @param {FilterableOrderShippingMethodAdjustmentProps} filters - The filters to apply on the retrieved order shipping method adjustment.
|
856
|
+
* @param {FindConfig<OrderShippingMethodAdjustmentDTO>} config - The configurations determining how the order shipping method adjustment is retrieved. Its properties, such as `select` or `relations`, accept the
|
857
|
+
* attributes or relations associated with a order shipping method adjustment.
|
858
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
859
|
+
* @returns {Promise<OrderShippingMethodAdjustmentDTO[]>} The list of {return type}(s).
|
860
|
+
*
|
861
|
+
* @example
|
862
|
+
* ```typescript
|
863
|
+
* const result = await orderModuleService.listShippingMethodAdjustments({
|
864
|
+
* id: "12345",
|
865
|
+
* });
|
866
|
+
* ```
|
867
|
+
*
|
868
|
+
*/
|
53
869
|
listShippingMethodAdjustments(filters: FilterableOrderShippingMethodAdjustmentProps, config?: FindConfig<OrderShippingMethodAdjustmentDTO>, sharedContext?: Context): Promise<OrderShippingMethodAdjustmentDTO[]>;
|
870
|
+
/**
|
871
|
+
* This method Represents the completion of an asynchronous operation
|
872
|
+
*
|
873
|
+
* @param {CreateOrderShippingMethodAdjustmentDTO[]} data - The order shipping method adjustment to be created.
|
874
|
+
* @returns {Promise<OrderShippingMethodAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
875
|
+
*
|
876
|
+
* @example
|
877
|
+
* ```typescript
|
878
|
+
* const adjustmentsData: CreateOrderShippingMethodAdjustmentDTO[] = [{
|
879
|
+
* shipping_method_id: '123',
|
880
|
+
* code: "ADJUSTMENT_CODE",
|
881
|
+
* amount: 1000,
|
882
|
+
* description: 'Discount',
|
883
|
+
* promotion_id: 'promo-456'
|
884
|
+
* }];
|
885
|
+
*
|
886
|
+
* const result = await orderModuleService.addShippingMethodAdjustments(adjustmentsData);
|
887
|
+
* ```
|
888
|
+
*
|
889
|
+
*/
|
54
890
|
addShippingMethodAdjustments(data: CreateOrderShippingMethodAdjustmentDTO[]): Promise<OrderShippingMethodAdjustmentDTO[]>;
|
891
|
+
/**
|
892
|
+
* This method Represents the completion of an asynchronous operation
|
893
|
+
*
|
894
|
+
* @param {CreateOrderShippingMethodAdjustmentDTO} data - The order shipping method adjustment to be created.
|
895
|
+
* @returns {Promise<OrderShippingMethodAdjustmentDTO>} Represents the completion of an asynchronous operation
|
896
|
+
*
|
897
|
+
* @example
|
898
|
+
* ```typescript
|
899
|
+
* // Example usage of addShippingMethodAdjustments method
|
900
|
+
* const adjustmentData: CreateOrderShippingMethodAdjustmentDTO = {
|
901
|
+
* shipping_method_id: "shipping_method_123",
|
902
|
+
* code: "ADJUSTMENT_CODE",
|
903
|
+
* amount: 1000
|
904
|
+
* };
|
905
|
+
*
|
906
|
+
* const result = await orderModuleService.addShippingMethodAdjustments(adjustmentData);
|
907
|
+
* ```
|
908
|
+
*
|
909
|
+
*/
|
55
910
|
addShippingMethodAdjustments(data: CreateOrderShippingMethodAdjustmentDTO): Promise<OrderShippingMethodAdjustmentDTO>;
|
911
|
+
/**
|
912
|
+
* This method Represents the completion of an asynchronous operation
|
913
|
+
*
|
914
|
+
* @param {string} orderId - The order's ID.
|
915
|
+
* @param {CreateOrderShippingMethodAdjustmentDTO[]} data - The order shipping method adjustment to be created.
|
916
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
917
|
+
* @returns {Promise<OrderShippingMethodAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
918
|
+
*
|
919
|
+
* @example
|
920
|
+
* ```typescript
|
921
|
+
* await orderModuleService.addShippingMethodAdjustments("orderId123", [
|
922
|
+
* {
|
923
|
+
* shipping_method_id: "shippingMethodId456",
|
924
|
+
* code: "CODE123",
|
925
|
+
* amount: 1000
|
926
|
+
* }
|
927
|
+
* ]);
|
928
|
+
* ```
|
929
|
+
*
|
930
|
+
*/
|
56
931
|
addShippingMethodAdjustments(orderId: string, data: CreateOrderShippingMethodAdjustmentDTO[], sharedContext?: Context): Promise<OrderShippingMethodAdjustmentDTO[]>;
|
932
|
+
/**
|
933
|
+
* This method Represents the completion of an asynchronous operation
|
934
|
+
*
|
935
|
+
* @param {string} orderId - The order's ID.
|
936
|
+
* @param {(CreateOrderShippingMethodAdjustmentDTO | UpdateOrderShippingMethodAdjustmentDTO)[]} data - The list of The order shipping method adjustment d t o | update order shipping method adjustment to be created.
|
937
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
938
|
+
* @returns {Promise<OrderShippingMethodAdjustmentDTO[]>} Represents the completion of an asynchronous operation
|
939
|
+
*
|
940
|
+
* @example
|
941
|
+
* ```typescript
|
942
|
+
* await orderModuleService.setShippingMethodAdjustments("orderId123", [
|
943
|
+
* {
|
944
|
+
* shipping_method_id: "shipMethodId123",
|
945
|
+
* code: "CODE123",
|
946
|
+
* amount: 1000,
|
947
|
+
* }
|
948
|
+
* ]);
|
949
|
+
* ```
|
950
|
+
*
|
951
|
+
*/
|
57
952
|
setShippingMethodAdjustments(orderId: string, data: (CreateOrderShippingMethodAdjustmentDTO | UpdateOrderShippingMethodAdjustmentDTO)[], sharedContext?: Context): Promise<OrderShippingMethodAdjustmentDTO[]>;
|
953
|
+
/**
|
954
|
+
* This method Represents the completion of an asynchronous operation
|
955
|
+
*
|
956
|
+
* @param {string[]} adjustmentIds - The list of {summary}
|
957
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
958
|
+
* @returns {Promise<void>} Resolves when {summary}
|
959
|
+
*
|
960
|
+
* @example
|
961
|
+
* ```typescript
|
962
|
+
* await orderModuleService.removeShippingMethodAdjustments(["adjustmentId1", "adjustmentId2"]);
|
963
|
+
* ```
|
964
|
+
*
|
965
|
+
*/
|
58
966
|
removeShippingMethodAdjustments(adjustmentIds: string[], sharedContext?: Context): Promise<void>;
|
967
|
+
/**
|
968
|
+
* This method Represents the completion of an asynchronous operation
|
969
|
+
*
|
970
|
+
* @param {string} adjustmentId - The adjustment's ID.
|
971
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
972
|
+
* @returns {Promise<void>} Resolves when {summary}
|
973
|
+
*
|
974
|
+
* @example
|
975
|
+
* ```typescript
|
976
|
+
* await orderModuleService.removeShippingMethodAdjustments("adjustmentId123");
|
977
|
+
* ```
|
978
|
+
*
|
979
|
+
*/
|
59
980
|
removeShippingMethodAdjustments(adjustmentId: string, sharedContext?: Context): Promise<void>;
|
981
|
+
/**
|
982
|
+
* This method Represents the completion of an asynchronous operation
|
983
|
+
*
|
984
|
+
* @param {Partial<OrderShippingMethodAdjustmentDTO>} selector - Make all properties in T optional
|
985
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
986
|
+
* @returns {Promise<void>} Resolves when {summary}
|
987
|
+
*
|
988
|
+
* @example
|
989
|
+
* ```typescript
|
990
|
+
* await orderModuleService.removeShippingMethodAdjustments({ id: "adjustment123" });
|
991
|
+
* ```
|
992
|
+
*
|
993
|
+
*/
|
60
994
|
removeShippingMethodAdjustments(selector: Partial<OrderShippingMethodAdjustmentDTO>, sharedContext?: Context): Promise<void>;
|
995
|
+
/**
|
996
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
997
|
+
*
|
998
|
+
* @param {FilterableOrderLineItemTaxLineProps} filters - The filters to apply on the retrieved order line item tax line.
|
999
|
+
* @param {FindConfig<OrderLineItemTaxLineDTO>} config - The configurations determining how the order line item tax line is retrieved. Its properties, such as `select` or `relations`, accept the
|
1000
|
+
* attributes or relations associated with a order line item tax line.
|
1001
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1002
|
+
* @returns {Promise<OrderLineItemTaxLineDTO[]>} The list of {return type}(s).
|
1003
|
+
*
|
1004
|
+
* @example
|
1005
|
+
* ```typescript
|
1006
|
+
* await orderModuleService.listLineItemTaxLines({ id: "123" });
|
1007
|
+
* ```
|
1008
|
+
*
|
1009
|
+
*/
|
61
1010
|
listLineItemTaxLines(filters: FilterableOrderLineItemTaxLineProps, config?: FindConfig<OrderLineItemTaxLineDTO>, sharedContext?: Context): Promise<OrderLineItemTaxLineDTO[]>;
|
1011
|
+
/**
|
1012
|
+
* This method Represents the completion of an asynchronous operation
|
1013
|
+
*
|
1014
|
+
* @param {CreateOrderLineItemTaxLineDTO[]} taxLines - The order line item tax line to be created.
|
1015
|
+
* @returns {Promise<OrderLineItemTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1016
|
+
*
|
1017
|
+
* @example
|
1018
|
+
* ```typescript
|
1019
|
+
* const taxLines: CreateOrderLineItemTaxLineDTO[] = [{
|
1020
|
+
* code: 'VAT',
|
1021
|
+
* rate: 20,
|
1022
|
+
* tax_rate_id: 'tax_rate_id_value'
|
1023
|
+
* }];
|
1024
|
+
*
|
1025
|
+
* const result = await orderModuleService.addLineItemTaxLines(taxLines);
|
1026
|
+
* ```
|
1027
|
+
*
|
1028
|
+
*/
|
62
1029
|
addLineItemTaxLines(taxLines: CreateOrderLineItemTaxLineDTO[]): Promise<OrderLineItemTaxLineDTO[]>;
|
1030
|
+
/**
|
1031
|
+
* This method Represents the completion of an asynchronous operation
|
1032
|
+
*
|
1033
|
+
* @param {CreateOrderLineItemTaxLineDTO} taxLine - The order line item tax line to be created.
|
1034
|
+
* @returns {Promise<OrderLineItemTaxLineDTO>} Represents the completion of an asynchronous operation
|
1035
|
+
*
|
1036
|
+
* @example
|
1037
|
+
* ```typescript
|
1038
|
+
* const taxLine: CreateOrderLineItemTaxLineDTO = {
|
1039
|
+
* code: 'TAX100',
|
1040
|
+
* rate: 10
|
1041
|
+
* };
|
1042
|
+
*
|
1043
|
+
* const response = await orderModuleService.addLineItemTaxLines(taxLine);
|
1044
|
+
* ```
|
1045
|
+
*
|
1046
|
+
*/
|
63
1047
|
addLineItemTaxLines(taxLine: CreateOrderLineItemTaxLineDTO): Promise<OrderLineItemTaxLineDTO>;
|
1048
|
+
/**
|
1049
|
+
* This method Represents the completion of an asynchronous operation
|
1050
|
+
*
|
1051
|
+
* @param {string} orderId - The order's ID.
|
1052
|
+
* @param {CreateOrderLineItemTaxLineDTO | CreateOrderLineItemTaxLineDTO[]} taxLines - The order line item tax line d t o | create order line item tax line to be created.
|
1053
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1054
|
+
* @returns {Promise<OrderLineItemTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1055
|
+
*
|
1056
|
+
* @example
|
1057
|
+
* ```typescript
|
1058
|
+
* await orderModuleService.addLineItemTaxLines("orderId123", [
|
1059
|
+
* {
|
1060
|
+
* code: "TAX1001",
|
1061
|
+
* rate: 70,
|
1062
|
+
* }
|
1063
|
+
* ]);
|
1064
|
+
* ```
|
1065
|
+
*
|
1066
|
+
*/
|
64
1067
|
addLineItemTaxLines(orderId: string, taxLines: CreateOrderLineItemTaxLineDTO[] | CreateOrderLineItemTaxLineDTO, sharedContext?: Context): Promise<OrderLineItemTaxLineDTO[]>;
|
1068
|
+
/**
|
1069
|
+
* This method Represents the completion of an asynchronous operation
|
1070
|
+
*
|
1071
|
+
* @param {string} orderId - The order's ID.
|
1072
|
+
* @param {(CreateOrderLineItemTaxLineDTO | UpdateOrderLineItemTaxLineDTO)[]} taxLines - The list of The order line item tax line d t o | update order line item tax line to be created.
|
1073
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1074
|
+
* @returns {Promise<OrderLineItemTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1075
|
+
*
|
1076
|
+
* @example
|
1077
|
+
* ```typescript
|
1078
|
+
* const orderId = '12345';
|
1079
|
+
* const taxLines: (CreateOrderLineItemTaxLineDTO | UpdateOrderLineItemTaxLineDTO)[] = [
|
1080
|
+
* {
|
1081
|
+
* code: "TAX1001",
|
1082
|
+
* rate: 70,
|
1083
|
+
* }
|
1084
|
+
* ];
|
1085
|
+
*
|
1086
|
+
* const result = await orderModuleService.setLineItemTaxLines(orderId, taxLines);
|
1087
|
+
*
|
1088
|
+
* console.log(result);
|
1089
|
+
* ```
|
1090
|
+
*
|
1091
|
+
*/
|
65
1092
|
setLineItemTaxLines(orderId: string, taxLines: (CreateOrderLineItemTaxLineDTO | UpdateOrderLineItemTaxLineDTO)[], sharedContext?: Context): Promise<OrderLineItemTaxLineDTO[]>;
|
1093
|
+
/**
|
1094
|
+
* This method Represents the completion of an asynchronous operation
|
1095
|
+
*
|
1096
|
+
* @param {string[]} taxLineIds - The list of {summary}
|
1097
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1098
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1099
|
+
*
|
1100
|
+
* @example
|
1101
|
+
* ```typescript
|
1102
|
+
* // Example usage of removeLineItemTaxLines method from IOrderModuleService
|
1103
|
+
* await orderModuleService.removeLineItemTaxLines(["taxLineId1", "taxLineId2"]);
|
1104
|
+
* ```
|
1105
|
+
*
|
1106
|
+
*/
|
66
1107
|
removeLineItemTaxLines(taxLineIds: string[], sharedContext?: Context): Promise<void>;
|
1108
|
+
/**
|
1109
|
+
* This method Represents the completion of an asynchronous operation
|
1110
|
+
*
|
1111
|
+
* @param {string} taxLineIds - {summary}
|
1112
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1113
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1114
|
+
*
|
1115
|
+
* @example
|
1116
|
+
* ```typescript
|
1117
|
+
* await orderModuleService.removeLineItemTaxLines("yourTaxLineId");
|
1118
|
+
* ```
|
1119
|
+
*
|
1120
|
+
*/
|
67
1121
|
removeLineItemTaxLines(taxLineIds: string, sharedContext?: Context): Promise<void>;
|
1122
|
+
/**
|
1123
|
+
* This method Represents the completion of an asynchronous operation
|
1124
|
+
*
|
1125
|
+
* @param {FilterableOrderLineItemTaxLineProps} selector - The filters to apply on the retrieved order line item tax line.
|
1126
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1127
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1128
|
+
*
|
1129
|
+
* @example
|
1130
|
+
* ```typescript
|
1131
|
+
* await orderModuleService.removeLineItemTaxLines({
|
1132
|
+
* id: "yourTaxLineId"
|
1133
|
+
* });
|
1134
|
+
* ```
|
1135
|
+
*
|
1136
|
+
*/
|
68
1137
|
removeLineItemTaxLines(selector: FilterableOrderLineItemTaxLineProps, sharedContext?: Context): Promise<void>;
|
1138
|
+
/**
|
1139
|
+
* This method retrieves a paginated list of {return type}(s) based on optional filters and configuration.
|
1140
|
+
*
|
1141
|
+
* @param {FilterableOrderShippingMethodTaxLineProps} filters - The filters to apply on the retrieved order shipping method tax line.
|
1142
|
+
* @param {FindConfig<OrderShippingMethodTaxLineDTO>} config - The configurations determining how the order shipping method tax line is retrieved. Its properties, such as `select` or `relations`, accept the
|
1143
|
+
* attributes or relations associated with a order shipping method tax line.
|
1144
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1145
|
+
* @returns {Promise<OrderShippingMethodTaxLineDTO[]>} The list of {return type}(s).
|
1146
|
+
*
|
1147
|
+
* @example
|
1148
|
+
* ```typescript
|
1149
|
+
* async function executeMethod() {
|
1150
|
+
* const result = await orderModuleService.listShippingMethodTaxLines({
|
1151
|
+
* id: "123",
|
1152
|
+
* });
|
1153
|
+
* }
|
1154
|
+
* ```
|
1155
|
+
*
|
1156
|
+
*/
|
69
1157
|
listShippingMethodTaxLines(filters: FilterableOrderShippingMethodTaxLineProps, config?: FindConfig<OrderShippingMethodTaxLineDTO>, sharedContext?: Context): Promise<OrderShippingMethodTaxLineDTO[]>;
|
1158
|
+
/**
|
1159
|
+
* This method Represents the completion of an asynchronous operation
|
1160
|
+
*
|
1161
|
+
* @param {CreateOrderShippingMethodTaxLineDTO[]} taxLines - The order shipping method tax line to be created.
|
1162
|
+
* @returns {Promise<OrderShippingMethodTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1163
|
+
*
|
1164
|
+
* @example
|
1165
|
+
* ```typescript
|
1166
|
+
* const result = await orderModuleService.addShippingMethodTaxLines([
|
1167
|
+
* {
|
1168
|
+
* code: "VAT20",
|
1169
|
+
* rate: 20,
|
1170
|
+
* }
|
1171
|
+
* ]);
|
1172
|
+
* ```
|
1173
|
+
*
|
1174
|
+
*/
|
70
1175
|
addShippingMethodTaxLines(taxLines: CreateOrderShippingMethodTaxLineDTO[]): Promise<OrderShippingMethodTaxLineDTO[]>;
|
1176
|
+
/**
|
1177
|
+
* This method Represents the completion of an asynchronous operation
|
1178
|
+
*
|
1179
|
+
* @param {CreateOrderShippingMethodTaxLineDTO} taxLine - The order shipping method tax line to be created.
|
1180
|
+
* @returns {Promise<OrderShippingMethodTaxLineDTO>} Represents the completion of an asynchronous operation
|
1181
|
+
*
|
1182
|
+
* @example
|
1183
|
+
* ```typescript
|
1184
|
+
* const taxLine: CreateOrderShippingMethodTaxLineDTO = {
|
1185
|
+
* code: "VAT20",
|
1186
|
+
* rate: 20,
|
1187
|
+
* };
|
1188
|
+
*
|
1189
|
+
* orderModuleService.addShippingMethodTaxLines(taxLine).then((result) => {
|
1190
|
+
* console.log(result);
|
1191
|
+
* });
|
1192
|
+
* ```
|
1193
|
+
*
|
1194
|
+
*/
|
71
1195
|
addShippingMethodTaxLines(taxLine: CreateOrderShippingMethodTaxLineDTO): Promise<OrderShippingMethodTaxLineDTO>;
|
1196
|
+
/**
|
1197
|
+
* This method Represents the completion of an asynchronous operation
|
1198
|
+
*
|
1199
|
+
* @param {string} orderId - The order's ID.
|
1200
|
+
* @param {CreateOrderShippingMethodTaxLineDTO | CreateOrderShippingMethodTaxLineDTO[]} taxLines - The order shipping method tax line d t o | create order shipping method tax line to be created.
|
1201
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1202
|
+
* @returns {Promise<OrderShippingMethodTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1203
|
+
*
|
1204
|
+
* @example
|
1205
|
+
* ```typescript
|
1206
|
+
* const orderId = '123';
|
1207
|
+
* const taxLines = [
|
1208
|
+
* {
|
1209
|
+
* code: "VAT20",
|
1210
|
+
* rate: 20,
|
1211
|
+
* }
|
1212
|
+
* ];
|
1213
|
+
*
|
1214
|
+
* const addedTaxLines = await orderModuleService.addShippingMethodTaxLines(orderId, taxLines);
|
1215
|
+
* ```
|
1216
|
+
*
|
1217
|
+
*/
|
72
1218
|
addShippingMethodTaxLines(orderId: string, taxLines: CreateOrderShippingMethodTaxLineDTO[] | CreateOrderShippingMethodTaxLineDTO, sharedContext?: Context): Promise<OrderShippingMethodTaxLineDTO[]>;
|
1219
|
+
/**
|
1220
|
+
* This method Represents the completion of an asynchronous operation
|
1221
|
+
*
|
1222
|
+
* @param {string} orderId - The order's ID.
|
1223
|
+
* @param {(CreateOrderShippingMethodTaxLineDTO | UpdateOrderShippingMethodTaxLineDTO)[]} taxLines - The list of The order shipping method tax line d t o | update order shipping method tax line to be created.
|
1224
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1225
|
+
* @returns {Promise<OrderShippingMethodTaxLineDTO[]>} Represents the completion of an asynchronous operation
|
1226
|
+
*
|
1227
|
+
* @example
|
1228
|
+
* ```typescript
|
1229
|
+
* const orderId = "someOrderId";
|
1230
|
+
* const taxLines = [
|
1231
|
+
* {
|
1232
|
+
* code: "VAT20",
|
1233
|
+
* rate: 20,
|
1234
|
+
* }
|
1235
|
+
* ];
|
1236
|
+
*
|
1237
|
+
* const result = await orderModuleService.setShippingMethodTaxLines(orderId, taxLines);
|
1238
|
+
* ```
|
1239
|
+
*
|
1240
|
+
*/
|
73
1241
|
setShippingMethodTaxLines(orderId: string, taxLines: (CreateOrderShippingMethodTaxLineDTO | UpdateOrderShippingMethodTaxLineDTO)[], sharedContext?: Context): Promise<OrderShippingMethodTaxLineDTO[]>;
|
1242
|
+
/**
|
1243
|
+
* This method Represents the completion of an asynchronous operation
|
1244
|
+
*
|
1245
|
+
* @param {string[]} taxLineIds - The list of {summary}
|
1246
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1247
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1248
|
+
*
|
1249
|
+
* @example
|
1250
|
+
* ```typescript
|
1251
|
+
* await orderModuleService.removeShippingMethodTaxLines(["taxLine1", "taxLine2"]);
|
1252
|
+
* ```
|
1253
|
+
*
|
1254
|
+
*/
|
74
1255
|
removeShippingMethodTaxLines(taxLineIds: string[], sharedContext?: Context): Promise<void>;
|
1256
|
+
/**
|
1257
|
+
* This method Represents the completion of an asynchronous operation
|
1258
|
+
*
|
1259
|
+
* @param {string} taxLineIds - {summary}
|
1260
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1261
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1262
|
+
*
|
1263
|
+
* @example
|
1264
|
+
* ```typescript
|
1265
|
+
* await orderModuleService.removeShippingMethodTaxLines("12345");
|
1266
|
+
* ```
|
1267
|
+
*
|
1268
|
+
*/
|
75
1269
|
removeShippingMethodTaxLines(taxLineIds: string, sharedContext?: Context): Promise<void>;
|
1270
|
+
/**
|
1271
|
+
* This method Represents the completion of an asynchronous operation
|
1272
|
+
*
|
1273
|
+
* @param {FilterableOrderShippingMethodTaxLineProps} selector - The filters to apply on the retrieved order shipping method tax line.
|
1274
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1275
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1276
|
+
*
|
1277
|
+
* @example
|
1278
|
+
* ```typescript
|
1279
|
+
* await orderModuleService.removeShippingMethodTaxLines({
|
1280
|
+
* id: "shippingMethodTaxLineId"
|
1281
|
+
* });
|
1282
|
+
* ```
|
1283
|
+
*
|
1284
|
+
*/
|
76
1285
|
removeShippingMethodTaxLines(selector: FilterableOrderShippingMethodTaxLineProps, sharedContext?: Context): Promise<void>;
|
77
1286
|
createOrderChange(data: CreateOrderChangeDTO, sharedContext?: Context): Promise<OrderChangeDTO>;
|
1287
|
+
/**
|
1288
|
+
* This method creates {return type}(s)
|
1289
|
+
*
|
1290
|
+
* @param {CreateOrderChangeDTO[]} data - The order change to be created.
|
1291
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1292
|
+
* @returns {Promise<OrderChangeDTO[]>} The created {return type}(s).
|
1293
|
+
*
|
1294
|
+
* @example
|
1295
|
+
* ```typescript
|
1296
|
+
* // Example call to createOrderChange
|
1297
|
+
*
|
1298
|
+
* const createOrderChangeData: CreateOrderChangeDTO[] = [{
|
1299
|
+
* order_id: "order123",
|
1300
|
+
* description: "Change due to customer request"
|
1301
|
+
* }];
|
1302
|
+
*
|
1303
|
+
* const result = await orderModuleService.createOrderChange(createOrderChangeData);
|
1304
|
+
* ```
|
1305
|
+
*
|
1306
|
+
*/
|
78
1307
|
createOrderChange(data: CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderChangeDTO[]>;
|
1308
|
+
/**
|
1309
|
+
* This method creates {return type}(s)
|
1310
|
+
*
|
1311
|
+
* @param {CreateOrderChangeDTO | CreateOrderChangeDTO[]} data - The order change d t o | create order change to be created.
|
1312
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1313
|
+
* @returns {Promise<OrderChangeDTO | OrderChangeDTO[]>} The created {return type}(s).
|
1314
|
+
*
|
1315
|
+
* @example
|
1316
|
+
* ```typescript
|
1317
|
+
* const result = await orderModuleService.createOrderChange({
|
1318
|
+
* order_id: "order123",
|
1319
|
+
* description: "Adding new item to the order"
|
1320
|
+
* });
|
1321
|
+
* ```
|
1322
|
+
*
|
1323
|
+
*/
|
79
1324
|
createOrderChange(data: CreateOrderChangeDTO | CreateOrderChangeDTO[], sharedContext?: Context): Promise<OrderChangeDTO | OrderChangeDTO[]>;
|
1325
|
+
/**
|
1326
|
+
* This method Represents the completion of an asynchronous operation
|
1327
|
+
*
|
1328
|
+
* @param {string} orderId - The order's ID.
|
1329
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1330
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1331
|
+
*
|
1332
|
+
* @example
|
1333
|
+
* ```typescript
|
1334
|
+
* await orderModuleService.cancelOrderChange("orderId123");
|
1335
|
+
* ```
|
1336
|
+
*
|
1337
|
+
*/
|
80
1338
|
cancelOrderChange(orderId: string, sharedContext?: Context): Promise<void>;
|
1339
|
+
/**
|
1340
|
+
* This method Represents the completion of an asynchronous operation
|
1341
|
+
*
|
1342
|
+
* @param {string[]} orderId - The order's ID.
|
1343
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1344
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1345
|
+
*
|
1346
|
+
* @example
|
1347
|
+
* ```typescript
|
1348
|
+
* await orderModuleService.cancelOrderChange(["1234ABCD"]);
|
1349
|
+
* ```
|
1350
|
+
*
|
1351
|
+
*/
|
81
1352
|
cancelOrderChange(orderId: string[], sharedContext?: Context): Promise<void>;
|
1353
|
+
/**
|
1354
|
+
* This method Represents the completion of an asynchronous operation
|
1355
|
+
*
|
1356
|
+
* @param {CancelOrderChangeDTO} data - The cancel order change details.
|
1357
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1358
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1359
|
+
*
|
1360
|
+
* @example
|
1361
|
+
* ```typescript
|
1362
|
+
* const cancelOrderChangeData: CancelOrderChangeDTO = {
|
1363
|
+
* id: "orderChangeId",
|
1364
|
+
* };
|
1365
|
+
*
|
1366
|
+
* await orderModuleService.cancelOrderChange(cancelOrderChangeData);
|
1367
|
+
* ```
|
1368
|
+
*
|
1369
|
+
*/
|
82
1370
|
cancelOrderChange(data: CancelOrderChangeDTO, sharedContext?: Context): Promise<void>;
|
1371
|
+
/**
|
1372
|
+
* This method Represents the completion of an asynchronous operation
|
1373
|
+
*
|
1374
|
+
* @param {CancelOrderChangeDTO[]} data - The cancel order change details.
|
1375
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1376
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1377
|
+
*
|
1378
|
+
* @example
|
1379
|
+
* ```typescript
|
1380
|
+
* await orderModuleService.cancelOrderChange([{ id: "orderChangeId" }]);
|
1381
|
+
* ```
|
1382
|
+
*
|
1383
|
+
*/
|
83
1384
|
cancelOrderChange(data: CancelOrderChangeDTO[], sharedContext?: Context): Promise<void>;
|
1385
|
+
/**
|
1386
|
+
* This method Represents the completion of an asynchronous operation
|
1387
|
+
*
|
1388
|
+
* @param {string} orderId - The order's ID.
|
1389
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1390
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1391
|
+
*
|
1392
|
+
* @example
|
1393
|
+
* ```typescript
|
1394
|
+
* await orderModuleService.confirmOrderChange("123456789");
|
1395
|
+
* ```
|
1396
|
+
*
|
1397
|
+
*/
|
84
1398
|
confirmOrderChange(orderId: string, sharedContext?: Context): Promise<void>;
|
1399
|
+
/**
|
1400
|
+
* This method Represents the completion of an asynchronous operation
|
1401
|
+
*
|
1402
|
+
* @param {string[]} orderId - The order's ID.
|
1403
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1404
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1405
|
+
*
|
1406
|
+
* @example
|
1407
|
+
* ```typescript
|
1408
|
+
* await orderModuleService.confirmOrderChange(["12345"]);
|
1409
|
+
* ```
|
1410
|
+
*
|
1411
|
+
*/
|
85
1412
|
confirmOrderChange(orderId: string[], sharedContext?: Context): Promise<void>;
|
1413
|
+
/**
|
1414
|
+
* This method Represents the completion of an asynchronous operation
|
1415
|
+
*
|
1416
|
+
* @param {ConfirmOrderChangeDTO} data - The confirm order change details.
|
1417
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1418
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1419
|
+
*
|
1420
|
+
* @example
|
1421
|
+
* ```typescript
|
1422
|
+
* await orderModuleService.confirmOrderChange({
|
1423
|
+
* id: "123456"
|
1424
|
+
* });
|
1425
|
+
* ```
|
1426
|
+
*
|
1427
|
+
*/
|
86
1428
|
confirmOrderChange(data: ConfirmOrderChangeDTO, sharedContext?: Context): Promise<void>;
|
1429
|
+
/**
|
1430
|
+
* This method Represents the completion of an asynchronous operation
|
1431
|
+
*
|
1432
|
+
* @param {ConfirmOrderChangeDTO[]} data - The confirm order change details.
|
1433
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1434
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1435
|
+
*
|
1436
|
+
* @example
|
1437
|
+
* ```typescript
|
1438
|
+
* const confirmOrderChangesData: ConfirmOrderChangeDTO[] = [{
|
1439
|
+
* id: "orderChangeId",
|
1440
|
+
* }];
|
1441
|
+
*
|
1442
|
+
* await orderModuleService.confirmOrderChange(confirmOrderChangesData);
|
1443
|
+
* ```
|
1444
|
+
*
|
1445
|
+
*/
|
87
1446
|
confirmOrderChange(data: ConfirmOrderChangeDTO[], sharedContext?: Context): Promise<void>;
|
1447
|
+
/**
|
1448
|
+
* This method Represents the completion of an asynchronous operation
|
1449
|
+
*
|
1450
|
+
* @param {string} orderId - The order's ID.
|
1451
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1452
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1453
|
+
*
|
1454
|
+
* @example
|
1455
|
+
* ```typescript
|
1456
|
+
* await orderModuleService.declineOrderChange("orderChangeId");
|
1457
|
+
* ```
|
1458
|
+
*
|
1459
|
+
*/
|
88
1460
|
declineOrderChange(orderId: string, sharedContext?: Context): Promise<void>;
|
1461
|
+
/**
|
1462
|
+
* This method Represents the completion of an asynchronous operation
|
1463
|
+
*
|
1464
|
+
* @param {string[]} orderId - The order's ID.
|
1465
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1466
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1467
|
+
*
|
1468
|
+
* @example
|
1469
|
+
* ```typescript
|
1470
|
+
* await orderModuleService.declineOrderChange(["orderChangeId"]);
|
1471
|
+
* ```
|
1472
|
+
*
|
1473
|
+
*/
|
89
1474
|
declineOrderChange(orderId: string[], sharedContext?: Context): Promise<void>;
|
1475
|
+
/**
|
1476
|
+
* This method Represents the completion of an asynchronous operation
|
1477
|
+
*
|
1478
|
+
* @param {DeclineOrderChangeDTO} data - The decline order change details.
|
1479
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1480
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1481
|
+
*
|
1482
|
+
* @example
|
1483
|
+
* ```typescript
|
1484
|
+
* await orderModuleService.declineOrderChange({
|
1485
|
+
* id: "123456",
|
1486
|
+
* });
|
1487
|
+
* ```
|
1488
|
+
*
|
1489
|
+
*/
|
90
1490
|
declineOrderChange(data: DeclineOrderChangeDTO, sharedContext?: Context): Promise<void>;
|
1491
|
+
/**
|
1492
|
+
* This method Represents the completion of an asynchronous operation
|
1493
|
+
*
|
1494
|
+
* @param {DeclineOrderChangeDTO[]} data - The decline order change details.
|
1495
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1496
|
+
* @returns {Promise<void>} Resolves when {summary}
|
1497
|
+
*
|
1498
|
+
* @example
|
1499
|
+
* ```typescript
|
1500
|
+
* await orderModuleService.declineOrderChange([
|
1501
|
+
* {
|
1502
|
+
* id: "12345",
|
1503
|
+
* }
|
1504
|
+
* ]);
|
1505
|
+
* ```
|
1506
|
+
*
|
1507
|
+
*/
|
91
1508
|
declineOrderChange(data: DeclineOrderChangeDTO[], sharedContext?: Context): Promise<void>;
|
1509
|
+
/**
|
1510
|
+
* This method {summary}
|
1511
|
+
*
|
1512
|
+
* @param {string | string[]} orderId - The order's ID.
|
1513
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1514
|
+
* @returns {(orderId: string | string[], sharedContext?: Context) => any} {summary}
|
1515
|
+
*
|
1516
|
+
* @example
|
1517
|
+
* ```typescript
|
1518
|
+
* await orderModuleService.applyPendingOrderActions("12345");
|
1519
|
+
* ```
|
1520
|
+
*
|
1521
|
+
*/
|
92
1522
|
applyPendingOrderActions(orderId: string | string[], sharedContext?: Context): any;
|
1523
|
+
/**
|
1524
|
+
* This method {summary}
|
1525
|
+
*
|
1526
|
+
* @param {any} data - {summary}
|
1527
|
+
* @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
|
1528
|
+
* @returns {(data: any, sharedContext?: Context) => any} {summary}
|
1529
|
+
*
|
1530
|
+
* @example
|
1531
|
+
* ```typescript
|
1532
|
+
* await orderModuleService.addOrderAction({
|
1533
|
+
* action: 'create',
|
1534
|
+
* orderId: '12345',
|
1535
|
+
* details: {
|
1536
|
+
* productId: 'abc123',
|
1537
|
+
* quantity: 2
|
1538
|
+
* }
|
1539
|
+
* });
|
1540
|
+
* ```
|
1541
|
+
*
|
1542
|
+
*/
|
93
1543
|
addOrderAction(data: any, sharedContext?: Context): any;
|
94
1544
|
}
|
95
1545
|
//# sourceMappingURL=service.d.ts.map
|