docs: generate OAS with events (#12394)

* docs: generate OAS with events

* small change
This commit is contained in:
Shahed Nasser
2025-05-07 14:57:03 +03:00
committed by GitHub
parent 262064fe96
commit a3bdb3e383
515 changed files with 3808 additions and 189 deletions

View File

@@ -9,7 +9,7 @@ export const sdk = new Medusa({
})
sdk.admin.product.createOption(
"prod_123",
"prod_123",
{
title: "Color",
values: ["Green", "Blue"]

View File

@@ -9,7 +9,7 @@ export const sdk = new Medusa({
})
sdk.admin.product.updateOption(
"prod_123",
"prod_123",
"prodopt_123",
{
title: "Color"

View File

@@ -9,7 +9,7 @@ export const sdk = new Medusa({
})
sdk.admin.product.batchVariantInventoryItems(
"prod_123",
"prod_123",
{
create: [
{

View File

@@ -9,7 +9,7 @@ export const sdk = new Medusa({
})
sdk.admin.product.updateVariant(
"prod_123",
"prod_123",
"variant_123",
{
title: "Blue Shirt",

View File

@@ -0,0 +1,16 @@
import Medusa from "@medusajs/js-sdk"
export const sdk = new Medusa({
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
debug: import.meta.env.DEV,
auth: {
type: "session",
},
})
sdk.admin.taxRegion.update("txreg_123", {
province_code: "ca",
})
.then(({ tax_region }) => {
console.log(tax_region)
})

View File

@@ -10,7 +10,7 @@ curl -X POST '{backend_url}/admin/customers/{id}/addresses' \
"address_2": "{value}",
"city": "{value}",
"country_code": "{value}",
"province": "{value}",
"province": "us-ca",
"postal_code": "{value}",
"phone": "{value}",
"metadata": {}

View File

@@ -13,7 +13,7 @@ curl -X POST '{backend_url}/admin/fulfillments' \
"address_2": "{value}",
"city": "{value}",
"country_code": "{value}",
"province": "{value}",
"province": "us-ca",
"postal_code": "{value}",
"metadata": {}
},

View File

@@ -3,7 +3,7 @@ curl -X POST '{backend_url}/admin/tax-regions' \
-H 'Content-Type: application/json' \
--data-raw '{
"country_code": "{value}",
"province_code": "{value}",
"province_code": "us-ca",
"parent_id": "{value}",
"metadata": {}
}'