docs: generate OAS for 2.11.2 (#13925)

This commit is contained in:
Shahed Nasser
2025-10-31 16:15:46 +02:00
committed by GitHub
parent 13d7d15be5
commit 604ff55a5b
403 changed files with 17473 additions and 5392 deletions

View File

@@ -0,0 +1,17 @@
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.product.batchImageVariants("prod_123", "img_123", {
add: ["variant_123", "variant_456"],
remove: ["variant_789"]
})
.then(({ added, removed }) => {
console.log(added, removed)
})

View File

@@ -0,0 +1,17 @@
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.product.batchVariantImages("prod_123", "variant_123", {
add: ["img_123", "img_456"],
remove: ["img_789"]
})
.then(({ added, removed }) => {
console.log(added, removed)
})

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/admin/index/details' \
-H 'Authorization: Bearer {access_token}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/admin/index/sync' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"strategy": "full"
}'

View File

@@ -0,0 +1,7 @@
curl -X POST '{backend_url}/admin/products/{id}/images/{image_id}/variants/batch' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"add": ["variant_123", "variant_456"],
"remove": ["variant_789"]
}'

View File

@@ -0,0 +1,7 @@
curl -X POST '{backend_url}/admin/products/{id}/variants/{variant_id}/images/batch' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"add": ["img_123", "img_456"],
"remove": ["img_789"]
}'