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
@@ -36,7 +36,7 @@ const salesChannels = await salesChannelModuleService.createSalesChannels([
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"`object`","description":"The sales channel details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannels"/>
## createSalesChannels(data, sharedContext?): Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;
@@ -56,4 +56,4 @@ const salesChannel = await salesChannelModuleService.createSalesChannels({
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created sales channel.","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created sales channel.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannels"/>
@@ -48,4 +48,4 @@ const salesChannels = await salesChannelModuleService.listSalesChannels(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"`object`","description":"The sales channel details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The list of sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listSalesChannels"/>
@@ -31,4 +31,4 @@ const salesChannel =
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved sales channel.","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveSalesChannel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The retrieved sales channel.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveSalesChannel"/>
@@ -37,7 +37,7 @@ const salesChannel = await salesChannelModuleService.updateSalesChannels(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated sales channel.","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated sales channel.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
## updateSalesChannels(selector, data, sharedContext?): Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;
@@ -62,4 +62,4 @@ const salesChannels = await salesChannelModuleService.updateSalesChannels(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"`object`","description":"The sales channel details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The updated sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
@@ -34,7 +34,7 @@ const salesChannel = await salesChannelModuleService.upsertSalesChannels({
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created or updated sales channel.","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="upsertSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created or updated sales channel.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="upsertSalesChannels"/>
## upsertSalesChannels(data, sharedContext?): Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;
@@ -60,4 +60,4 @@ const salesChannels = await salesChannelModuleService.upsertSalesChannels([
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created or updated sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"`object`","description":"The sales channel details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="upsertSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]&#62;","optional":false,"defaultValue":"","description":"The created or updated sales channels.","expandable":false,"children":[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="upsertSalesChannels"/>