@medusajs/types 1.12.0-snapshot-20240405070935 → 1.12.0-snapshot-20240406075900

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. package/dist/auth/common/auth-user.d.ts +21 -16
  2. package/dist/auth/common/auth-user.d.ts.map +1 -1
  3. package/dist/auth/common/provider.d.ts +28 -15
  4. package/dist/auth/common/provider.d.ts.map +1 -1
  5. package/dist/auth/service.d.ts +137 -75
  6. package/dist/auth/service.d.ts.map +1 -1
  7. package/dist/bundles.d.ts +2 -0
  8. package/dist/bundles.d.ts.map +1 -1
  9. package/dist/bundles.js +3 -1
  10. package/dist/bundles.js.map +1 -1
  11. package/dist/cart/common.d.ts +443 -62
  12. package/dist/cart/common.d.ts.map +1 -1
  13. package/dist/cart/mutations.d.ts +483 -0
  14. package/dist/cart/mutations.d.ts.map +1 -1
  15. package/dist/cart/mutations.js.map +1 -1
  16. package/dist/cart/service.d.ts +1607 -0
  17. package/dist/cart/service.d.ts.map +1 -1
  18. package/dist/common/index.d.ts +1 -0
  19. package/dist/common/index.d.ts.map +1 -1
  20. package/dist/common/index.js +1 -0
  21. package/dist/common/index.js.map +1 -1
  22. package/dist/common/rule.d.ts +2 -0
  23. package/dist/common/rule.d.ts.map +1 -0
  24. package/dist/common/rule.js +3 -0
  25. package/dist/common/rule.js.map +1 -0
  26. package/dist/customer/service.d.ts +445 -197
  27. package/dist/customer/service.d.ts.map +1 -1
  28. package/dist/file/common.d.ts +14 -0
  29. package/dist/file/common.d.ts.map +1 -0
  30. package/dist/file/common.js +3 -0
  31. package/dist/file/common.js.map +1 -0
  32. package/dist/file/index.d.ts +4 -0
  33. package/dist/file/index.d.ts.map +1 -0
  34. package/dist/file/index.js +20 -0
  35. package/dist/file/index.js.map +1 -0
  36. package/dist/file/mutations.d.ts +18 -0
  37. package/dist/file/mutations.d.ts.map +1 -0
  38. package/dist/file/mutations.js +3 -0
  39. package/dist/file/mutations.js.map +1 -0
  40. package/dist/file/service.d.ts +76 -0
  41. package/dist/file/service.d.ts.map +1 -0
  42. package/dist/file/service.js +3 -0
  43. package/dist/file/service.js.map +1 -0
  44. package/dist/fulfillment/mutations/shipping-option-rule.d.ts +2 -2
  45. package/dist/fulfillment/mutations/shipping-option-rule.d.ts.map +1 -1
  46. package/dist/http/fulfillment/admin/fulfillment-address.d.ts +22 -0
  47. package/dist/http/fulfillment/admin/fulfillment-address.d.ts.map +1 -0
  48. package/dist/http/fulfillment/admin/fulfillment-address.js +3 -0
  49. package/dist/http/fulfillment/admin/fulfillment-address.js.map +1 -0
  50. package/dist/http/fulfillment/admin/fulfillment-item.d.ts +17 -0
  51. package/dist/http/fulfillment/admin/fulfillment-item.d.ts.map +1 -0
  52. package/dist/http/fulfillment/admin/fulfillment-item.js +3 -0
  53. package/dist/http/fulfillment/admin/fulfillment-item.js.map +1 -0
  54. package/dist/http/fulfillment/admin/fulfillment-label.d.ts +14 -0
  55. package/dist/http/fulfillment/admin/fulfillment-label.d.ts.map +1 -0
  56. package/dist/http/fulfillment/admin/fulfillment-label.js +3 -0
  57. package/dist/http/fulfillment/admin/fulfillment-label.js.map +1 -0
  58. package/dist/http/fulfillment/admin/fulfillment-provider.d.ts +12 -0
  59. package/dist/http/fulfillment/admin/fulfillment-provider.d.ts.map +1 -0
  60. package/dist/http/fulfillment/admin/fulfillment-provider.js +3 -0
  61. package/dist/http/fulfillment/admin/fulfillment-provider.js.map +1 -0
  62. package/dist/http/fulfillment/admin/fulfillment-set.d.ts +15 -0
  63. package/dist/http/fulfillment/admin/fulfillment-set.d.ts.map +1 -0
  64. package/dist/http/fulfillment/admin/fulfillment-set.js +3 -0
  65. package/dist/http/fulfillment/admin/fulfillment-set.js.map +1 -0
  66. package/dist/http/fulfillment/admin/fulfillment.d.ts +27 -0
  67. package/dist/http/fulfillment/admin/fulfillment.d.ts.map +1 -0
  68. package/dist/http/fulfillment/admin/fulfillment.js +3 -0
  69. package/dist/http/fulfillment/admin/fulfillment.js.map +1 -0
  70. package/dist/http/fulfillment/admin/geo-zone.d.ts +17 -0
  71. package/dist/http/fulfillment/admin/geo-zone.d.ts.map +1 -0
  72. package/dist/http/fulfillment/admin/geo-zone.js +3 -0
  73. package/dist/http/fulfillment/admin/geo-zone.js.map +1 -0
  74. package/dist/http/fulfillment/admin/index.d.ts +13 -0
  75. package/dist/http/fulfillment/admin/index.d.ts.map +1 -0
  76. package/dist/http/fulfillment/admin/index.js +29 -0
  77. package/dist/http/fulfillment/admin/index.js.map +1 -0
  78. package/dist/http/fulfillment/admin/service-zone.d.ts +14 -0
  79. package/dist/http/fulfillment/admin/service-zone.d.ts.map +1 -0
  80. package/dist/http/fulfillment/admin/service-zone.js +3 -0
  81. package/dist/http/fulfillment/admin/service-zone.js.map +1 -0
  82. package/dist/http/fulfillment/admin/shipping-option-rule.d.ts +16 -0
  83. package/dist/http/fulfillment/admin/shipping-option-rule.d.ts.map +1 -0
  84. package/dist/http/fulfillment/admin/shipping-option-rule.js +3 -0
  85. package/dist/http/fulfillment/admin/shipping-option-rule.js.map +1 -0
  86. package/dist/http/fulfillment/admin/shipping-option-type.d.ts +14 -0
  87. package/dist/http/fulfillment/admin/shipping-option-type.d.ts.map +1 -0
  88. package/dist/http/fulfillment/admin/shipping-option-type.js +3 -0
  89. package/dist/http/fulfillment/admin/shipping-option-type.js.map +1 -0
  90. package/dist/http/fulfillment/admin/shipping-option.d.ts +31 -0
  91. package/dist/http/fulfillment/admin/shipping-option.d.ts.map +1 -0
  92. package/dist/http/fulfillment/admin/shipping-option.js +3 -0
  93. package/dist/http/fulfillment/admin/shipping-option.js.map +1 -0
  94. package/dist/http/fulfillment/admin/shipping-profile.d.ts +13 -0
  95. package/dist/http/fulfillment/admin/shipping-profile.d.ts.map +1 -0
  96. package/dist/http/fulfillment/admin/shipping-profile.js +3 -0
  97. package/dist/http/fulfillment/admin/shipping-profile.js.map +1 -0
  98. package/dist/http/fulfillment/index.d.ts +2 -0
  99. package/dist/http/fulfillment/index.d.ts.map +1 -0
  100. package/dist/http/fulfillment/index.js +18 -0
  101. package/dist/http/fulfillment/index.js.map +1 -0
  102. package/dist/http/index.d.ts +3 -0
  103. package/dist/http/index.d.ts.map +1 -0
  104. package/dist/http/index.js +19 -0
  105. package/dist/http/index.js.map +1 -0
  106. package/dist/http/stock-locations/common.d.ts +28 -0
  107. package/dist/http/stock-locations/common.d.ts.map +1 -0
  108. package/dist/http/stock-locations/common.js +3 -0
  109. package/dist/http/stock-locations/common.js.map +1 -0
  110. package/dist/http/stock-locations/index.d.ts +2 -0
  111. package/dist/http/stock-locations/index.d.ts.map +1 -0
  112. package/dist/http/stock-locations/index.js +18 -0
  113. package/dist/http/stock-locations/index.js.map +1 -0
  114. package/dist/index.d.ts +4 -1
  115. package/dist/index.d.ts.map +1 -1
  116. package/dist/index.js +4 -1
  117. package/dist/index.js.map +1 -1
  118. package/dist/inventory/common/inventory-item.d.ts +55 -64
  119. package/dist/inventory/common/inventory-item.d.ts.map +1 -1
  120. package/dist/inventory/common/inventory-level.d.ts +37 -37
  121. package/dist/inventory/common/inventory-level.d.ts.map +1 -1
  122. package/dist/inventory/common/reservation-item.d.ts +34 -44
  123. package/dist/inventory/common/reservation-item.d.ts.map +1 -1
  124. package/dist/inventory/service-next.d.ts +596 -534
  125. package/dist/inventory/service-next.d.ts.map +1 -1
  126. package/dist/payment/common.d.ts +174 -53
  127. package/dist/payment/common.d.ts.map +1 -1
  128. package/dist/payment/common.js +3 -3
  129. package/dist/payment/common.js.map +1 -1
  130. package/dist/payment/mutations.d.ts +58 -17
  131. package/dist/payment/mutations.d.ts.map +1 -1
  132. package/dist/payment/provider.d.ts +128 -43
  133. package/dist/payment/provider.d.ts.map +1 -1
  134. package/dist/payment/provider.js.map +1 -1
  135. package/dist/payment/service.d.ts +460 -39
  136. package/dist/payment/service.d.ts.map +1 -1
  137. package/dist/pricing/common/price-list.d.ts +2 -2
  138. package/dist/pricing/common/price-set.d.ts +6 -4
  139. package/dist/pricing/common/price-set.d.ts.map +1 -1
  140. package/dist/pricing/service.d.ts +731 -1695
  141. package/dist/pricing/service.d.ts.map +1 -1
  142. package/dist/product/common.d.ts +4 -0
  143. package/dist/product/common.d.ts.map +1 -1
  144. package/dist/product-category/repository.d.ts +2 -1
  145. package/dist/product-category/repository.d.ts.map +1 -1
  146. package/dist/promotion/common/application-method.d.ts +153 -0
  147. package/dist/promotion/common/application-method.d.ts.map +1 -1
  148. package/dist/promotion/common/campaign-budget.d.ts +37 -0
  149. package/dist/promotion/common/campaign-budget.d.ts.map +1 -1
  150. package/dist/promotion/common/campaign.d.ts +36 -0
  151. package/dist/promotion/common/campaign.d.ts.map +1 -1
  152. package/dist/promotion/common/compute-actions.d.ts +135 -0
  153. package/dist/promotion/common/compute-actions.d.ts.map +1 -1
  154. package/dist/promotion/common/promotion-rule-value.d.ts +30 -0
  155. package/dist/promotion/common/promotion-rule-value.d.ts.map +1 -1
  156. package/dist/promotion/common/promotion-rule.d.ts +77 -0
  157. package/dist/promotion/common/promotion-rule.d.ts.map +1 -1
  158. package/dist/promotion/common/promotion.d.ts +100 -0
  159. package/dist/promotion/common/promotion.d.ts.map +1 -1
  160. package/dist/promotion/mutations.d.ts +84 -0
  161. package/dist/promotion/mutations.d.ts.map +1 -1
  162. package/dist/promotion/service.d.ts +786 -0
  163. package/dist/promotion/service.d.ts.map +1 -1
  164. package/dist/region/common.d.ts +9 -0
  165. package/dist/region/common.d.ts.map +1 -1
  166. package/dist/region/mutations.d.ts +11 -3
  167. package/dist/region/mutations.d.ts.map +1 -1
  168. package/dist/region/service.d.ts +210 -85
  169. package/dist/region/service.d.ts.map +1 -1
  170. package/dist/stock-location/common.d.ts +14 -0
  171. package/dist/stock-location/common.d.ts.map +1 -1
  172. package/dist/stock-location/service-next.d.ts +178 -186
  173. package/dist/stock-location/service-next.d.ts.map +1 -1
  174. package/dist/store/common/store.d.ts +42 -0
  175. package/dist/store/common/store.d.ts.map +1 -1
  176. package/dist/store/mutations/store.d.ts +75 -0
  177. package/dist/store/mutations/store.d.ts.map +1 -1
  178. package/dist/store/service.d.ts +113 -75
  179. package/dist/store/service.d.ts.map +1 -1
  180. package/dist/tax/common.d.ts +298 -10
  181. package/dist/tax/common.d.ts.map +1 -1
  182. package/dist/tax/mutations.d.ts +157 -0
  183. package/dist/tax/mutations.d.ts.map +1 -1
  184. package/dist/tax/provider.d.ts +126 -0
  185. package/dist/tax/provider.d.ts.map +1 -1
  186. package/dist/tax/service.d.ts +600 -0
  187. package/dist/tax/service.d.ts.map +1 -1
  188. package/dist/workflows/index.d.ts +2 -0
  189. package/dist/workflows/index.d.ts.map +1 -0
  190. package/dist/workflows/index.js +18 -0
  191. package/dist/workflows/index.js.map +1 -0
  192. package/dist/workflows/stock-locations/index.d.ts +2 -0
  193. package/dist/workflows/stock-locations/index.d.ts.map +1 -0
  194. package/dist/workflows/stock-locations/index.js +18 -0
  195. package/dist/workflows/stock-locations/index.js.map +1 -0
  196. package/dist/workflows/stock-locations/mutations.d.ts +8 -0
  197. package/dist/workflows/stock-locations/mutations.d.ts.map +1 -0
  198. package/dist/workflows/stock-locations/mutations.js +3 -0
  199. package/dist/workflows/stock-locations/mutations.js.map +1 -0
  200. package/package.json +1 -1
@@ -4,85 +4,1692 @@ import { IModuleService } from "../modules-sdk";
4
4
  import { Context } from "../shared-context";
5
5
  import { CartAddressDTO, CartDTO, CartLineItemDTO, CartShippingMethodDTO, FilterableAddressProps, FilterableCartProps, FilterableLineItemAdjustmentProps, FilterableLineItemProps, FilterableLineItemTaxLineProps, FilterableShippingMethodAdjustmentProps, FilterableShippingMethodProps, FilterableShippingMethodTaxLineProps, LineItemAdjustmentDTO, LineItemTaxLineDTO, ShippingMethodAdjustmentDTO, ShippingMethodTaxLineDTO } from "./common";
6
6
  import { CreateAddressDTO, CreateCartDTO, CreateLineItemAdjustmentDTO, CreateLineItemDTO, CreateLineItemForCartDTO, CreateLineItemTaxLineDTO, CreateShippingMethodAdjustmentDTO, CreateShippingMethodDTO, CreateShippingMethodForSingleCartDTO, CreateShippingMethodTaxLineDTO, UpdateAddressDTO, UpdateCartDTO, UpdateCartDataDTO, UpdateLineItemDTO, UpdateLineItemTaxLineDTO, UpdateLineItemWithSelectorDTO, UpdateShippingMethodAdjustmentDTO, UpdateShippingMethodTaxLineDTO, UpsertLineItemAdjustmentDTO } from "./mutations";
7
+ /**
8
+ * The main service interface for the Cart Module.
9
+ */
7
10
  export interface ICartModuleService extends IModuleService {
11
+ /**
12
+ * This method retrieves a cart by its ID.
13
+ *
14
+ * @param {string} cartId - The cart's ID.
15
+ * @param {FindConfig<CartDTO>} config - The configurations determining how the cart is retrieved. Its properties, such as `select` or `relations`, accept the
16
+ * attributes or relations associated with a cart.
17
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
18
+ * @returns {Promise<CartDTO>} The retrieved cart.
19
+ *
20
+ * @example
21
+ * A simple example that retrieves a cart by its ID:
22
+ *
23
+ * ```ts
24
+ * const cart = await cartModuleService.retrieve("cart_123")
25
+ * ```
26
+ *
27
+ * To specify relations that should be retrieved:
28
+ *
29
+ * ```ts
30
+ * const cart = await cartModuleService.retrieve("cart_123", {
31
+ * relations: ["shipping_address"],
32
+ * })
33
+ * ```
34
+ */
8
35
  retrieve(cartId: string, config?: FindConfig<CartDTO>, sharedContext?: Context): Promise<CartDTO>;
36
+ /**
37
+ * This method retrieves a paginated list of carts based on optional filters and configuration.
38
+ *
39
+ * @param {FilterableCartProps} filters - The filters to apply on the retrieved carts.
40
+ * @param {FindConfig<CartDTO>} config - The configurations determining how the cart is retrieved. Its properties, such as `select` or `relations`, accept the
41
+ * attributes or relations associated with a cart.
42
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
43
+ * @returns {Promise<CartDTO[]>} The list of carts.
44
+ *
45
+ * @example
46
+ * To retrieve a list of carts using their IDs:
47
+ *
48
+ * ```ts
49
+ * const carts = await cartModuleService.list({
50
+ * id: ["cart_123", "cart_321"],
51
+ * })
52
+ * ```
53
+ *
54
+ * To specify relations that should be retrieved within the carts:
55
+ *
56
+ * ```ts
57
+ * const carts = await cartModuleService.list(
58
+ * {
59
+ * id: ["cart_123", "cart_321"],
60
+ * },
61
+ * {
62
+ * relations: ["shipping_address"],
63
+ * }
64
+ * )
65
+ * ```
66
+ *
67
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
68
+ *
69
+ * ```ts
70
+ * const carts = await cartModuleService.list(
71
+ * {
72
+ * id: ["cart_123", "cart_321"],
73
+ * },
74
+ * {
75
+ * relations: ["shipping_address"],
76
+ * take: 20,
77
+ * skip: 2,
78
+ * }
79
+ * )
80
+ * ```
81
+ */
9
82
  list(filters?: FilterableCartProps, config?: FindConfig<CartDTO>, sharedContext?: Context): Promise<CartDTO[]>;
83
+ /**
84
+ * This method retrieves a paginated list of carts along with the total count of available carts satisfying the provided filters.
85
+ *
86
+ * @param {FilterableCartProps} filters - The filters to apply on the retrieved carts.
87
+ * @param {FindConfig<CartDTO>} config - The configurations determining how the cart is retrieved. Its properties, such as `select` or `relations`, accept the
88
+ * attributes or relations associated with a cart.
89
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
90
+ * @returns {Promise<[CartDTO[], number]>} The list of carts along with their total count.
91
+ *
92
+ * @example
93
+ * To retrieve a list of carts using their IDs:
94
+ *
95
+ * ```ts
96
+ * const [carts, count] = await cartModuleService.listAndCount({
97
+ * id: ["cart_123", "cart_321"],
98
+ * })
99
+ * ```
100
+ *
101
+ * To specify relations that should be retrieved within the carts:
102
+ *
103
+ * ```ts
104
+ * const [carts, count] = await cartModuleService.listAndCount(
105
+ * {
106
+ * id: ["cart_123", "cart_321"],
107
+ * },
108
+ * {
109
+ * relations: ["shipping_address"],
110
+ * }
111
+ * )
112
+ * ```
113
+ *
114
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
115
+ *
116
+ * ```ts
117
+ * const [carts, count] = await cartModuleService.listAndCount(
118
+ * {
119
+ * id: ["cart_123", "cart_321"],
120
+ * },
121
+ * {
122
+ * relations: ["shipping_address"],
123
+ * take: 20,
124
+ * skip: 2,
125
+ * }
126
+ * )
127
+ * ```
128
+ */
10
129
  listAndCount(filters?: FilterableCartProps, config?: FindConfig<CartDTO>, sharedContext?: Context): Promise<[CartDTO[], number]>;
130
+ /**
131
+ * This method creates carts.
132
+ *
133
+ * @param {CreateCartDTO[]} data - The carts to be created.
134
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
135
+ * @returns {Promise<CartDTO[]>} The created carts.
136
+ *
137
+ * @example
138
+ * const carts = await cartModuleService.create([
139
+ * {
140
+ * currency_code: "usd",
141
+ * },
142
+ * {
143
+ * currency_code: "eur",
144
+ * },
145
+ * ])
146
+ */
11
147
  create(data: CreateCartDTO[], sharedContext?: Context): Promise<CartDTO[]>;
148
+ /**
149
+ * This method creates a cart.
150
+ *
151
+ * @param {CreateCartDTO} data - The cart to be created.
152
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
153
+ * @returns {Promise<CartDTO>} The created cart.
154
+ *
155
+ * @example
156
+ * const cart = await cartModuleService.create({
157
+ * currency_code: "usd",
158
+ * })
159
+ */
12
160
  create(data: CreateCartDTO, sharedContext?: Context): Promise<CartDTO>;
161
+ /**
162
+ * This method updates existing carts.
163
+ *
164
+ * @param {UpdateCartDTO[]} data - The attributes to update in the carts.
165
+ * @returns {Promise<CartDTO[]>} The updated carts.
166
+ *
167
+ * @example
168
+ * const carts = await cartModuleService.update([
169
+ * {
170
+ * id: "cart_123",
171
+ * region_id: "reg_123",
172
+ * },
173
+ * {
174
+ * id: "cart_321",
175
+ * customer_id: "cus_123",
176
+ * },
177
+ * ])
178
+ */
13
179
  update(data: UpdateCartDTO[]): Promise<CartDTO[]>;
180
+ /**
181
+ * This method updates an existing cart.
182
+ *
183
+ * @param {string} cartId - The cart's ID.
184
+ * @param {UpdateCartDataDTO} data - The attributes to update in the cart data.
185
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
186
+ * @returns {Promise<CartDTO>} The updated cart.
187
+ *
188
+ * @example
189
+ * const cart = await cartModuleService.update("cart_123", {
190
+ * region_id: "reg_123",
191
+ * })
192
+ */
14
193
  update(cartId: string, data: UpdateCartDataDTO, sharedContext?: Context): Promise<CartDTO>;
194
+ /**
195
+ * This method updates existing carts matching the specified filters.
196
+ *
197
+ * @param {Partial<CartDTO>} selector - The filters that specify which carts to update.
198
+ * @param {UpdateCartDataDTO} data - The attributes to update in the carts.
199
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
200
+ * @returns {Promise<CartDTO[]>} The updated carts.
201
+ *
202
+ * @example
203
+ * const carts = await cartModuleService.update(
204
+ * {
205
+ * currency_code: "usd",
206
+ * },
207
+ * {
208
+ * region_id: "reg_123",
209
+ * }
210
+ * )
211
+ */
15
212
  update(selector: Partial<CartDTO>, data: UpdateCartDataDTO, sharedContext?: Context): Promise<CartDTO[]>;
213
+ /**
214
+ * This method deletes carts by their IDs.
215
+ *
216
+ * @param {string[]} cartIds - The list of cart IDs.
217
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
218
+ * @returns {Promise<void>} Resolves when the carts are deleted successfully.
219
+ *
220
+ * @example
221
+ * await cartModuleService.delete(["cart_123", "cart_321"])
222
+ */
16
223
  delete(cartIds: string[], sharedContext?: Context): Promise<void>;
224
+ /**
225
+ * This method deletes a cart by its ID.
226
+ *
227
+ * @param {string} cartId - The cart's ID.
228
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
229
+ * @returns {Promise<void>} Resolves when the carts are deleted successfully.
230
+ *
231
+ * @example
232
+ * await cartModuleService.delete("cart_123")
233
+ */
17
234
  delete(cartId: string, sharedContext?: Context): Promise<void>;
235
+ /**
236
+ * This method retrieves a paginated list of addresses based on optional filters and configuration.
237
+ *
238
+ * @param {FilterableAddressProps} filters - The filters to apply on the retrieved addresss.
239
+ * @param {FindConfig<CartAddressDTO>} config - The configurations determining how the address is retrieved. Its properties, such as `select` or `relations`, accept the
240
+ * attributes or relations associated with a address.
241
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
242
+ * @returns {Promise<CartAddressDTO[]>} The list of addresses.
243
+ *
244
+ * @example
245
+ * To retrieve a list of addresses using their IDs:
246
+ *
247
+ * ```ts
248
+ * const addresses = await cartModuleService.listAddresses({
249
+ * id: ["caaddr_123", "caaddr_321"],
250
+ * })
251
+ * ```
252
+ *
253
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
254
+ *
255
+ * ```ts
256
+ * const addresses = await cartModuleService.listAddresses(
257
+ * {
258
+ * id: ["caaddr_123", "caaddr_321"],
259
+ * },
260
+ * {
261
+ * take: 20,
262
+ * skip: 2,
263
+ * }
264
+ * )
265
+ * ```
266
+ */
18
267
  listAddresses(filters?: FilterableAddressProps, config?: FindConfig<CartAddressDTO>, sharedContext?: Context): Promise<CartAddressDTO[]>;
268
+ /**
269
+ * This method creates addresses.
270
+ *
271
+ * @param {CreateAddressDTO[]} data - The addresss to be created.
272
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
273
+ * @returns {Promise<CartAddressDTO[]>} The created addresses.
274
+ *
275
+ * @example
276
+ * const addresses = await cartModuleService.createAddresses([
277
+ * {
278
+ * address_1: "412 E Cheyenne Rd",
279
+ * country_code: "us",
280
+ * },
281
+ * {
282
+ * first_name: "Genevieve",
283
+ * last_name: "Fox",
284
+ * address_1: "17350 Northwest Fwy",
285
+ * country_code: "us",
286
+ * },
287
+ * ])
288
+ */
19
289
  createAddresses(data: CreateAddressDTO[], sharedContext?: Context): Promise<CartAddressDTO[]>;
290
+ /**
291
+ * This method creates a address.
292
+ *
293
+ * @param {CreateAddressDTO} data - The address to be created.
294
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
295
+ * @returns {Promise<CartAddressDTO>} The created address.
296
+ *
297
+ * @example
298
+ * const address = await cartModuleService.createAddresses({
299
+ * first_name: "Genevieve",
300
+ * last_name: "Fox",
301
+ * address_1: "17350 Northwest Fwy",
302
+ * country_code: "us",
303
+ * })
304
+ */
20
305
  createAddresses(data: CreateAddressDTO, sharedContext?: Context): Promise<CartAddressDTO>;
306
+ /**
307
+ * This method updates existing addresses.
308
+ *
309
+ * @param {UpdateAddressDTO[]} data - The attributes to update in the addresss.
310
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
311
+ * @returns {Promise<CartAddressDTO[]>} The updated addresses.
312
+ *
313
+ * @example
314
+ * const addresses = await cartModuleService.updateAddresses([
315
+ * {
316
+ * id: "caaddr_123",
317
+ * first_name: "Leroy",
318
+ * },
319
+ * {
320
+ * id: "caaddr_321",
321
+ * last_name: "Hunt",
322
+ * },
323
+ * ])
324
+ */
21
325
  updateAddresses(data: UpdateAddressDTO[], sharedContext?: Context): Promise<CartAddressDTO[]>;
326
+ /**
327
+ * This method updates an existing address.
328
+ *
329
+ * @param {UpdateAddressDTO} data - The attributes to update in the address.
330
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
331
+ * @returns {Promise<CartAddressDTO>} The updated address.
332
+ *
333
+ * @example
334
+ * const address = await cartModuleService.updateAddresses({
335
+ * id: "caaddr_123",
336
+ * first_name: "Leroy",
337
+ * })
338
+ */
22
339
  updateAddresses(data: UpdateAddressDTO, sharedContext?: Context): Promise<CartAddressDTO>;
340
+ /**
341
+ * This method deletes addresses by their IDs.
342
+ *
343
+ * @param {string[]} ids - The IDs of the cart.
344
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
345
+ * @returns {Promise<void>} Resolves when the addresses are deleted successfully.
346
+ *
347
+ * @example
348
+ * await cartModuleService.deleteAddresses([
349
+ * "caaddr_123",
350
+ * "caaddr_321",
351
+ * ])
352
+ */
23
353
  deleteAddresses(ids: string[], sharedContext?: Context): Promise<void>;
354
+ /**
355
+ * This method deletes an address by its ID.
356
+ *
357
+ * @param {string} ids - The IDs of the cart.
358
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
359
+ * @returns {Promise<void>} Resolves when the address are deleted successfully.
360
+ *
361
+ * @example
362
+ * await cartModuleService.deleteAddresses("caaddr_123")
363
+ */
24
364
  deleteAddresses(ids: string, sharedContext?: Context): Promise<void>;
365
+ /**
366
+ * This method retrieves a line item by its ID.
367
+ *
368
+ * @param {string} itemId - The item's ID.
369
+ * @param {FindConfig<CartLineItemDTO>} config - The configurations determining how the line item is retrieved. Its properties, such as `select` or `relations`, accept the
370
+ * attributes or relations associated with a line item.
371
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
372
+ * @returns {Promise<CartLineItemDTO>} The retrieved line item.
373
+ *
374
+ * @example
375
+ * A simple example that retrieves a line item by its ID:
376
+ *
377
+ * ```ts
378
+ * const lineItem =
379
+ * await cartModuleService.retrieveLineItem("cali_123")
380
+ * ```
381
+ *
382
+ * To specify relations that should be retrieved:
383
+ *
384
+ * ```ts
385
+ * const lineItem = await cartModuleService.retrieveLineItem(
386
+ * "cali_123",
387
+ * {
388
+ * relations: ["cart"],
389
+ * }
390
+ * )
391
+ * ```
392
+ */
25
393
  retrieveLineItem(itemId: string, config?: FindConfig<CartLineItemDTO>, sharedContext?: Context): Promise<CartLineItemDTO>;
394
+ /**
395
+ * This method retrieves a paginated list of line items based on optional filters and configuration.
396
+ *
397
+ * @param {FilterableLineItemProps} filters - The filters to apply on the retrieved line items.
398
+ * @param {FindConfig<CartLineItemDTO>} config - The configurations determining how the line item is retrieved. Its properties, such as `select` or `relations`, accept the
399
+ * attributes or relations associated with a line item.
400
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
401
+ * @returns {Promise<CartLineItemDTO[]>} The list of line items.
402
+ *
403
+ * @example
404
+ * To retrieve a list of line items using their IDs:
405
+ *
406
+ * ```ts
407
+ * const lineItems = await cartModuleService.listLineItems({
408
+ * id: ["cali_123", "cali_321"],
409
+ * })
410
+ * ```
411
+ *
412
+ * To specify relations that should be retrieved within the line items:
413
+ *
414
+ * ```ts
415
+ * const lineItems = await cartModuleService.listLineItems(
416
+ * {
417
+ * id: ["cali_123", "cali_321"],
418
+ * },
419
+ * {
420
+ * relations: ["cart"],
421
+ * }
422
+ * )
423
+ * ```
424
+ *
425
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
426
+ *
427
+ * ```ts
428
+ * const lineItems = await cartModuleService.listLineItems(
429
+ * {
430
+ * id: ["cali_123", "cali_321"],
431
+ * },
432
+ * {
433
+ * relations: ["cart"],
434
+ * take: 20,
435
+ * skip: 2,
436
+ * }
437
+ * )
438
+ * ```
439
+ */
26
440
  listLineItems(filters: FilterableLineItemProps, config?: FindConfig<CartLineItemDTO>, sharedContext?: Context): Promise<CartLineItemDTO[]>;
441
+ /**
442
+ * This method adds a line item to a cart
443
+ *
444
+ * @param {CreateLineItemForCartDTO} data - The line item to create and add to the cart.
445
+ * The cart is specified in the `cart_id` field.
446
+ * @returns {Promise<CartLineItemDTO[]>} The added line item.
447
+ *
448
+ * @example
449
+ * const lineItem = await cartModuleService.addLineItems({
450
+ * cart_id: "cart_123",
451
+ * title: "Shirt",
452
+ * quantity: 2,
453
+ * unit_price: 4000,
454
+ * })
455
+ */
27
456
  addLineItems(data: CreateLineItemForCartDTO): Promise<CartLineItemDTO[]>;
457
+ /**
458
+ * This method adds line items to carts.
459
+ *
460
+ * @param {CreateLineItemForCartDTO[]} data - The line item to create and add to the carts.
461
+ * The cart is specified in the `cart_id` field.
462
+ * @returns {Promise<CartLineItemDTO[]>} The added line items.
463
+ *
464
+ * @example
465
+ * const lineItems = await cartModuleService.addLineItems([
466
+ * {
467
+ * cart_id: "cart_123",
468
+ * title: "Shirt",
469
+ * quantity: 2,
470
+ * unit_price: 4000,
471
+ * },
472
+ * {
473
+ * cart_id: "cart_123",
474
+ * title: "Pants",
475
+ * quantity: 1,
476
+ * unit_price: 3000,
477
+ * },
478
+ * ])
479
+ */
28
480
  addLineItems(data: CreateLineItemForCartDTO[]): Promise<CartLineItemDTO[]>;
481
+ /**
482
+ * This method adds line items to a cart.
483
+ *
484
+ * @param {string} cartId - The cart's ID.
485
+ * @param {CreateLineItemDTO[]} items - The line items to be created and added.
486
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
487
+ * @returns {Promise<CartLineItemDTO[]>} The added line items.
488
+ *
489
+ * @example
490
+ * const lineItems = await cartModuleService.addLineItems(
491
+ * "cart_123",
492
+ * [
493
+ * {
494
+ * title: "Shirt",
495
+ * quantity: 2,
496
+ * unit_price: 4000,
497
+ * },
498
+ * {
499
+ * title: "Pants",
500
+ * quantity: 1,
501
+ * unit_price: 3000,
502
+ * },
503
+ * ]
504
+ * )
505
+ */
29
506
  addLineItems(cartId: string, items: CreateLineItemDTO[], sharedContext?: Context): Promise<CartLineItemDTO[]>;
507
+ /**
508
+ * This method updates existing line items.
509
+ *
510
+ * @param {UpdateLineItemWithSelectorDTO[]} data - A list of objects, each holding the filters that specify which items
511
+ * to update, and the attributes to update in the items.
512
+ * @returns {Promise<CartLineItemDTO[]>} The updated line items.
513
+ *
514
+ * @example
515
+ * const lineItems = await cartModuleService.updateLineItems([
516
+ * {
517
+ * selector: {
518
+ * id: "cali_123",
519
+ * },
520
+ * data: {
521
+ * quantity: 2,
522
+ * },
523
+ * },
524
+ * {
525
+ * selector: {
526
+ * variant_sku: "PANTS",
527
+ * },
528
+ * data: {
529
+ * unit_price: 3000,
530
+ * },
531
+ * },
532
+ * ])
533
+ */
30
534
  updateLineItems(data: UpdateLineItemWithSelectorDTO[]): Promise<CartLineItemDTO[]>;
535
+ /**
536
+ * This method updates existing line items matching the specified filters.
537
+ *
538
+ * @param {Partial<CartLineItemDTO>} selector - The filters that specify which line items to update.
539
+ * @param {Partial<UpdateLineItemDTO>} data - The attributes to update in the line items.
540
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
541
+ * @returns {Promise<CartLineItemDTO[]>} The updated line items.
542
+ *
543
+ * @example
544
+ * const lineItems = await cartModuleService.updateLineItems(
545
+ * {
546
+ * variant_sku: "PANTS",
547
+ * },
548
+ * {
549
+ * unit_price: 4000,
550
+ * }
551
+ * )
552
+ */
31
553
  updateLineItems(selector: Partial<CartLineItemDTO>, data: Partial<UpdateLineItemDTO>, sharedContext?: Context): Promise<CartLineItemDTO[]>;
554
+ /**
555
+ * This method updates an existing line item.
556
+ *
557
+ * @param {string} lineId - The line item's ID.
558
+ * @param {Partial<UpdateLineItemDTO>} data - The attributes to update in the line item.
559
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
560
+ * @returns {Promise<CartLineItemDTO>} The updated line item.
561
+ *
562
+ * @example
563
+ * const lineItem = await cartModuleService.updateLineItems(
564
+ * "cali_123",
565
+ * {
566
+ * unit_price: 3000,
567
+ * }
568
+ * )
569
+ */
32
570
  updateLineItems(lineId: string, data: Partial<UpdateLineItemDTO>, sharedContext?: Context): Promise<CartLineItemDTO>;
571
+ /**
572
+ * This method retrieves a paginated list of shipping methods based on optional filters and configuration.
573
+ *
574
+ * @param {FilterableShippingMethodProps} filters - The filters to apply on the retrieved shipping methods.
575
+ * @param {FindConfig<CartShippingMethodDTO>} config - The configurations determining how the shipping method is retrieved. Its properties, such as `select` or `relations`, accept the
576
+ * attributes or relations associated with a shipping method.
577
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
578
+ * @returns {Promise<CartShippingMethodDTO[]>} The list of shipping methods.
579
+ *
580
+ * @example
581
+ * To retrieve a list of shipping methods using their IDs:
582
+ *
583
+ * ```ts
584
+ * const shippingMethods =
585
+ * await cartModuleService.listShippingMethods(
586
+ * {
587
+ * id: ["casm_123", "casm_321"],
588
+ * },
589
+ * {}
590
+ * )
591
+ * ```
592
+ *
593
+ * To specify relations that should be retrieved within the shipping methods:
594
+ *
595
+ * ```ts
596
+ * const shippingMethods =
597
+ * await cartModuleService.listShippingMethods(
598
+ * {
599
+ * id: ["casm_123", "casm_321"],
600
+ * },
601
+ * {
602
+ * relations: ["cart"],
603
+ * }
604
+ * )
605
+ * ```
606
+ *
607
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
608
+ *
609
+ * ```ts
610
+ * const shippingMethods =
611
+ * await cartModuleService.listShippingMethods(
612
+ * {
613
+ * id: ["casm_123", "casm_321"],
614
+ * },
615
+ * {
616
+ * relations: ["cart"],
617
+ * take: 20,
618
+ * skip: 2,
619
+ * }
620
+ * )
621
+ * ```
622
+ */
33
623
  listShippingMethods(filters: FilterableShippingMethodProps, config: FindConfig<CartShippingMethodDTO>, sharedContext?: Context): Promise<CartShippingMethodDTO[]>;
624
+ /**
625
+ * This method adds a shipping method to carts.
626
+ *
627
+ * @param {CreateShippingMethodDTO} data - The shipping method to be created and added to the carts.
628
+ * The cart is specified in the `cart_id` field.
629
+ * @returns {Promise<CartShippingMethodDTO>} The added shipping method.
630
+ *
631
+ * @example
632
+ * const shippingMethod =
633
+ * await cartModuleService.addShippingMethods({
634
+ * cart_id: "cart_123",
635
+ * name: "UPS",
636
+ * amount: 3000,
637
+ * })
638
+ */
34
639
  addShippingMethods(data: CreateShippingMethodDTO): Promise<CartShippingMethodDTO>;
640
+ /**
641
+ * This method adds shipping methods to carts.
642
+ *
643
+ * @param {CreateShippingMethodDTO[]} data - The shipping methods to be created and added to the carts.
644
+ * The cart is specified in the `cart_id` field.
645
+ * @returns {Promise<CartShippingMethodDTO[]>} The added shipping methods.
646
+ *
647
+ * @example
648
+ * const shippingMethods =
649
+ * await cartModuleService.addShippingMethods([
650
+ * {
651
+ * cart_id: "cart_123",
652
+ * name: "UPS",
653
+ * amount: 3000,
654
+ * },
655
+ * {
656
+ * cart_id: "cart_123",
657
+ * name: "FedEx",
658
+ * amount: 2000,
659
+ * },
660
+ * ])
661
+ */
35
662
  addShippingMethods(data: CreateShippingMethodDTO[]): Promise<CartShippingMethodDTO[]>;
663
+ /**
664
+ * This method adds shipping methods to a cart.
665
+ *
666
+ * @param {string} cartId - The cart's ID.
667
+ * @param {CreateShippingMethodForSingleCartDTO[]} methods - The shipping methods to be created and added.
668
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
669
+ * @returns {Promise<CartShippingMethodDTO[]>} The added shipping methods.
670
+ *
671
+ * @example
672
+ * const shippingMethods =
673
+ * await cartModuleService.addShippingMethods("cart_123", [
674
+ * {
675
+ * name: "UPS",
676
+ * amount: 3000,
677
+ * },
678
+ * {
679
+ * name: "FedEx",
680
+ * amount: 2000,
681
+ * },
682
+ * ])
683
+ */
36
684
  addShippingMethods(cartId: string, methods: CreateShippingMethodForSingleCartDTO[], sharedContext?: Context): Promise<CartShippingMethodDTO[]>;
685
+ /**
686
+ * This method retrieves a paginated list of line item adjustments based on optional filters and configuration.
687
+ *
688
+ * @param {FilterableLineItemAdjustmentProps} filters - The filters to apply on the retrieved line item adjustments.
689
+ * @param {FindConfig<LineItemAdjustmentDTO>} config - The configurations determining how the line item adjustment is retrieved. Its properties, such as `select` or `relations`, accept the
690
+ * attributes or relations associated with a line item adjustment.
691
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
692
+ * @returns {Promise<LineItemAdjustmentDTO[]>} The list of line item adjustments.
693
+ *
694
+ * @example
695
+ * To retrieve a list of line item adjustments using their IDs:
696
+ *
697
+ * ```ts
698
+ * const lineItemAdjustments =
699
+ * await cartModuleService.listLineItemAdjustments({
700
+ * id: ["caliadj_123", "caliadj_321"],
701
+ * })
702
+ * ```
703
+ *
704
+ * To specify relations that should be retrieved within the line item adjustments:
705
+ *
706
+ * ```ts
707
+ * const lineItemAdjustments =
708
+ * await cartModuleService.listLineItemAdjustments(
709
+ * {
710
+ * id: ["caliadj_123", "caliadj_321"],
711
+ * },
712
+ * {
713
+ * relations: ["item"],
714
+ * }
715
+ * )
716
+ * ```
717
+ *
718
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
719
+ *
720
+ * ```ts
721
+ * const lineItemAdjustments =
722
+ * await cartModuleService.listLineItemAdjustments(
723
+ * {
724
+ * id: ["caliadj_123", "caliadj_321"],
725
+ * },
726
+ * {
727
+ * relations: ["item"],
728
+ * take: 20,
729
+ * skip: 2,
730
+ * }
731
+ * )
732
+ * ```
733
+ */
37
734
  listLineItemAdjustments(filters: FilterableLineItemAdjustmentProps, config?: FindConfig<LineItemAdjustmentDTO>, sharedContext?: Context): Promise<LineItemAdjustmentDTO[]>;
735
+ /**
736
+ * This method adds line item adjustments to line items.
737
+ *
738
+ * @param {CreateLineItemAdjustmentDTO[]} data - The line item adjustments to be created and added to line items.
739
+ * The line item is specified by the `item_id` field.
740
+ * @returns {Promise<LineItemAdjustmentDTO[]>} The added line item adjustments.
741
+ *
742
+ * @example
743
+ * const lineItemAdjustments =
744
+ * await cartModuleService.addLineItemAdjustments([
745
+ * {
746
+ * item_id: "caliadj_123",
747
+ * code: "50%OFF",
748
+ * amount: 3000,
749
+ * },
750
+ * {
751
+ * item_id: "caliadj_321",
752
+ * code: "10%OFF",
753
+ * amount: 3000,
754
+ * },
755
+ * ])
756
+ */
38
757
  addLineItemAdjustments(data: CreateLineItemAdjustmentDTO[]): Promise<LineItemAdjustmentDTO[]>;
758
+ /**
759
+ * This method adds a line item adjustment to a line item.
760
+ *
761
+ * @param {CreateLineItemAdjustmentDTO} data - The line item adjustment to be created and added to a line item.
762
+ * The line item is specified by the `item_id` field.
763
+ * @returns {Promise<LineItemAdjustmentDTO[]>} The added line item adjustment.
764
+ *
765
+ * @example
766
+ * const lineItemAdjustments =
767
+ * await cartModuleService.addLineItemAdjustments({
768
+ * item_id: "caliadj_123",
769
+ * code: "50%OFF",
770
+ * amount: 3000,
771
+ * })
772
+ */
39
773
  addLineItemAdjustments(data: CreateLineItemAdjustmentDTO): Promise<LineItemAdjustmentDTO[]>;
774
+ /**
775
+ * This method adds line item adjustments to line items in a cart.
776
+ *
777
+ * @param {string} cartId - The cart's ID.
778
+ * @param {CreateLineItemAdjustmentDTO[]} data - The line item adjustments to be created and added to line items.
779
+ * The line item is specified by the `item_id` field.
780
+ * @returns {Promise<LineItemAdjustmentDTO[]>} The added line item adjustment.
781
+ *
782
+ * @example
783
+ * const lineItemAdjustments =
784
+ * await cartModuleService.addLineItemAdjustments("cart_123", [
785
+ * {
786
+ * item_id: "caliadj_123",
787
+ * code: "50%OFF",
788
+ * amount: 3000,
789
+ * },
790
+ * {
791
+ * item_id: "caliadj_321",
792
+ * code: "10%OFF",
793
+ * amount: 2000,
794
+ * },
795
+ * ])
796
+ */
40
797
  addLineItemAdjustments(cartId: string, data: CreateLineItemAdjustmentDTO[]): Promise<LineItemAdjustmentDTO[]>;
798
+ /**
799
+ * This method set the line item adjustments of line items in a cart. The existing line item adjustments, except those
800
+ * included in the specified list, of an item are removed and replaced with the specified adjustments.
801
+ *
802
+ * @param {string} cartId - The cart's ID.
803
+ * @param {UpsertLineItemAdjustmentDTO[]} data - The line item adjustments to add to the line items.
804
+ * The line item is specified by the `item_id` field. If the `id` field is specified, the adjustment
805
+ * is kept in the line item's adjustment and its attributes can be updated.
806
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
807
+ * @returns {Promise<LineItemAdjustmentDTO[]>} The added line item adjustments.
808
+ *
809
+ * @example
810
+ * const lineItemAdjustments =
811
+ * await cartModuleService.setLineItemAdjustments("cart_123", [
812
+ * {
813
+ * id: "adj_123",
814
+ * item_id: "caliadj_123",
815
+ * },
816
+ * {
817
+ * item_id: "caliadj_123",
818
+ * code: "10%OFF",
819
+ * amount: 2000,
820
+ * },
821
+ * {
822
+ * item_id: "caliadj_321",
823
+ * code: "50%OFF",
824
+ * amount: 3000,
825
+ * },
826
+ * ])
827
+ */
41
828
  setLineItemAdjustments(cartId: string, data: UpsertLineItemAdjustmentDTO[], sharedContext?: Context): Promise<LineItemAdjustmentDTO[]>;
829
+ /**
830
+ * This method retrieves a paginated list of shipping method adjustments based on optional filters and configuration.
831
+ *
832
+ * @param {FilterableShippingMethodAdjustmentProps} filters - The filters to apply on the retrieved shipping method adjustments.
833
+ * @param {FindConfig<ShippingMethodAdjustmentDTO>} config - The configurations determining how the shipping method adjustment is retrieved. Its properties, such as `select` or `relations`, accept the
834
+ * attributes or relations associated with a shipping method adjustment.
835
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
836
+ * @returns {Promise<ShippingMethodAdjustmentDTO[]>} The list of shipping method adjustments.
837
+ *
838
+ * @example
839
+ * To retrieve a list of shipping method adjustments using their IDs:
840
+ *
841
+ * ```ts
842
+ * const shippingMethodAdjustments =
843
+ * await cartModuleService.listShippingMethodAdjustments({
844
+ * id: ["casmadj_123", "casmadj_321"],
845
+ * })
846
+ * ```
847
+ *
848
+ * To specify relations that should be retrieved within the shipping method adjustments:
849
+ *
850
+ * ```ts
851
+ * const shippingMethodAdjustments =
852
+ * await cartModuleService.listShippingMethodAdjustments(
853
+ * {
854
+ * id: ["casmadj_123", "casmadj_321"],
855
+ * },
856
+ * {
857
+ * relations: ["shipping_method"],
858
+ * }
859
+ * )
860
+ * ```
861
+ *
862
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
863
+ *
864
+ * ```ts
865
+ * const shippingMethodAdjustments =
866
+ * await cartModuleService.listShippingMethodAdjustments(
867
+ * {
868
+ * id: ["casmadj_123", "casmadj_321"],
869
+ * },
870
+ * {
871
+ * relations: ["shipping_method"],
872
+ * take: 20,
873
+ * skip: 2,
874
+ * }
875
+ * )
876
+ * ```
877
+ */
42
878
  listShippingMethodAdjustments(filters: FilterableShippingMethodAdjustmentProps, config?: FindConfig<ShippingMethodAdjustmentDTO>, sharedContext?: Context): Promise<ShippingMethodAdjustmentDTO[]>;
879
+ /**
880
+ * This method adds shipping method adjustments to shipping methods.
881
+ *
882
+ * @param {CreateShippingMethodAdjustmentDTO[]} data - The shipping method adjustments to be created and added to
883
+ * shipping methods. The shipping method is specified by the `shipping_method_id` field.
884
+ * @returns {Promise<ShippingMethodAdjustmentDTO[]>} The added shipping method adjustments.
885
+ *
886
+ * @example
887
+ * const shippingMethodAdjustments =
888
+ * await cartModuleService.addShippingMethodAdjustments([
889
+ * {
890
+ * shipping_method_id: "casm_123",
891
+ * code: "FREESHIPPING",
892
+ * amount: 3000,
893
+ * },
894
+ * {
895
+ * shipping_method_id: "casm_321",
896
+ * code: "10%OFF",
897
+ * amount: 1500,
898
+ * },
899
+ * ])
900
+ */
43
901
  addShippingMethodAdjustments(data: CreateShippingMethodAdjustmentDTO[]): Promise<ShippingMethodAdjustmentDTO[]>;
902
+ /**
903
+ * This method adds a shipping method adjustment to a shipping method.
904
+ *
905
+ * @param {CreateShippingMethodAdjustmentDTO} data - The shipping method adjustment to be created and added to a
906
+ * shipping method. The shipping method is specified by the `shipping_method_id` field.
907
+ * @returns {Promise<ShippingMethodAdjustmentDTO>} The added shipping method adjustment.
908
+ *
909
+ * @example
910
+ * const shippingMethodAdjustment =
911
+ * await cartModuleService.addShippingMethodAdjustments({
912
+ * shipping_method_id: "casm_123",
913
+ * code: "FREESHIPPING",
914
+ * amount: 3000,
915
+ * })
916
+ */
44
917
  addShippingMethodAdjustments(data: CreateShippingMethodAdjustmentDTO): Promise<ShippingMethodAdjustmentDTO>;
918
+ /**
919
+ * This method adds shipping method adjustments to shipping methods in a cart.
920
+ *
921
+ * @param {string} cartId - The cart's ID.
922
+ * @param {CreateShippingMethodAdjustmentDTO[]} data - The shipping method adjustments to be created and added to
923
+ * shipping methods. The shipping method is specified by the `shipping_method_id` field.
924
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
925
+ * @returns {Promise<ShippingMethodAdjustmentDTO[]>} The added shipping method adjustments.
926
+ *
927
+ * @example
928
+ * const shippingMethodAdjustments =
929
+ * await cartModuleService.addShippingMethodAdjustments(
930
+ * "cart_123",
931
+ * [
932
+ * {
933
+ * shipping_method_id: "casm_123",
934
+ * code: "FREESHIPPING",
935
+ * amount: 3000,
936
+ * },
937
+ * {
938
+ * shipping_method_id: "casm_321",
939
+ * code: "10%OFF",
940
+ * amount: 1500,
941
+ * },
942
+ * ]
943
+ * )
944
+ */
45
945
  addShippingMethodAdjustments(cartId: string, data: CreateShippingMethodAdjustmentDTO[], sharedContext?: Context): Promise<ShippingMethodAdjustmentDTO[]>;
946
+ /**
947
+ * This method sets the shipping method adjustment of shipping methods in a cart. The existing shipping method adjustments,
948
+ * except those included in the specified list, of an item are removed and replaced with the specified adjustments.
949
+ *
950
+ * @param {string} cartId - The cart's ID.
951
+ * @param {(CreateShippingMethodAdjustmentDTO | UpdateShippingMethodAdjustmentDTO)[]} data - The shipping method adjustments to add to the shipping
952
+ * method. If the `id` field is specified, the adjustment is kept in the shipping method's adjustment and its attributes can be updated.
953
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
954
+ * @returns {Promise<ShippingMethodAdjustmentDTO[]>} The added shipping method adjustments.
955
+ *
956
+ * @example
957
+ * const shippingMethodAdjustments =
958
+ * await cartModuleService.setShippingMethodAdjustments(
959
+ * "cart_123",
960
+ * [
961
+ * {
962
+ * id: "casmadj_123",
963
+ * shipping_method_id: "casm_123",
964
+ * code: "FREESHIPPING",
965
+ * },
966
+ * {
967
+ * shipping_method_id: "casm_321",
968
+ * code: "10%OFF",
969
+ * amount: 1500,
970
+ * },
971
+ * ]
972
+ * )
973
+ */
46
974
  setShippingMethodAdjustments(cartId: string, data: (CreateShippingMethodAdjustmentDTO | UpdateShippingMethodAdjustmentDTO)[], sharedContext?: Context): Promise<ShippingMethodAdjustmentDTO[]>;
975
+ /**
976
+ * This method retrieves a paginated list of line item tax lines based on optional filters and configuration.
977
+ *
978
+ * @param {FilterableLineItemTaxLineProps} filters - The filters to apply on the retrieved line item tax lines.
979
+ * @param {FindConfig<LineItemTaxLineDTO>} config - The configurations determining how the line item tax line is retrieved. Its properties, such as `select` or `relations`, accept the
980
+ * attributes or relations associated with a line item tax line.
981
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
982
+ * @returns {Promise<LineItemTaxLineDTO[]>} The list of line item tax lines.
983
+ *
984
+ * @example
985
+ * To retrieve a list of line item tax lines using their IDs:
986
+ *
987
+ * ```ts
988
+ * const lineItemTaxLines =
989
+ * await cartModuleService.listLineItemTaxLines({
990
+ * id: ["calitxl_123", "calitxl_321"],
991
+ * })
992
+ * ```
993
+ *
994
+ * To specify relations that should be retrieved within the line item tax lines:
995
+ *
996
+ * ```ts
997
+ * const lineItemTaxLines =
998
+ * await cartModuleService.listLineItemTaxLines(
999
+ * {
1000
+ * id: ["calitxl_123", "calitxl_321"],
1001
+ * },
1002
+ * {
1003
+ * relations: ["item"],
1004
+ * }
1005
+ * )
1006
+ * ```
1007
+ *
1008
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
1009
+ *
1010
+ * ```ts
1011
+ * const lineItemTaxLines =
1012
+ * await cartModuleService.listLineItemTaxLines(
1013
+ * {
1014
+ * id: ["calitxl_123", "calitxl_321"],
1015
+ * },
1016
+ * {
1017
+ * relations: ["item"],
1018
+ * take: 20,
1019
+ * skip: 2,
1020
+ * }
1021
+ * )
1022
+ * ```
1023
+ */
47
1024
  listLineItemTaxLines(filters: FilterableLineItemTaxLineProps, config?: FindConfig<LineItemTaxLineDTO>, sharedContext?: Context): Promise<LineItemTaxLineDTO[]>;
1025
+ /**
1026
+ * This method creates and adds line item tax lines.
1027
+ *
1028
+ * @param {CreateLineItemTaxLineDTO[]} taxLines - The line item tax lines to be created.
1029
+ * @returns {Promise<LineItemTaxLineDTO[]>} The added line item tax lines.
1030
+ *
1031
+ * @example
1032
+ * const lineItemTaxLines =
1033
+ * await cartModuleService.addLineItemTaxLines([
1034
+ * {
1035
+ * code: "1000",
1036
+ * rate: 10,
1037
+ * },
1038
+ * {
1039
+ * code: "1234",
1040
+ * rate: 20,
1041
+ * },
1042
+ * ])
1043
+ */
48
1044
  addLineItemTaxLines(taxLines: CreateLineItemTaxLineDTO[]): Promise<LineItemTaxLineDTO[]>;
1045
+ /**
1046
+ * This method creates and adds a line item tax line.
1047
+ *
1048
+ * @param {CreateLineItemTaxLineDTO} taxLine - The line item tax line to be created.
1049
+ * @returns {Promise<LineItemTaxLineDTO>} The added line item tax line.
1050
+ *
1051
+ * @example
1052
+ * const lineItemTaxLines =
1053
+ * await cartModuleService.addLineItemTaxLines({
1054
+ * code: "1000",
1055
+ * rate: 10,
1056
+ * })
1057
+ */
49
1058
  addLineItemTaxLines(taxLine: CreateLineItemTaxLineDTO): Promise<LineItemTaxLineDTO>;
1059
+ /**
1060
+ * This method creates and adds one or more line item tax lines to a cart.
1061
+ *
1062
+ * @param {string} cartId - The cart's ID.
1063
+ * @param {CreateLineItemTaxLineDTO | CreateLineItemTaxLineDTO[]} taxLines - The line item tax lines to add.
1064
+ * You can specify one or more items.
1065
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1066
+ * @returns {Promise<LineItemTaxLineDTO[]>} The added line item tax lines.
1067
+ *
1068
+ * @example
1069
+ * const lineItemTaxLines =
1070
+ * await cartModuleService.addLineItemTaxLines("cart_123", {
1071
+ * code: "1000",
1072
+ * rate: 10,
1073
+ * })
1074
+ */
50
1075
  addLineItemTaxLines(cartId: string, taxLines: CreateLineItemTaxLineDTO[] | CreateLineItemTaxLineDTO, sharedContext?: Context): Promise<LineItemTaxLineDTO[]>;
1076
+ /**
1077
+ * This method sets the line item tax lines in a cart. The existing line item tax lines,
1078
+ * except those included in the specified list, are removed and replaced with the specified tax lines.
1079
+ *
1080
+ * @param {string} cartId - The cart's ID.
1081
+ * @param {(CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[]} taxLines - The line item tax lines to add.
1082
+ * If the `id` field is specified, the tax line is kept and its attributes can be updated.
1083
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1084
+ * @returns {Promise<LineItemTaxLineDTO[]>} The added line item tax lines.
1085
+ *
1086
+ * @example
1087
+ * const lineItemTaxLines =
1088
+ * await cartModuleService.setLineItemTaxLines("cart_123", [
1089
+ * {
1090
+ * code: "1000",
1091
+ * rate: 10,
1092
+ * },
1093
+ * {
1094
+ * code: "1234",
1095
+ * rate: 20,
1096
+ * },
1097
+ * ])
1098
+ */
51
1099
  setLineItemTaxLines(cartId: string, taxLines: (CreateLineItemTaxLineDTO | UpdateLineItemTaxLineDTO)[], sharedContext?: Context): Promise<LineItemTaxLineDTO[]>;
1100
+ /**
1101
+ * This method retrieves a paginated list of shipping method tax lines based on optional filters and configuration.
1102
+ *
1103
+ * @param {FilterableShippingMethodTaxLineProps} filters - The filters to apply on the retrieved shipping method tax lines.
1104
+ * @param {FindConfig<ShippingMethodTaxLineDTO>} config - The configurations determining how the shipping method tax line is retrieved. Its properties, such as `select` or `relations`, accept the
1105
+ * attributes or relations associated with a shipping method tax line.
1106
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1107
+ * @returns {Promise<ShippingMethodTaxLineDTO[]>} The list of shipping method tax lines.
1108
+ *
1109
+ * @example
1110
+ * To retrieve a list of shipping method tax lines using their IDs:
1111
+ *
1112
+ * ```ts
1113
+ * const shippingMethodTaxLines =
1114
+ * await cartModuleService.listShippingMethodTaxLines({
1115
+ * id: ["casmtxl_123", "casmtxl_321"],
1116
+ * })
1117
+ * ```
1118
+ *
1119
+ * To specify relations that should be retrieved within the shipping method tax lines:
1120
+ *
1121
+ * ```ts
1122
+ * const shippingMethodTaxLines =
1123
+ * await cartModuleService.listShippingMethodTaxLines(
1124
+ * {
1125
+ * id: ["casmtxl_123", "casmtxl_321"],
1126
+ * },
1127
+ * {
1128
+ * relations: ["shipping_method"],
1129
+ * }
1130
+ * )
1131
+ * ```
1132
+ *
1133
+ * By default, only the first `15` records are retrieved. You can control pagination by specifying the `skip` and `take` properties of the `config` parameter:
1134
+ *
1135
+ * ```ts
1136
+ * const shippingMethodTaxLines =
1137
+ * await cartModuleService.listShippingMethodTaxLines(
1138
+ * {
1139
+ * id: ["casmtxl_123", "casmtxl_321"],
1140
+ * },
1141
+ * {
1142
+ * relations: ["shipping_method"],
1143
+ * take: 20,
1144
+ * skip: 2,
1145
+ * }
1146
+ * )
1147
+ * ```
1148
+ */
52
1149
  listShippingMethodTaxLines(filters: FilterableShippingMethodTaxLineProps, config?: FindConfig<ShippingMethodTaxLineDTO>, sharedContext?: Context): Promise<ShippingMethodTaxLineDTO[]>;
1150
+ /**
1151
+ * This method creates and adds shipping method tax lines.
1152
+ *
1153
+ * @param {CreateShippingMethodTaxLineDTO[]} taxLines - The shipping method tax lines to be created.
1154
+ * @returns {Promise<ShippingMethodTaxLineDTO[]>} The added shipping method tax lines.
1155
+ *
1156
+ * @example
1157
+ * const shippingMethodTaxLines =
1158
+ * await cartModuleService.addShippingMethodTaxLines([
1159
+ * {
1160
+ * code: "1000",
1161
+ * rate: 10,
1162
+ * },
1163
+ * {
1164
+ * code: "1234",
1165
+ * rate: 20,
1166
+ * },
1167
+ * ])
1168
+ */
53
1169
  addShippingMethodTaxLines(taxLines: CreateShippingMethodTaxLineDTO[]): Promise<ShippingMethodTaxLineDTO[]>;
1170
+ /**
1171
+ * This method creates and adds a shipping method tax line.
1172
+ *
1173
+ * @param {CreateShippingMethodTaxLineDTO} taxLine - The shipping method tax line to be created.
1174
+ * @returns {Promise<ShippingMethodTaxLineDTO>} The added shipping method tax line.
1175
+ *
1176
+ * @example
1177
+ * const shippingMethodTaxLine =
1178
+ * await cartModuleService.addShippingMethodTaxLines({
1179
+ * code: "1000",
1180
+ * rate: 10,
1181
+ * })
1182
+ */
54
1183
  addShippingMethodTaxLines(taxLine: CreateShippingMethodTaxLineDTO): Promise<ShippingMethodTaxLineDTO>;
1184
+ /**
1185
+ * This method creates and adds one or more shipping method tax lines to a cart.
1186
+ *
1187
+ * @param {string} cartId - The cart's ID.
1188
+ * @param {CreateShippingMethodTaxLineDTO | CreateShippingMethodTaxLineDTO[]} taxLines - The shipping item tax lines to add.
1189
+ * If the `id` field is specified, the tax line is kept and its attributes can be updated.
1190
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1191
+ * @returns {Promise<ShippingMethodTaxLineDTO[]>} The added shipping method tax lines.
1192
+ *
1193
+ * @example
1194
+ * const shippingMethodTaxLines =
1195
+ * await cartModuleService.addShippingMethodTaxLines(
1196
+ * "cart_123",
1197
+ * [
1198
+ * {
1199
+ * code: "1000",
1200
+ * rate: 10,
1201
+ * },
1202
+ * {
1203
+ * code: "1234",
1204
+ * rate: 20,
1205
+ * },
1206
+ * ]
1207
+ * )
1208
+ */
55
1209
  addShippingMethodTaxLines(cartId: string, taxLines: CreateShippingMethodTaxLineDTO[] | CreateShippingMethodTaxLineDTO, sharedContext?: Context): Promise<ShippingMethodTaxLineDTO[]>;
1210
+ /**
1211
+ * This method sets the shipping item tax lines in a cart. The shipping line item tax lines,
1212
+ * except those included in the specified list, are removed and replaced with the specified tax lines.
1213
+ *
1214
+ * @param {string} cartId - The cart's ID.
1215
+ * @param {(CreateShippingMethodTaxLineDTO | UpdateShippingMethodTaxLineDTO)[]} taxLines - The shipping item tax lines to add.
1216
+ * If the `id` field is specified, the tax line is kept and its attributes can be updated.
1217
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1218
+ * @returns {Promise<ShippingMethodTaxLineDTO[]>} The added shipping method tax lines.
1219
+ *
1220
+ * @example
1221
+ * const shippingMethodTaxLines =
1222
+ * await cartModuleService.setShippingMethodTaxLines(
1223
+ * "cart_123",
1224
+ * [
1225
+ * {
1226
+ * code: "1000",
1227
+ * rate: 10,
1228
+ * },
1229
+ * {
1230
+ * code: "1234",
1231
+ * rate: 20,
1232
+ * },
1233
+ * ]
1234
+ * )
1235
+ */
56
1236
  setShippingMethodTaxLines(cartId: string, taxLines: (CreateShippingMethodTaxLineDTO | UpdateShippingMethodTaxLineDTO)[], sharedContext?: Context): Promise<ShippingMethodTaxLineDTO[]>;
1237
+ /**
1238
+ * This method deletes carts by their IDs.
1239
+ *
1240
+ * @param {string[]} ids - The IDs of the cart.
1241
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1242
+ * @returns {Promise<void>} Resolves when the carts are deleted successfully.
1243
+ *
1244
+ * @example
1245
+ * await cartModuleService.delete(["cart_123", "cart_321"])
1246
+ */
57
1247
  delete(ids: string[], sharedContext?: Context): Promise<void>;
1248
+ /**
1249
+ * This method deletes a cart by its ID.
1250
+ *
1251
+ * @param {string} id - The ID of the cart.
1252
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1253
+ * @returns {Promise<void>} Resolves when a cart is deleted successfully.
1254
+ *
1255
+ * @example
1256
+ * await cartModuleService.delete("cart_123")
1257
+ */
58
1258
  delete(id: string, sharedContext?: Context): Promise<void>;
1259
+ /**
1260
+ * This method deletes line items by their IDs.
1261
+ *
1262
+ * @param {string[]} ids - The IDs of the line items.
1263
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1264
+ * @returns {Promise<void>} Resolves when the line items are deleted successfully.
1265
+ *
1266
+ * @example
1267
+ * await cartModuleService.deleteLineItems([
1268
+ * "cali_123",
1269
+ * "cali_321",
1270
+ * ])
1271
+ */
59
1272
  deleteLineItems(ids: string[], sharedContext?: Context): Promise<void>;
1273
+ /**
1274
+ * This method deletes a line item by its ID.
1275
+ *
1276
+ * @param {string} id - The ID of the line item.
1277
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1278
+ * @returns {Promise<void>} Resolves when a line item is deleted successfully.
1279
+ *
1280
+ * @example
1281
+ * await cartModuleService.deleteLineItems("cali_123")
1282
+ */
60
1283
  deleteLineItems(id: string, sharedContext?: Context): Promise<void>;
1284
+ /**
1285
+ * This method deletes shipping methods by their IDs.
1286
+ *
1287
+ * @param {string[]} ids - The IDs of the shipping methods.
1288
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1289
+ * @returns {Promise<void>} Resolves when the shipping methods are deleted successfully.
1290
+ *
1291
+ * @example
1292
+ * await cartModuleService.deleteShippingMethods([
1293
+ * "casm_123",
1294
+ * "casm_321",
1295
+ * ])
1296
+ */
61
1297
  deleteShippingMethods(ids: string[], sharedContext?: Context): Promise<void>;
1298
+ /**
1299
+ * This method deletes a shipping method by its ID.
1300
+ *
1301
+ * @param {string} id - The ID of the shipping method.
1302
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1303
+ * @returns {Promise<void>} Resolves when the shipping method is deleted successfully.
1304
+ *
1305
+ * @example
1306
+ * await cartModuleService.deleteShippingMethods("casm_123")
1307
+ */
62
1308
  deleteShippingMethods(id: string, sharedContext?: Context): Promise<void>;
1309
+ /**
1310
+ * This method deletes line item adjustments by their IDs.
1311
+ *
1312
+ * @param {string[]} ids - The IDs of the line item adjustments.
1313
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1314
+ * @returns {Promise<void>} Resolves when the line item adjustments are deleted successfully.
1315
+ *
1316
+ * @example
1317
+ * await cartModuleService.deleteLineItemAdjustments([
1318
+ * "caliadj_123",
1319
+ * "caliadj_321",
1320
+ * ])
1321
+ */
63
1322
  deleteLineItemAdjustments(ids: string[], sharedContext?: Context): Promise<void>;
1323
+ /**
1324
+ * This method deletes a line item adjustment by its ID.
1325
+ *
1326
+ * @param {string} id - The ID of the line item adjustment.
1327
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1328
+ * @returns {Promise<void>} Resolves when the line item adjustment is deleted successfully.
1329
+ *
1330
+ * @example
1331
+ * await cartModuleService.deleteLineItemAdjustments(
1332
+ * "caliadj_123"
1333
+ * )
1334
+ */
64
1335
  deleteLineItemAdjustments(id: string, sharedContext?: Context): Promise<void>;
1336
+ /**
1337
+ * This method deletes shipping method adjustments by their IDs.
1338
+ *
1339
+ * @param {string[]} ids - The IDs of the shipping method adjustments.
1340
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1341
+ * @returns {Promise<void>} Resolves when the shipping method adjustments are deleted successfully.
1342
+ *
1343
+ * @example
1344
+ * await cartModuleService.deleteShippingMethodAdjustments([
1345
+ * "casmadj_123",
1346
+ * "casmadj_321",
1347
+ * ])
1348
+ */
65
1349
  deleteShippingMethodAdjustments(ids: string[], sharedContext?: Context): Promise<void>;
1350
+ /**
1351
+ * This method deletes a shipping method adjustment by its ID.
1352
+ *
1353
+ * @param {string} id - The ID of the shipping method adjustment.
1354
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1355
+ * @returns {Promise<void>} Resolves when shipping method adjustment is deleted successfully.
1356
+ *
1357
+ * @example
1358
+ * await cartModuleService.deleteShippingMethodAdjustments(
1359
+ * "casmadj_123"
1360
+ * )
1361
+ */
66
1362
  deleteShippingMethodAdjustments(id: string, sharedContext?: Context): Promise<void>;
1363
+ /**
1364
+ * This method deletes line item tax lines by their IDs.
1365
+ *
1366
+ * @param {string[]} ids - The IDs of the line item tax lines.
1367
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1368
+ * @returns {Promise<void>} Resolves when the line item tax lines are deleted successfully.
1369
+ *
1370
+ * @example
1371
+ * await cartModuleService.deleteLineItemTaxLines([
1372
+ * "calitxl_123",
1373
+ * "calitxl_321",
1374
+ * ])
1375
+ */
67
1376
  deleteLineItemTaxLines(ids: string[], sharedContext?: Context): Promise<void>;
1377
+ /**
1378
+ * This method deletes a line item tax line by its ID.
1379
+ *
1380
+ * @param {string} id - The ID of the line item tax line.
1381
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1382
+ * @returns {Promise<void>} Resolves when the line item tax line is deleted successfully.
1383
+ *
1384
+ * @example
1385
+ * await cartModuleService.deleteLineItemTaxLines("calitxl_123")
1386
+ */
68
1387
  deleteLineItemTaxLines(id: string, sharedContext?: Context): Promise<void>;
1388
+ /**
1389
+ * This method deletes shipping method tax lines by their IDs.
1390
+ *
1391
+ * @param {string[]} ids - The IDs of the shipping method tax lines.
1392
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1393
+ * @returns {Promise<void>} Resolves when the shipping method tax lines are deleted successfully.
1394
+ *
1395
+ * @example
1396
+ * await cartModuleService.deleteShippingMethodTaxLines([
1397
+ * "casmtxl_123",
1398
+ * "casmtxl_321",
1399
+ * ])
1400
+ */
69
1401
  deleteShippingMethodTaxLines(ids: string[], sharedContext?: Context): Promise<void>;
1402
+ /**
1403
+ * This method deletes a shipping method tax line by its ID.
1404
+ *
1405
+ * @param {string} id - The ID of the shipping method tax line.
1406
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1407
+ * @returns {Promise<void>} Resolves when the shipping method tax line is deleted successfully.
1408
+ *
1409
+ * @example
1410
+ * await cartModuleService.deleteShippingMethodTaxLines(
1411
+ * "casmtxl_123"
1412
+ * )
1413
+ */
70
1414
  deleteShippingMethodTaxLines(id: string, sharedContext?: Context): Promise<void>;
1415
+ /**
1416
+ * This method soft deletes carts by their IDs.
1417
+ *
1418
+ * @param {string[]} ids - The IDs of the carts.
1419
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1420
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1421
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated line item.
1422
+ * The object's keys are the ID attribute names of the cart entity's relations, such as `item_id`, and its value is an array of strings, each being the ID of a record associated
1423
+ * with the cart through this relation, such as the IDs of associated line item.
1424
+ *
1425
+ * If there are no related records, the promise resolves to `void`.
1426
+ *
1427
+ * @example
1428
+ * await cartModuleService.softDelete(["cart_123", "cart_321"])
1429
+ */
71
1430
  softDelete<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1431
+ /**
1432
+ * This method restores soft deleted carts by their IDs.
1433
+ *
1434
+ * @param {string[]} ids - The IDs of the carts.
1435
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the carts. You can pass to its `returnLinkableKeys`
1436
+ * property any of the cart's relation attribute names, such as `items`.
1437
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1438
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated line item.
1439
+ * The object's keys are the ID attribute names of the cart entity's relations, such as `item_id`,
1440
+ * and its value is an array of strings, each being the ID of the record associated with the cart through this relation,
1441
+ * such as the IDs of associated line item.
1442
+ *
1443
+ * If there are no related records restored, the promise resolves to `void`.
1444
+ *
1445
+ * @example
1446
+ * await cartModuleService.restore(["cart_123", "cart_321"])
1447
+ */
72
1448
  restore<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1449
+ /**
1450
+ * This method soft deletes addresses by their IDs.
1451
+ *
1452
+ * @param {string[]} ids - The IDs of the addresses.
1453
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1454
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1455
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted.
1456
+ * If there are no related records, the promise resolves to `void`.
1457
+ *
1458
+ * @example
1459
+ * await cartModuleService.softDeleteAddresses([
1460
+ * "caaddr_123",
1461
+ * "caaddr_321",
1462
+ * ])
1463
+ */
73
1464
  softDeleteAddresses<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1465
+ /**
1466
+ * This method restores soft deleted addresses by their IDs.
1467
+ *
1468
+ * @param {string[]} ids - The IDs of the addresses.
1469
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the addresses. You can pass to its `returnLinkableKeys`
1470
+ * property any of the address's relation attribute names.
1471
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1472
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored.
1473
+ * If there are no related records restored, the promise resolves to `void`.
1474
+ *
1475
+ * @example
1476
+ * await cartModuleService.restoreAddresses([
1477
+ * "caaddr_123",
1478
+ * "caaddr_321",
1479
+ * ])
1480
+ */
74
1481
  restoreAddresses<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1482
+ /**
1483
+ * This method soft deletes line items by their IDs.
1484
+ *
1485
+ * @param {string[]} ids - The IDs of the line items.
1486
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1487
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1488
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated tax lines.
1489
+ * The object's keys are the ID attribute names of the line item entity's relations, such as `tax_line_id`, and its value is an array of strings, each being the ID of a record associated
1490
+ * with the line item through this relation, such as the IDs of associated tax lines.
1491
+ *
1492
+ * If there are no related records, the promise resolves to `void`.
1493
+ *
1494
+ * @example
1495
+ * await cartModuleService.softDeleteLineItems([
1496
+ * "cali_123",
1497
+ * "cali_321",
1498
+ * ])
1499
+ */
75
1500
  softDeleteLineItems<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1501
+ /**
1502
+ * This method restores soft deleted line items by their IDs.
1503
+ *
1504
+ * @param {string[]} ids - The IDs of the line items.
1505
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the line items. You can pass to its `returnLinkableKeys`
1506
+ * property any of the line item's relation attribute names, such as `tax_lines`.
1507
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1508
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated tax line.
1509
+ * The object's keys are the ID attribute names of the line item entity's relations, such as `tax_line_id`,
1510
+ * and its value is an array of strings, each being the ID of the record associated with the line item through this relation,
1511
+ * such as the IDs of associated tax line.
1512
+ *
1513
+ * If there are no related records restored, the promise resolves to `void`.
1514
+ *
1515
+ * @example
1516
+ * await cartModuleService.restoreLineItems([
1517
+ * "cali_123",
1518
+ * "cali_321",
1519
+ * ])
1520
+ */
76
1521
  restoreLineItems<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1522
+ /**
1523
+ * This method soft deletes shipping methods by their IDs.
1524
+ *
1525
+ * @param {string[]} ids - The IDs of the shipping methods.
1526
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1527
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1528
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted, such as the ID of the associated tax lines.
1529
+ * The object's keys are the ID attribute names of the shipping method entity's relations, such as `tax_line_id`, and its value is an array of strings, each being the ID of a record associated
1530
+ * with the shipping method through this relation, such as the IDs of associated tax line.
1531
+ *
1532
+ * If there are no related records, the promise resolves to `void`.
1533
+ *
1534
+ * @example
1535
+ * await cartModuleService.softDeleteShippingMethods([
1536
+ * "casm_123",
1537
+ * "casm_321",
1538
+ * ])
1539
+ */
77
1540
  softDeleteShippingMethods<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1541
+ /**
1542
+ * This method restores soft deleted shipping methods by their IDs.
1543
+ *
1544
+ * @param {string[]} ids - The IDs of the shipping methods.
1545
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the shipping methods. You can pass to its `returnLinkableKeys`
1546
+ * property any of the shipping method's relation attribute names, such as `tax_lines`.
1547
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1548
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored, such as the ID of associated tax lines.
1549
+ * The object's keys are the ID attribute names of the shipping method entity's relations, such as `tax_line_id`,
1550
+ * and its value is an array of strings, each being the ID of the record associated with the shipping method through this relation,
1551
+ * such as the IDs of associated tax lines.
1552
+ *
1553
+ * If there are no related records restored, the promise resolves to `void`.
1554
+ *
1555
+ * @example
1556
+ * await cartModuleService.restoreShippingMethods([
1557
+ * "casm_123",
1558
+ * "casm_321",
1559
+ * ])
1560
+ */
78
1561
  restoreShippingMethods<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1562
+ /**
1563
+ * This method soft deletes line item adjustments by their IDs.
1564
+ *
1565
+ * @param {string[]} ids - The IDs of the line item adjustments.
1566
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1567
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1568
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted.
1569
+ * If there are no related records, the promise resolves to `void`.
1570
+ *
1571
+ * @example
1572
+ * await cartModuleService.softDeleteLineItemAdjustments([
1573
+ * "caliadj_123",
1574
+ * "caliadj_321",
1575
+ * ])
1576
+ */
79
1577
  softDeleteLineItemAdjustments<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1578
+ /**
1579
+ * This method restores soft deleted line item adjustments by their IDs.
1580
+ *
1581
+ * @param {string[]} ids - The IDs of the line item adjustments.
1582
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the line item adjustments. You can pass to its `returnLinkableKeys`
1583
+ * property any of the line item adjustment's relation attribute names.
1584
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1585
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored.
1586
+ * If there are no related records restored, the promise resolves to `void`.
1587
+ *
1588
+ * @example
1589
+ * await cartModuleService.restoreLineItemAdjustments([
1590
+ * "caliadj_123",
1591
+ * "caliadj_321",
1592
+ * ])
1593
+ */
80
1594
  restoreLineItemAdjustments<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1595
+ /**
1596
+ * This method soft deletes shipping method adjustments by their IDs.
1597
+ *
1598
+ * @param {string[]} ids - The IDs of the shipping method adjustments.
1599
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1600
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1601
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted.
1602
+ * If there are no related records, the promise resolves to `void`.
1603
+ *
1604
+ * @example
1605
+ * await cartModuleService.softDeleteShippingMethodAdjustments([
1606
+ * "casmadj_123",
1607
+ * "casmadj_321",
1608
+ * ])
1609
+ */
81
1610
  softDeleteShippingMethodAdjustments<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1611
+ /**
1612
+ * This method restores soft deleted shipping method adjustments by their IDs.
1613
+ *
1614
+ * @param {string[]} ids - The IDs of the shipping method adjustments.
1615
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the shipping method adjustment. You can pass to its `returnLinkableKeys`
1616
+ * property any of the shipping method adjustment's relation attribute names.
1617
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1618
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored.
1619
+ * If there are no related records restored, the promise resolves to `void`.
1620
+ *
1621
+ * @example
1622
+ * await cartModuleService.restoreShippingMethodAdjustments([
1623
+ * "casmadj_123",
1624
+ * "casmadj_321",
1625
+ * ])
1626
+ */
82
1627
  restoreShippingMethodAdjustments<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1628
+ /**
1629
+ * This method soft deletes line item tax lines by their IDs.
1630
+ *
1631
+ * @param {string[]} ids - The IDs of the line item tax lines.
1632
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1633
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1634
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted.
1635
+ * If there are no related records, the promise resolves to `void`.
1636
+ *
1637
+ * @example
1638
+ * await cartModuleService.softDeleteLineItemTaxLines([
1639
+ * "calitxl_123",
1640
+ * "calitxl_321",
1641
+ * ])
1642
+ */
83
1643
  softDeleteLineItemTaxLines<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1644
+ /**
1645
+ * This method restores soft deleted line item tax lines by its IDs.
1646
+ *
1647
+ * @param {string[]} ids - The IDs of the line item tax lines.
1648
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the line item tax lines. You can pass to its `returnLinkableKeys`
1649
+ * property any of the line item tax line's relation attribute names.
1650
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1651
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored.
1652
+ * If there are no related records restored, the promise resolves to `void`.
1653
+ *
1654
+ * @example
1655
+ * await cartModuleService.restoreLineItemTaxLines([
1656
+ * "calitxl_123",
1657
+ * "calitxl_321",
1658
+ * ])
1659
+ */
84
1660
  restoreLineItemTaxLines<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1661
+ /**
1662
+ * This method soft deletes shipping method tax lines by their IDs.
1663
+ *
1664
+ * @param {string[]} ids - The IDs of the shipping method tax lines.
1665
+ * @param {SoftDeleteReturn<TReturnableLinkableKeys>} config - An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
1666
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1667
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were also soft deleted.
1668
+ * If there are no related records, the promise resolves to `void`.
1669
+ *
1670
+ * @example
1671
+ * await cartModuleService.softDeleteShippingMethodTaxLines([
1672
+ * "casmtxl_123",
1673
+ * "casmtxl_321",
1674
+ * ])
1675
+ */
85
1676
  softDeleteShippingMethodTaxLines<TReturnableLinkableKeys extends string = string>(ids: string[], config?: SoftDeleteReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
1677
+ /**
1678
+ * This method restores soft deleted shipping method tax lines by their IDs.
1679
+ *
1680
+ * @param {string[]} ids - The IDs of the shipping method tax lines.
1681
+ * @param {RestoreReturn<TReturnableLinkableKeys>} config - Configurations determining which relations to restore along with each of the shipping method tax lines. You can pass to its `returnLinkableKeys`
1682
+ * property any of the shipping method tax line's relation attribute names.
1683
+ * @param {Context} sharedContext - A context used to share resources, such as transaction manager, between the application and the module.
1684
+ * @returns {Promise<void | Record<TReturnableLinkableKeys, string[]>>} An object that includes the IDs of related records that were restored.
1685
+ * If there are no related records restored, the promise resolves to `void`.
1686
+ *
1687
+ * @example
1688
+ * await cartModuleService.restoreShippingMethodTaxLines([
1689
+ * "casmtxl_123",
1690
+ * "casmtxl_321",
1691
+ * ])
1692
+ */
86
1693
  restoreShippingMethodTaxLines<TReturnableLinkableKeys extends string = string>(ids: string[], config?: RestoreReturn<TReturnableLinkableKeys>, sharedContext?: Context): Promise<Record<TReturnableLinkableKeys, string[]> | void>;
87
1694
  }
88
1695
  //# sourceMappingURL=service.d.ts.map