diff --git a/packages/oas/medusa-oas-cli/redocly/redocly-config.yaml b/packages/oas/medusa-oas-cli/redocly/redocly-config.yaml index 138d4fea4e..632a112796 100644 --- a/packages/oas/medusa-oas-cli/redocly/redocly-config.yaml +++ b/packages/oas/medusa-oas-cli/redocly/redocly-config.yaml @@ -13,7 +13,6 @@ decorators: - Order - Payment - PaymentSession - - SalesChannel ClaimImage: - ClaimItem ClaimItem: @@ -44,7 +43,6 @@ decorators: - Fulfillment GiftCard: - Order - - Region GiftCardTransaction: - GiftCard - Order @@ -75,9 +73,6 @@ decorators: - Refund - Return - Swap - - SalesChannel - - Region - - LineItem OrderEdit: - Order OrderItemChange: diff --git a/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml b/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml index c63dda2fd3..4283873041 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/Cart.yaml @@ -234,3 +234,10 @@ properties: description: The total of gift cards with taxes type: integer example: 0 + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + items: + $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/Order.yaml b/www/apps/api-reference/specs/admin/components/schemas/Order.yaml index 6d67af8e6c..9fb3daeff9 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/Order.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/Order.yaml @@ -339,3 +339,11 @@ properties: description: Learn about the metadata attribute, and how to delete and update it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + x-featureFlag: medusa_v2 + items: + $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml b/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml index a79fecafa9..fc7419a6d8 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/PublishableApiKeySalesChannel.yaml @@ -6,7 +6,14 @@ type: object required: - publishable_key_id - sales_channel_id + - created_at + - updated_at + - deleted_at properties: + id: + description: The relation's ID + type: string + example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A sales_channel_id: description: The sales channel's ID type: string @@ -15,3 +22,16 @@ properties: description: The publishable API key's ID type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time diff --git a/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml b/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml index 87f03d42be..1dc2968f5c 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/SalesChannel.yaml @@ -59,3 +59,26 @@ properties: description: Learn about the metadata attribute, and how to delete and update it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + carts: + description: The associated carts. + type: array + nullable: true + x-expandable: carts + x-featureFlag: medusa_v2 + items: + type: object + orders: + description: The associated orders. + type: array + nullable: true + x-expandable: orders + x-featureFlag: medusa_v2 + items: + type: object + publishableKeys: + description: The associated publishable API keys. + type: array + nullable: true + x-expandable: publishableKeys + items: + type: object diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index cd92c3d027..b305e0c33c 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -36000,6 +36000,13 @@ components: description: The total of gift cards with taxes type: integer example: 0 + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + items: + $ref: '#/components/schemas/SalesChannel' ClaimImage: title: Claim Image description: The details of an image attached to a claim. @@ -39255,6 +39262,14 @@ components: it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + x-featureFlag: medusa_v2 + items: + $ref: '#/components/schemas/SalesChannel' OrderEdit: title: Order Edit description: >- @@ -41157,7 +41172,14 @@ components: required: - publishable_key_id - sales_channel_id + - created_at + - updated_at + - deleted_at properties: + id: + description: The relation's ID + type: string + example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A sales_channel_id: description: The sales channel's ID type: string @@ -41166,6 +41188,19 @@ components: description: The publishable API key's ID type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time Refund: title: Refund description: >- @@ -41811,6 +41846,29 @@ components: it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + carts: + description: The associated carts. + type: array + nullable: true + x-expandable: carts + x-featureFlag: medusa_v2 + items: + type: object + orders: + description: The associated orders. + type: array + nullable: true + x-expandable: orders + x-featureFlag: medusa_v2 + items: + type: object + publishableKeys: + description: The associated publishable API keys. + type: array + nullable: true + x-expandable: publishableKeys + items: + type: object SalesChannelLocation: title: Sales Channel Stock Location description: >- diff --git a/www/apps/api-reference/specs/store/code_samples/tsx/store_products/getundefined b/www/apps/api-reference/specs/store/code_samples/tsx/store_products/getundefined index 52017119da..3822ddde6a 100644 --- a/www/apps/api-reference/specs/store/code_samples/tsx/store_products/getundefined +++ b/www/apps/api-reference/specs/store/code_samples/tsx/store_products/getundefined @@ -1,22 +1,22 @@ -import React from "react" -import { useProducts } from "medusa-react" - -function Product () { - const { products, isLoading } = useProducts() - - return ( -
- {isLoading && Loading...} - {products && !products.length && No Products} - {products && products.length > 0 && ( - - )} -
- ) -} - -export default Products +import React from "react" +import { useProducts } from "medusa-react" + +const Products = () => { + const { products, isLoading } = useProducts() + + return ( +
+ {isLoading && Loading...} + {products && !products.length && No Products} + {products && products.length > 0 && ( + + )} +
+ ) +} + +export default Products diff --git a/www/apps/api-reference/specs/store/components/schemas/Cart.yaml b/www/apps/api-reference/specs/store/components/schemas/Cart.yaml index c63dda2fd3..4283873041 100644 --- a/www/apps/api-reference/specs/store/components/schemas/Cart.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/Cart.yaml @@ -234,3 +234,10 @@ properties: description: The total of gift cards with taxes type: integer example: 0 + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + items: + $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/Order.yaml b/www/apps/api-reference/specs/store/components/schemas/Order.yaml index 6d67af8e6c..9fb3daeff9 100644 --- a/www/apps/api-reference/specs/store/components/schemas/Order.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/Order.yaml @@ -339,3 +339,11 @@ properties: description: Learn about the metadata attribute, and how to delete and update it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + x-featureFlag: medusa_v2 + items: + $ref: ./SalesChannel.yaml diff --git a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml b/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml index a79fecafa9..fc7419a6d8 100644 --- a/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/PublishableApiKeySalesChannel.yaml @@ -6,7 +6,14 @@ type: object required: - publishable_key_id - sales_channel_id + - created_at + - updated_at + - deleted_at properties: + id: + description: The relation's ID + type: string + example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A sales_channel_id: description: The sales channel's ID type: string @@ -15,3 +22,16 @@ properties: description: The publishable API key's ID type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time diff --git a/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml b/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml index 87f03d42be..1dc2968f5c 100644 --- a/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/SalesChannel.yaml @@ -59,3 +59,26 @@ properties: description: Learn about the metadata attribute, and how to delete and update it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + carts: + description: The associated carts. + type: array + nullable: true + x-expandable: carts + x-featureFlag: medusa_v2 + items: + type: object + orders: + description: The associated orders. + type: array + nullable: true + x-expandable: orders + x-featureFlag: medusa_v2 + items: + type: object + publishableKeys: + description: The associated publishable API keys. + type: array + nullable: true + x-expandable: publishableKeys + items: + type: object diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index ab22fd96b2..0895c27e80 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -7540,6 +7540,13 @@ components: description: The total of gift cards with taxes type: integer example: 0 + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + items: + $ref: '#/components/schemas/SalesChannel' ClaimImage: title: Claim Image description: The details of an image attached to a claim. @@ -10758,6 +10765,14 @@ components: it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + sales_channels: + description: The associated sales channels. + type: array + nullable: true + x-expandable: sales_channels + x-featureFlag: medusa_v2 + items: + $ref: '#/components/schemas/SalesChannel' OrderEdit: title: Order Edit description: >- @@ -12660,7 +12675,14 @@ components: required: - publishable_key_id - sales_channel_id + - created_at + - updated_at + - deleted_at properties: + id: + description: The relation's ID + type: string + example: pksc_01G8X9A7ESKAJXG2H0E6F1MW7A sales_channel_id: description: The sales channel's ID type: string @@ -12669,6 +12691,19 @@ components: description: The publishable API key's ID type: string example: pak_01G1G5V21KADXNGH29BJMAJ4B4 + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + nullable: true + type: string + format: date-time Refund: title: Refund description: >- @@ -13296,6 +13331,29 @@ components: it. url: >- https://docs.medusajs.com/development/entities/overview#metadata-attribute + carts: + description: The associated carts. + type: array + nullable: true + x-expandable: carts + x-featureFlag: medusa_v2 + items: + type: object + orders: + description: The associated orders. + type: array + nullable: true + x-expandable: orders + x-featureFlag: medusa_v2 + items: + type: object + publishableKeys: + description: The associated publishable API keys. + type: array + nullable: true + x-expandable: publishableKeys + items: + type: object SalesChannelLocation: title: Sales Channel Stock Location description: >-