chore(docs): Updated API Reference (#6041)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
co-authored by
Oli Juhl
Shahed Nasser
parent
a9b4214503
commit
bc58bc8f47
@@ -1,22 +1,22 @@
|
||||
import React from "react"
|
||||
import { useProducts } from "medusa-react"
|
||||
|
||||
function Product () {
|
||||
const { products, isLoading } = useProducts()
|
||||
|
||||
return (
|
||||
<div>
|
||||
{isLoading && <span>Loading...</span>}
|
||||
{products && !products.length && <span>No Products</span>}
|
||||
{products && products.length > 0 && (
|
||||
<ul>
|
||||
{products.map((product) => (
|
||||
<li key={product.id}>{product.title}</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Products
|
||||
import React from "react"
|
||||
import { useProducts } from "medusa-react"
|
||||
|
||||
const Products = () => {
|
||||
const { products, isLoading } = useProducts()
|
||||
|
||||
return (
|
||||
<div>
|
||||
{isLoading && <span>Loading...</span>}
|
||||
{products && !products.length && <span>No Products</span>}
|
||||
{products && products.length > 0 && (
|
||||
<ul>
|
||||
{products.map((product) => (
|
||||
<li key={product.id}>{product.title}</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Products
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+20
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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: >-
|
||||
|
||||
Reference in New Issue
Block a user