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:
co-authored by
Oli Juhl
Shahed Nasser
parent
3ab056e572
commit
7865909891
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @oas [post] /store/carts/{id}/customer
|
||||
* operationId: PostCartsIdCustomer
|
||||
* summary: Set Cart's Customer
|
||||
* x-sidebar-summary: Set Customer
|
||||
* description: Set the customer of the cart. This is useful when you create the cart for a guest customer, then they log in with their account.
|
||||
* externalDocs:
|
||||
* url: https://docs.medusajs.com/resources/storefront-development/cart/update#set-carts-customer
|
||||
* description: "Storefront guide: How to set the cart's customer."
|
||||
* x-authenticated: false
|
||||
* parameters:
|
||||
* - name: id
|
||||
* in: path
|
||||
* description: The cart'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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/carts/{id}/customer' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Carts
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreCartResponse"
|
||||
* "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: transferCartCustomerWorkflow
|
||||
*
|
||||
*/
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @oas [post] /store/orders/{id}/transfer/accept
|
||||
* operationId: PostOrdersIdTransferAccept
|
||||
* summary: Accept Order Transfer
|
||||
* x-sidebar-summary: Accept Transfer
|
||||
* description: Accept an order to be transfered to a customer's account, which was specified when the transfer request was created. The transfer is requested previously either by the customer using the
|
||||
* [Request Order Transfer Store API route](https://docs.medusajs.com/api/store#orders_postordersidtransferrequest), or by the admin using the [Request Order Transfer Admin API
|
||||
* route](https://docs.medusajs.com/api/admin#orders_postordersidtransferrequest).
|
||||
* x-authenticated: false
|
||||
* 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"
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreAcceptOrderTransfer"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/orders/{id}/transfer/accept' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* --data-raw '{
|
||||
* "token": "{value}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Orders
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreOrderResponse"
|
||||
* "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: acceptOrderTransferWorkflow
|
||||
*
|
||||
*/
|
||||
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @oas [post] /store/orders/{id}/transfer/cancel
|
||||
* operationId: PostOrdersIdTransferCancel
|
||||
* summary: Cancel Order Transfer
|
||||
* x-sidebar-summary: Cancel Transfer
|
||||
* description: Cancel an order transfer that the logged-in customer previously requested using the [Request Order Transfer](https://docs.medusajs.com/api/store#orders_postordersidtransferrequest) 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"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/orders/{id}/transfer/cancel' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Orders
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreOrderResponse"
|
||||
* "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: cancelOrderTransferRequestWorkflow
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
*/
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @oas [post] /store/orders/{id}/transfer/decline
|
||||
* operationId: PostOrdersIdTransferDecline
|
||||
* summary: Decline Order Transfer
|
||||
* x-sidebar-summary: Decline Transfer
|
||||
* description: Decline an order transfer previously requested, typically by the admin user using the [Request Order Transfer Admin API route](https://docs.medusajs.com/api/admin#orders_postordersidtransferrequest).
|
||||
* x-authenticated: false
|
||||
* 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"
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreDeclineOrderTransferRequest"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/orders/{id}/transfer/decline' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}' \
|
||||
* -H 'Content-Type: application/json' \
|
||||
* --data-raw '{
|
||||
* "token": "{value}"
|
||||
* }'
|
||||
* tags:
|
||||
* - Orders
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreOrderResponse"
|
||||
* "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: declineOrderTransferRequestWorkflow
|
||||
*
|
||||
*/
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
/**
|
||||
* @oas [post] /store/orders/{id}/transfer/request
|
||||
* operationId: PostOrdersIdTransferRequest
|
||||
* summary: Request Order Transfer
|
||||
* x-sidebar-summery: Request Transfer
|
||||
* description: Request an order to be transfered to the logged-in customer's account. The transfer is confirmed using the [Accept Order
|
||||
* Transfer](https://docs.medusajs.com/api/store#orders_postordersidtransferaccept) 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"
|
||||
* requestBody:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreRequestOrderTransfer"
|
||||
* x-codeSamples:
|
||||
* - lang: Shell
|
||||
* label: cURL
|
||||
* source: |-
|
||||
* curl -X POST '{backend_url}/store/orders/{id}/transfer/request' \
|
||||
* -H 'x-publishable-api-key: {your_publishable_api_key}'
|
||||
* tags:
|
||||
* - Orders
|
||||
* responses:
|
||||
* "200":
|
||||
* description: OK
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* $ref: "#/components/schemas/StoreOrderResponse"
|
||||
* "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: getOrderDetailWorkflow
|
||||
* security:
|
||||
* - cookie_auth: []
|
||||
* - jwt_token: []
|
||||
*
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user