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

Co-authored-by: kodiakhq[bot] <kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2022-11-28 10:59:43 +02:00
committed by GitHub
parent 546577a81a
commit 3cee0bc8fc
10 changed files with 464 additions and 3 deletions

View File

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

View File

@@ -0,0 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/product-types' \
--header 'Authorization: Bearer {api_token}'