Skip to content

Commit

Permalink
chore(docs): Updated API Reference (#6041)
Browse files Browse the repository at this point in the history
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <[email protected]>
Co-authored-by: Shahed Nasser <[email protected]>
  • Loading branch information
3 people authored Jan 10, 2024
1 parent a9b4214 commit bc58bc8
Show file tree
Hide file tree
Showing 12 changed files with 254 additions and 27 deletions.
5 changes: 0 additions & 5 deletions packages/oas/medusa-oas-cli/redocly/redocly-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ decorators:
- Order
- Payment
- PaymentSession
- SalesChannel
ClaimImage:
- ClaimItem
ClaimItem:
Expand Down Expand Up @@ -44,7 +43,6 @@ decorators:
- Fulfillment
GiftCard:
- Order
- Region
GiftCardTransaction:
- GiftCard
- Order
Expand Down Expand Up @@ -75,9 +73,6 @@ decorators:
- Refund
- Return
- Swap
- SalesChannel
- Region
- LineItem
OrderEdit:
- Order
OrderItemChange:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
58 changes: 58 additions & 0 deletions www/apps/api-reference/specs/admin/openapi.full.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -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
Expand All @@ -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: >-
Expand Down Expand Up @@ -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: >-
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading

4 comments on commit bc58bc8

@vercel
Copy link

@vercel vercel bot commented on bc58bc8 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs-ui – ./www/apps/ui

docs-ui-medusajs.vercel.app
docs-ui-git-develop-medusajs.vercel.app
docs-ui.vercel.app

@vercel
Copy link

@vercel vercel bot commented on bc58bc8 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

medusa-dashboard – ./packages/admin-next/dashboard

medusa-dashboard.vercel.app
admin-preview.medusajs.com
medusa-dashboard-git-develop-medusajs.vercel.app
medusa-dashboard-medusajs.vercel.app

@vercel
Copy link

@vercel vercel bot commented on bc58bc8 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

api-reference – ./www/apps/api-reference

api-reference-medusajs.vercel.app
api-reference-git-develop-medusajs.vercel.app
api-reference-delta.vercel.app
docs.medusajs.com

@vercel
Copy link

@vercel vercel bot commented on bc58bc8 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

medusa-docs – ./www/apps/docs

medusa-docs.vercel.app
medusa-docs-medusajs.vercel.app
medusa-docs-git-develop-medusajs.vercel.app

Please sign in to comment.