chore(docs): Generated API Reference (#3021)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
co-authored by
shahednasser
parent
2c2c70d88c
commit
853f8efdf3
@@ -10643,23 +10643,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AdminPostProductCategoriesReq'
|
$ref: '#/components/schemas/AdminPostProductCategoriesReq'
|
||||||
x-codeSamples:
|
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.admin.productCategories.create({
|
|
||||||
name: 'Jeans',
|
|
||||||
})
|
|
||||||
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10686,7 +10669,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
@@ -10739,21 +10722,6 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
default: 100
|
default: 100
|
||||||
x-codeSamples:
|
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.admin.productCategories.list()
|
|
||||||
|
|
||||||
.then(({ product_category, limit, offset, count }) => {
|
|
||||||
console.log(product_category.length);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10765,7 +10733,7 @@ paths:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Product Categories
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -10774,7 +10742,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
product_category:
|
product_categories:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
@@ -10813,21 +10781,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
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.admin.productCategories.delete(product_category_id)
|
|
||||||
|
|
||||||
.then(({ id, object, deleted }) => {
|
|
||||||
console.log(id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10886,21 +10839,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
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.admin.productCategories.retrieve("pcat-id")
|
|
||||||
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10912,7 +10850,7 @@ paths:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Category
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -10921,7 +10859,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
@@ -22847,6 +22785,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation
|
A product category object. Available if the relation
|
||||||
|
|||||||
@@ -10643,23 +10643,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AdminPostProductCategoriesReq'
|
$ref: '#/components/schemas/AdminPostProductCategoriesReq'
|
||||||
x-codeSamples:
|
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.admin.productCategories.create({
|
|
||||||
name: 'Jeans',
|
|
||||||
})
|
|
||||||
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10686,7 +10669,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
@@ -10739,21 +10722,6 @@ paths:
|
|||||||
type: integer
|
type: integer
|
||||||
default: 100
|
default: 100
|
||||||
x-codeSamples:
|
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.admin.productCategories.list()
|
|
||||||
|
|
||||||
.then(({ product_category, limit, offset, count }) => {
|
|
||||||
console.log(product_category.length);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10765,7 +10733,7 @@ paths:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Product Categories
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -10774,7 +10742,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
product_category:
|
product_categories:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
@@ -10813,21 +10781,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
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.admin.productCategories.delete(product_category_id)
|
|
||||||
|
|
||||||
.then(({ id, object, deleted }) => {
|
|
||||||
console.log(id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10886,21 +10839,6 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
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.admin.productCategories.retrieve("pcat-id")
|
|
||||||
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source: >
|
source: >
|
||||||
@@ -10912,7 +10850,7 @@ paths:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Category
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -10921,7 +10859,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: '#/components/schemas/ProductCategory'
|
$ref: '#/components/schemas/ProductCategory'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
@@ -22847,6 +22785,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation
|
A product category object. Available if the relation
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
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.admin.productCategories.list()
|
|
||||||
.then(({ product_category, limit, offset, count }) => {
|
|
||||||
console.log(product_category.length);
|
|
||||||
});
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
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.admin.productCategories.create({
|
|
||||||
name: 'Jeans',
|
|
||||||
})
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
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.admin.productCategories.delete(product_category_id)
|
|
||||||
.then(({ id, object, deleted }) => {
|
|
||||||
console.log(id);
|
|
||||||
});
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
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.admin.productCategories.retrieve("pcat-id")
|
|
||||||
.then(({ productCategory }) => {
|
|
||||||
console.log(productCategory.id);
|
|
||||||
});
|
|
||||||
@@ -37,6 +37,10 @@ properties:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation `parent_category` is
|
A product category object. Available if the relation `parent_category` is
|
||||||
|
|||||||
@@ -24,10 +24,6 @@ post:
|
|||||||
schema:
|
schema:
|
||||||
$ref: ../components/schemas/AdminPostProductCategoriesReq.yaml
|
$ref: ../components/schemas/AdminPostProductCategoriesReq.yaml
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
|
||||||
label: JS Client
|
|
||||||
source:
|
|
||||||
$ref: ../code_samples/JavaScript/product-categories/postundefined
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
@@ -45,7 +41,7 @@ post:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: ../components/schemas/ProductCategory.yaml
|
$ref: ../components/schemas/ProductCategory.yaml
|
||||||
'400':
|
'400':
|
||||||
$ref: ../components/responses/400_error.yaml
|
$ref: ../components/responses/400_error.yaml
|
||||||
@@ -98,10 +94,6 @@ get:
|
|||||||
type: integer
|
type: integer
|
||||||
default: 100
|
default: 100
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
|
||||||
label: JS Client
|
|
||||||
source:
|
|
||||||
$ref: ../code_samples/JavaScript/product-categories/getundefined
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
@@ -110,7 +102,7 @@ get:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Product Categories
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -119,7 +111,7 @@ get:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
product_category:
|
product_categories:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: ../components/schemas/ProductCategory.yaml
|
$ref: ../components/schemas/ProductCategory.yaml
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ delete:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
|
||||||
label: JS Client
|
|
||||||
source:
|
|
||||||
$ref: ../code_samples/JavaScript/product-categories_{id}/deleteundefined
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
@@ -68,10 +64,6 @@ get:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
|
||||||
label: JS Client
|
|
||||||
source:
|
|
||||||
$ref: ../code_samples/JavaScript/product-categories_{id}/getundefined
|
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
source:
|
source:
|
||||||
@@ -80,7 +72,7 @@ get:
|
|||||||
- api_token: []
|
- api_token: []
|
||||||
- cookie_auth: []
|
- cookie_auth: []
|
||||||
tags:
|
tags:
|
||||||
- Category
|
- Product Category
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: OK
|
description: OK
|
||||||
@@ -89,7 +81,7 @@ get:
|
|||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
productCategory:
|
product_category:
|
||||||
$ref: ../components/schemas/ProductCategory.yaml
|
$ref: ../components/schemas/ProductCategory.yaml
|
||||||
'400':
|
'400':
|
||||||
$ref: ../components/responses/400_error.yaml
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
|||||||
@@ -8224,6 +8224,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation
|
A product category object. Available if the relation
|
||||||
|
|||||||
@@ -8224,6 +8224,10 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation
|
A product category object. Available if the relation
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ properties:
|
|||||||
items:
|
items:
|
||||||
type: object
|
type: object
|
||||||
description: A product category object.
|
description: A product category object.
|
||||||
|
parent_category_id:
|
||||||
|
description: The ID of the parent category.
|
||||||
|
type: string
|
||||||
|
default: null
|
||||||
parent_category:
|
parent_category:
|
||||||
description: >-
|
description: >-
|
||||||
A product category object. Available if the relation `parent_category` is
|
A product category object. Available if the relation `parent_category` is
|
||||||
|
|||||||
Reference in New Issue
Block a user