docs: generated references after collapse types improvement (#11889)

This commit is contained in:
Shahed Nasser
2025-03-18 16:48:43 +02:00
committed by GitHub
parent d0ca0f5ce0
commit ac24749bd3
774 changed files with 1612 additions and 1628 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -20,4 +20,4 @@ sdk.admin.exchange.cancel("exchange_123")
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"AdminExchangeResponse","type":"[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
@@ -21,4 +21,4 @@ sdk.admin.exchange.cancel("exchange_123")
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The cancelation's details.","expandable":false,"children":[{"name":"AdminExchangeDeleteResponse","type":"[AdminExchangeDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeDeleteResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"exchange\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The cancelation's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"exchange\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
@@ -22,4 +22,4 @@ sdk.admin.exchange.create({
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"AdminExchangeResponse","type":"[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
@@ -51,4 +51,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminExchangeListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of exchanges.","expandable":false,"children":[{"name":"AdminExchangeListResponse","type":"[AdminExchangeListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminExchangeListResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminExchangeListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of exchanges.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -36,4 +36,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"AdminExchangeResponse","type":"[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details.","expandable":false,"children":[{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The exchange's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order this exchange is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the exchange was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the exchange was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string` \\| `Date`","description":"The date the exchange was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| `Date`","description":"The date the exchange was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"additional_items","type":"[BaseExchangeItem](../../../../../types/interfaces/types.BaseExchangeItem/page.mdx)[]","description":"The exchange's new (outbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The exchange's returned (inbound) items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`string`","description":"The exchange's display ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`string`","description":"The version of the order when the exchange is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"The ID of the user that created the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to notify the customer about changes in the exchange.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"difference_due","type":"`number`","description":"The exchange's difference amount due, either to the customer or the merchant.\n\nIf the value is positive, the customer owes the merchant additional payment of this amount.\nIf negative, the merchant owes the customer a refund of this amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The associated return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"[BaseOrder](../../../../../types/interfaces/types.BaseOrder/page.mdx)","description":"The associated order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Whether out-of-stock variants can be added as new items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[BaseOrderShippingMethod](../../../../../types/interfaces/types.BaseOrderShippingMethod/page.mdx)[]","description":"The shipping methods used to send the outbound items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactions","type":"[BaseOrderTransaction](../../../../../types/interfaces/types.BaseOrderTransaction/page.mdx)[]","description":"The exchange's transactions.","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":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -141,7 +141,7 @@ Since the response is dynamically determined, we cannot know if it is JSON or no
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;T&#62;","optional":false,"defaultValue":"","description":"Promise&#60;T&#62;","expandable":false,"children":[{"name":"T","type":"T","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetch"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;T&#62;","optional":false,"defaultValue":"","description":"Promise&#60;T&#62;","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetch"/>
`fetchStream` is a helper method to deal with server-sent events. It returns an object with a stream and an abort function.
It follows a very similar interface to `fetch`, with the return value being an async generator.
@@ -154,7 +154,7 @@ The caller is responsible for handling `disconnect` events and aborting the stre
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"FetchStreamResponse","expandable":false,"children":[{"name":"FetchStreamResponse","type":"[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stream","type":"`null` \\| AsyncGenerator&#60;[ServerSentEventMessage](../../../interfaces/js_sdk.admin.ServerSentEventMessage/page.mdx), void, unknown&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"comment","type":"`string`","description":"Ignored by the client.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"event","type":"`string`","description":"A string identifying the type of event described.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`string`","description":"The data field for the message. Split by new lines.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `number`","description":"The event ID to set the EventSource object's last event ID value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retry","type":"`number`","description":"The reconnection time.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"abort","type":"() => `void`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetchStream"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[FetchStreamResponse](../../../interfaces/js_sdk.admin.FetchStreamResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"FetchStreamResponse","expandable":false,"children":[{"name":"stream","type":"`null` \\| AsyncGenerator&#60;[ServerSentEventMessage](../../../interfaces/js_sdk.admin.ServerSentEventMessage/page.mdx), void, unknown&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"comment","type":"`string`","description":"Ignored by the client.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"event","type":"`string`","description":"A string identifying the type of event described.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`string`","description":"The data field for the message. Split by new lines.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `number`","description":"The event ID to set the EventSource object's last event ID value.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retry","type":"`number`","description":"The reconnection time.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"abort","type":"() => `void`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="fetchStream"/>
## Parameters