chore(docs): Generated API Reference (#2649)
Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
parent
546577a81a
commit
3cee0bc8fc
@@ -11766,7 +11766,7 @@ paths:
|
|||||||
description: The number of types to return.
|
description: The number of types to return.
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
default: 10
|
default: 20
|
||||||
- in: query
|
- in: query
|
||||||
name: offset
|
name: offset
|
||||||
description: The number of items to skip before the results.
|
description: The number of items to skip before the results.
|
||||||
@@ -13792,6 +13792,7 @@ paths:
|
|||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
/products/types:
|
/products/types:
|
||||||
get:
|
get:
|
||||||
|
deprecated: true
|
||||||
operationId: GetProductsTypes
|
operationId: GetProductsTypes
|
||||||
summary: List Product Types
|
summary: List Product Types
|
||||||
description: Retrieves a list of Product Types.
|
description: Retrieves a list of Product Types.
|
||||||
|
|||||||
@@ -11766,7 +11766,7 @@ paths:
|
|||||||
description: The number of types to return.
|
description: The number of types to return.
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
default: 10
|
default: 20
|
||||||
- in: query
|
- in: query
|
||||||
name: offset
|
name: offset
|
||||||
description: The number of items to skip before the results.
|
description: The number of items to skip before the results.
|
||||||
@@ -13792,6 +13792,7 @@ paths:
|
|||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
/products/types:
|
/products/types:
|
||||||
get:
|
get:
|
||||||
|
deprecated: true
|
||||||
operationId: GetProductsTypes
|
operationId: GetProductsTypes
|
||||||
summary: List Product Types
|
summary: List Product Types
|
||||||
description: Retrieves a list of Product Types.
|
description: Retrieves a list of Product Types.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ get:
|
|||||||
description: The number of types to return.
|
description: The number of types to return.
|
||||||
schema:
|
schema:
|
||||||
type: integer
|
type: integer
|
||||||
default: 10
|
default: 20
|
||||||
- in: query
|
- in: query
|
||||||
name: offset
|
name: offset
|
||||||
description: The number of items to skip before the results.
|
description: The number of items to skip before the results.
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
get:
|
get:
|
||||||
|
deprecated: true
|
||||||
operationId: GetProductsTypes
|
operationId: GetProductsTypes
|
||||||
summary: List Product Types
|
summary: List Product Types
|
||||||
description: Retrieves a list of Product Types.
|
description: Retrieves a list of Product Types.
|
||||||
|
|||||||
@@ -2937,6 +2937,160 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
/product-types:
|
||||||
|
get:
|
||||||
|
operationId: GetProductTypes
|
||||||
|
summary: List Product Types
|
||||||
|
description: Retrieve a list of Product Types.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
description: The number of types to return.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
description: The number of items to skip before the results.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: order
|
||||||
|
description: The field to sort items by.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: discount_condition_id
|
||||||
|
description: The discount condition id on which to filter the product types.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: value
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type values to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type IDs to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: q
|
||||||
|
description: A query string to search values for
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: created_at
|
||||||
|
description: Date comparison for when resulting product types were created.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
- in: query
|
||||||
|
name: updated_at
|
||||||
|
description: Date comparison for when resulting product types were updated.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.store.productTypes.list()
|
||||||
|
|
||||||
|
.then(({ product_types }) => {
|
||||||
|
console.log(product_types.length);
|
||||||
|
});
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/store/product-types' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- Product Type
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
product_types:
|
||||||
|
$ref: '#/components/schemas/product_type'
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
description: The total number of items available
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
description: The number of items skipped before these items
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
description: The number of items per page
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/products/{id}':
|
'/products/{id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetProductsProduct
|
operationId: GetProductsProduct
|
||||||
|
|||||||
@@ -2937,6 +2937,160 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
/product-types:
|
||||||
|
get:
|
||||||
|
operationId: GetProductTypes
|
||||||
|
summary: List Product Types
|
||||||
|
description: Retrieve a list of Product Types.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
description: The number of types to return.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
description: The number of items to skip before the results.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: order
|
||||||
|
description: The field to sort items by.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: discount_condition_id
|
||||||
|
description: The discount condition id on which to filter the product types.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: value
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type values to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type IDs to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: q
|
||||||
|
description: A query string to search values for
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: created_at
|
||||||
|
description: Date comparison for when resulting product types were created.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
- in: query
|
||||||
|
name: updated_at
|
||||||
|
description: Date comparison for when resulting product types were updated.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.store.productTypes.list()
|
||||||
|
|
||||||
|
.then(({ product_types }) => {
|
||||||
|
console.log(product_types.length);
|
||||||
|
});
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/store/product-types' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- Product Type
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
product_types:
|
||||||
|
$ref: '#/components/schemas/product_type'
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
description: The total number of items available
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
description: The number of items skipped before these items
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
description: The number of items per page
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/products/{id}':
|
'/products/{id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetProductsProduct
|
operationId: GetProductsProduct
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.store.productTypes.list()
|
||||||
|
.then(({ product_types }) => {
|
||||||
|
console.log(product_types.length);
|
||||||
|
});
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request GET 'https://medusa-url.com/store/product-types' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -207,6 +207,8 @@ paths:
|
|||||||
$ref: paths/orders_{id}.yaml
|
$ref: paths/orders_{id}.yaml
|
||||||
/orders:
|
/orders:
|
||||||
$ref: paths/orders.yaml
|
$ref: paths/orders.yaml
|
||||||
|
/product-types:
|
||||||
|
$ref: paths/product-types.yaml
|
||||||
/products/{id}:
|
/products/{id}:
|
||||||
$ref: paths/products_{id}.yaml
|
$ref: paths/products_{id}.yaml
|
||||||
/products:
|
/products:
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
get:
|
||||||
|
operationId: GetProductTypes
|
||||||
|
summary: List Product Types
|
||||||
|
description: Retrieve a list of Product Types.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: limit
|
||||||
|
description: The number of types to return.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 20
|
||||||
|
- in: query
|
||||||
|
name: offset
|
||||||
|
description: The number of items to skip before the results.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
default: 0
|
||||||
|
- in: query
|
||||||
|
name: order
|
||||||
|
description: The field to sort items by.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: discount_condition_id
|
||||||
|
description: The discount condition id on which to filter the product types.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: value
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type values to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: id
|
||||||
|
style: form
|
||||||
|
explode: false
|
||||||
|
description: The type IDs to search for
|
||||||
|
schema:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: q
|
||||||
|
description: A query string to search values for
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: query
|
||||||
|
name: created_at
|
||||||
|
description: Date comparison for when resulting product types were created.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
- in: query
|
||||||
|
name: updated_at
|
||||||
|
description: Date comparison for when resulting product types were updated.
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
lt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than this date
|
||||||
|
format: date
|
||||||
|
gt:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than this date
|
||||||
|
format: date
|
||||||
|
lte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates less than or equal to this date
|
||||||
|
format: date
|
||||||
|
gte:
|
||||||
|
type: string
|
||||||
|
description: filter by dates greater than or equal to this date
|
||||||
|
format: date
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/product-types/getundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/product-types/getundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- Product Type
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
product_types:
|
||||||
|
$ref: ../components/schemas/product_type.yaml
|
||||||
|
count:
|
||||||
|
type: integer
|
||||||
|
description: The total number of items available
|
||||||
|
offset:
|
||||||
|
type: integer
|
||||||
|
description: The number of items skipped before these items
|
||||||
|
limit:
|
||||||
|
type: integer
|
||||||
|
description: The number of items per page
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
Reference in New Issue
Block a user