docs: generate OAS for 2.11.2 (#13925)
This commit is contained in:
@@ -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)
|
||||
})
|
||||
@@ -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)
|
||||
})
|
||||
@@ -0,0 +1,2 @@
|
||||
curl '{backend_url}/admin/index/details' \
|
||||
-H 'Authorization: Bearer {access_token}'
|
||||
@@ -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"
|
||||
}'
|
||||
@@ -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"]
|
||||
}'
|
||||
@@ -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"]
|
||||
}'
|
||||
Reference in New Issue
Block a user