chore(docs): Generated References (automated) (#9772)

Generated the following references:
- `auth_provider`
- `core_flows`
- `js_sdk`
- `medusa_config`
- `modules`
- `payment_provider`
- `tax`
- `tax_provider`
- `types`
- `workflows`

Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]andShahed Nasser authored and GitHub committed 2024-10-25 07:08:57 +00:00
1 parent 59e6747800
commit d40499ca6a
613 files changed
+56943 -55109

No files matched your search

@@ -9,14 +9,14 @@ import { TypeList } from "docs-ui"
This documentation provides a reference to the `sdk.store.cart` set of methods used to send requests to Medusa's Store API routes.
Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart).
Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/resources/storefront-development/cart).
## create
This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/v2/api/store#carts\_postcarts)
This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/api/store#carts\_postcarts)
API route.
Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/create).
Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/create).
### Example
@@ -31,7 +31,7 @@ sdk.store.cart.create({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCart/page.mdx)","description":"The details of the cart to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is created in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The cart's currency code. If not provided, the region's currency\ncode is used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)[]","description":"The cart's items.","optional":true,"defaultValue":"","expandable":false,"children":[Line truncated
<TypeList types={[{"name":"body","type":"[StoreCreateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCart/page.mdx)","description":"The details of the cart to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is created in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The cart's currency code. If not provided, the region's currency\ncode is used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)[]","description":"The cart's items.","optional":true,"defaultValue":"","expandable":false,"children":[Line truncated
### Returns
@@ -42,9 +42,9 @@ ___
## update
This method updates a cart. It sends a request to the
[Update Cart](https://docs.medusajs.com/v2/api/store#carts\_postcartsid) API route.
[Update Cart](https://docs.medusajs.com/api/store#carts\_postcartsid) API route.
Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/update).
Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/update).
### Example
@@ -59,7 +59,7 @@ sdk.store.cart.update("cart_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCart/page.mdx)","description":"The data to update in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the associated sales channel. Only products in the same sales channel\ncan be added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","descripLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCart/page.mdx)","description":"The data to update in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the associated sales channel. Only products in the same sales channel\ncan be added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","descripLine truncated
### Returns
@@ -70,9 +70,9 @@ ___
## retrieve
This method retrieves a cart by its ID. It sends a request to the
[Get Cart](https://docs.medusajs.com/v2/api/store#carts\_getcartsid) API route.
[Get Cart](https://docs.medusajs.com/api/store#carts\_getcartsid) API route.
Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/retrieve).
Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/retrieve).
### Example
@@ -96,11 +96,11 @@ sdk.store.cart.retrieve("cart_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -111,9 +111,9 @@ ___
## createLineItem
This methods adds a product variant to the cart as a line item. It sends a request to the
[Add Line Item](https://docs.medusajs.com/v2/api/store#carts\_postcartsidlineitems) API route.
[Add Line Item](https://docs.medusajs.com/api/store#carts\_postcartsidlineitems) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -129,7 +129,7 @@ sdk.store.cart.createLineItem("cart_123", {
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)","description":"The details of the item to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_id","type":"`string`","description":"The ID of the product variant to add to the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)","description":"The details of the item to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_id","type":"`string`","description":"The ID of the product variant to add to the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -140,9 +140,9 @@ ___
## updateLineItem
This method updates a line item in a cart. It sends a request to the
[Update Line Item](https://docs.medusajs.com/v2/api/store#carts\_postcartsidlineitemsline\_id) API route.
[Update Line Item](https://docs.medusajs.com/api/store#carts\_postcartsidlineitemsline\_id) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -161,7 +161,7 @@ sdk.store.cart.updateLineItem(
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"The line item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCartLineItem/page.mdx)","description":"The data to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"The line item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCartLineItem/page.mdx)","description":"The data to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -172,9 +172,9 @@ ___
## deleteLineItem
This method deletes a line item from a cart. It sends a request to the
[Remove Line Item](https://docs.medusajs.com/v2/api/store#carts\_deletecartsidlineitemsline\_id) API route.
[Remove Line Item](https://docs.medusajs.com/api/store#carts\_deletecartsidlineitemsline\_id) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -201,9 +201,9 @@ ___
## addShippingMethod
This method adds a shipping method to a cart. It sends a request to
the [Add Shipping Method](https://docs.medusajs.com/v2/api/store#carts\_postcartsidshippingmethods) API routes.
the [Add Shipping Method](https://docs.medusajs.com/api/store#carts\_postcartsidshippingmethods) API routes.
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
### Example
@@ -221,7 +221,7 @@ sdk.store.cart.addShippingMethod("cart_123", {
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartShippingMethods](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartShippingMethods/page.mdx)","description":"The shipping method's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"option_id","type":"`string`","description":"The id of the chosen shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data useful for the associated fulfillment provider.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartShippingMethods](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartShippingMethods/page.mdx)","description":"The shipping method's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"option_id","type":"`string`","description":"The id of the chosen shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data useful for the associated fulfillment provider.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -232,10 +232,10 @@ ___
## complete
This method completes a cart and places the order. It's the last step of the checkout flow.
The method sends a request to the [Complete Cart](https://docs.medusajs.com/v2/api/store#carts\_postcartsidcomplete)
The method sends a request to the [Complete Cart](https://docs.medusajs.com/api/store#carts\_postcartsidcomplete)
API route.
Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart).
Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart).
### Example
@@ -254,7 +254,7 @@ sdk.store.cart.complete("cart_123")
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the created order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the created order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -262,10 +262,10 @@ sdk.store.cart.complete("cart_123")
## create
This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/v2/api/store#carts\_postcarts)
This method creates a cart. It sends a request to the [Create Cart](https://docs.medusajs.com/api/store#carts\_postcarts)
API route.
Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/create).
Related guide: [How to create a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/create).
### Example
@@ -280,7 +280,7 @@ sdk.store.cart.create({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCart/page.mdx)","description":"The details of the cart to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is created in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The cart's currency code. If not provided, the region's currency\ncode is used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)[]","description":"The cart's items.","optional":true,"defaultValue":"","expandable":false,"children":[Line truncated
<TypeList types={[{"name":"body","type":"[StoreCreateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCart/page.mdx)","description":"The details of the cart to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is created in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The cart's currency code. If not provided, the region's currency\ncode is used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)[]","description":"The cart's items.","optional":true,"defaultValue":"","expandable":false,"children":[Line truncated
### Returns
@@ -291,9 +291,9 @@ ___
## update
This method updates a cart. It sends a request to the
[Update Cart](https://docs.medusajs.com/v2/api/store#carts\_postcartsid) API route.
[Update Cart](https://docs.medusajs.com/api/store#carts\_postcartsid) API route.
Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/update).
Related guide: [How to update a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/update).
### Example
@@ -308,7 +308,7 @@ sdk.store.cart.update("cart_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCart/page.mdx)","description":"The data to update in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the associated sales channel. Only products in the same sales channel\ncan be added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","descripLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCart/page.mdx)","description":"The data to update in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region that the cart is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [StoreAddAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddAddress/page.mdx)","description":"The cart's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"email","type":"`string`","description":"The email of the customer associated with the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the associated sales channel. Only products in the same sales channel\ncan be added to the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","descripLine truncated
### Returns
@@ -319,9 +319,9 @@ ___
## retrieve
This method retrieves a cart by its ID. It sends a request to the
[Get Cart](https://docs.medusajs.com/v2/api/store#carts\_getcartsid) API route.
[Get Cart](https://docs.medusajs.com/api/store#carts\_getcartsid) API route.
Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/retrieve).
Related guide: [How to retrieve a cart in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/retrieve).
### Example
@@ -345,11 +345,11 @@ sdk.store.cart.retrieve("cart_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -360,9 +360,9 @@ ___
## createLineItem
This methods adds a product variant to the cart as a line item. It sends a request to the
[Add Line Item](https://docs.medusajs.com/v2/api/store#carts\_postcartsidlineitems) API route.
[Add Line Item](https://docs.medusajs.com/api/store#carts\_postcartsidlineitems) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -378,7 +378,7 @@ sdk.store.cart.createLineItem("cart_123", {
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)","description":"The details of the item to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_id","type":"`string`","description":"The ID of the product variant to add to the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartLineItem/page.mdx)","description":"The details of the item to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variant_id","type":"`string`","description":"The ID of the product variant to add to the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The item's quantity in the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -389,9 +389,9 @@ ___
## updateLineItem
This method updates a line item in a cart. It sends a request to the
[Update Line Item](https://docs.medusajs.com/v2/api/store#carts\_postcartsidlineitemsline\_id) API route.
[Update Line Item](https://docs.medusajs.com/api/store#carts\_postcartsidlineitemsline\_id) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -410,7 +410,7 @@ sdk.store.cart.updateLineItem(
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"The line item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCartLineItem/page.mdx)","description":"The data to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"lineItemId","type":"`string`","description":"The line item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCartLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCartLineItem/page.mdx)","description":"The data to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -421,9 +421,9 @@ ___
## deleteLineItem
This method deletes a line item from a cart. It sends a request to the
[Remove Line Item](https://docs.medusajs.com/v2/api/store#carts\_deletecartsidlineitemsline\_id) API route.
[Remove Line Item](https://docs.medusajs.com/api/store#carts\_deletecartsidlineitemsline\_id) API route.
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/cart/manage-items).
Related guide: [How to manage a cart's line items in the storefront](https://docs.medusajs.com/resources/storefront-development/cart/manage-items).
### Example
@@ -450,9 +450,9 @@ ___
## addShippingMethod
This method adds a shipping method to a cart. It sends a request to
the [Add Shipping Method](https://docs.medusajs.com/v2/api/store#carts\_postcartsidshippingmethods) API routes.
the [Add Shipping Method](https://docs.medusajs.com/api/store#carts\_postcartsidshippingmethods) API routes.
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
### Example
@@ -470,7 +470,7 @@ sdk.store.cart.addShippingMethod("cart_123", {
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartShippingMethods](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartShippingMethods/page.mdx)","description":"The shipping method's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"option_id","type":"`string`","description":"The id of the chosen shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data useful for the associated fulfillment provider.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreAddCartShippingMethods](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreAddCartShippingMethods/page.mdx)","description":"The shipping method's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"option_id","type":"`string`","description":"The id of the chosen shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Data useful for the associated fulfillment provider.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -481,10 +481,10 @@ ___
## complete
This method completes a cart and places the order. It's the last step of the checkout flow.
The method sends a request to the [Complete Cart](https://docs.medusajs.com/v2/api/store#carts\_postcartsidcomplete)
The method sends a request to the [Complete Cart](https://docs.medusajs.com/api/store#carts\_postcartsidcomplete)
API route.
Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/v2/resources/storefront-development/checkout/complete-cart).
Related guide: [Learn how to complete cart in checkout flow](https://docs.medusajs.com/resources/storefront-development/checkout/complete-cart).
### Example
@@ -503,7 +503,7 @@ sdk.store.cart.complete("cart_123")
### Parameters
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the created order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"The cart's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the created order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -12,9 +12,9 @@ This documentation provides a reference to the `sdk.store.category` set of metho
## list
This method retrieves a paginated list of product categories. It sends a request to the
[List Categories](https://docs.medusajs.com/v2/api/store#product-categories\_getproductcategories) API route.
[List Categories](https://docs.medusajs.com/api/store#product-categories\_getproductcategories) API route.
Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list).
Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/list).
### Example
@@ -53,11 +53,11 @@ sdk.store.category.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreProductCategoryListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the category's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the category's ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by the category's name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `string`[]","description":"Filter by the category's description(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Retrieve the child categories of the specified parent ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the category's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter by whether the category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter by whether the category is internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreProductCategoryListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the category's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the category's ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by the category's name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `string`[]","description":"Filter by the category's description(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Retrieve the child categories of the specified parent ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the category's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter by whether the category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter by whether the category is internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`Line truncated
### Returns
@@ -68,9 +68,9 @@ ___
## retrieve
This method retrieves a category by its ID. It sends a request to the
[Retrieve Product Category](https://docs.medusajs.com/v2/api/store#product-categories\_getproductcategoriesid).
[Retrieve Product Category](https://docs.medusajs.com/api/store#product-categories\_getproductcategoriesid).
Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve).
Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/retrieve).
### Example
@@ -94,11 +94,11 @@ sdk.store.category.retrieve("pcat_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[StoreProductCategoryParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryParams/page.mdx)","description":"Configure the fields to retrieve in the category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_ancestors_tree","type":"`boolean`","description":"Whether to retrieve the parent category. If enabled, the parent category is\nretrieved in the `parent_category` field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to retrieve the child categories. If enabled, the child categories are\nretrieved in the `category_children` field.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[StoreProductCategoryParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryParams/page.mdx)","description":"Configure the fields to retrieve in the category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_ancestors_tree","type":"`boolean`","description":"Whether to retrieve the parent category. If enabled, the parent category is\nretrieved in the `parent_category` field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to retrieve the child categories. If enabled, the child categories are\nretrieved in the `category_children` field.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -107,9 +107,9 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## list
This method retrieves a paginated list of product categories. It sends a request to the
[List Categories](https://docs.medusajs.com/v2/api/store#product-categories\_getproductcategories) API route.
[List Categories](https://docs.medusajs.com/api/store#product-categories\_getproductcategories) API route.
Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list).
Related guide: [How to retrieve list of categories in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/list).
### Example
@@ -148,11 +148,11 @@ sdk.store.category.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreProductCategoryListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the category's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the category's ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by the category's name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `string`[]","description":"Filter by the category's description(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Retrieve the child categories of the specified parent ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the category's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter by whether the category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter by whether the category is internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreProductCategoryListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductCategoryListParams](../../../../../types/interfaces/types.BaseProductCategoryListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the category's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the category's ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by the category's name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| `string`[]","description":"Filter by the category's description(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_category_id","type":"`null` \\| `string` \\| `string`[]","description":"Retrieve the child categories of the specified parent ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the category's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_active","type":"`boolean`","description":"Filter by whether the category is active.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_internal","type":"`boolean`","description":"Filter by whether the category is internal.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`Line truncated
### Returns
@@ -163,9 +163,9 @@ ___
## retrieve
This method retrieves a category by its ID. It sends a request to the
[Retrieve Product Category](https://docs.medusajs.com/v2/api/store#product-categories\_getproductcategoriesid).
[Retrieve Product Category](https://docs.medusajs.com/api/store#product-categories\_getproductcategoriesid).
Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/categories/retrieve).
Related guide: [How to retrieve a category in the storefront](https://docs.medusajs.com/resources/storefront-development/products/categories/retrieve).
### Example
@@ -189,11 +189,11 @@ sdk.store.category.retrieve("pcat_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[StoreProductCategoryParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryParams/page.mdx)","description":"Configure the fields to retrieve in the category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_ancestors_tree","type":"`boolean`","description":"Whether to retrieve the parent category. If enabled, the parent category is\nretrieved in the `parent_category` field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to retrieve the child categories. If enabled, the child categories are\nretrieved in the `category_children` field.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the category to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[StoreProductCategoryParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductCategoryParams/page.mdx)","description":"Configure the fields to retrieve in the category.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_ancestors_tree","type":"`boolean`","description":"Whether to retrieve the parent category. If enabled, the parent category is\nretrieved in the `parent_category` field.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"include_descendants_tree","type":"`boolean`","description":"Whether to retrieve the child categories. If enabled, the child categories are\nretrieved in the `category_children` field.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -12,9 +12,9 @@ This documentation provides a reference to the `sdk.store.collection` set of met
## list
This method retrieves a paginated list of product collections. It sends a request to the
[List Collections](https://docs.medusajs.com/v2/api/store#collections\_getcollections) API route.
[List Collections](https://docs.medusajs.com/api/store#collections\_getcollections) API route.
Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list).
Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/list).
### Example
@@ -53,11 +53,11 @@ sdk.store.collection.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCollectionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCollectionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the collection's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by collection ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by collection handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by collection title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection creation dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection update dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFiltLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCollectionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCollectionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the collection's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by collection ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by collection handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by collection title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection creation dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection update dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterableLine truncated
### Returns
@@ -67,10 +67,10 @@ ___
## retrieve
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)
This method retrieves a collection by its ID. It sends a request to the [Get Collection](https://docs.medusajs.com/api/store#collections\_getcollectionsid)
API route.
Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve).
Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/retrieve).
### Example
@@ -94,11 +94,11 @@ sdk.store.collection.retrieve("pcol_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -107,9 +107,9 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## list
This method retrieves a paginated list of product collections. It sends a request to the
[List Collections](https://docs.medusajs.com/v2/api/store#collections\_getcollections) API route.
[List Collections](https://docs.medusajs.com/api/store#collections\_getcollections) API route.
Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list).
Related guide: [How to retrieve collections in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/list).
### Example
@@ -148,11 +148,11 @@ sdk.store.collection.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCollectionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCollectionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the collection's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by collection ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by collection handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by collection title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection creation dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection update dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFiltLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCollectionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCollectionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCollectionListParams](../../../../../types/interfaces/types.BaseCollectionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the collection's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by collection ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by collection handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by collection title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection creation dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on collection update dates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterableLine truncated
### Returns
@@ -162,10 +162,10 @@ ___
## retrieve
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)
This method retrieves a collection by its ID. It sends a request to the [Get Collection](https://docs.medusajs.com/api/store#collections\_getcollectionsid)
API route.
Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/collections/retrieve).
Related guide: [How to retrieve a collection in a storefront](https://docs.medusajs.com/resources/storefront-development/products/collections/retrieve).
### Example
@@ -189,11 +189,11 @@ sdk.store.collection.retrieve("pcol_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the collection to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the collection.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -11,13 +11,13 @@ This documentation provides a reference to the `sdk.store.customer` set of metho
## create
This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/v2/api/store#customers\_postcustomers)
This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/api/store#customers\_postcustomers)
API route.
You must use the Auth.register method first to retrieve a registration token. Then, pass that
registration token in the `headers` parameter of this method as an authorization bearer header.
Related guide: [How to register customer in storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/register)
Related guide: [How to register customer in storefront](https://docs.medusajs.com/resources/storefront-development/customers/register)
### Example
@@ -43,7 +43,7 @@ sdk.store.customer.create(
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request. This is where you include the authorization JWT registration token.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreCreateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request. This is where you include the authorization JWT registration token.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -57,9 +57,9 @@ This method updates the logged-in customer's details. The customer must be logge
first with the Auth.login method.
It sends a request to the
[Update Customer](https://docs.medusajs.com/v2/api/store#customers\_postcustomersme) API route.
[Update Customer](https://docs.medusajs.com/api/store#customers\_postcustomersme) API route.
Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/profile).
Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/profile).
### Example
@@ -74,7 +74,7 @@ sdk.store.customer.update({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreUpdateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomer/page.mdx)","description":"The customer's details to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreUpdateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomer/page.mdx)","description":"The customer's details to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -87,7 +87,7 @@ ___
This method retrieves the logged-in customer's details. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/v2/api/store#customers\_getcustomersme)
It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/api/store#customers\_getcustomersme)
API route.
### Example
@@ -101,7 +101,7 @@ sdk.store.customer.retrieve()
### Parameters
<TypeList types={[{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -114,10 +114,10 @@ ___
This method creates an address for the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Create Address](https://docs.medusajs.com/v2/api/store#customers\_postcustomersmeaddresses)
It sends a request to the [Create Address](https://docs.medusajs.com/api/store#customers\_postcustomersmeaddresses)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -132,7 +132,7 @@ sdk.store.customer.createAddress({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomerAddress/page.mdx)","description":"The address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomerAddress/page.mdx)","description":"The address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -145,10 +145,10 @@ ___
This method updates the address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Update Address](https://docs.medusajs.com/v2/api/store#customers\_postcustomersmeaddressesaddress\_id)
It sends a request to the [Update Address](https://docs.medusajs.com/api/store#customers\_postcustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -166,7 +166,7 @@ sdk.store.customer.updateAddress(
### Parameters
<TypeList types={[{"name":"addressId","type":"`string`","description":"The ID of the address to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomerAddress/page.mdx)","description":"The details to update in the address.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"addressId","type":"`string`","description":"The ID of the address to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomerAddress/page.mdx)","description":"The details to update in the address.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -179,10 +179,10 @@ ___
This method retrieves the logged-in customer's address. The customer must be logged in
first with the Auth.login method.
It sends a request to the [List Customer's Address](https://docs.medusajs.com/v2/api/store#customers\_getcustomersmeaddresses)
It sends a request to the [List Customer's Address](https://docs.medusajs.com/api/store#customers\_getcustomersmeaddresses)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -221,11 +221,11 @@ sdk.store.customer.listAddress({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCustomerAddressFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCustomerAddressFilters/page.mdx)","description":"Configure the fields to retrieve in the addresses.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keyword to search the address's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `string`[]","description":"Filter by company name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `string`[]","description":"Filter by cities.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[]","description":"Filter by country code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `string`[]","description":"Filter by province(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `string`[]","description":"Filter by postal code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.Line truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCustomerAddressFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCustomerAddressFilters/page.mdx)","description":"Configure the fields to retrieve in the addresses.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keyword to search the address's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `string`[]","description":"Filter by company name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `string`[]","description":"Filter by cities.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[]","description":"Filter by country code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `string`[]","description":"Filter by province(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `string`[]","description":"Filter by postal code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BasLine truncated
### Returns
@@ -238,10 +238,10 @@ ___
This method retrieves an address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Get Address](https://docs.medusajs.com/v2/api/store#customers\_getcustomersmeaddressesaddress\_id)
It sends a request to the [Get Address](https://docs.medusajs.com/api/store#customers\_getcustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -270,11 +270,11 @@ sdk.store.customer.retrieveAddress(
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"addressId","type":"`string`","description":"The address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"addressId","type":"`string`","description":"The address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -287,10 +287,10 @@ ___
This method deletes an address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Remove Address](https://docs.medusajs.com/v2/api/store#customers\_deletecustomersmeaddressesaddress\_id)
It sends a request to the [Remove Address](https://docs.medusajs.com/api/store#customers\_deletecustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -311,13 +311,13 @@ sdk.store.customer.deleteAddress("caddr_123")
## create
This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/v2/api/store#customers\_postcustomers)
This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/api/store#customers\_postcustomers)
API route.
You must use the Auth.register method first to retrieve a registration token. Then, pass that
registration token in the `headers` parameter of this method as an authorization bearer header.
Related guide: [How to register customer in storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/register)
Related guide: [How to register customer in storefront](https://docs.medusajs.com/resources/storefront-development/customers/register)
### Example
@@ -343,7 +343,7 @@ sdk.store.customer.create(
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request. This is where you include the authorization JWT registration token.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreCreateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request. This is where you include the authorization JWT registration token.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -357,9 +357,9 @@ This method updates the logged-in customer's details. The customer must be logge
first with the Auth.login method.
It sends a request to the
[Update Customer](https://docs.medusajs.com/v2/api/store#customers\_postcustomersme) API route.
[Update Customer](https://docs.medusajs.com/api/store#customers\_postcustomersme) API route.
Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/profile).
Related guide: [How to edit customer's profile in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/profile).
### Example
@@ -374,7 +374,7 @@ sdk.store.customer.update({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreUpdateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomer/page.mdx)","description":"The customer's details to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreUpdateCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomer/page.mdx)","description":"The customer's details to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"company_name","type":"`string`","description":"The customer's company name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The customer's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The customer's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The customer's phone number.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -387,7 +387,7 @@ ___
This method retrieves the logged-in customer's details. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/v2/api/store#customers\_getcustomersme)
It sends a request to the [Get Logged-In Customer](https://docs.medusajs.com/api/store#customers\_getcustomersme)
API route.
### Example
@@ -401,7 +401,7 @@ sdk.store.customer.retrieve()
### Parameters
<TypeList types={[{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -414,10 +414,10 @@ ___
This method creates an address for the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Create Address](https://docs.medusajs.com/v2/api/store#customers\_postcustomersmeaddresses)
It sends a request to the [Create Address](https://docs.medusajs.com/api/store#customers\_postcustomersmeaddresses)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -432,7 +432,7 @@ sdk.store.customer.createAddress({
### Parameters
<TypeList types={[{"name":"body","type":"[StoreCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomerAddress/page.mdx)","description":"The address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"body","type":"[StoreCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCreateCustomerAddress/page.mdx)","description":"The address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -445,10 +445,10 @@ ___
This method updates the address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Update Address](https://docs.medusajs.com/v2/api/store#customers\_postcustomersmeaddressesaddress\_id)
It sends a request to the [Update Address](https://docs.medusajs.com/api/store#customers\_postcustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -466,7 +466,7 @@ sdk.store.customer.updateAddress(
### Parameters
<TypeList types={[{"name":"addressId","type":"`string`","description":"The ID of the address to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomerAddress/page.mdx)","description":"The details to update in the address.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"addressId","type":"`string`","description":"The ID of the address to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[StoreUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreUpdateCustomerAddress/page.mdx)","description":"The details to update in the address.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the customer.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -479,10 +479,10 @@ ___
This method retrieves the logged-in customer's address. The customer must be logged in
first with the Auth.login method.
It sends a request to the [List Customer's Address](https://docs.medusajs.com/v2/api/store#customers\_getcustomersmeaddresses)
It sends a request to the [List Customer's Address](https://docs.medusajs.com/api/store#customers\_getcustomersmeaddresses)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -521,11 +521,11 @@ sdk.store.customer.listAddress({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCustomerAddressFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCustomerAddressFilters/page.mdx)","description":"Configure the fields to retrieve in the addresses.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keyword to search the address's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `string`[]","description":"Filter by company name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `string`[]","description":"Filter by cities.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[]","description":"Filter by country code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `string`[]","description":"Filter by province(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `string`[]","description":"Filter by postal code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.Line truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreCustomerAddressFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCustomerAddressFilters/page.mdx)","description":"Configure the fields to retrieve in the addresses.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keyword to search the address's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string` \\| `string`[]","description":"Filter by company name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string` \\| `string`[]","description":"Filter by cities.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[]","description":"Filter by country code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string` \\| `string`[]","description":"Filter by province(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string` \\| `string`[]","description":"Filter by postal code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseCustomerAddressFilters](../../../../../types/interfaces/types.BaseCustomerAddressFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseCustomerAddressFilters](../../../../../types/interfaces/types.BasLine truncated
### Returns
@@ -538,10 +538,10 @@ ___
This method retrieves an address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Get Address](https://docs.medusajs.com/v2/api/store#customers\_getcustomersmeaddressesaddress\_id)
It sends a request to the [Get Address](https://docs.medusajs.com/api/store#customers\_getcustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -570,11 +570,11 @@ sdk.store.customer.retrieveAddress(
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"addressId","type":"`string`","description":"The address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"addressId","type":"`string`","description":"The address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -587,10 +587,10 @@ ___
This method deletes an address of the logged-in customer. The customer must be logged in
first with the Auth.login method.
It sends a request to the [Remove Address](https://docs.medusajs.com/v2/api/store#customers\_deletecustomersmeaddressesaddress\_id)
It sends a request to the [Remove Address](https://docs.medusajs.com/api/store#customers\_deletecustomersmeaddressesaddress\_id)
API route.
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses)
Related guides: [How to manage customer's addresses in the storefront](https://docs.medusajs.com/resources/storefront-development/customers/addresses)
### Example
@@ -12,10 +12,10 @@ This documentation provides a reference to the `sdk.store.fulfillment` set of me
## listCartOptions
This method retrieves the list of shipping options for a cart. It sends a request to
the [List Shipping Options](https://docs.medusajs.com/v2/api/store#shipping-options\_getshippingoptions)
the [List Shipping Options](https://docs.medusajs.com/api/store#shipping-options\_getshippingoptions)
API route.
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
### Example
@@ -30,19 +30,19 @@ sdk.store.fulfillment.listCartOptions({
### Parameters
<TypeList types={[{"name":"query","type":"[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)","description":"The cart's details along with configurations of the fields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether to retrieve shipping options used for returns.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../typesLine truncated
<TypeList types={[{"name":"query","type":"[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)","description":"The cart's details along with configurations of the fields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether to retrieve shipping options used for returns.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DALine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping options that can be used for the cart.","expandable":false,"children":[{"name":"StoreShippingOptionListResponse","type":"[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_options","type":"[StoreCartShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCartShippingOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price. `flat` means the price\nis fixed, whereas `calculated` means the price is calculated by the \nassociated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data useful for the fulfillment provider when handling the shipment and fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`object`","description":"The shipping option's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`object`","description":"The details of the associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The shipping option's amount.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping options that can be used for the cart.","expandable":false,"children":[{"name":"StoreShippingOptionListResponse","type":"[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_options","type":"[StoreCartShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCartShippingOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price. `flat` means the price\nis fixed, whereas `calculated` means the price is calculated by the \nassociated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data useful for the fulfillment provider when handling the shipment and fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`object`","description":"The shipping option's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`object`","description":"The details of the associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The shipping option's amount.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
## listCartOptions
This method retrieves the list of shipping options for a cart. It sends a request to
the [List Shipping Options](https://docs.medusajs.com/v2/api/store#shipping-options\_getshippingoptions)
the [List Shipping Options](https://docs.medusajs.com/api/store#shipping-options\_getshippingoptions)
API route.
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/shipping).
Related guide: [Implement shipping step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/shipping).
### Example
@@ -57,8 +57,8 @@ sdk.store.fulfillment.listCartOptions({
### Parameters
<TypeList types={[{"name":"query","type":"[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)","description":"The cart's details along with configurations of the fields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether to retrieve shipping options used for returns.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../typesLine truncated
<TypeList types={[{"name":"query","type":"[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)","description":"The cart's details along with configurations of the fields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether to retrieve shipping options used for returns.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"The ID of the cart to retrieve the shipping options that\ncan be applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([StoreGetShippingOptionList](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreGetShippingOptionList/page.mdx) \\| [BaseFilterable](../../../../../types/DALine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping options that can be used for the cart.","expandable":false,"children":[{"name":"StoreShippingOptionListResponse","type":"[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_options","type":"[StoreCartShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCartShippingOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price. `flat` means the price\nis fixed, whereas `calculated` means the price is calculated by the \nassociated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data useful for the fulfillment provider when handling the shipment and fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`object`","description":"The shipping option's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`object`","description":"The details of the associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The shipping option's amount.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping options that can be used for the cart.","expandable":false,"children":[{"name":"StoreShippingOptionListResponse","type":"[StoreShippingOptionListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreShippingOptionListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_options","type":"[StoreCartShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCartShippingOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of the shipping option's price. `flat` means the price\nis fixed, whereas `calculated` means the price is calculated by the \nassociated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the associated service zone.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the associated shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider used to handle shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"The data useful for the fulfillment provider when handling the shipment and fulfillment.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property).","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`object`","description":"The shipping option's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"`object`","description":"The details of the associated fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The shipping option's amount.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
@@ -12,7 +12,7 @@ This documentation provides a reference to the `sdk.store.order` set of methods
## list
This method retrieves a paginated list of orders matching the specified filters. It
sends a request to the [List Orders](https://docs.medusajs.com/v2/api/store#orders\_getorders)
sends a request to the [List Orders](https://docs.medusajs.com/api/store#orders\_getorders)
API route.
### Example
@@ -52,11 +52,11 @@ sdk.store.order.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)","description":"Configure the fields to retrieve in the orders.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by order ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx) \\| [OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)[]","description":"Filter by order status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/inLine truncated
<TypeList types={[{"name":"query","type":"[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)","description":"Configure the fields to retrieve in the orders.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by order ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx) \\| [OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)[]","description":"Filter by order status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interLine truncated
### Returns
@@ -67,7 +67,7 @@ ___
## retrieve
This method retrieves an order by its ID. It sends a request to the
[Get Order](https://docs.medusajs.com/v2/api/store#orders\_getordersid) API route.
[Get Order](https://docs.medusajs.com/api/store#orders\_getordersid) API route.
### Example
@@ -91,11 +91,11 @@ sdk.store.order.retrieve("order_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -104,7 +104,7 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## list
This method retrieves a paginated list of orders matching the specified filters. It
sends a request to the [List Orders](https://docs.medusajs.com/v2/api/store#orders\_getorders)
sends a request to the [List Orders](https://docs.medusajs.com/api/store#orders\_getorders)
API route.
### Example
@@ -144,11 +144,11 @@ sdk.store.order.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)","description":"Configure the fields to retrieve in the orders.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by order ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx) \\| [OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)[]","description":"Filter by order status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/inLine truncated
<TypeList types={[{"name":"query","type":"[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)","description":"Configure the fields to retrieve in the orders.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by order ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx) \\| [OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)[]","description":"Filter by order status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([StoreOrderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreOrderFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interLine truncated
### Returns
@@ -159,7 +159,7 @@ ___
## retrieve
This method retrieves an order by its ID. It sends a request to the
[Get Order](https://docs.medusajs.com/v2/api/store#orders\_getordersid) API route.
[Get Order](https://docs.medusajs.com/api/store#orders\_getordersid) API route.
### Example
@@ -183,11 +183,11 @@ sdk.store.order.retrieve("order_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -12,10 +12,10 @@ This documentation provides a reference to the `sdk.store.payment` set of method
## listPaymentProviders
This method retrieves the payment providers available in a region, which is useful during checkout.
It sends a request to the [List Payment Providers](https://docs.medusajs.com/v2/api/store#payment-providers\_getpaymentproviders)
It sends a request to the [List Payment Providers](https://docs.medusajs.com/api/store#payment-providers\_getpaymentproviders)
API route.
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
### Example
@@ -60,11 +60,11 @@ sdk.store.payment.listPaymentProviders({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StorePaymentProviderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StorePaymentProviderFilters/page.mdx)","description":"The filters to apply on the retrieved providers, along with configurations of the \nfields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to retrieve its payment providers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StorePaymentProviderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StorePaymentProviderFilters/page.mdx)","description":"The filters to apply on the retrieved providers, along with configurations of the \nfields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to retrieve its payment providers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -75,14 +75,14 @@ ___
## initiatePaymentSession
This method creates a payment session of a cart's payment collection, selecting a payment provider.
It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/v2/api/store#payment-collections\_postpaymentcollectionsidpaymentsessions)
It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/api/store#payment-collections\_postpaymentcollectionsidpaymentsessions)
API route.
If the cart doesn't have a payment collection, a payment collection is created for the cart by
sending a request to the [Create Payment Collection](https://docs.medusajs.com/v2/api/store#payment-collections\_postpaymentcollections)
sending a request to the [Create Payment Collection](https://docs.medusajs.com/api/store#payment-collections\_postpaymentcollections)
API route.
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
### Example
@@ -103,7 +103,7 @@ sdk.store.payment.initiatePaymentSession(
### Parameters
<TypeList types={[{"name":"cart","type":"[StoreCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCart/page.mdx)","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`number`","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"`number`","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"`number`","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"`number`","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`number`","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"`number`","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_subtotal","type":"`number`","description":"The original shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_tax_total","type":"`number`","description":"The original shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable"Line truncated
<TypeList types={[{"name":"cart","type":"[StoreCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCart/page.mdx)","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`number`","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"`number`","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"`number`","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"`number`","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`number`","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"`number`","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_subtotal","type":"`number`","description":"The original shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_tax_total","type":"`number`","description":"The original shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable"Line truncated
### Returns
@@ -112,10 +112,10 @@ sdk.store.payment.initiatePaymentSession(
## listPaymentProviders
This method retrieves the payment providers available in a region, which is useful during checkout.
It sends a request to the [List Payment Providers](https://docs.medusajs.com/v2/api/store#payment-providers\_getpaymentproviders)
It sends a request to the [List Payment Providers](https://docs.medusajs.com/api/store#payment-providers\_getpaymentproviders)
API route.
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
### Example
@@ -160,11 +160,11 @@ sdk.store.payment.listPaymentProviders({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StorePaymentProviderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StorePaymentProviderFilters/page.mdx)","description":"The filters to apply on the retrieved providers, along with configurations of the \nfields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to retrieve its payment providers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StorePaymentProviderFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StorePaymentProviderFilters/page.mdx)","description":"The filters to apply on the retrieved providers, along with configurations of the \nfields to retrieve in the options.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to retrieve its payment providers.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -175,14 +175,14 @@ ___
## initiatePaymentSession
This method creates a payment session of a cart's payment collection, selecting a payment provider.
It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/v2/api/store#payment-collections\_postpaymentcollectionsidpaymentsessions)
It sends a request to the [Initialize Payment Session](https://docs.medusajs.com/api/store#payment-collections\_postpaymentcollectionsidpaymentsessions)
API route.
If the cart doesn't have a payment collection, a payment collection is created for the cart by
sending a request to the [Create Payment Collection](https://docs.medusajs.com/v2/api/store#payment-collections\_postpaymentcollections)
sending a request to the [Create Payment Collection](https://docs.medusajs.com/api/store#payment-collections\_postpaymentcollections)
API route.
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment).
Related guide: [Implement payment step during checkout](https://docs.medusajs.com/resources/storefront-development/checkout/payment).
### Example
@@ -203,7 +203,7 @@ sdk.store.payment.initiatePaymentSession(
### Parameters
<TypeList types={[{"name":"cart","type":"[StoreCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCart/page.mdx)","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`number`","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"`number`","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"`number`","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"`number`","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`number`","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"`number`","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_subtotal","type":"`number`","description":"The original shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_tax_total","type":"`number`","description":"The original shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable"Line truncated
<TypeList types={[{"name":"cart","type":"[StoreCart](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreCart/page.mdx)","description":"The cart's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the cart","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The original item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The original item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The original item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The item total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The item subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The item tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The original total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"The original subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"`number`","description":"The original tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"`number`","description":"The total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the cart. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"`number`","description":"The tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"`number`","description":"The discount total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_tax_total","type":"`number`","description":"The discount tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_total","type":"`number`","description":"The gift card total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"gift_card_tax_total","type":"`number`","description":"The gift card tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_total","type":"`number`","description":"The shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_subtotal","type":"`number`","description":"The shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_tax_total","type":"`number`","description":"The shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_total","type":"`number`","description":"The original shipping total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_subtotal","type":"`number`","description":"The original shipping subtotal of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_shipping_tax_total","type":"`number`","description":"The original shipping tax total of the cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the associated customer","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel the cart belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer that owns the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable"Line truncated
### Returns
@@ -12,12 +12,12 @@ This documentation provides a reference to the `sdk.store.product` set of method
## list
This method retrieves a list of products. It sends a request to the
[List Products API route](https://docs.medusajs.com/v2/api/store#products\_getproducts).
[List Products API route](https://docs.medusajs.com/api/store#products\_getproducts).
Related guides:
- [How to list products in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/list).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
- [How to list products in a storefront](https://docs.medusajs.com/resources/storefront-development/products/list).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
### Example
@@ -56,11 +56,11 @@ sdk.store.product.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[StoreProductParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx) \\| [ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)[]","description":"Filter the product by status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"Filter the product by the sales channel(s) it belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by the product's title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the product's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the product's id(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filter by whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`string` \\| `string`[]","description":"Filter by the product's tag(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter by the product's type(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_id","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[]","description":"Filter by the product's collection(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filers on the product's creation date.","optional":true,"defaultValue":"","expandable":falsLine truncated
<TypeList types={[{"name":"query","type":"[StoreProductParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx) \\| [ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)[]","description":"Filter the product by status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"Filter the product by the sales channel(s) it belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by the product's title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the product's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the product's id(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filter by whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`string` \\| `string`[]","description":"Filter by the product's tag(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter by the product's type(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_id","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[]","description":"Filter by the product's collection(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filers on the product's creation date.","optional":true,"defaultValue":"","expandable":false,"Line truncated
### Returns
@@ -71,12 +71,12 @@ ___
## retrieve
This method is used to retrieve a product by its ID. It sends a request to the
[Get Product](https://docs.medusajs.com/v2/api/store#products\_getproductsid) API route.
[Get Product](https://docs.medusajs.com/api/store#products\_getproductsid) API route.
Related guides:
- [How to retrieve a product in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/retrieve).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
- [How to retrieve a product in the storefront](https://docs.medusajs.com/resources/storefront-development/products/retrieve).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
### Example
@@ -100,11 +100,11 @@ sdk.store.product.retrieve("prod_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -113,12 +113,12 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## list
This method retrieves a list of products. It sends a request to the
[List Products API route](https://docs.medusajs.com/v2/api/store#products\_getproducts).
[List Products API route](https://docs.medusajs.com/api/store#products\_getproducts).
Related guides:
- [How to list products in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/list).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
- [How to list products in a storefront](https://docs.medusajs.com/resources/storefront-development/products/list).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
### Example
@@ -157,11 +157,11 @@ sdk.store.product.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[StoreProductParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx) \\| [ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)[]","description":"Filter the product by status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"Filter the product by the sales channel(s) it belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by the product's title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the product's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the product's id(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filter by whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`string` \\| `string`[]","description":"Filter by the product's tag(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter by the product's type(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_id","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[]","description":"Filter by the product's collection(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filers on the product's creation date.","optional":true,"defaultValue":"","expandable":falsLine truncated
<TypeList types={[{"name":"query","type":"[StoreProductParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreProductParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseProductListParams](../../../../../types/interfaces/types.BaseProductListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search the searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx) \\| [ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)[]","description":"Filter the product by status(es).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"Filter the product by the sales channel(s) it belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string` \\| `string`[]","description":"Filter by the product's title(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string` \\| `string`[]","description":"Filter by the product's handle(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by the product's id(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Filter by whether the product is a gift card.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tags","type":"`string` \\| `string`[]","description":"Filter by the product's tag(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`string` \\| `string`[]","description":"Filter by the product's type(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"category_id","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"categories","type":"`string` \\| `string`[]","description":"Filter by the product's category(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`string` \\| `string`[]","description":"Filter by the product's collection(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filers on the product's creation date.","optional":true,"defaultValue":"","expandable":false,"Line truncated
### Returns
@@ -172,12 +172,12 @@ ___
## retrieve
This method is used to retrieve a product by its ID. It sends a request to the
[Get Product](https://docs.medusajs.com/v2/api/store#products\_getproductsid) API route.
[Get Product](https://docs.medusajs.com/api/store#products\_getproductsid) API route.
Related guides:
- [How to retrieve a product in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/retrieve).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/v2/resources/storefront-development/products/price)
- [How to retrieve a product in the storefront](https://docs.medusajs.com/resources/storefront-development/products/retrieve).
- [How to retrieve a product variant's prices in the storefront](https://docs.medusajs.com/resources/storefront-development/products/price)
### Example
@@ -201,11 +201,11 @@ sdk.store.product.retrieve("prod_123", {
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the product.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -12,9 +12,9 @@ This documentation provides a reference to the `sdk.store.region` set of methods
## list
This method retrieves the paginated list of regions in the store. It sends a request to the
[List Regions API route](https://docs.medusajs.com/v2/api/store#regions\_getregions).
[List Regions API route](https://docs.medusajs.com/api/store#regions\_getregions).
Related guide: [How to list regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/list).
Related guide: [How to list regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/list).
### Example
@@ -53,11 +53,11 @@ sdk.store.region.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreRegionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search a region's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by region name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Filter by currency code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expaLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreRegionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search a region's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by region name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Filter by currency code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandaLine truncated
### Returns
@@ -67,10 +67,10 @@ ___
## retrieve
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)
This method retrieves a region by its ID. It sends a request to the [Get Region](https://docs.medusajs.com/api/store#regions\_getregionsid)
API route.
Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/store-retrieve-region).
Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/store-retrieve-region).
### Example
@@ -97,11 +97,11 @@ sdk.store.region.retrieve(
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns
@@ -110,9 +110,9 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## list
This method retrieves the paginated list of regions in the store. It sends a request to the
[List Regions API route](https://docs.medusajs.com/v2/api/store#regions\_getregions).
[List Regions API route](https://docs.medusajs.com/api/store#regions\_getregions).
Related guide: [How to list regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/list).
Related guide: [How to list regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/list).
### Example
@@ -151,11 +151,11 @@ sdk.store.region.list({
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreRegionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search a region's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by region name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Filter by currency code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expaLine truncated
<TypeList types={[{"name":"query","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [StoreRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.StoreRegionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"A query or keywords to search a region's searchable fields by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by region name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Filter by currency code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[BaseRegionFilters](../../../../../types/interfaces/types.BaseRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandaLine truncated
### Returns
@@ -165,10 +165,10 @@ ___
## retrieve
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)
This method retrieves a region by its ID. It sends a request to the [Get Region](https://docs.medusajs.com/api/store#regions\_getregionsid)
API route.
Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/v2/resources/storefront-development/regions/store-retrieve-region).
Related guide: [Store and retrieve regions in a storefront](https://docs.medusajs.com/resources/storefront-development/regions/store-retrieve-region).
### Example
@@ -195,11 +195,11 @@ sdk.store.region.retrieve(
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../../admin/types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="__type"/>
### Returns