chore(docs): Updated API Reference (automated) (#12268)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com> Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
37 files changed
+386
-150
No files matched your search
-3
@@ -8,9 +8,6 @@ export const sdk = new Medusa({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
To convert a draft order to an order:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
sdk.admin.draftOrder.convertToOrder("order_123")
|
sdk.admin.draftOrder.convertToOrder("order_123")
|
||||||
.then(({ order }) => {
|
.then(({ order }) => {
|
||||||
console.log(order)
|
console.log(order)
|
||||||
|
|||||||
+17
@@ -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.draftOrder.removeShippingMethod(
|
||||||
|
"order_123",
|
||||||
|
"shipping_method_123"
|
||||||
|
)
|
||||||
|
.then(({ draft_order_preview }) => {
|
||||||
|
console.log(draft_order_preview)
|
||||||
|
})
|
||||||
+2
@@ -0,0 +1,2 @@
|
|||||||
|
curl -X DELETE '{backend_url}/admin/draft-orders/{id}/edit/shipping-methods/method/{method_id}' \
|
||||||
|
-H 'Authorization: Bearer {access_token}'
|
||||||
+22
-10
@@ -27,17 +27,20 @@ properties:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's invokation function.
|
description: The state of the step's invokation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The invokation step's state.
|
description: The invokation step's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -51,9 +54,6 @@ properties:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
definition:
|
definition:
|
||||||
type: object
|
type: object
|
||||||
description: The step's definition details.
|
description: The step's definition details.
|
||||||
@@ -75,8 +75,20 @@ properties:
|
|||||||
type: boolean
|
type: boolean
|
||||||
title: continueOnPermanentFailure
|
title: continueOnPermanentFailure
|
||||||
description: >-
|
description: >-
|
||||||
Whether the step continues executing even if its status is
|
Whether the workflow should continue executing even if its
|
||||||
changed to failed.
|
status is changed to failed.
|
||||||
|
skipOnPermanentFailure:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: >-
|
||||||
|
The ID of the step to skip to in case of a permanent
|
||||||
|
failure.
|
||||||
|
- type: boolean
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: >-
|
||||||
|
Whether the workflow should skip subsequent steps in case of
|
||||||
|
a permanent failure.
|
||||||
maxRetries:
|
maxRetries:
|
||||||
type: number
|
type: number
|
||||||
title: maxRetries
|
title: maxRetries
|
||||||
@@ -115,17 +127,20 @@ properties:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's compensation function.
|
description: The state of the step's compensation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The compensation function's state.
|
description: The compensation function's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -139,9 +154,6 @@ properties:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
depth:
|
depth:
|
||||||
type: number
|
type: number
|
||||||
title: depth
|
title: depth
|
||||||
|
|||||||
@@ -14711,9 +14711,6 @@ paths:
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
To convert a draft order to an order:
|
|
||||||
|
|
||||||
```ts
|
|
||||||
sdk.admin.draftOrder.convertToOrder("order_123")
|
sdk.admin.draftOrder.convertToOrder("order_123")
|
||||||
.then(({ order }) => {
|
.then(({ order }) => {
|
||||||
console.log(order)
|
console.log(order)
|
||||||
@@ -15553,6 +15550,73 @@ paths:
|
|||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
x-workflow: updateDraftOrderShippingMethodWorkflow
|
x-workflow: updateDraftOrderShippingMethodWorkflow
|
||||||
|
delete:
|
||||||
|
operationId: DeleteDraftOrdersIdEditShippingMethodsMethodMethod_id
|
||||||
|
summary: Remove Shipping Method from Draft Order
|
||||||
|
x-sidebar-summary: Remove Shipping Method
|
||||||
|
description: Remove the shipping method in a draft order that is being edited.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: The draft order's ID.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: method_id
|
||||||
|
in: path
|
||||||
|
description: The shipping method's ID.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
- jwt_token: []
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS SDK
|
||||||
|
source: |-
|
||||||
|
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.draftOrder.removeShippingMethod(
|
||||||
|
"order_123",
|
||||||
|
"shipping_method_123"
|
||||||
|
)
|
||||||
|
.then(({ draft_order_preview }) => {
|
||||||
|
console.log(draft_order_preview)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: |-
|
||||||
|
curl -X DELETE '{backend_url}/admin/draft-orders/{id}/edit/shipping-methods/method/{method_id}' \
|
||||||
|
-H 'Authorization: Bearer {access_token}'
|
||||||
|
tags:
|
||||||
|
- Draft Orders
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
x-workflow: removeDraftOrderShippingMethodWorkflow
|
||||||
/admin/draft-orders/{id}/edit/shipping-methods/{action_id}:
|
/admin/draft-orders/{id}/edit/shipping-methods/{action_id}:
|
||||||
post:
|
post:
|
||||||
operationId: PostDraftOrdersIdEditShippingMethodsAction_id
|
operationId: PostDraftOrdersIdEditShippingMethodsAction_id
|
||||||
@@ -15634,8 +15698,8 @@ paths:
|
|||||||
x-workflow: updateDraftOrderActionShippingMethodWorkflow
|
x-workflow: updateDraftOrderActionShippingMethodWorkflow
|
||||||
delete:
|
delete:
|
||||||
operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
||||||
summary: Remove Shipping Method from Draft Order
|
summary: Remove New Shipping Method from Draft Order
|
||||||
x-sidebar-summary: Remove Shipping Method
|
x-sidebar-summary: Remove New Shipping Method
|
||||||
description: |
|
description: |
|
||||||
Remove the shipping method in a draft order using the `ID` of the method's `SHIPPING_ADD` action.
|
Remove the shipping method in a draft order using the `ID` of the method's `SHIPPING_ADD` action.
|
||||||
|
|
||||||
@@ -63142,17 +63206,20 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's invokation function.
|
description: The state of the step's invokation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The invokation step's state.
|
description: The invokation step's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -63166,9 +63233,6 @@ components:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
definition:
|
definition:
|
||||||
type: object
|
type: object
|
||||||
description: The step's definition details.
|
description: The step's definition details.
|
||||||
@@ -63191,7 +63255,11 @@ components:
|
|||||||
title: continueOnPermanentFailure
|
title: continueOnPermanentFailure
|
||||||
description: Whether the workflow should continue executing even if its status is changed to failed.
|
description: Whether the workflow should continue executing even if its status is changed to failed.
|
||||||
skipOnPermanentFailure:
|
skipOnPermanentFailure:
|
||||||
type: boolean
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: The ID of the step to skip to in case of a permanent failure.
|
||||||
|
- type: boolean
|
||||||
title: skipOnPermanentFailure
|
title: skipOnPermanentFailure
|
||||||
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
||||||
maxRetries:
|
maxRetries:
|
||||||
@@ -63223,17 +63291,20 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's compensation function.
|
description: The state of the step's compensation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The compensation function's state.
|
description: The compensation function's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -63247,9 +63318,6 @@ components:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
depth:
|
depth:
|
||||||
type: number
|
type: number
|
||||||
title: depth
|
title: depth
|
||||||
|
|||||||
+52
@@ -55,3 +55,55 @@ post:
|
|||||||
'500':
|
'500':
|
||||||
$ref: ../components/responses/500_error.yaml
|
$ref: ../components/responses/500_error.yaml
|
||||||
x-workflow: updateDraftOrderShippingMethodWorkflow
|
x-workflow: updateDraftOrderShippingMethodWorkflow
|
||||||
|
delete:
|
||||||
|
operationId: DeleteDraftOrdersIdEditShippingMethodsMethodMethod_id
|
||||||
|
summary: Remove Shipping Method from Draft Order
|
||||||
|
x-sidebar-summary: Remove Shipping Method
|
||||||
|
description: Remove the shipping method in a draft order that is being edited.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
description: The draft order's ID.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- name: method_id
|
||||||
|
in: path
|
||||||
|
description: The shipping method's ID.
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
- jwt_token: []
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS SDK
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/JavaScript/admin_draft-orders_{id}_edit_shipping-methods_method_{method_id}/delete.js
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/Shell/admin_draft-orders_{id}_edit_shipping-methods_method_{method_id}/delete.sh
|
||||||
|
tags:
|
||||||
|
- Draft Orders
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
x-workflow: removeDraftOrderShippingMethodWorkflow
|
||||||
+2
-2
@@ -67,8 +67,8 @@ post:
|
|||||||
x-workflow: updateDraftOrderActionShippingMethodWorkflow
|
x-workflow: updateDraftOrderActionShippingMethodWorkflow
|
||||||
delete:
|
delete:
|
||||||
operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
||||||
summary: Remove Shipping Method from Draft Order
|
summary: Remove New Shipping Method from Draft Order
|
||||||
x-sidebar-summary: Remove Shipping Method
|
x-sidebar-summary: Remove New Shipping Method
|
||||||
description: >
|
description: >
|
||||||
Remove the shipping method in a draft order using the `ID` of the method's
|
Remove the shipping method in a draft order using the `ID` of the method's
|
||||||
`SHIPPING_ADD` action.
|
`SHIPPING_ADD` action.
|
||||||
|
|||||||
+22
-10
@@ -27,17 +27,20 @@ properties:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's invokation function.
|
description: The state of the step's invokation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The invokation step's state.
|
description: The invokation step's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -51,9 +54,6 @@ properties:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
definition:
|
definition:
|
||||||
type: object
|
type: object
|
||||||
description: The step's definition details.
|
description: The step's definition details.
|
||||||
@@ -75,8 +75,20 @@ properties:
|
|||||||
type: boolean
|
type: boolean
|
||||||
title: continueOnPermanentFailure
|
title: continueOnPermanentFailure
|
||||||
description: >-
|
description: >-
|
||||||
Whether the step continues executing even if its status is
|
Whether the workflow should continue executing even if its
|
||||||
changed to failed.
|
status is changed to failed.
|
||||||
|
skipOnPermanentFailure:
|
||||||
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: >-
|
||||||
|
The ID of the step to skip to in case of a permanent
|
||||||
|
failure.
|
||||||
|
- type: boolean
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: >-
|
||||||
|
Whether the workflow should skip subsequent steps in case of
|
||||||
|
a permanent failure.
|
||||||
maxRetries:
|
maxRetries:
|
||||||
type: number
|
type: number
|
||||||
title: maxRetries
|
title: maxRetries
|
||||||
@@ -115,17 +127,20 @@ properties:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's compensation function.
|
description: The state of the step's compensation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The compensation function's state.
|
description: The compensation function's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -139,9 +154,6 @@ properties:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
depth:
|
depth:
|
||||||
type: number
|
type: number
|
||||||
title: depth
|
title: depth
|
||||||
|
|||||||
@@ -21288,17 +21288,20 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's invokation function.
|
description: The state of the step's invokation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The invokation step's state.
|
description: The invokation step's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -21312,9 +21315,6 @@ components:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
definition:
|
definition:
|
||||||
type: object
|
type: object
|
||||||
description: The step's definition details.
|
description: The step's definition details.
|
||||||
@@ -21337,7 +21337,11 @@ components:
|
|||||||
title: continueOnPermanentFailure
|
title: continueOnPermanentFailure
|
||||||
description: Whether the workflow should continue executing even if its status is changed to failed.
|
description: Whether the workflow should continue executing even if its status is changed to failed.
|
||||||
skipOnPermanentFailure:
|
skipOnPermanentFailure:
|
||||||
type: boolean
|
oneOf:
|
||||||
|
- type: string
|
||||||
|
title: skipOnPermanentFailure
|
||||||
|
description: The ID of the step to skip to in case of a permanent failure.
|
||||||
|
- type: boolean
|
||||||
title: skipOnPermanentFailure
|
title: skipOnPermanentFailure
|
||||||
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
||||||
maxRetries:
|
maxRetries:
|
||||||
@@ -21369,17 +21373,20 @@ components:
|
|||||||
type: object
|
type: object
|
||||||
description: The state of the step's compensation function.
|
description: The state of the step's compensation function.
|
||||||
x-schemaName: WorkflowExecutionFn
|
x-schemaName: WorkflowExecutionFn
|
||||||
|
required:
|
||||||
|
- state
|
||||||
|
- status
|
||||||
properties:
|
properties:
|
||||||
state:
|
state:
|
||||||
type: string
|
type: string
|
||||||
description: The compensation function's state.
|
description: The compensation function's state.
|
||||||
enum:
|
enum:
|
||||||
|
- failed
|
||||||
- not_started
|
- not_started
|
||||||
- invoking
|
- invoking
|
||||||
- compensating
|
- compensating
|
||||||
- done
|
- done
|
||||||
- reverted
|
- reverted
|
||||||
- failed
|
|
||||||
- dormant
|
- dormant
|
||||||
- skipped
|
- skipped
|
||||||
- skipped_failure
|
- skipped_failure
|
||||||
@@ -21393,9 +21400,6 @@ components:
|
|||||||
- waiting_response
|
- waiting_response
|
||||||
- temp_failure
|
- temp_failure
|
||||||
- permanent_failure
|
- permanent_failure
|
||||||
required:
|
|
||||||
- state
|
|
||||||
- status
|
|
||||||
depth:
|
depth:
|
||||||
type: number
|
type: number
|
||||||
title: depth
|
title: depth
|
||||||
|
|||||||
+4
-4
@@ -20,15 +20,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
/**
|
/**
|
||||||
* @oas [delete] /admin/draft-orders/{id}/edit/shipping-methods/{action_id}
|
* @oas [delete] /admin/draft-orders/{id}/edit/shipping-methods/{action_id}
|
||||||
* operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
* operationId: DeleteDraftOrdersIdEditShippingMethodsAction_id
|
||||||
* summary: Remove Shipping Method from Draft Order
|
* summary: Remove New Shipping Method from Draft Order
|
||||||
* x-sidebar-summary: Remove Shipping Method
|
* x-sidebar-summary: Remove New Shipping Method
|
||||||
* description: |
|
* description: |
|
||||||
* Remove the shipping method in a draft order using the `ID` of the method's `SHIPPING_ADD` action.
|
* Remove the shipping method in a draft order using the `ID` of the method's `SHIPPING_ADD` action.
|
||||||
*
|
*
|
||||||
|
|||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
/**
|
||||||
|
* @oas [delete] /admin/draft-orders/{id}/edit/shipping-methods/method/{method_id}
|
||||||
|
* operationId: DeleteDraftOrdersIdEditShippingMethodsMethodMethod_id
|
||||||
|
* summary: Remove Shipping Method from Draft Order
|
||||||
|
* x-sidebar-summary: Remove Shipping Method
|
||||||
|
* description: Remove the shipping method in a draft order that is being edited.
|
||||||
|
* x-authenticated: true
|
||||||
|
* parameters:
|
||||||
|
* - name: id
|
||||||
|
* in: path
|
||||||
|
* description: The draft order's ID.
|
||||||
|
* required: true
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* - name: method_id
|
||||||
|
* in: path
|
||||||
|
* description: The shipping method's ID.
|
||||||
|
* required: true
|
||||||
|
* schema:
|
||||||
|
* type: string
|
||||||
|
* security:
|
||||||
|
* - api_token: []
|
||||||
|
* - cookie_auth: []
|
||||||
|
* - jwt_token: []
|
||||||
|
* x-codeSamples:
|
||||||
|
* - lang: JavaScript
|
||||||
|
* label: JS SDK
|
||||||
|
* source: |-
|
||||||
|
* 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.draftOrder.removeShippingMethod(
|
||||||
|
* "order_123",
|
||||||
|
* "shipping_method_123"
|
||||||
|
* )
|
||||||
|
* .then(({ draft_order_preview }) => {
|
||||||
|
* console.log(draft_order_preview)
|
||||||
|
* })
|
||||||
|
* - lang: Shell
|
||||||
|
* label: cURL
|
||||||
|
* source: |-
|
||||||
|
* curl -X DELETE '{backend_url}/admin/draft-orders/{id}/edit/shipping-methods/method/{method_id}' \
|
||||||
|
* -H 'Authorization: Bearer {access_token}'
|
||||||
|
* tags:
|
||||||
|
* - Draft Orders
|
||||||
|
* responses:
|
||||||
|
* "200":
|
||||||
|
* description: OK
|
||||||
|
* "400":
|
||||||
|
* $ref: "#/components/responses/400_error"
|
||||||
|
* "401":
|
||||||
|
* $ref: "#/components/responses/unauthorized"
|
||||||
|
* "404":
|
||||||
|
* $ref: "#/components/responses/not_found_error"
|
||||||
|
* "409":
|
||||||
|
* $ref: "#/components/responses/invalid_state_error"
|
||||||
|
* "422":
|
||||||
|
* $ref: "#/components/responses/invalid_request_error"
|
||||||
|
* "500":
|
||||||
|
* $ref: "#/components/responses/500_error"
|
||||||
|
* x-workflow: removeDraftOrderShippingMethodWorkflow
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
@@ -8,15 +8,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* - name: offset
|
* - name: offset
|
||||||
|
|||||||
@@ -14,15 +14,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -14,15 +14,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* - name: offset
|
* - name: offset
|
||||||
|
|||||||
+4
-4
@@ -20,15 +20,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* - name: offset
|
* - name: offset
|
||||||
|
|||||||
+4
-4
@@ -14,15 +14,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* - name: include_ancestors_tree
|
* - name: include_ancestors_tree
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -14,15 +14,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -15,15 +15,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -21,15 +21,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@
|
|||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. If a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. Without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. Without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
-3
@@ -44,9 +44,6 @@
|
|||||||
* },
|
* },
|
||||||
* })
|
* })
|
||||||
*
|
*
|
||||||
* To convert a draft order to an order:
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* sdk.admin.draftOrder.convertToOrder("order_123")
|
* sdk.admin.draftOrder.convertToOrder("order_123")
|
||||||
* .then(({ order }) => {
|
* .then(({ order }) => {
|
||||||
* console.log(order)
|
* console.log(order)
|
||||||
|
|||||||
@@ -8,15 +8,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -14,15 +14,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -15,15 +15,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -26,15 +26,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* - name: offset
|
* - name: offset
|
||||||
|
|||||||
+4
-4
@@ -23,15 +23,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* requestBody:
|
* requestBody:
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -20,15 +20,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
+4
-4
@@ -26,15 +26,15 @@
|
|||||||
* - name: fields
|
* - name: fields
|
||||||
* in: query
|
* in: query
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* required: false
|
* required: false
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* title: fields
|
* title: fields
|
||||||
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
* description: Comma-separated fields that should be included in the returned data. if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default
|
||||||
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in
|
* fields. without prefix it will replace the entire default fields. This API route restricts the fields that can be selected. Learn how to override the retrievable fields in the [Retrieve Custom
|
||||||
* the [Retrieve Custom Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
|
||||||
* externalDocs:
|
* externalDocs:
|
||||||
* url: "#select-fields-and-relations"
|
* url: "#select-fields-and-relations"
|
||||||
* security:
|
* security:
|
||||||
|
|||||||
@@ -27,17 +27,20 @@
|
|||||||
* type: object
|
* type: object
|
||||||
* description: The state of the step's invokation function.
|
* description: The state of the step's invokation function.
|
||||||
* x-schemaName: WorkflowExecutionFn
|
* x-schemaName: WorkflowExecutionFn
|
||||||
|
* required:
|
||||||
|
* - state
|
||||||
|
* - status
|
||||||
* properties:
|
* properties:
|
||||||
* state:
|
* state:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The invokation step's state.
|
* description: The invokation step's state.
|
||||||
* enum:
|
* enum:
|
||||||
|
* - failed
|
||||||
* - not_started
|
* - not_started
|
||||||
* - invoking
|
* - invoking
|
||||||
* - compensating
|
* - compensating
|
||||||
* - done
|
* - done
|
||||||
* - reverted
|
* - reverted
|
||||||
* - failed
|
|
||||||
* - dormant
|
* - dormant
|
||||||
* - skipped
|
* - skipped
|
||||||
* - skipped_failure
|
* - skipped_failure
|
||||||
@@ -51,9 +54,6 @@
|
|||||||
* - waiting_response
|
* - waiting_response
|
||||||
* - temp_failure
|
* - temp_failure
|
||||||
* - permanent_failure
|
* - permanent_failure
|
||||||
* required:
|
|
||||||
* - state
|
|
||||||
* - status
|
|
||||||
* definition:
|
* definition:
|
||||||
* type: object
|
* type: object
|
||||||
* description: The step's definition details.
|
* description: The step's definition details.
|
||||||
@@ -76,7 +76,11 @@
|
|||||||
* title: continueOnPermanentFailure
|
* title: continueOnPermanentFailure
|
||||||
* description: Whether the workflow should continue executing even if its status is changed to failed.
|
* description: Whether the workflow should continue executing even if its status is changed to failed.
|
||||||
* skipOnPermanentFailure:
|
* skipOnPermanentFailure:
|
||||||
* type: boolean
|
* oneOf:
|
||||||
|
* - type: string
|
||||||
|
* title: skipOnPermanentFailure
|
||||||
|
* description: The ID of the step to skip to in case of a permanent failure.
|
||||||
|
* - type: boolean
|
||||||
* title: skipOnPermanentFailure
|
* title: skipOnPermanentFailure
|
||||||
* description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
* description: Whether the workflow should skip subsequent steps in case of a permanent failure.
|
||||||
* maxRetries:
|
* maxRetries:
|
||||||
@@ -108,17 +112,20 @@
|
|||||||
* type: object
|
* type: object
|
||||||
* description: The state of the step's compensation function.
|
* description: The state of the step's compensation function.
|
||||||
* x-schemaName: WorkflowExecutionFn
|
* x-schemaName: WorkflowExecutionFn
|
||||||
|
* required:
|
||||||
|
* - state
|
||||||
|
* - status
|
||||||
* properties:
|
* properties:
|
||||||
* state:
|
* state:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The compensation function's state.
|
* description: The compensation function's state.
|
||||||
* enum:
|
* enum:
|
||||||
|
* - failed
|
||||||
* - not_started
|
* - not_started
|
||||||
* - invoking
|
* - invoking
|
||||||
* - compensating
|
* - compensating
|
||||||
* - done
|
* - done
|
||||||
* - reverted
|
* - reverted
|
||||||
* - failed
|
|
||||||
* - dormant
|
* - dormant
|
||||||
* - skipped
|
* - skipped
|
||||||
* - skipped_failure
|
* - skipped_failure
|
||||||
@@ -132,9 +139,6 @@
|
|||||||
* - waiting_response
|
* - waiting_response
|
||||||
* - temp_failure
|
* - temp_failure
|
||||||
* - permanent_failure
|
* - permanent_failure
|
||||||
* required:
|
|
||||||
* - state
|
|
||||||
* - status
|
|
||||||
* depth:
|
* depth:
|
||||||
* type: number
|
* type: number
|
||||||
* title: depth
|
* title: depth
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
"js-sdk": "sdk.admin.draftOrder.update(\"order_123\", {\n email: \"test@test.com\",\n})\n.then(({ draft_order }) => {\n console.log(draft_order)\n})"
|
"js-sdk": "sdk.admin.draftOrder.update(\"order_123\", {\n email: \"test@test.com\",\n})\n.then(({ draft_order }) => {\n console.log(draft_order)\n})"
|
||||||
},
|
},
|
||||||
"POST /admin/draft-orders/{id}/convert-to-order": {
|
"POST /admin/draft-orders/{id}/convert-to-order": {
|
||||||
"js-sdk": "To convert a draft order to an order:\n\n```ts\nsdk.admin.draftOrder.convertToOrder(\"order_123\")\n.then(({ order }) => {\n console.log(order)\n})"
|
"js-sdk": "sdk.admin.draftOrder.convertToOrder(\"order_123\")\n.then(({ order }) => {\n console.log(order)\n})"
|
||||||
},
|
},
|
||||||
"POST /admin/draft-orders/{id}/edit/items": {
|
"POST /admin/draft-orders/{id}/edit/items": {
|
||||||
"js-sdk": "sdk.admin.draftOrder.addItems(\"order_123\", {\n items: [\n {\n variant_id: \"variant_123\",\n quantity: 1,\n },\n ],\n})\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})"
|
"js-sdk": "sdk.admin.draftOrder.addItems(\"order_123\", {\n items: [\n {\n variant_id: \"variant_123\",\n quantity: 1,\n },\n ],\n})\n.then(({ draft_order_preview }) => {\n console.log(draft_order_preview)\n})"
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
"js-sdk": "sdk.admin.inventoryItem.batchInventoryItemsLocationLevels({\n create: [{\n inventory_item_id: \"iitem_123\",\n location_id: \"sloc_123\",\n stocked_quantity: 10\n }],\n delete: [\"ilvl_123\"]\n})\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})"
|
"js-sdk": "sdk.admin.inventoryItem.batchInventoryItemsLocationLevels({\n create: [{\n inventory_item_id: \"iitem_123\",\n location_id: \"sloc_123\",\n stocked_quantity: 10\n }],\n delete: [\"ilvl_123\"]\n})\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})"
|
||||||
},
|
},
|
||||||
"POST /admin/invites/accept": {
|
"POST /admin/invites/accept": {
|
||||||
"js-sdk": "const token = await sdk.auth.register(\"user\", \"emailpass\", {\n email: \"user@gmail.com\",\n password: \"supersecret\"\n})\n\nsdk.admin.invite.accept(\n {\n email: \"user@gmail.com\",\n first_name: \"John\",\n last_name: \"Smith\",\n invite_token: \"12345...\"\n },\n {\n Authorization: `Bearer ${token}`\n }\n)\n.then(({ user }) => {\n console.log(user)\n})"
|
"js-sdk": "await sdk.auth.register(\"user\", \"emailpass\", {\n email: \"user@gmail.com\",\n password: \"supersecret\"\n})\n\n// all subsequent requests will use the token in the header\nconst { user } = await sdk.admin.invite.accept(\n {\n email: \"user@gmail.com\",\n first_name: \"John\",\n last_name: \"Smith\",\n invite_token: \"12345...\"\n },\n)"
|
||||||
},
|
},
|
||||||
"POST /admin/invites": {
|
"POST /admin/invites": {
|
||||||
"js-sdk": "sdk.admin.invite.create({\n email: \"user@gmail.com\",\n})\n.then(({ invite }) => {\n console.log(invite)\n})"
|
"js-sdk": "sdk.admin.invite.create({\n email: \"user@gmail.com\",\n})\n.then(({ invite }) => {\n console.log(invite)\n})"
|
||||||
|
|||||||
Reference in new issue
Block a user