chore(docs): Updated API Reference (automated) (#10258)

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:
github-actions[bot]
2024-11-25 14:33:22 +00:00
committed by GitHub
co-authored by Oli Juhl Shahed Nasser
parent 3ab056e572
commit 7865909891
73 changed files with 2943 additions and 275 deletions
@@ -357,7 +357,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: createOrdersWorkflow
* x-workflow: createOrderWorkflow
*
*/
@@ -0,0 +1,72 @@
/**
* @oas [post] /admin/orders/{id}/transfer
* operationId: PostOrdersIdTransfer
* x-sidebar-summary: Request Transfer
* summary: Request Order Transfer
* description: Request an order to be transfered to another customer. The transfer is confirmed by sending a request to the [Accept Order Transfer](https://docs.medusajs.com/api/store#orders_postordersidtransferaccept) Store API route.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The order's ID.
* required: true
* schema:
* type: string
* - name: fields
* 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 fields.
* without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
* 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
* fields. Without prefix it will replace the entire default fields.
* externalDocs:
* url: "#select-fields-and-relations"
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminTransferOrder"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/orders/{id}/transfer' \
* -H 'Authorization: Bearer {access_token}' \
* -H 'Content-Type: application/json' \
* --data-raw '{
* "customer_id": "cus_123"
* }'
* tags:
* - Orders
* responses:
* "200":
* description: OK
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminOrderResponse"
* "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: requestOrderTransferWorkflow
*
*/
@@ -1,8 +1,9 @@
/**
* @oas [post] /admin/orders/{id}
* operationId: PostOrdersId
* summary: Update an Order
* description: Update an order's details.
* @oas [post] /admin/orders/{id}/transfer/cancel
* operationId: PostOrdersIdTransferCancel
* summary: Cancel Transfer Request
* x-sidebar-summary: Cancel Transfer
* description: Cancel a request to transfer an order to another customer.
* x-authenticated: true
* parameters:
* - name: id
@@ -13,14 +14,16 @@
* type: string
* - name: fields
* 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
* fields. without prefix it will replace the entire default 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 fields.
* without prefix it will replace the entire default fields.
* required: false
* schema:
* type: string
* 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
* fields. without prefix it will replace the entire default 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
* fields. Without prefix it will replace the entire default fields.
* externalDocs:
* url: "#select-fields-and-relations"
* security:
@@ -31,7 +34,7 @@
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/orders/{id}' \
* curl -X POST '{backend_url}/admin/orders/{id}/transfer/cancel' \
* -H 'Authorization: Bearer {access_token}'
* tags:
* - Orders
@@ -54,6 +57,7 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* x-workflow: cancelOrderTransferRequestWorkflow
*
*/