@medusajs/js-sdk 0.0.2-snapshot-20241022120003 → 0.0.2-snapshot-20241022140307
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin/api-key.d.ts +144 -1
- package/dist/admin/api-key.d.ts.map +1 -1
- package/dist/admin/api-key.js +143 -0
- package/dist/admin/api-key.js.map +1 -1
- package/dist/admin/campaign.d.ts +135 -0
- package/dist/admin/campaign.d.ts.map +1 -1
- package/dist/admin/campaign.js +135 -0
- package/dist/admin/campaign.js.map +1 -1
- package/dist/admin/claim.d.ts +542 -19
- package/dist/admin/claim.d.ts.map +1 -1
- package/dist/admin/claim.js +523 -0
- package/dist/admin/claim.js.map +1 -1
- package/dist/admin/currency.d.ts +80 -1
- package/dist/admin/currency.d.ts.map +1 -1
- package/dist/admin/currency.js +81 -2
- package/dist/admin/currency.js.map +1 -1
- package/dist/admin/customer-group.d.ts +152 -2
- package/dist/admin/customer-group.d.ts.map +1 -1
- package/dist/admin/customer-group.js +150 -0
- package/dist/admin/customer-group.js.map +1 -1
- package/dist/admin/customer.d.ts +135 -13
- package/dist/admin/customer.d.ts.map +1 -1
- package/dist/admin/customer.js +130 -0
- package/dist/admin/customer.js.map +1 -1
- package/dist/admin/exchange.d.ts +471 -16
- package/dist/admin/exchange.d.ts.map +1 -1
- package/dist/admin/exchange.js +455 -0
- package/dist/admin/exchange.js.map +1 -1
- package/dist/admin/fulfillment-provider.d.ts +47 -0
- package/dist/admin/fulfillment-provider.d.ts.map +1 -1
- package/dist/admin/fulfillment-provider.js +47 -0
- package/dist/admin/fulfillment-provider.js.map +1 -1
- package/dist/esm/admin/api-key.d.ts +144 -1
- package/dist/esm/admin/api-key.d.ts.map +1 -1
- package/dist/esm/admin/api-key.js +143 -0
- package/dist/esm/admin/api-key.js.map +1 -1
- package/dist/esm/admin/campaign.d.ts +135 -0
- package/dist/esm/admin/campaign.d.ts.map +1 -1
- package/dist/esm/admin/campaign.js +135 -0
- package/dist/esm/admin/campaign.js.map +1 -1
- package/dist/esm/admin/claim.d.ts +542 -19
- package/dist/esm/admin/claim.d.ts.map +1 -1
- package/dist/esm/admin/claim.js +523 -0
- package/dist/esm/admin/claim.js.map +1 -1
- package/dist/esm/admin/currency.d.ts +80 -1
- package/dist/esm/admin/currency.d.ts.map +1 -1
- package/dist/esm/admin/currency.js +81 -2
- package/dist/esm/admin/currency.js.map +1 -1
- package/dist/esm/admin/customer-group.d.ts +152 -2
- package/dist/esm/admin/customer-group.d.ts.map +1 -1
- package/dist/esm/admin/customer-group.js +150 -0
- package/dist/esm/admin/customer-group.js.map +1 -1
- package/dist/esm/admin/customer.d.ts +135 -13
- package/dist/esm/admin/customer.d.ts.map +1 -1
- package/dist/esm/admin/customer.js +130 -0
- package/dist/esm/admin/customer.js.map +1 -1
- package/dist/esm/admin/exchange.d.ts +471 -16
- package/dist/esm/admin/exchange.d.ts.map +1 -1
- package/dist/esm/admin/exchange.js +455 -0
- package/dist/esm/admin/exchange.js.map +1 -1
- package/dist/esm/admin/fulfillment-provider.d.ts +47 -0
- package/dist/esm/admin/fulfillment-provider.d.ts.map +1 -1
- package/dist/esm/admin/fulfillment-provider.js +47 -0
- package/dist/esm/admin/fulfillment-provider.js.map +1 -1
- package/package.json +2 -2
@@ -10,26 +10,549 @@ export declare class Claim {
|
|
10
10
|
* @ignore
|
11
11
|
*/
|
12
12
|
constructor(client: Client);
|
13
|
+
/**
|
14
|
+
* This method retrieves a paginated list of claims. It sends a request to the
|
15
|
+
* [List Claims](https://docs.medusajs.com/v2/api/admin#claims_getclaims) API route.
|
16
|
+
*
|
17
|
+
* @param query - Filters and pagination configurations.
|
18
|
+
* @param headers - Headers to pass in the request.
|
19
|
+
* @returns The paginated list of claims.
|
20
|
+
*
|
21
|
+
* @example
|
22
|
+
* To retrieve the list of claims:
|
23
|
+
*
|
24
|
+
* ```ts
|
25
|
+
* sdk.admin.claim.list()
|
26
|
+
* .then(({ claims, count, limit, offset }) => {
|
27
|
+
* console.log(claims)
|
28
|
+
* })
|
29
|
+
* ```
|
30
|
+
*
|
31
|
+
* To configure the pagination, pass the `limit` and `offset` query parameters.
|
32
|
+
*
|
33
|
+
* For example, to retrieve only 10 items and skip 10 items:
|
34
|
+
*
|
35
|
+
* ```ts
|
36
|
+
* sdk.admin.claim.list({
|
37
|
+
* limit: 10,
|
38
|
+
* offset: 10
|
39
|
+
* })
|
40
|
+
* .then(({ claims, count, limit, offset }) => {
|
41
|
+
* console.log(claims)
|
42
|
+
* })
|
43
|
+
* ```
|
44
|
+
*
|
45
|
+
* Using the `fields` query parameter, you can specify the fields and relations to retrieve
|
46
|
+
* in each claim:
|
47
|
+
*
|
48
|
+
* ```ts
|
49
|
+
* sdk.admin.claim.list({
|
50
|
+
* fields: "id,*additional_items"
|
51
|
+
* })
|
52
|
+
* .then(({ claims, count, limit, offset }) => {
|
53
|
+
* console.log(claims)
|
54
|
+
* })
|
55
|
+
* ```
|
56
|
+
*
|
57
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
|
58
|
+
*/
|
13
59
|
list(query?: HttpTypes.AdminClaimListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimListResponse>;
|
14
|
-
|
15
|
-
|
60
|
+
/**
|
61
|
+
* This method retrieves a claim. It sends a request to the
|
62
|
+
* [Get Claim](https://docs.medusajs.com/v2/api/admin#claims_getclaimsid) API route.
|
63
|
+
*
|
64
|
+
* @param id - The claim's ID.
|
65
|
+
* @param query - Configure the fields to retrieve in the claim.
|
66
|
+
* @param headers - Headers to pass in the request
|
67
|
+
* @returns The claim's details.
|
68
|
+
*
|
69
|
+
* @example
|
70
|
+
* To retrieve a claim by its ID:
|
71
|
+
*
|
72
|
+
* ```ts
|
73
|
+
* sdk.admin.claim.retrieve("claim_123")
|
74
|
+
* .then(({ claim }) => {
|
75
|
+
* console.log(claim)
|
76
|
+
* })
|
77
|
+
* ```
|
78
|
+
*
|
79
|
+
* To specify the fields and relations to retrieve:
|
80
|
+
*
|
81
|
+
* ```ts
|
82
|
+
* sdk.admin.claim.retrieve("claim_123", {
|
83
|
+
* fields: "id,*additional_items"
|
84
|
+
* })
|
85
|
+
* .then(({ claim }) => {
|
86
|
+
* console.log(claim)
|
87
|
+
* })
|
88
|
+
* ```
|
89
|
+
*
|
90
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
|
91
|
+
*/
|
92
|
+
retrieve(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
93
|
+
/**
|
94
|
+
* This method creates a claim. It sends a request to the
|
95
|
+
* [Create Claim](https://docs.medusajs.com/v2/api/admin#claims_postclaims) API route.
|
96
|
+
*
|
97
|
+
* @param body - The claim's details.
|
98
|
+
* @param query - Configure the fields to retrieve in the claim.
|
99
|
+
* @param headers - Headers to pass in the request
|
100
|
+
* @returns The claim and order's details.
|
101
|
+
*
|
102
|
+
* @example
|
103
|
+
* sdk.admin.claim.create({
|
104
|
+
* type: "refund",
|
105
|
+
* order_id: "order_123",
|
106
|
+
* })
|
107
|
+
* .then(({ claim }) => {
|
108
|
+
* console.log(claim)
|
109
|
+
* })
|
110
|
+
*/
|
111
|
+
create(body: HttpTypes.AdminCreateClaim, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimOrderResponse>;
|
112
|
+
/**
|
113
|
+
* This method cancels a claim. It sends a request to the
|
114
|
+
* [Cancel Claim](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidcancel) API route.
|
115
|
+
*
|
116
|
+
* @param id - The claim's ID.
|
117
|
+
* @param query - Configure the fields to retrieve in the claim.
|
118
|
+
* @param headers - Headers to pass in the request
|
119
|
+
* @returns The claim's details.
|
120
|
+
*
|
121
|
+
* @example
|
122
|
+
* sdk.admin.claim.cancel("claim_123")
|
123
|
+
* .then(({ claim }) => {
|
124
|
+
* console.log(claim)
|
125
|
+
* })
|
126
|
+
*/
|
16
127
|
cancel(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimResponse>;
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
128
|
+
/**
|
129
|
+
* This method adds items to the claim. It sends a request to the
|
130
|
+
* [Add Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidclaimitems) API route.
|
131
|
+
*
|
132
|
+
* @param id - The ID of the claim to add the items to.
|
133
|
+
* @param body - The items' details.
|
134
|
+
* @param query - Configure the fields to retrieve in the claim.
|
135
|
+
* @param headers - Headers to pass in the request
|
136
|
+
* @returns The claim's details with a preview of the order when the claim is applied.
|
137
|
+
*
|
138
|
+
* @example
|
139
|
+
* sdk.admin.claim.addItems("claim_123", {
|
140
|
+
* items: [
|
141
|
+
* {
|
142
|
+
* id: "orli_123",
|
143
|
+
* quantity: 1
|
144
|
+
* }
|
145
|
+
* ]
|
146
|
+
* })
|
147
|
+
* .then(({ claim }) => {
|
148
|
+
* console.log(claim)
|
149
|
+
* })
|
150
|
+
*/
|
151
|
+
addItems(id: string, body: HttpTypes.AdminAddClaimItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
152
|
+
/**
|
153
|
+
* This method updates a claim item by the ID of the item's `WRITE_OFF_ITEM` action. It
|
154
|
+
* sends a request to the [Update Claim Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidclaimitemsaction_id) API route.
|
155
|
+
*
|
156
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
157
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
158
|
+
*
|
159
|
+
* @param id - The claim's ID.
|
160
|
+
* @param actionId - The id of the order item's `WRITE_OFF_ITEM` action.
|
161
|
+
* @param body - The details to update.
|
162
|
+
* @param query - Configure the fields to retrieve in the claim.
|
163
|
+
* @param headers - Headers to pass in the request
|
164
|
+
* @returns The claim's details with a preview of the order when the claim is applied.
|
165
|
+
*
|
166
|
+
* @example
|
167
|
+
* sdk.admin.claim.updateItem(
|
168
|
+
* "claim_123",
|
169
|
+
* "ordchact_123",
|
170
|
+
* {
|
171
|
+
* quantity: 1
|
172
|
+
* }
|
173
|
+
* )
|
174
|
+
* .then(({ claim }) => {
|
175
|
+
* console.log(claim)
|
176
|
+
* })
|
177
|
+
*/
|
178
|
+
updateItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
179
|
+
/**
|
180
|
+
* This method removes a claim item from a claim by the ID of the item's `WRITE_OFF_ITEM` action.
|
181
|
+
* It sends a request to the [Remove Claim Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidclaimitemsaction_id)
|
182
|
+
* API route.
|
183
|
+
*
|
184
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
185
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
186
|
+
*
|
187
|
+
* @param id - The claim's ID.
|
188
|
+
* @param actionId - The id of the order item's `WRITE_OFF_ITEM` action.
|
189
|
+
* @param query - Configure the fields to retrieve in the claim.
|
190
|
+
* @param headers - Headers to pass in the request
|
191
|
+
* @returns The claim's details with a preview of the order when the claim is applied.
|
192
|
+
*
|
193
|
+
* @example
|
194
|
+
* sdk.admin.claim.removeItem(
|
195
|
+
* "claim_123",
|
196
|
+
* "ordchact_123",
|
197
|
+
* )
|
198
|
+
* .then(({ claim }) => {
|
199
|
+
* console.log(claim)
|
200
|
+
* })
|
201
|
+
*/
|
202
|
+
removeItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
203
|
+
/**
|
204
|
+
* This method adds inbound (or return) items to the claim. These inbound items will have a `RETURN_ITEM` action.
|
205
|
+
*
|
206
|
+
* This method sends a request to the [Add Inbound Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinbounditems)
|
207
|
+
* API route.
|
208
|
+
*
|
209
|
+
* @param id - The ID of the claim to add the inbound items to.
|
210
|
+
* @param body - The inbound items' details.
|
211
|
+
* @param query - Configure the fields to retrieve in the return.
|
212
|
+
* @param headers - Headers to pass in the request
|
213
|
+
* @returns The details of the return associated with the claim, with a preview of the order when the claim is applied.
|
214
|
+
*
|
215
|
+
* @example
|
216
|
+
* sdk.admin.claim.addInboundItems(
|
217
|
+
* "claim_123",
|
218
|
+
* {
|
219
|
+
* items: [
|
220
|
+
* {
|
221
|
+
* id: "orli_123",
|
222
|
+
* quantity: 1
|
223
|
+
* }
|
224
|
+
* ]
|
225
|
+
* },
|
226
|
+
* )
|
227
|
+
* .then(({ return: returnData }) => {
|
228
|
+
* console.log(returnData)
|
229
|
+
* })
|
230
|
+
*/
|
231
|
+
addInboundItems(id: string, body: HttpTypes.AdminAddClaimInboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimReturnPreviewResponse>;
|
232
|
+
/**
|
233
|
+
* This method updates an inbound (or return) item of a claim using the ID of the item's `RETURN_ITEM` action.
|
234
|
+
* It sends a request to the [Update Inbound Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinbounditemsaction_id)
|
235
|
+
* API route.
|
236
|
+
*
|
237
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
238
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
239
|
+
*
|
240
|
+
* @param id - The claim's ID.
|
241
|
+
* @param actionId - The id of the return item's `RETURN_ITEM` action.
|
242
|
+
* @param body - The details to update in the inbound item.
|
243
|
+
* @param query - Configure the fields to retrieve in the return.
|
244
|
+
* @param headers - Headers to pass in the request
|
245
|
+
* @returns The details of the return associated wth the claim, with a preview of the order when the claim is applied.
|
246
|
+
*
|
247
|
+
* @example
|
248
|
+
* sdk.admin.claim.updateInboundItem(
|
249
|
+
* "claim_123",
|
250
|
+
* "ordchact_123",
|
251
|
+
* {
|
252
|
+
* quantity: 1
|
253
|
+
* },
|
254
|
+
* )
|
255
|
+
* .then(({ return: returnData }) => {
|
256
|
+
* console.log(returnData)
|
257
|
+
* })
|
258
|
+
*/
|
259
|
+
updateInboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimInboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimReturnPreviewResponse>;
|
260
|
+
/**
|
261
|
+
* This method removes an inbound (or return) item from a claim using the ID of the item's `RETURN_ITEM` action.
|
262
|
+
* It sends a request to the [Remove Inbound Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidinbounditemsaction_id)
|
263
|
+
* API route.
|
264
|
+
*
|
265
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
266
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
267
|
+
*
|
268
|
+
* @param id - The claim's ID.
|
269
|
+
* @param actionId - The ID of the return item's `RETURN_ITEM` action.
|
270
|
+
* @param query - Configure the fields to retrieve in the return.
|
271
|
+
* @param headers - Headers to pass in the request
|
272
|
+
* @returns The details of the return associated wth the claim, with a preview of the order when the claim is applied.
|
273
|
+
*
|
274
|
+
* @example
|
275
|
+
* sdk.admin.claim.removeInboundItem(
|
276
|
+
* "claim_123",
|
277
|
+
* "ordchact_123",
|
278
|
+
* )
|
279
|
+
* .then(({ return: returnData }) => {
|
280
|
+
* console.log(returnData)
|
281
|
+
* })
|
282
|
+
*/
|
283
|
+
removeInboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimReturnPreviewResponse>;
|
284
|
+
/**
|
285
|
+
* This method adds an inbound (or return) shipping method to a claim.
|
286
|
+
* The inbound shipping method will have a `SHIPPING_ADD` action.
|
287
|
+
*
|
288
|
+
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinboundshippingmethod)
|
289
|
+
* API route.
|
290
|
+
*
|
291
|
+
* @param id - The claim's ID.
|
292
|
+
* @param body - The shipping method's details.
|
293
|
+
* @param query - Configure the fields to retrieve in the return.
|
294
|
+
* @param headers - Headers to pass in the request
|
295
|
+
* @returns The details of the return associated wth the claim, with a preview of the order when the claim is applied.
|
296
|
+
*
|
297
|
+
* @example
|
298
|
+
* sdk.admin.claim.addInboundShipping(
|
299
|
+
* "claim_123",
|
300
|
+
* {
|
301
|
+
* shipping_option_id: "so_123",
|
302
|
+
* custom_amount: 10
|
303
|
+
* },
|
304
|
+
* )
|
305
|
+
* .then(({ return: returnData }) => {
|
306
|
+
* console.log(returnData)
|
307
|
+
* })
|
308
|
+
*/
|
309
|
+
addInboundShipping(id: string, body: HttpTypes.AdminClaimAddInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimReturnPreviewResponse>;
|
310
|
+
/**
|
311
|
+
* This method updates a shipping method for returning items in the claim using the ID of the method's `SHIPPING_ADD` action.
|
312
|
+
* It sends a request to the [Update Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinboundshippingmethodaction_id)
|
313
|
+
* API route.
|
314
|
+
*
|
315
|
+
* Every shipping method has an `actions` property, whose value is an array of actions.
|
316
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
317
|
+
*
|
318
|
+
* @param id - The claim's ID.
|
319
|
+
* @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
|
320
|
+
* @param body - The details to update in the shipping method
|
321
|
+
* @param query - Configure the fields to retrieve in the claim.
|
322
|
+
* @param headers - Headers to pass in the request
|
323
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
324
|
+
*
|
325
|
+
* @example
|
326
|
+
* sdk.admin.claim.updateInboundShipping(
|
327
|
+
* "claim_123",
|
328
|
+
* "ordchact_123",
|
329
|
+
* {
|
330
|
+
* custom_amount: 10
|
331
|
+
* },
|
332
|
+
* )
|
333
|
+
* .then(({ claim }) => {
|
334
|
+
* console.log(claim)
|
335
|
+
* })
|
336
|
+
*/
|
337
|
+
updateInboundShipping(id: string, actionId: string, body: HttpTypes.AdminClaimUpdateInboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
338
|
+
/**
|
339
|
+
* This method deletes a shipping method for returning items in the claim using the ID of the method's `SHIPPING_ADD` action.
|
340
|
+
* It sends a request to the [Remove Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidinboundshippingmethodaction_id)
|
341
|
+
* API route.
|
342
|
+
*
|
343
|
+
* Every shipping method has an `actions` property, whose value is an array of actions.
|
344
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
345
|
+
*
|
346
|
+
* @param id - The claim's ID.
|
347
|
+
* @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
|
348
|
+
* @param query - Configure the fields to retrieve in the return.
|
349
|
+
* @param headers - Headers to pass in the request
|
350
|
+
* @returns The details of the return associated wth the claim, with a preview of the order when the claim is applied.
|
351
|
+
*
|
352
|
+
* @example
|
353
|
+
* sdk.admin.claim.deleteInboundShipping(
|
354
|
+
* "claim_123",
|
355
|
+
* "ordchact_123",
|
356
|
+
* )
|
357
|
+
* .then(({ return: returnData }) => {
|
358
|
+
* console.log(returnData)
|
359
|
+
* })
|
360
|
+
*/
|
361
|
+
deleteInboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimReturnPreviewResponse>;
|
362
|
+
/**
|
363
|
+
* This method adds outbound (or new) items to a claim. These outbound items will have an `ITEM_ADD` action.
|
364
|
+
* It sends a request to the [Add Outbound Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutbounditems)
|
365
|
+
* API route.
|
366
|
+
*
|
367
|
+
* @param id - The ID of the claim to add the outbound items to.
|
368
|
+
* @param body - The items' details.
|
369
|
+
* @param query - Configure the fields to retrieve in the claim.
|
370
|
+
* @param headers - Headers to pass in the request
|
371
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
372
|
+
*
|
373
|
+
* @example
|
374
|
+
* sdk.admin.claim.addOutboundItems(
|
375
|
+
* "claim_123",
|
376
|
+
* {
|
377
|
+
* items: [{
|
378
|
+
* id: "orli_123",
|
379
|
+
* quantity: 1
|
380
|
+
* }]
|
381
|
+
* },
|
382
|
+
* )
|
383
|
+
* .then(({ claim }) => {
|
384
|
+
* console.log(claim)
|
385
|
+
* })
|
386
|
+
*/
|
387
|
+
addOutboundItems(id: string, body: HttpTypes.AdminAddClaimOutboundItems, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
388
|
+
/**
|
389
|
+
* This method updates an outbound (or new) item of a claim using the ID of the item's `ITEM_ADD` action.
|
390
|
+
* It sends a request to the [Update Outbound Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutbounditemsaction_id)
|
391
|
+
* API route.
|
392
|
+
*
|
393
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
394
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
395
|
+
*
|
396
|
+
* @param id - The claim's ID.
|
397
|
+
* @param actionId - The id of the new claim item's `ITEM_ADD` action.
|
398
|
+
* @param body - The item's details.
|
399
|
+
* @param query - Configure the fields to retrieve in the claim.
|
400
|
+
* @param headers - Headers to pass in the request
|
401
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
402
|
+
*
|
403
|
+
* @example
|
404
|
+
* sdk.admin.claim.updateOutboundItem(
|
405
|
+
* "claim_123",
|
406
|
+
* "ordchact_123",
|
407
|
+
* {
|
408
|
+
* quantity: 1
|
409
|
+
* },
|
410
|
+
* )
|
411
|
+
* .then(({ claim }) => {
|
412
|
+
* console.log(claim)
|
413
|
+
* })
|
414
|
+
*/
|
415
|
+
updateOutboundItem(id: string, actionId: string, body: HttpTypes.AdminUpdateClaimOutboundItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
416
|
+
/**
|
417
|
+
* This method removes an outbound (or new) item from a claim using the ID of the item's `ITEM_ADD` action.
|
418
|
+
* It sends a request to the [Remove Outbound Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidoutbounditemsaction_id)
|
419
|
+
* API route.
|
420
|
+
*
|
421
|
+
* Every item has an `actions` property, whose value is an array of actions.
|
422
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
423
|
+
*
|
424
|
+
* @param id - The claim's ID.
|
425
|
+
* @param actionId - The id of the new claim item's `ITEM_ADD` action.
|
426
|
+
* @param query - Configure the fields to retrieve in the claim.
|
427
|
+
* @param headers - Headers to pass in the request
|
428
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
429
|
+
*
|
430
|
+
* @example
|
431
|
+
* sdk.admin.claim.removeOutboundItem(
|
432
|
+
* "claim_123",
|
433
|
+
* "ordchact_123",
|
434
|
+
* )
|
435
|
+
* .then(({ claim }) => {
|
436
|
+
* console.log(claim)
|
437
|
+
* })
|
438
|
+
*/
|
439
|
+
removeOutboundItem(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
440
|
+
/**
|
441
|
+
* This method adds outbound an outbound shipping method to a claim.
|
442
|
+
* The outbound shipping method will have a `SHIPPING_ADD` action.
|
443
|
+
*
|
444
|
+
* This method sends a request to the
|
445
|
+
* [Add Outbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutboundshippingmethod)
|
446
|
+
* API route.
|
447
|
+
*
|
448
|
+
* @param id - The claim's ID.
|
449
|
+
* @param body - The shipping method's details.
|
450
|
+
* @param query - Configure the fields to retrieve in the claim.
|
451
|
+
* @param headers - Headers to pass in the request
|
452
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
453
|
+
*
|
454
|
+
* @example
|
455
|
+
* * sdk.admin.claim.addOutboundShipping(
|
456
|
+
* "claim_123",
|
457
|
+
* {
|
458
|
+
* shipping_option_id: "so_123",
|
459
|
+
* custom_amount: 10
|
460
|
+
* },
|
461
|
+
* )
|
462
|
+
* .then(({ claim }) => {
|
463
|
+
* console.log(claim)
|
464
|
+
* })
|
465
|
+
*/
|
466
|
+
addOutboundShipping(id: string, body: HttpTypes.AdminClaimAddOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
467
|
+
/**
|
468
|
+
* This method updates the shipping method for delivering outbound items in a claim using the ID of the method's `SHIPPING_ADD` action.
|
469
|
+
* It sends a request to the [Update Outbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutboundshippingmethodaction_id)
|
470
|
+
* API route.
|
471
|
+
*
|
472
|
+
* Every shipping method has an `actions` property, whose value is an array of actions.
|
473
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
474
|
+
*
|
475
|
+
* @param id - The claim's ID.
|
476
|
+
* @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
|
477
|
+
* @param body - The shipping method's details.
|
478
|
+
* @param query - Configure the fields to retrieve in the claim.
|
479
|
+
* @param headers - Headers to pass in the request
|
480
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
481
|
+
*
|
482
|
+
* @example
|
483
|
+
* sdk.admin.claim.updateOutboundShipping(
|
484
|
+
* "claim_123",
|
485
|
+
* "ordchact_123",
|
486
|
+
* {
|
487
|
+
* custom_amount: 10
|
488
|
+
* },
|
489
|
+
* )
|
490
|
+
* .then(({ claim }) => {
|
491
|
+
* console.log(claim)
|
492
|
+
* })
|
493
|
+
*/
|
494
|
+
updateOutboundShipping(id: string, actionId: string, body: HttpTypes.AdminClaimUpdateOutboundShipping, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
495
|
+
/**
|
496
|
+
* This method deletes the shipping method for delivering outbound items in the claim using the ID of the method's `SHIPPING_ADD` action.
|
497
|
+
*
|
498
|
+
* Every shipping method has an `actions` property, whose value is an array of actions.
|
499
|
+
* You can check the action's name using its `action` property, and use the value of the `id` property.
|
500
|
+
*
|
501
|
+
* @param id - The claim's ID.
|
502
|
+
* @param actionId - The id of the shipping method's `SHIPPING_ADD` action.
|
503
|
+
* @param query - Configure the fields to retrieve in the claim.
|
504
|
+
* @param headers - Headers to pass in the request
|
505
|
+
* @returns The details of the claim, with a preview of the order when the claim is applied.
|
506
|
+
*
|
507
|
+
* @example
|
508
|
+
* sdk.admin.claim.deleteOutboundShipping(
|
509
|
+
* "claim_123",
|
510
|
+
* "ordchact_123",
|
511
|
+
* )
|
512
|
+
* .then(({ claim }) => {
|
513
|
+
* console.log(claim)
|
514
|
+
* })
|
515
|
+
*/
|
516
|
+
deleteOutboundShipping(id: string, actionId: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimPreviewResponse>;
|
517
|
+
/**
|
518
|
+
* This method confirms a claim request, applying its changes on the associated order.
|
519
|
+
* It sends a request to the [Confirm Claim Request](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidrequest)
|
520
|
+
* API route.
|
521
|
+
*
|
522
|
+
* @param id - The claim's ID.
|
523
|
+
* @param body - The confirmation details.
|
524
|
+
* @param query - Configure the fields to retrieve in the claim.
|
525
|
+
* @param headers - Headers to pass in the request
|
526
|
+
* @returns The details of the claim and its associated return, with a preview of the order when the claim is applied.
|
527
|
+
*
|
528
|
+
* @example
|
529
|
+
* sdk.admin.claim.request(
|
530
|
+
* "claim_123",
|
531
|
+
* {},
|
532
|
+
* )
|
533
|
+
* .then(({ claim }) => {
|
534
|
+
* console.log(claim)
|
535
|
+
* })
|
536
|
+
*/
|
537
|
+
request(id: string, body: HttpTypes.AdminRequestClaim, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimRequestResponse>;
|
538
|
+
/**
|
539
|
+
* This method cancels a requested claim. It sends a request to the
|
540
|
+
* [Cancel Claim Request](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidrequest)
|
541
|
+
* API route.
|
542
|
+
*
|
543
|
+
* @param id - The claim's ID.
|
544
|
+
* @param query - Configure the fields to retrieve in the claim.
|
545
|
+
* @param headers - Headers to pass in the request
|
546
|
+
* @returns The cancelation's details.
|
547
|
+
*
|
548
|
+
* @example
|
549
|
+
* sdk.admin.claim.cancelRequest(
|
550
|
+
* "claim_123",
|
551
|
+
* )
|
552
|
+
* .then(({ deleted }) => {
|
553
|
+
* console.log(deleted)
|
554
|
+
* })
|
555
|
+
*/
|
556
|
+
cancelRequest(id: string, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminClaimDeleteResponse>;
|
34
557
|
}
|
35
558
|
//# sourceMappingURL=claim.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/admin/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,KAAK;IAChB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;
|
1
|
+
{"version":3,"file":"claim.d.ts","sourceRoot":"","sources":["../../../src/admin/claim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,KAAK;IAChB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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