@medusajs/js-sdk 2.0.0 → 2.0.1-preview-20241025150152
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/admin/api-key.d.ts +8 -8
- package/dist/admin/api-key.js +8 -8
- package/dist/admin/campaign.d.ts +8 -8
- package/dist/admin/campaign.js +8 -8
- package/dist/admin/claim.d.ts +22 -22
- package/dist/admin/claim.js +22 -22
- package/dist/admin/currency.d.ts +4 -4
- package/dist/admin/currency.js +4 -4
- package/dist/admin/customer-group.d.ts +8 -8
- package/dist/admin/customer-group.js +8 -8
- package/dist/admin/customer.d.ts +27 -7
- package/dist/admin/customer.d.ts.map +1 -1
- package/dist/admin/customer.js +33 -7
- package/dist/admin/customer.js.map +1 -1
- package/dist/admin/exchange.d.ts +21 -21
- package/dist/admin/exchange.js +21 -21
- package/dist/admin/fulfillment-provider.d.ts +2 -2
- package/dist/admin/fulfillment-provider.js +2 -2
- package/dist/admin/fulfillment-set.d.ts +6 -6
- package/dist/admin/fulfillment-set.js +6 -6
- package/dist/admin/fulfillment.d.ts +3 -3
- package/dist/admin/fulfillment.js +3 -3
- package/dist/admin/inventory-item.d.ts +12 -12
- package/dist/admin/inventory-item.js +12 -12
- package/dist/admin/invite.d.ts +8 -8
- package/dist/admin/invite.js +8 -8
- package/dist/admin/payment-collection.d.ts +0 -2
- package/dist/admin/payment-collection.d.ts.map +1 -1
- package/dist/admin/payment-collection.js +0 -12
- package/dist/admin/payment-collection.js.map +1 -1
- package/dist/admin/price-list.d.ts +195 -1
- package/dist/admin/price-list.d.ts.map +1 -1
- package/dist/admin/price-list.js +194 -0
- package/dist/admin/price-list.js.map +1 -1
- package/dist/admin/price-preference.d.ts +133 -0
- package/dist/admin/price-preference.d.ts.map +1 -1
- package/dist/admin/price-preference.js +133 -0
- package/dist/admin/price-preference.js.map +1 -1
- package/dist/admin/product-category.d.ts +150 -0
- package/dist/admin/product-category.d.ts.map +1 -1
- package/dist/admin/product-category.js +150 -0
- package/dist/admin/product-category.js.map +1 -1
- package/dist/admin/product-collection.d.ts +149 -0
- package/dist/admin/product-collection.d.ts.map +1 -1
- package/dist/admin/product-collection.js +149 -0
- package/dist/admin/product-collection.js.map +1 -1
- package/dist/auth/index.d.ts +10 -10
- package/dist/auth/index.js +10 -10
- package/dist/esm/admin/api-key.d.ts +8 -8
- package/dist/esm/admin/api-key.js +8 -8
- package/dist/esm/admin/campaign.d.ts +8 -8
- package/dist/esm/admin/campaign.js +8 -8
- package/dist/esm/admin/claim.d.ts +22 -22
- package/dist/esm/admin/claim.js +22 -22
- package/dist/esm/admin/currency.d.ts +4 -4
- package/dist/esm/admin/currency.js +4 -4
- package/dist/esm/admin/customer-group.d.ts +8 -8
- package/dist/esm/admin/customer-group.js +8 -8
- package/dist/esm/admin/customer.d.ts +27 -7
- package/dist/esm/admin/customer.d.ts.map +1 -1
- package/dist/esm/admin/customer.js +35 -7
- package/dist/esm/admin/customer.js.map +1 -1
- package/dist/esm/admin/exchange.d.ts +21 -21
- package/dist/esm/admin/exchange.js +21 -21
- package/dist/esm/admin/fulfillment-provider.d.ts +2 -2
- package/dist/esm/admin/fulfillment-provider.js +2 -2
- package/dist/esm/admin/fulfillment-set.d.ts +6 -6
- package/dist/esm/admin/fulfillment-set.js +6 -6
- package/dist/esm/admin/fulfillment.d.ts +3 -3
- package/dist/esm/admin/fulfillment.js +3 -3
- package/dist/esm/admin/inventory-item.d.ts +12 -12
- package/dist/esm/admin/inventory-item.js +12 -12
- package/dist/esm/admin/invite.d.ts +8 -8
- package/dist/esm/admin/invite.js +8 -8
- package/dist/esm/admin/payment-collection.d.ts +0 -2
- package/dist/esm/admin/payment-collection.d.ts.map +1 -1
- package/dist/esm/admin/payment-collection.js +0 -16
- package/dist/esm/admin/payment-collection.js.map +1 -1
- package/dist/esm/admin/price-list.d.ts +195 -1
- package/dist/esm/admin/price-list.d.ts.map +1 -1
- package/dist/esm/admin/price-list.js +194 -0
- package/dist/esm/admin/price-list.js.map +1 -1
- package/dist/esm/admin/price-preference.d.ts +133 -0
- package/dist/esm/admin/price-preference.d.ts.map +1 -1
- package/dist/esm/admin/price-preference.js +133 -0
- package/dist/esm/admin/price-preference.js.map +1 -1
- package/dist/esm/admin/product-category.d.ts +150 -0
- package/dist/esm/admin/product-category.d.ts.map +1 -1
- package/dist/esm/admin/product-category.js +150 -0
- package/dist/esm/admin/product-category.js.map +1 -1
- package/dist/esm/admin/product-collection.d.ts +149 -0
- package/dist/esm/admin/product-collection.d.ts.map +1 -1
- package/dist/esm/admin/product-collection.js +149 -0
- package/dist/esm/admin/product-collection.js.map +1 -1
- package/dist/esm/auth/index.d.ts +10 -10
- package/dist/esm/auth/index.js +10 -10
- package/dist/esm/store/index.d.ts +73 -73
- package/dist/esm/store/index.js +73 -73
- package/dist/store/index.d.ts +73 -73
- package/dist/store/index.js +73 -73
- package/package.json +2 -2
@@ -12,7 +12,7 @@ export declare class InventoryItem {
|
|
12
12
|
constructor(client: Client);
|
13
13
|
/**
|
14
14
|
* This method creates an inventory item. It sends a request to the
|
15
|
-
* [Create Inventory Item](https://docs.medusajs.com/
|
15
|
+
* [Create Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitems)
|
16
16
|
* API route.
|
17
17
|
*
|
18
18
|
* @param body - The inventory item's details.
|
@@ -31,7 +31,7 @@ export declare class InventoryItem {
|
|
31
31
|
create(body: HttpTypes.AdminCreateInventoryItem, query?: HttpTypes.SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryItemResponse>;
|
32
32
|
/**
|
33
33
|
* This method updates an inventory level. It sends a request to the
|
34
|
-
* [Update Inventory Item](https://docs.medusajs.com/
|
34
|
+
* [Update Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsid)
|
35
35
|
* API route.
|
36
36
|
*
|
37
37
|
* @param id - The inventory item's ID.
|
@@ -51,7 +51,7 @@ export declare class InventoryItem {
|
|
51
51
|
update(id: string, body: HttpTypes.AdminUpdateInventoryItem, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryItemResponse>;
|
52
52
|
/**
|
53
53
|
* This method retrieves a paginated list of inventory items. It sends a request to the
|
54
|
-
* [List Inventory Items](https://docs.medusajs.com/
|
54
|
+
* [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
|
55
55
|
* API route.
|
56
56
|
*
|
57
57
|
* @param query - Filters and pagination configurations.
|
@@ -94,12 +94,12 @@ export declare class InventoryItem {
|
|
94
94
|
* })
|
95
95
|
* ```
|
96
96
|
*
|
97
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
97
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
98
98
|
*/
|
99
99
|
list(query?: HttpTypes.AdminInventoryItemParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryItemListResponse>;
|
100
100
|
/**
|
101
101
|
* This method retrieves an inventory item by its ID. It sends a request to the
|
102
|
-
* [Get Inventory Item](https://docs.medusajs.com/
|
102
|
+
* [Get Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitemsid) API route.
|
103
103
|
*
|
104
104
|
* @param id - The inventory item's ID.
|
105
105
|
* @param query - Configure the fields to retrieve in the inventory item.
|
@@ -127,12 +127,12 @@ export declare class InventoryItem {
|
|
127
127
|
* })
|
128
128
|
* ```
|
129
129
|
*
|
130
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
130
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
131
131
|
*/
|
132
132
|
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryItemResponse>;
|
133
133
|
/**
|
134
134
|
* This method deletes an inventory item. This sends a request to the
|
135
|
-
* [Delete Inventory Item](https://docs.medusajs.com/
|
135
|
+
* [Delete Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsid)
|
136
136
|
* API route.
|
137
137
|
*
|
138
138
|
* @param id - The inventory item's ID.
|
@@ -148,7 +148,7 @@ export declare class InventoryItem {
|
|
148
148
|
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryItemDeleteResponse>;
|
149
149
|
/**
|
150
150
|
* This method retrieves a paginated list of inventory levels that belong to an inventory item.
|
151
|
-
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/
|
151
|
+
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
|
152
152
|
* API route.
|
153
153
|
*
|
154
154
|
* @param id - The inventory item's ID.
|
@@ -192,7 +192,7 @@ export declare class InventoryItem {
|
|
192
192
|
* })
|
193
193
|
* ```
|
194
194
|
*
|
195
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
195
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
196
196
|
*/
|
197
197
|
listLevels(id: string, query?: HttpTypes.AdminInventoryLevelFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryLevelListResponse>;
|
198
198
|
/**
|
@@ -200,7 +200,7 @@ export declare class InventoryItem {
|
|
200
200
|
* stock location.
|
201
201
|
*
|
202
202
|
* This method sends a request to the
|
203
|
-
* [Update Inventory Level](https://docs.medusajs.com/
|
203
|
+
* [Update Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelslocation_id)
|
204
204
|
* API route.
|
205
205
|
*
|
206
206
|
* @param id - The inventory item's ID.
|
@@ -228,7 +228,7 @@ export declare class InventoryItem {
|
|
228
228
|
* and a stock location.
|
229
229
|
*
|
230
230
|
* This method sends a request to the
|
231
|
-
* [Remove Inventory Level](https://docs.medusajs.com/
|
231
|
+
* [Remove Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsidlocationlevelslocation_id)
|
232
232
|
* API route.
|
233
233
|
*
|
234
234
|
* @param id - The inventory item's ID.
|
@@ -248,7 +248,7 @@ export declare class InventoryItem {
|
|
248
248
|
deleteLevel(id: string, locationId: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInventoryLevelDeleteResponse>;
|
249
249
|
/**
|
250
250
|
* This method manages the inventory levels of an inventory item. It sends a request to the
|
251
|
-
* [Manage Inventory Levels](https://docs.medusajs.com/
|
251
|
+
* [Manage Inventory Levels](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelsbatch)
|
252
252
|
* API route.
|
253
253
|
*
|
254
254
|
* @param id - The inventory item's ID.
|
@@ -10,7 +10,7 @@ class InventoryItem {
|
|
10
10
|
}
|
11
11
|
/**
|
12
12
|
* This method creates an inventory item. It sends a request to the
|
13
|
-
* [Create Inventory Item](https://docs.medusajs.com/
|
13
|
+
* [Create Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitems)
|
14
14
|
* API route.
|
15
15
|
*
|
16
16
|
* @param body - The inventory item's details.
|
@@ -36,7 +36,7 @@ class InventoryItem {
|
|
36
36
|
}
|
37
37
|
/**
|
38
38
|
* This method updates an inventory level. It sends a request to the
|
39
|
-
* [Update Inventory Item](https://docs.medusajs.com/
|
39
|
+
* [Update Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsid)
|
40
40
|
* API route.
|
41
41
|
*
|
42
42
|
* @param id - The inventory item's ID.
|
@@ -63,7 +63,7 @@ class InventoryItem {
|
|
63
63
|
}
|
64
64
|
/**
|
65
65
|
* This method retrieves a paginated list of inventory items. It sends a request to the
|
66
|
-
* [List Inventory Items](https://docs.medusajs.com/
|
66
|
+
* [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
|
67
67
|
* API route.
|
68
68
|
*
|
69
69
|
* @param query - Filters and pagination configurations.
|
@@ -106,7 +106,7 @@ class InventoryItem {
|
|
106
106
|
* })
|
107
107
|
* ```
|
108
108
|
*
|
109
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
109
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
110
110
|
*/
|
111
111
|
async list(query, headers) {
|
112
112
|
return await this.client.fetch(`/admin/inventory-items`, {
|
@@ -116,7 +116,7 @@ class InventoryItem {
|
|
116
116
|
}
|
117
117
|
/**
|
118
118
|
* This method retrieves an inventory item by its ID. It sends a request to the
|
119
|
-
* [Get Inventory Item](https://docs.medusajs.com/
|
119
|
+
* [Get Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitemsid) API route.
|
120
120
|
*
|
121
121
|
* @param id - The inventory item's ID.
|
122
122
|
* @param query - Configure the fields to retrieve in the inventory item.
|
@@ -144,7 +144,7 @@ class InventoryItem {
|
|
144
144
|
* })
|
145
145
|
* ```
|
146
146
|
*
|
147
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
147
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
148
148
|
*/
|
149
149
|
async retrieve(id, query, headers) {
|
150
150
|
return await this.client.fetch(`/admin/inventory-items/${id}`, {
|
@@ -154,7 +154,7 @@ class InventoryItem {
|
|
154
154
|
}
|
155
155
|
/**
|
156
156
|
* This method deletes an inventory item. This sends a request to the
|
157
|
-
* [Delete Inventory Item](https://docs.medusajs.com/
|
157
|
+
* [Delete Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsid)
|
158
158
|
* API route.
|
159
159
|
*
|
160
160
|
* @param id - The inventory item's ID.
|
@@ -175,7 +175,7 @@ class InventoryItem {
|
|
175
175
|
}
|
176
176
|
/**
|
177
177
|
* This method retrieves a paginated list of inventory levels that belong to an inventory item.
|
178
|
-
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/
|
178
|
+
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
|
179
179
|
* API route.
|
180
180
|
*
|
181
181
|
* @param id - The inventory item's ID.
|
@@ -219,7 +219,7 @@ class InventoryItem {
|
|
219
219
|
* })
|
220
220
|
* ```
|
221
221
|
*
|
222
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
222
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
223
223
|
*/
|
224
224
|
async listLevels(id, query, headers) {
|
225
225
|
return await this.client.fetch(`/admin/inventory-items/${id}/location-levels`, {
|
@@ -232,7 +232,7 @@ class InventoryItem {
|
|
232
232
|
* stock location.
|
233
233
|
*
|
234
234
|
* This method sends a request to the
|
235
|
-
* [Update Inventory Level](https://docs.medusajs.com/
|
235
|
+
* [Update Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelslocation_id)
|
236
236
|
* API route.
|
237
237
|
*
|
238
238
|
* @param id - The inventory item's ID.
|
@@ -267,7 +267,7 @@ class InventoryItem {
|
|
267
267
|
* and a stock location.
|
268
268
|
*
|
269
269
|
* This method sends a request to the
|
270
|
-
* [Remove Inventory Level](https://docs.medusajs.com/
|
270
|
+
* [Remove Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsidlocationlevelslocation_id)
|
271
271
|
* API route.
|
272
272
|
*
|
273
273
|
* @param id - The inventory item's ID.
|
@@ -292,7 +292,7 @@ class InventoryItem {
|
|
292
292
|
}
|
293
293
|
/**
|
294
294
|
* This method manages the inventory levels of an inventory item. It sends a request to the
|
295
|
-
* [Manage Inventory Levels](https://docs.medusajs.com/
|
295
|
+
* [Manage Inventory Levels](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelsbatch)
|
296
296
|
* API route.
|
297
297
|
*
|
298
298
|
* @param id - The inventory item's ID.
|
package/dist/admin/invite.d.ts
CHANGED
@@ -15,7 +15,7 @@ export declare class Invite {
|
|
15
15
|
* the {@link Auth.register}.
|
16
16
|
*
|
17
17
|
* This method sends a request to the [Accept Invite]
|
18
|
-
* (https://docs.medusajs.com/
|
18
|
+
* (https://docs.medusajs.com/api/admin#invites_postinvitesaccept)
|
19
19
|
* API route.
|
20
20
|
*
|
21
21
|
* @param input - The details of the user to create.
|
@@ -52,7 +52,7 @@ export declare class Invite {
|
|
52
52
|
}, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminAcceptInviteResponse>;
|
53
53
|
/**
|
54
54
|
* This method creates an invite. It sends a request to the
|
55
|
-
* [Create Invite](https://docs.medusajs.com/
|
55
|
+
* [Create Invite](https://docs.medusajs.com/api/admin#invites_postinvites)
|
56
56
|
* API route.
|
57
57
|
*
|
58
58
|
* @param body - The invite's details.
|
@@ -71,7 +71,7 @@ export declare class Invite {
|
|
71
71
|
create(body: HttpTypes.AdminCreateInvite, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
|
72
72
|
/**
|
73
73
|
* This method retrieves an invite by its ID. It sends a request to the
|
74
|
-
* [Get Invite](https://docs.medusajs.com/
|
74
|
+
* [Get Invite](https://docs.medusajs.com/api/admin#invites_getinvitesid)
|
75
75
|
* API route.
|
76
76
|
*
|
77
77
|
* @param id - The invite's ID.
|
@@ -100,12 +100,12 @@ export declare class Invite {
|
|
100
100
|
* })
|
101
101
|
* ```
|
102
102
|
*
|
103
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
103
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
104
104
|
*/
|
105
105
|
retrieve(id: string, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
|
106
106
|
/**
|
107
107
|
* This method retrieves a paginated list of invites. It sends a request to the
|
108
|
-
* [List Invites](https://docs.medusajs.com/
|
108
|
+
* [List Invites](https://docs.medusajs.com/api/admin#invites_getinvites)
|
109
109
|
* API route.
|
110
110
|
*
|
111
111
|
* @param queryParams - Filters and pagination configurations.
|
@@ -148,12 +148,12 @@ export declare class Invite {
|
|
148
148
|
* })
|
149
149
|
* ```
|
150
150
|
*
|
151
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
151
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
152
152
|
*/
|
153
153
|
list(queryParams?: FindParams, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteListResponse>;
|
154
154
|
/**
|
155
155
|
* This method refreshes the token of an invite. It sends a request to the
|
156
|
-
* [Refresh Invite Token](https://docs.medusajs.com/
|
156
|
+
* [Refresh Invite Token](https://docs.medusajs.com/api/admin#invites_postinvitesidresend)
|
157
157
|
* API route.
|
158
158
|
*
|
159
159
|
* @param id - The invite's ID.
|
@@ -169,7 +169,7 @@ export declare class Invite {
|
|
169
169
|
resend(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminInviteResponse>;
|
170
170
|
/**
|
171
171
|
* This method deletes an invite. It sends a request to the
|
172
|
-
* [Delete Invite](https://docs.medusajs.com/
|
172
|
+
* [Delete Invite](https://docs.medusajs.com/api/admin#invites_deleteinvitesid)
|
173
173
|
* API route.
|
174
174
|
*
|
175
175
|
* @param id - The invite's ID.
|
package/dist/admin/invite.js
CHANGED
@@ -13,7 +13,7 @@ class Invite {
|
|
13
13
|
* the {@link Auth.register}.
|
14
14
|
*
|
15
15
|
* This method sends a request to the [Accept Invite]
|
16
|
-
* (https://docs.medusajs.com/
|
16
|
+
* (https://docs.medusajs.com/api/admin#invites_postinvitesaccept)
|
17
17
|
* API route.
|
18
18
|
*
|
19
19
|
* @param input - The details of the user to create.
|
@@ -53,7 +53,7 @@ class Invite {
|
|
53
53
|
}
|
54
54
|
/**
|
55
55
|
* This method creates an invite. It sends a request to the
|
56
|
-
* [Create Invite](https://docs.medusajs.com/
|
56
|
+
* [Create Invite](https://docs.medusajs.com/api/admin#invites_postinvites)
|
57
57
|
* API route.
|
58
58
|
*
|
59
59
|
* @param body - The invite's details.
|
@@ -79,7 +79,7 @@ class Invite {
|
|
79
79
|
}
|
80
80
|
/**
|
81
81
|
* This method retrieves an invite by its ID. It sends a request to the
|
82
|
-
* [Get Invite](https://docs.medusajs.com/
|
82
|
+
* [Get Invite](https://docs.medusajs.com/api/admin#invites_getinvitesid)
|
83
83
|
* API route.
|
84
84
|
*
|
85
85
|
* @param id - The invite's ID.
|
@@ -108,7 +108,7 @@ class Invite {
|
|
108
108
|
* })
|
109
109
|
* ```
|
110
110
|
*
|
111
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
111
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
112
112
|
*/
|
113
113
|
async retrieve(id, query, headers) {
|
114
114
|
return await this.client.fetch(`/admin/invites/${id}`, {
|
@@ -118,7 +118,7 @@ class Invite {
|
|
118
118
|
}
|
119
119
|
/**
|
120
120
|
* This method retrieves a paginated list of invites. It sends a request to the
|
121
|
-
* [List Invites](https://docs.medusajs.com/
|
121
|
+
* [List Invites](https://docs.medusajs.com/api/admin#invites_getinvites)
|
122
122
|
* API route.
|
123
123
|
*
|
124
124
|
* @param queryParams - Filters and pagination configurations.
|
@@ -161,7 +161,7 @@ class Invite {
|
|
161
161
|
* })
|
162
162
|
* ```
|
163
163
|
*
|
164
|
-
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/
|
164
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
|
165
165
|
*/
|
166
166
|
async list(queryParams, headers) {
|
167
167
|
return await this.client.fetch(`/admin/invites`, {
|
@@ -171,7 +171,7 @@ class Invite {
|
|
171
171
|
}
|
172
172
|
/**
|
173
173
|
* This method refreshes the token of an invite. It sends a request to the
|
174
|
-
* [Refresh Invite Token](https://docs.medusajs.com/
|
174
|
+
* [Refresh Invite Token](https://docs.medusajs.com/api/admin#invites_postinvitesidresend)
|
175
175
|
* API route.
|
176
176
|
*
|
177
177
|
* @param id - The invite's ID.
|
@@ -192,7 +192,7 @@ class Invite {
|
|
192
192
|
}
|
193
193
|
/**
|
194
194
|
* This method deletes an invite. It sends a request to the
|
195
|
-
* [Delete Invite](https://docs.medusajs.com/
|
195
|
+
* [Delete Invite](https://docs.medusajs.com/api/admin#invites_deleteinvitesid)
|
196
196
|
* API route.
|
197
197
|
*
|
198
198
|
* @param id - The invite's ID.
|
@@ -10,8 +10,6 @@ export declare class PaymentCollection {
|
|
10
10
|
* @ignore
|
11
11
|
*/
|
12
12
|
constructor(client: Client);
|
13
|
-
list(query?: HttpTypes.AdminPaymentCollectionFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionsResponse>;
|
14
|
-
retrieve(id: string, query?: HttpTypes.AdminPaymentCollectionFilters, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
15
13
|
create(body: HttpTypes.AdminCreatePaymentCollection, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
16
14
|
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminDeletePaymentCollectionResponse>;
|
17
15
|
markAsPaid(id: string, body: HttpTypes.AdminMarkPaymentCollectionAsPaid, query?: SelectParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPaymentCollectionResponse>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment-collection.d.ts","sourceRoot":"","sources":["../../src/admin/payment-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAIpB,
|
1
|
+
{"version":3,"file":"payment-collection.d.ts","sourceRoot":"","sources":["../../src/admin/payment-collection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IACtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAIpB,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,4BAA4B,EAC5C,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;IAanB,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAU1C,UAAU,CACd,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,gCAAgC,EAChD,KAAK,CAAC,EAAE,YAAY,EACpB,OAAO,CAAC,EAAE,aAAa;CAY1B"}
|
@@ -8,18 +8,6 @@ class PaymentCollection {
|
|
8
8
|
constructor(client) {
|
9
9
|
this.client = client;
|
10
10
|
}
|
11
|
-
async list(query, headers) {
|
12
|
-
return await this.client.fetch(`/admin/payment-collections`, {
|
13
|
-
query,
|
14
|
-
headers,
|
15
|
-
});
|
16
|
-
}
|
17
|
-
async retrieve(id, query, headers) {
|
18
|
-
return await this.client.fetch(`/admin/payment-collections/${id}`, {
|
19
|
-
query,
|
20
|
-
headers,
|
21
|
-
});
|
22
|
-
}
|
23
11
|
async create(body, query, headers) {
|
24
12
|
return await this.client.fetch(`/admin/payment-collections`, {
|
25
13
|
method: "POST",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"payment-collection.js","sourceRoot":"","sources":["../../src/admin/payment-collection.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAK5B;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,
|
1
|
+
{"version":3,"file":"payment-collection.js","sourceRoot":"","sources":["../../src/admin/payment-collection.ts"],"names":[],"mappings":";;;AAIA,MAAa,iBAAiB;IAK5B;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,MAAM,CACV,IAA4C,EAC5C,KAAoB,EACpB,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,4BAA4B,EAC5B;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,OAAuB;QAC9C,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAAE,EAAE,EAClC;YACE,MAAM,EAAE,QAAQ;YAChB,OAAO;SACR,CACF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,UAAU,CACd,EAAU,EACV,IAAgD,EAChD,KAAoB,EACpB,OAAuB;QAEvB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAC5B,8BAA8B,EAAE,eAAe,EAC/C;YACE,MAAM,EAAE,MAAM;YACd,OAAO;YACP,IAAI;YACJ,KAAK;SACN,CACF,CAAA;IACH,CAAC;CACF;AAtDD,8CAsDC"}
|
@@ -10,12 +10,206 @@ export declare class PriceList {
|
|
10
10
|
* @ignore
|
11
11
|
*/
|
12
12
|
constructor(client: Client);
|
13
|
+
/**
|
14
|
+
* This method retrieves a price list. It sends a request to the
|
15
|
+
* [Get Price List](https://docs.medusajs.com/v2/api/admin#price-lists_getpricelistsid)
|
16
|
+
* API route.
|
17
|
+
*
|
18
|
+
* @param id - The price list's ID.
|
19
|
+
* @param query - Configure the fields to retrieve in the price list.
|
20
|
+
* @param headers - Headers to pass in the request
|
21
|
+
* @returns The price list's details.
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* To retrieve a price list by its ID:
|
25
|
+
*
|
26
|
+
* ```ts
|
27
|
+
* sdk.admin.priceList.retrieve("plist_123")
|
28
|
+
* .then(({ price_list }) => {
|
29
|
+
* console.log(price_list)
|
30
|
+
* })
|
31
|
+
* ```
|
32
|
+
*
|
33
|
+
* To specify the fields and relations to retrieve:
|
34
|
+
*
|
35
|
+
* ```ts
|
36
|
+
* sdk.admin.priceList.retrieve("plist_123", {
|
37
|
+
* fields: "id,*prices"
|
38
|
+
* })
|
39
|
+
* .then(({ price_list }) => {
|
40
|
+
* console.log(price_list)
|
41
|
+
* })
|
42
|
+
* ```
|
43
|
+
*
|
44
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
|
45
|
+
*/
|
13
46
|
retrieve(id: string, query?: HttpTypes.AdminPriceListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListResponse>;
|
47
|
+
/**
|
48
|
+
* This method retrieves a paginated list of price lists. It sends a request to the
|
49
|
+
* [List Price Lists](https://docs.medusajs.com/v2/api/admin#price-lists_getpricelists) API route.
|
50
|
+
*
|
51
|
+
* @param query - Filters and pagination configurations.
|
52
|
+
* @param headers - Headers to pass in the request.
|
53
|
+
* @returns The paginated list of price lists.
|
54
|
+
*
|
55
|
+
* @example
|
56
|
+
* To retrieve the list of price lists:
|
57
|
+
*
|
58
|
+
* ```ts
|
59
|
+
* sdk.admin.priceList.list()
|
60
|
+
* .then(({ price_lists, count, limit, offset }) => {
|
61
|
+
* console.log(price_lists)
|
62
|
+
* })
|
63
|
+
* ```
|
64
|
+
*
|
65
|
+
* To configure the pagination, pass the `limit` and `offset` query parameters.
|
66
|
+
*
|
67
|
+
* For example, to retrieve only 10 items and skip 10 items:
|
68
|
+
*
|
69
|
+
* ```ts
|
70
|
+
* sdk.admin.priceList.list({
|
71
|
+
* limit: 10,
|
72
|
+
* offset: 10
|
73
|
+
* })
|
74
|
+
* .then(({ price_lists, count, limit, offset }) => {
|
75
|
+
* console.log(price_lists)
|
76
|
+
* })
|
77
|
+
* ```
|
78
|
+
*
|
79
|
+
* Using the `fields` query parameter, you can specify the fields and relations to retrieve
|
80
|
+
* in each price list:
|
81
|
+
*
|
82
|
+
* ```ts
|
83
|
+
* sdk.admin.priceList.list({
|
84
|
+
* fields: "id,*prices"
|
85
|
+
* })
|
86
|
+
* .then(({ price_lists, count, limit, offset }) => {
|
87
|
+
* console.log(price_lists)
|
88
|
+
* })
|
89
|
+
* ```
|
90
|
+
*
|
91
|
+
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
|
92
|
+
*/
|
14
93
|
list(query?: HttpTypes.AdminPriceListListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListListResponse>;
|
94
|
+
/**
|
95
|
+
* This method creates a price list. It sends a request to the
|
96
|
+
* [Create Price List](https://docs.medusajs.com/v2/api/admin#price-lists_postpricelists)
|
97
|
+
* API route.
|
98
|
+
*
|
99
|
+
* @param body - The details of the price list to create.
|
100
|
+
* @param query - Configure the fields to retrieve in the price list.
|
101
|
+
* @param headers - Headers to pass in the request
|
102
|
+
* @returns The price list's details.
|
103
|
+
*
|
104
|
+
* @example
|
105
|
+
* sdk.admin.priceList.create({
|
106
|
+
* title: "My Price List",
|
107
|
+
* status: "active",
|
108
|
+
* type: "sale",
|
109
|
+
* prices: [
|
110
|
+
* {
|
111
|
+
* variant_id: "variant_123",
|
112
|
+
* amount: 10,
|
113
|
+
* currency_code: "usd",
|
114
|
+
* rules: {
|
115
|
+
* region_id: "reg_123"
|
116
|
+
* }
|
117
|
+
* }
|
118
|
+
* ]
|
119
|
+
* })
|
120
|
+
* .then(({ price_list }) => {
|
121
|
+
* console.log(price_list)
|
122
|
+
* })
|
123
|
+
*/
|
15
124
|
create(body: HttpTypes.AdminCreatePriceList, query?: HttpTypes.AdminPriceListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListResponse>;
|
125
|
+
/**
|
126
|
+
* This method updates a price list. It sends a request to the
|
127
|
+
* [Update Price List](https://docs.medusajs.com/v2/api/admin#price-lists_postpricelistsid)
|
128
|
+
* API route.
|
129
|
+
*
|
130
|
+
* @param id - The price list's ID.
|
131
|
+
* @param body - The data to update in the price list.
|
132
|
+
* @param query - Configure the fields to retrieve in the price list.
|
133
|
+
* @param headers - Headers to pass in the request
|
134
|
+
* @returns The price list's details.
|
135
|
+
*
|
136
|
+
* @example
|
137
|
+
* sdk.admin.priceList.update("plist_123", {
|
138
|
+
* title: "My Price List",
|
139
|
+
* })
|
140
|
+
* .then(({ price_list }) => {
|
141
|
+
* console.log(price_list)
|
142
|
+
* })
|
143
|
+
*/
|
16
144
|
update(id: string, body: HttpTypes.AdminUpdatePriceList, query?: HttpTypes.AdminPriceListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListResponse>;
|
145
|
+
/**
|
146
|
+
* This method deletes a price list. It sends a request to the
|
147
|
+
* [Delete Price List](https://docs.medusajs.com/v2/api/admin#price-lists_deletepricelistsid)
|
148
|
+
* API route.
|
149
|
+
*
|
150
|
+
* @param id - The price list's ID.
|
151
|
+
* @param headers - Headers to pass in the request
|
152
|
+
* @returns The deletion's details.
|
153
|
+
*
|
154
|
+
* @example
|
155
|
+
* sdk.admin.priceList.delete("plist_123")
|
156
|
+
* .then(({ deleted }) => {
|
157
|
+
* console.log(deleted)
|
158
|
+
* })
|
159
|
+
*/
|
17
160
|
delete(id: string, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListDeleteResponse>;
|
18
|
-
|
161
|
+
/**
|
162
|
+
* This method manages the prices of a price list to create, update, or delete them.
|
163
|
+
* It sends a request to the [Manage Prices](https://docs.medusajs.com/v2/api/admin#price-lists_postpricelistsidpricesbatch)
|
164
|
+
* API route.
|
165
|
+
*
|
166
|
+
* @param id - The price list's ID.
|
167
|
+
* @param body - The prices to create, update, or delete.
|
168
|
+
* @param query - Configure the fields to retrieve in the price list.
|
169
|
+
* @param headers - Headers to pass in the request
|
170
|
+
* @returns The price list's details.
|
171
|
+
*
|
172
|
+
* @example
|
173
|
+
* sdk.admin.priceList.batchPrices("plist_123", {
|
174
|
+
* create: [{
|
175
|
+
* variant_id: "variant_123",
|
176
|
+
* currency_code: "usd",
|
177
|
+
* amount: 10,
|
178
|
+
* rules: {
|
179
|
+
* region_id: "reg_123"
|
180
|
+
* }
|
181
|
+
* }],
|
182
|
+
* update: [{
|
183
|
+
* id: "price_123",
|
184
|
+
* variant_id: "variant_123",
|
185
|
+
* amount: 20,
|
186
|
+
* }],
|
187
|
+
* delete: ["price_123"]
|
188
|
+
* })
|
189
|
+
* .then(({ created, updated, deleted }) => {
|
190
|
+
* console.log(created, updated, deleted)
|
191
|
+
* })
|
192
|
+
*/
|
193
|
+
batchPrices(id: string, body: HttpTypes.AdminBatchPriceListPrice, query?: HttpTypes.AdminPriceListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListBatchResponse>;
|
194
|
+
/**
|
195
|
+
* This method removes products from a price list. It sends a request to the
|
196
|
+
* [Remove Product](https://docs.medusajs.com/v2/api/admin#price-lists_postpricelistsidproducts)
|
197
|
+
* API route.
|
198
|
+
*
|
199
|
+
* @param id - The price list's ID.
|
200
|
+
* @param body - The details of the products to remove.
|
201
|
+
* @param query - Configure the fields to retrieve in the price list.
|
202
|
+
* @param headers - Headers to pass in the request
|
203
|
+
* @returns The price list's details.
|
204
|
+
*
|
205
|
+
* @example
|
206
|
+
* sdk.admin.priceList.linkProducts("plist_123", {
|
207
|
+
* remove: ["prod_123"]
|
208
|
+
* })
|
209
|
+
* .then(({ price_list }) => {
|
210
|
+
* console.log(price_list)
|
211
|
+
* })
|
212
|
+
*/
|
19
213
|
linkProducts(id: string, body: HttpTypes.AdminLinkPriceListProducts, query?: HttpTypes.AdminPriceListParams, headers?: ClientHeaders): Promise<HttpTypes.AdminPriceListResponse>;
|
20
214
|
}
|
21
215
|
//# sourceMappingURL=price-list.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"price-list.d.ts","sourceRoot":"","sources":["../../src/admin/price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,SAAS;IACpB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IAEtB;;OAEG;gBACS,MAAM,EAAE,MAAM;
|
1
|
+
{"version":3,"file":"price-list.d.ts","sourceRoot":"","sources":["../../src/admin/price-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,qBAAa,SAAS;IACpB;;OAEG;IACH,OAAO,CAAC,MAAM,CAAQ;IAEtB;;OAEG;gBACS,MAAM,EAAE,MAAM;IAI1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgCG;IACG,QAAQ,CACZ,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,SAAS,CAAC,oBAAoB,EACtC,OAAO,CAAC,EAAE,aAAa;IAYzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6CG;IACG,IAAI,CACR,KAAK,CAAC,EAAE,SAAS,CAAC,wBAAwB,EAC1C,OAAO,CAAC,EAAE,aAAa;IAYzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACG,MAAM,CACV,IAAI,EAAE,SAAS,CAAC,oBAAoB,EACpC,KAAK,CAAC,EAAE,SAAS,CAAC,oBAAoB,EACtC,OAAO,CAAC,EAAE,aAAa;IAazB;;;;;;;;;;;;;;;;;;OAkBG;IACG,MAAM,CACV,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,oBAAoB,EACpC,KAAK,CAAC,EAAE,SAAS,CAAC,oBAAoB,EACtC,OAAO,CAAC,EAAE,aAAa;IAazB;;;;;;;;;;;;;;OAcG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa;IAUhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,WAAW,CACf,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,wBAAwB,EACxC,KAAK,CAAC,EAAE,SAAS,CAAC,oBAAoB,EACtC,OAAO,CAAC,EAAE,aAAa;IAazB;;;;;;;;;;;;;;;;;;OAkBG;IACG,YAAY,CAChB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,SAAS,CAAC,0BAA0B,EAC1C,KAAK,CAAC,EAAE,SAAS,CAAC,oBAAoB,EACtC,OAAO,CAAC,EAAE,aAAa;CAY1B"}
|