chore(docs): Generated API Reference (#3021)

Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-01-13 09:27:24 +02:00
committed by GitHub
parent 2c2c70d88c
commit 853f8efdf3
12 changed files with 39 additions and 185 deletions

View File

@@ -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);
});

View File

@@ -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);
});

View File

@@ -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);
});

View File

@@ -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);
});