docs: generate API reference for 2.12.0 (#14185)

This commit is contained in:
Shahed Nasser
2025-12-02 11:56:37 +02:00
committed by GitHub
parent 21f61ec160
commit 9372a17d1f
71 changed files with 6310 additions and 19 deletions

View File

@@ -0,0 +1,19 @@
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.order.updateOrderChange(
"ordch_123",
{
carry_over_promotions: true
}
)
.then(({ order_change }) => {
console.log(order_change)
})

View File

@@ -1,2 +1,6 @@
curl -X POST '{backend_url}/admin/draft-orders/{id}' \
-H 'Authorization: Bearer {jwt_token}'
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "test@test.com"
}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/admin/order-changes/{id}' \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"carry_over_promotions": true
}'