Skip to content

Commit 9372a17

Browse files
authored
docs: generate API reference for 2.12.0 (#14185)
1 parent 21f61ec commit 9372a17

File tree

71 files changed

+6620
-329
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+6620
-329
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.order.updateOrderChange(
12+
"ordch_123",
13+
{
14+
carry_over_promotions: true
15+
}
16+
)
17+
.then(({ order_change }) => {
18+
console.log(order_change)
19+
})
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
curl -X POST '{backend_url}/admin/draft-orders/{id}' \
2-
-H 'Authorization: Bearer {jwt_token}'
2+
-H 'Authorization: Bearer {jwt_token}' \
3+
-H 'Content-Type: application/json' \
4+
--data-raw '{
5+
"email": "[email protected]"
6+
}'
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
curl -X POST '{backend_url}/admin/order-changes/{id}' \
2+
-H 'Authorization: Bearer {access_token}' \
3+
-H 'Content-Type: application/json' \
4+
--data-raw '{
5+
"carry_over_promotions": true
6+
}'

www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrder.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,3 +272,10 @@ properties:
272272
type: number
273273
title: shipping_discount_total
274274
description: The total discount amount applied on the draft order's shipping.
275+
custom_display_id:
276+
type: string
277+
title: custom_display_id
278+
description: The custom display ID of the draft order.
279+
externalDocs:
280+
url: >-
281+
https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id

www/apps/api-reference/specs/admin/components/schemas/AdminDraftOrderPreview.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,3 +677,10 @@ properties:
677677
type: number
678678
title: shipping_discount_total
679679
description: The total discount amount applied on the draft order's shipping.
680+
custom_display_id:
681+
type: string
682+
title: custom_display_id
683+
description: The custom display ID of the draft order.
684+
externalDocs:
685+
url: >-
686+
https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id

www/apps/api-reference/specs/admin/components/schemas/AdminOrder.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,3 +265,10 @@ properties:
265265
type: number
266266
title: shipping_discount_total
267267
description: The total discount amount applied on the order's shipping.
268+
custom_display_id:
269+
type: string
270+
title: custom_display_id
271+
description: The custom display ID of the order.
272+
externalDocs:
273+
url: >-
274+
https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id

www/apps/api-reference/specs/admin/components/schemas/AdminOrderChange.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,9 @@ properties:
139139
format: date-time
140140
title: updated_at
141141
description: The date the order change was updated.
142+
carry_over_promotions:
143+
type: boolean
144+
title: carry_over_promotions
145+
description: >-
146+
Whether promotions from the original order should be carried over to the
147+
order change (specifically, exchanges).
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
type: object
2+
description: The details of the order change.
3+
x-schemaName: AdminOrderChangeResponse
4+
required:
5+
- order_change
6+
properties:
7+
order_change:
8+
$ref: ./AdminOrderChange.yaml

www/apps/api-reference/specs/admin/components/schemas/AdminOrderPreview.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,3 +679,10 @@ properties:
679679
type: number
680680
title: shipping_discount_total
681681
description: The total discount amount applied on the order's shipping.
682+
custom_display_id:
683+
type: string
684+
title: custom_display_id
685+
description: The custom display ID of the order.
686+
externalDocs:
687+
url: >-
688+
https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id

www/apps/api-reference/specs/admin/components/schemas/AdminProductVariant.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ required:
1111
- ean
1212
- upc
1313
- thumbnail
14+
- images
1415
- allow_backorder
1516
- manage_inventory
1617
- hs_code
@@ -149,7 +150,7 @@ properties:
149150
type: array
150151
description: The variant's images.
151152
items:
152-
$ref: ./AdminProductImage.yaml
153+
$ref: ./BaseProductImage.yaml
153154
thumbnail:
154155
type: string
155156
title: thumbnail

0 commit comments

Comments
 (0)