@medusajs/js-sdk 2.0.0-rc-20241022183311 → 2.0.1-preview-20241025120203

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. package/dist/admin/api-key.d.ts +8 -8
  2. package/dist/admin/api-key.js +8 -8
  3. package/dist/admin/campaign.d.ts +8 -8
  4. package/dist/admin/campaign.js +8 -8
  5. package/dist/admin/claim.d.ts +22 -22
  6. package/dist/admin/claim.js +22 -22
  7. package/dist/admin/currency.d.ts +4 -4
  8. package/dist/admin/currency.js +4 -4
  9. package/dist/admin/customer-group.d.ts +8 -8
  10. package/dist/admin/customer-group.js +8 -8
  11. package/dist/admin/customer.d.ts +27 -7
  12. package/dist/admin/customer.d.ts.map +1 -1
  13. package/dist/admin/customer.js +33 -7
  14. package/dist/admin/customer.js.map +1 -1
  15. package/dist/admin/exchange.d.ts +21 -21
  16. package/dist/admin/exchange.js +21 -21
  17. package/dist/admin/fulfillment-provider.d.ts +2 -2
  18. package/dist/admin/fulfillment-provider.js +2 -2
  19. package/dist/admin/fulfillment-set.d.ts +6 -6
  20. package/dist/admin/fulfillment-set.js +6 -6
  21. package/dist/admin/fulfillment.d.ts +3 -3
  22. package/dist/admin/fulfillment.js +3 -3
  23. package/dist/admin/inventory-item.d.ts +12 -12
  24. package/dist/admin/inventory-item.js +12 -12
  25. package/dist/admin/invite.d.ts +8 -8
  26. package/dist/admin/invite.js +8 -8
  27. package/dist/admin/payment-collection.d.ts +0 -2
  28. package/dist/admin/payment-collection.d.ts.map +1 -1
  29. package/dist/admin/payment-collection.js +0 -12
  30. package/dist/admin/payment-collection.js.map +1 -1
  31. package/dist/admin/price-list.d.ts +195 -1
  32. package/dist/admin/price-list.d.ts.map +1 -1
  33. package/dist/admin/price-list.js +194 -0
  34. package/dist/admin/price-list.js.map +1 -1
  35. package/dist/admin/price-preference.d.ts +133 -0
  36. package/dist/admin/price-preference.d.ts.map +1 -1
  37. package/dist/admin/price-preference.js +133 -0
  38. package/dist/admin/price-preference.js.map +1 -1
  39. package/dist/admin/product-category.d.ts +150 -0
  40. package/dist/admin/product-category.d.ts.map +1 -1
  41. package/dist/admin/product-category.js +150 -0
  42. package/dist/admin/product-category.js.map +1 -1
  43. package/dist/admin/product-collection.d.ts +149 -0
  44. package/dist/admin/product-collection.d.ts.map +1 -1
  45. package/dist/admin/product-collection.js +149 -0
  46. package/dist/admin/product-collection.js.map +1 -1
  47. package/dist/auth/index.d.ts +10 -10
  48. package/dist/auth/index.js +10 -10
  49. package/dist/esm/admin/api-key.d.ts +8 -8
  50. package/dist/esm/admin/api-key.js +8 -8
  51. package/dist/esm/admin/campaign.d.ts +8 -8
  52. package/dist/esm/admin/campaign.js +8 -8
  53. package/dist/esm/admin/claim.d.ts +22 -22
  54. package/dist/esm/admin/claim.js +22 -22
  55. package/dist/esm/admin/currency.d.ts +4 -4
  56. package/dist/esm/admin/currency.js +4 -4
  57. package/dist/esm/admin/customer-group.d.ts +8 -8
  58. package/dist/esm/admin/customer-group.js +8 -8
  59. package/dist/esm/admin/customer.d.ts +27 -7
  60. package/dist/esm/admin/customer.d.ts.map +1 -1
  61. package/dist/esm/admin/customer.js +35 -7
  62. package/dist/esm/admin/customer.js.map +1 -1
  63. package/dist/esm/admin/exchange.d.ts +21 -21
  64. package/dist/esm/admin/exchange.js +21 -21
  65. package/dist/esm/admin/fulfillment-provider.d.ts +2 -2
  66. package/dist/esm/admin/fulfillment-provider.js +2 -2
  67. package/dist/esm/admin/fulfillment-set.d.ts +6 -6
  68. package/dist/esm/admin/fulfillment-set.js +6 -6
  69. package/dist/esm/admin/fulfillment.d.ts +3 -3
  70. package/dist/esm/admin/fulfillment.js +3 -3
  71. package/dist/esm/admin/inventory-item.d.ts +12 -12
  72. package/dist/esm/admin/inventory-item.js +12 -12
  73. package/dist/esm/admin/invite.d.ts +8 -8
  74. package/dist/esm/admin/invite.js +8 -8
  75. package/dist/esm/admin/payment-collection.d.ts +0 -2
  76. package/dist/esm/admin/payment-collection.d.ts.map +1 -1
  77. package/dist/esm/admin/payment-collection.js +0 -16
  78. package/dist/esm/admin/payment-collection.js.map +1 -1
  79. package/dist/esm/admin/price-list.d.ts +195 -1
  80. package/dist/esm/admin/price-list.d.ts.map +1 -1
  81. package/dist/esm/admin/price-list.js +194 -0
  82. package/dist/esm/admin/price-list.js.map +1 -1
  83. package/dist/esm/admin/price-preference.d.ts +133 -0
  84. package/dist/esm/admin/price-preference.d.ts.map +1 -1
  85. package/dist/esm/admin/price-preference.js +133 -0
  86. package/dist/esm/admin/price-preference.js.map +1 -1
  87. package/dist/esm/admin/product-category.d.ts +150 -0
  88. package/dist/esm/admin/product-category.d.ts.map +1 -1
  89. package/dist/esm/admin/product-category.js +150 -0
  90. package/dist/esm/admin/product-category.js.map +1 -1
  91. package/dist/esm/admin/product-collection.d.ts +149 -0
  92. package/dist/esm/admin/product-collection.d.ts.map +1 -1
  93. package/dist/esm/admin/product-collection.js +149 -0
  94. package/dist/esm/admin/product-collection.js.map +1 -1
  95. package/dist/esm/auth/index.d.ts +10 -10
  96. package/dist/esm/auth/index.js +10 -10
  97. package/dist/esm/store/index.d.ts +73 -73
  98. package/dist/esm/store/index.js +73 -73
  99. package/dist/store/index.d.ts +73 -73
  100. package/dist/store/index.js +73 -73
  101. package/package.json +2 -2
@@ -9,9 +9,9 @@ class Store {
9
9
  this.region = {
10
10
  /**
11
11
  * This method retrieves the paginated list of regions in the store. It sends a request to the
12
- * [List Regions API route](https://docs.medusajs.com/v2/api/store#regions_getregions).
12
+ * [List Regions API route](https://docs.medusajs.com/api/store#regions_getregions).
13
13
  *
14
- * Related guide: [How to list regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/list).
14
+ * Related guide: [How to list regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/list).
15
15
  *
16
16
  * @param query - Filters and pagination configurations.
17
17
  * @param headers - Headers to pass in the request
@@ -53,7 +53,7 @@ class Store {
53
53
  * })
54
54
  * ```
55
55
  *
56
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
56
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
57
57
  */
58
58
  list: async (query, headers) => {
59
59
  return this.client.fetch(`/store/regions`, {
@@ -62,10 +62,10 @@ class Store {
62
62
  });
63
63
  },
64
64
  /**
65
- * This method retrieves a region by its ID. It sends a request to the [Get Region](https://docs.medusajs.com/v2/api/store#regions_getregionsid)
65
+ * This method retrieves a region by its ID. It sends a request to the [Get Region](https://docs.medusajs.com/api/store#regions_getregionsid)
66
66
  * API route.
67
67
  *
68
- * Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/store-retrieve-region).
68
+ * Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/store-retrieve-region).
69
69
  *
70
70
  * @param id - The region's ID.
71
71
  * @param query - Configure the fields to retrieve in the region.
@@ -96,7 +96,7 @@ class Store {
96
96
  * })
97
97
  * ```
98
98
  *
99
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
99
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
100
100
  */
101
101
  retrieve: async (id, query, headers) => {
102
102
  return this.client.fetch(`/store/regions/${id}`, {
@@ -108,9 +108,9 @@ class Store {
108
108
  this.collection = {
109
109
  /**
110
110
  * This method retrieves a paginated list of product collections. It sends a request to the
111
- * [List Collections](https://docs.medusajs.com/v2/api/store#collections_getcollections) API route.
111
+ * [List Collections](https://docs.medusajs.com/api/store#collections_getcollections) API route.
112
112
  *
113
- * Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list).
113
+ * Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/list).
114
114
  *
115
115
  * @param query - Filters and pagination configurations.
116
116
  * @param headers - Headers to pass in the request
@@ -152,7 +152,7 @@ class Store {
152
152
  * })
153
153
  * ```
154
154
  *
155
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
155
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
156
156
  */
157
157
  list: async (query, headers) => {
158
158
  return this.client.fetch(`/store/collections`, {
@@ -161,10 +161,10 @@ class Store {
161
161
  });
162
162
  },
163
163
  /**
164
- * This method retrieves a collection by its ID. It sends a request to the [Get Collection](https://docs.medusajs.com/v2/api/store#collections_getcollectionsid)
164
+ * This method retrieves a collection by its ID. It sends a request to the [Get Collection](https://docs.medusajs.com/api/store#collections_getcollectionsid)
165
165
  * API route.
166
166
  *
167
- * Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve).
167
+ * Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/retrieve).
168
168
  *
169
169
  * @param id - The ID of the collection to retrieve.
170
170
  * @param query - Configure the fields to retrieve in the collection.
@@ -192,7 +192,7 @@ class Store {
192
192
  * })
193
193
  * ```
194
194
  *
195
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
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
  retrieve: async (id, query, headers) => {
198
198
  return this.client.fetch(`/store/collections/${id}`, {
@@ -204,9 +204,9 @@ class Store {
204
204
  this.category = {
205
205
  /**
206
206
  * This method retrieves a paginated list of product categories. It sends a request to the
207
- * [List Categories](https://docs.medusajs.com/v2/api/store#product-categories_getproductcategories) API route.
207
+ * [List Categories](https://docs.medusajs.com/api/store#product-categories_getproductcategories) API route.
208
208
  *
209
- * Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list).
209
+ * Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/list).
210
210
  *
211
211
  * @param query - Filters and pagination configurations.
212
212
  * @param headers - Headers to pass in the request.
@@ -248,7 +248,7 @@ class Store {
248
248
  * })
249
249
  * ```
250
250
  *
251
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
251
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
252
252
  */
253
253
  list: async (query, headers) => {
254
254
  return this.client.fetch(`/store/product-categories`, {
@@ -258,9 +258,9 @@ class Store {
258
258
  },
259
259
  /**
260
260
  * This method retrieves a category by its ID. It sends a request to the
261
- * [Retrieve Product Category](https://docs.medusajs.com/v2/api/store#product-categories_getproductcategoriesid).
261
+ * [Retrieve Product Category](https://docs.medusajs.com/api/store#product-categories_getproductcategoriesid).
262
262
  *
263
- * Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve).
263
+ * Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/retrieve).
264
264
  *
265
265
  * @param id - The ID of the category to retrieve.
266
266
  * @param query - Configure the fields to retrieve in the category.
@@ -288,7 +288,7 @@ class Store {
288
288
  * })
289
289
  * ```
290
290
  *
291
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
291
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
292
292
  */
293
293
  retrieve: async (id, query, headers) => {
294
294
  return this.client.fetch(`/store/product-categories/${id}`, {
@@ -300,12 +300,12 @@ class Store {
300
300
  this.product = {
301
301
  /**
302
302
  * This method retrieves a list of products. It sends a request to the
303
- * [List Products API route](https://docs.medusajs.com/v2/api/store#products_getproducts).
303
+ * [List Products API route](https://docs.medusajs.com/api/store#products_getproducts).
304
304
  *
305
305
  * Related guides:
306
306
  *
307
- * - [How to list products in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/list).
308
- * - [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
307
+ * - [How to list products in a storefront](https://docs.medusajs.com/resources/storefront-development/products/list).
308
+ * - [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
309
309
  *
310
310
  * @param query - Filters and pagination configurations.
311
311
  * @param headers - Headers to pass in the request.
@@ -347,7 +347,7 @@ class Store {
347
347
  * })
348
348
  * ```
349
349
  *
350
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
350
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
351
351
  */
352
352
  list: async (query, headers) => {
353
353
  return this.client.fetch(`/store/products`, {
@@ -357,12 +357,12 @@ class Store {
357
357
  },
358
358
  /**
359
359
  * This method is used to retrieve a product by its ID. It sends a request to the
360
- * [Get Product](https://docs.medusajs.com/v2/api/store#products_getproductsid) API route.
360
+ * [Get Product](https://docs.medusajs.com/api/store#products_getproductsid) API route.
361
361
  *
362
362
  * Related guides:
363
363
  *
364
- * - [How to retrieve a product in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/retrieve).
365
- * - [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
364
+ * - [How to retrieve a product in the storefront](https://docs.medusajs.com/resources/storefront-development/products/retrieve).
365
+ * - [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
366
366
  *
367
367
  * @param id - The product's ID.
368
368
  * @param query - Configure the fields to retrieve in the product.
@@ -390,7 +390,7 @@ class Store {
390
390
  * })
391
391
  * ```
392
392
  *
393
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
393
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
394
394
  */
395
395
  retrieve: async (id, query, headers) => {
396
396
  return this.client.fetch(`/store/products/${id}`, {
@@ -400,14 +400,14 @@ class Store {
400
400
  },
401
401
  };
402
402
  /**
403
- * Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart).
403
+ * Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/resources/storefront-development/cart).
404
404
  */
405
405
  this.cart = {
406
406
  /**
407
- * This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/v2/api/store#carts_postcarts)
407
+ * This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/api/store#carts_postcarts)
408
408
  * API route.
409
409
  *
410
- * Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/create).
410
+ * Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/create).
411
411
  *
412
412
  * @param body - The details of the cart to create.
413
413
  * @param query - Configure the fields to retrieve in the cart.
@@ -432,9 +432,9 @@ class Store {
432
432
  },
433
433
  /**
434
434
  * This method updates a cart. It sends a request to the
435
- * [Update Cart](https://docs.medusajs.com/v2/api/store#carts_postcartsid) API route.
435
+ * [Update Cart](https://docs.medusajs.com/api/store#carts_postcartsid) API route.
436
436
  *
437
- * Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/update).
437
+ * Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/update).
438
438
  *
439
439
  * @param id - The cart's ID.
440
440
  * @param body - The data to update in the cart.
@@ -460,9 +460,9 @@ class Store {
460
460
  },
461
461
  /**
462
462
  * This method retrieves a cart by its ID. It sends a request to the
463
- * [Get Cart](https://docs.medusajs.com/v2/api/store#carts_getcartsid) API route.
463
+ * [Get Cart](https://docs.medusajs.com/api/store#carts_getcartsid) API route.
464
464
  *
465
- * Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/retrieve).
465
+ * Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/retrieve).
466
466
  *
467
467
  * @param id - The cart's ID.
468
468
  * @param query - Configure the fields to retrieve in the cart.
@@ -490,7 +490,7 @@ class Store {
490
490
  * })
491
491
  * ```
492
492
  *
493
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
493
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
494
494
  */
495
495
  retrieve: async (id, query, headers) => {
496
496
  return this.client.fetch(`/store/carts/${id}`, {
@@ -500,9 +500,9 @@ class Store {
500
500
  },
501
501
  /**
502
502
  * This methods adds a product variant to the cart as a line item. It sends a request to the
503
- * [Add Line Item](https://docs.medusajs.com/v2/api/store#carts_postcartsidlineitems) API route.
503
+ * [Add Line Item](https://docs.medusajs.com/api/store#carts_postcartsidlineitems) API route.
504
504
  *
505
- * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
505
+ * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
506
506
  *
507
507
  * @param cartId - The cart's ID.
508
508
  * @param body - The details of the item to add.
@@ -529,9 +529,9 @@ class Store {
529
529
  },
530
530
  /**
531
531
  * This method updates a line item in a cart. It sends a request to the
532
- * [Update Line Item](https://docs.medusajs.com/v2/api/store#carts_postcartsidlineitemsline_id) API route.
532
+ * [Update Line Item](https://docs.medusajs.com/api/store#carts_postcartsidlineitemsline_id) API route.
533
533
  *
534
- * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
534
+ * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
535
535
  *
536
536
  * @param cartId - The cart's ID.
537
537
  * @param lineItemId - The line item's ID.
@@ -562,9 +562,9 @@ class Store {
562
562
  },
563
563
  /**
564
564
  * This method deletes a line item from a cart. It sends a request to the
565
- * [Remove Line Item](https://docs.medusajs.com/v2/api/store#carts_deletecartsidlineitemsline_id) API route.
565
+ * [Remove Line Item](https://docs.medusajs.com/api/store#carts_deletecartsidlineitemsline_id) API route.
566
566
  *
567
- * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
567
+ * Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
568
568
  *
569
569
  * @param cartId - The cart's ID.
570
570
  * @param lineItemId - The item's ID.
@@ -588,9 +588,9 @@ class Store {
588
588
  },
589
589
  /**
590
590
  * This method adds a shipping method to a cart. It sends a request to
591
- * the [Add Shipping Method](https://docs.medusajs.com/v2/api/store#carts_postcartsidshippingmethods) API routes.
591
+ * the [Add Shipping Method](https://docs.medusajs.com/api/store#carts_postcartsidshippingmethods) API routes.
592
592
  *
593
- * Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
593
+ * Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
594
594
  *
595
595
  * @param cartId - The cart's ID.
596
596
  * @param body - The shipping method's details.
@@ -619,10 +619,10 @@ class Store {
619
619
  },
620
620
  /**
621
621
  * This method completes a cart and places the order. It's the last step of the checkout flow.
622
- * The method sends a request to the [Complete Cart](https://docs.medusajs.com/v2/api/store#carts_postcartsidcomplete)
622
+ * The method sends a request to the [Complete Cart](https://docs.medusajs.com/api/store#carts_postcartsidcomplete)
623
623
  * API route.
624
624
  *
625
- * Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart).
625
+ * Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart).
626
626
  *
627
627
  * @param cartId - The cart's ID.
628
628
  * @param query - Configure the fields to retrieve in the created order.
@@ -652,10 +652,10 @@ class Store {
652
652
  this.fulfillment = {
653
653
  /**
654
654
  * This method retrieves the list of shipping options for a cart. It sends a request to
655
- * the [List Shipping Options](https://docs.medusajs.com/v2/api/store#shipping-options_getshippingoptions)
655
+ * the [List Shipping Options](https://docs.medusajs.com/api/store#shipping-options_getshippingoptions)
656
656
  * API route.
657
657
  *
658
- * Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
658
+ * Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
659
659
  *
660
660
  * @param query - The cart's details along with configurations of the fields to retrieve in the options.
661
661
  * @param headers - Headers to pass in the request.
@@ -679,10 +679,10 @@ class Store {
679
679
  this.payment = {
680
680
  /**
681
681
  * This method retrieves the payment providers available in a region, which is useful during checkout.
682
- * It sends a request to the [List Payment Providers](https://docs.medusajs.com/v2/api/store#payment-providers_getpaymentproviders)
682
+ * It sends a request to the [List Payment Providers](https://docs.medusajs.com/api/store#payment-providers_getpaymentproviders)
683
683
  * API route.
684
684
  *
685
- * Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
685
+ * Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
686
686
  *
687
687
  * @param query - The filters to apply on the retrieved providers, along with configurations of the
688
688
  * fields to retrieve in the options.
@@ -731,7 +731,7 @@ class Store {
731
731
  * })
732
732
  * ```
733
733
  *
734
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
734
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
735
735
  */
736
736
  listPaymentProviders: async (query, headers) => {
737
737
  return this.client.fetch(`/store/payment-providers`, {
@@ -741,14 +741,14 @@ class Store {
741
741
  },
742
742
  /**
743
743
  * This method creates a payment session of a cart's payment collection, selecting a payment provider.
744
- * It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/v2/api/store#payment-collections_postpaymentcollectionsidpaymentsessions)
744
+ * It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/api/store#payment-collections_postpaymentcollectionsidpaymentsessions)
745
745
  * API route.
746
746
  *
747
747
  * If the cart doesn't have a payment collection, a payment collection is created for the cart by
748
- * sending a request to the [Create Payment Collection](https://docs.medusajs.com/v2/api/store#payment-collections_postpaymentcollections)
748
+ * sending a request to the [Create Payment Collection](https://docs.medusajs.com/api/store#payment-collections_postpaymentcollections)
749
749
  * API route.
750
750
  *
751
- * Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
751
+ * Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
752
752
  *
753
753
  * @param cart - The cart's details.
754
754
  * @param body - The payment session's details.
@@ -793,7 +793,7 @@ class Store {
793
793
  this.order = {
794
794
  /**
795
795
  * This method retrieves a paginated list of orders matching the specified filters. It
796
- * sends a request to the [List Orders](https://docs.medusajs.com/v2/api/store#orders_getorders)
796
+ * sends a request to the [List Orders](https://docs.medusajs.com/api/store#orders_getorders)
797
797
  * API route.
798
798
  *
799
799
  * @param query - Configure the fields to retrieve in the orders.
@@ -836,7 +836,7 @@ class Store {
836
836
  * })
837
837
  * ```
838
838
  *
839
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
839
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
840
840
  */
841
841
  list: async (query, headers) => {
842
842
  return this.client.fetch(`/store/orders`, {
@@ -846,7 +846,7 @@ class Store {
846
846
  },
847
847
  /**
848
848
  * This method retrieves an order by its ID. It sends a request to the
849
- * [Get Order](https://docs.medusajs.com/v2/api/store#orders_getordersid) API route.
849
+ * [Get Order](https://docs.medusajs.com/api/store#orders_getordersid) API route.
850
850
  *
851
851
  * @param id - The order's ID.
852
852
  * @param query - Configure the fields to retrieve in the order.
@@ -874,7 +874,7 @@ class Store {
874
874
  * })
875
875
  * ```
876
876
  *
877
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
877
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
878
878
  */
879
879
  retrieve: async (id, query, headers) => {
880
880
  return this.client.fetch(`/store/orders/${id}`, {
@@ -885,13 +885,13 @@ class Store {
885
885
  };
886
886
  this.customer = {
887
887
  /**
888
- * This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/v2/api/store#customers_postcustomers)
888
+ * This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/api/store#customers_postcustomers)
889
889
  * API route.
890
890
  *
891
891
  * You must use the {@link Auth.register} method first to retrieve a registration token. Then, pass that
892
892
  * registration token in the `headers` parameter of this method as an authorization bearer header.
893
893
  *
894
- * Related guide: [How to register customer in storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/register)
894
+ * Related guide: [How to register customer in storefront](https://docs.medusajs.com/resources/storefront-development/customers/register)
895
895
  *
896
896
  * @param body - The customer's details.
897
897
  * @param query - Configure the fields to retrieve in the customer.
@@ -930,9 +930,9 @@ class Store {
930
930
  * first with the {@link Auth.login} method.
931
931
  *
932
932
  * It sends a request to the
933
- * [Update Customer](https://docs.medusajs.com/v2/api/store#customers_postcustomersme) API route.
933
+ * [Update Customer](https://docs.medusajs.com/api/store#customers_postcustomersme) API route.
934
934
  *
935
- * Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/profile).
935
+ * Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/profile).
936
936
  *
937
937
  * @param body - The customer's details to update.
938
938
  * @param query - Configure the fields to retrieve in the customer.
@@ -959,7 +959,7 @@ class Store {
959
959
  * This method retrieves the logged-in customer's details. The customer must be logged in
960
960
  * first with the {@link Auth.login} method.
961
961
  *
962
- * It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/v2/api/store#customers_getcustomersme)
962
+ * It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/api/store#customers_getcustomersme)
963
963
  * API route.
964
964
  *
965
965
  * @param query - Configure the fields to retrieve in the customer.
@@ -982,10 +982,10 @@ class Store {
982
982
  * This method creates an address for the logged-in customer. The customer must be logged in
983
983
  * first with the {@link Auth.login} method.
984
984
  *
985
- * It sends a request to the [Create Address](https://docs.medusajs.com/v2/api/store#customers_postcustomersmeaddresses)
985
+ * It sends a request to the [Create Address](https://docs.medusajs.com/api/store#customers_postcustomersmeaddresses)
986
986
  * API route.
987
987
  *
988
- * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
988
+ * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
989
989
  *
990
990
  * @param body - The address's details.
991
991
  * @param query - Configure the fields to retrieve in the customer.
@@ -1012,10 +1012,10 @@ class Store {
1012
1012
  * This method updates the address of the logged-in customer. The customer must be logged in
1013
1013
  * first with the {@link Auth.login} method.
1014
1014
  *
1015
- * It sends a request to the [Update Address](https://docs.medusajs.com/v2/api/store#customers_postcustomersmeaddressesaddress_id)
1015
+ * It sends a request to the [Update Address](https://docs.medusajs.com/api/store#customers_postcustomersmeaddressesaddress_id)
1016
1016
  * API route.
1017
1017
  *
1018
- * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
1018
+ * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
1019
1019
  *
1020
1020
  * @param addressId - The ID of the address to update.
1021
1021
  * @param body - The details to update in the address.
@@ -1046,10 +1046,10 @@ class Store {
1046
1046
  * This method retrieves the logged-in customer's address. The customer must be logged in
1047
1047
  * first with the {@link Auth.login} method.
1048
1048
  *
1049
- * It sends a request to the [List Customer's Address](https://docs.medusajs.com/v2/api/store#customers_getcustomersmeaddresses)
1049
+ * It sends a request to the [List Customer's Address](https://docs.medusajs.com/api/store#customers_getcustomersmeaddresses)
1050
1050
  * API route.
1051
1051
  *
1052
- * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
1052
+ * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
1053
1053
  *
1054
1054
  * @param query - Configure the fields to retrieve in the addresses.
1055
1055
  * @param headers - Headers to pass in the request.
@@ -1091,7 +1091,7 @@ class Store {
1091
1091
  * })
1092
1092
  * ```
1093
1093
  *
1094
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
1094
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
1095
1095
  */
1096
1096
  listAddress: async (query, headers) => {
1097
1097
  return this.client.fetch(`/store/customers/me/addresses`, {
@@ -1103,10 +1103,10 @@ class Store {
1103
1103
  * This method retrieves an address of the logged-in customer. The customer must be logged in
1104
1104
  * first with the {@link Auth.login} method.
1105
1105
  *
1106
- * It sends a request to the [Get Address](https://docs.medusajs.com/v2/api/store#customers_getcustomersmeaddressesaddress_id)
1106
+ * It sends a request to the [Get Address](https://docs.medusajs.com/api/store#customers_getcustomersmeaddressesaddress_id)
1107
1107
  * API route.
1108
1108
  *
1109
- * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
1109
+ * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
1110
1110
  *
1111
1111
  * @param addressId - The address's ID.
1112
1112
  * @param query - Configure the fields to retrieve in the address.
@@ -1139,7 +1139,7 @@ class Store {
1139
1139
  * })
1140
1140
  * ```
1141
1141
  *
1142
- * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
1142
+ * Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
1143
1143
  */
1144
1144
  retrieveAddress: async (addressId, query, headers) => {
1145
1145
  return this.client.fetch(`/store/customers/me/addresses/${addressId}`, {
@@ -1151,10 +1151,10 @@ class Store {
1151
1151
  * This method deletes an address of the logged-in customer. The customer must be logged in
1152
1152
  * first with the {@link Auth.login} method.
1153
1153
  *
1154
- * It sends a request to the [Remove Address](https://docs.medusajs.com/v2/api/store#customers_deletecustomersmeaddressesaddress_id)
1154
+ * It sends a request to the [Remove Address](https://docs.medusajs.com/api/store#customers_deletecustomersmeaddressesaddress_id)
1155
1155
  * API route.
1156
1156
  *
1157
- * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
1157
+ * Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
1158
1158
  *
1159
1159
  * @param addressId - The address's ID.
1160
1160
  * @param headers - Headers to pass in the request.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/js-sdk",
3
- "version": "2.0.0-rc-20241022183311",
3
+ "version": "2.0.1-preview-20241025120203",
4
4
  "description": "SDK for the Medusa API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -35,7 +35,7 @@
35
35
  "typescript": "^5.6.2"
36
36
  },
37
37
  "dependencies": {
38
- "@medusajs/types": "2.0.0-rc-20241022183311",
38
+ "@medusajs/types": "2.0.1-preview-20241025120203",
39
39
  "fetch-event-stream": "^0.1.5",
40
40
  "qs": "^6.12.1"
41
41
  },