chore(docs): Updated API Reference (v2) (#8361)

Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
This commit is contained in:
github-actions[bot]
2024-07-31 07:33:02 +00:00
committed by GitHub
parent aac906f058
commit 749e86b5d8
22 changed files with 881 additions and 42 deletions
@@ -0,0 +1,94 @@
/**
* @oas [delete] /admin/claims/{id}/request
* operationId: DeleteClaimsIdRequest
* summary: Remove Requests from Claim
* description: Remove a list of requests from a claim. This doesn't delete the
* Request, only the association between the Request and the claim.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The claim's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - name: offset
* in: query
* description: The number of items to skip when retrieving a list.
* required: false
* schema:
* type: number
* title: offset
* description: The number of items to skip when retrieving a list.
* - name: limit
* in: query
* description: Limit the number of items returned in the list.
* required: false
* schema:
* type: number
* title: limit
* description: Limit the number of items returned in the list.
* - name: order
* in: query
* description: The field to sort the data by. By default, the sort order is
* ascending. To change the order to descending, prefix the field name with
* `-`.
* required: false
* schema:
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is
* ascending. To change the order to descending, prefix the field name with
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X DELETE '{backend_url}/admin/claims/{id}/request' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Claims
* 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"
*
*/
@@ -0,0 +1,98 @@
/**
* @oas [post] /admin/claims/{id}/cancel
* operationId: PostClaimsIdCancel
* summary: Add Cancels to Claim
* description: Add a list of cancels to a claim.
* x-authenticated: true
* parameters:
* - name: id
* in: path
* description: The claim's ID.
* required: true
* schema:
* type: string
* - name: expand
* in: query
* description: Comma-separated relations that should be expanded in the returned data.
* required: false
* schema:
* type: string
* title: expand
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - name: offset
* in: query
* description: The number of items to skip when retrieving a list.
* required: false
* schema:
* type: number
* title: offset
* description: The number of items to skip when retrieving a list.
* - name: limit
* in: query
* description: Limit the number of items returned in the list.
* required: false
* schema:
* type: number
* title: limit
* description: Limit the number of items returned in the list.
* - name: order
* in: query
* description: The field to sort the data by. By default, the sort order is
* ascending. To change the order to descending, prefix the field name with
* `-`.
* required: false
* schema:
* type: string
* title: order
* description: The field to sort the data by. By default, the sort order is
* ascending. To change the order to descending, prefix the field name with
* `-`.
* security:
* - api_token: []
* - cookie_auth: []
* - jwt_token: []
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostCancelClaimReqSchema"
* x-codeSamples:
* - lang: Shell
* label: cURL
* source: |-
* curl -X POST '{backend_url}/admin/claims/{id}/cancel' \
* -H 'x-medusa-access-token: {api_token}'
* tags:
* - Claims
* 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"
*
*/
@@ -21,18 +21,18 @@
* description: Comma-separated relations that should be expanded in the returned data.
* - 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.
* - name: offset
* in: query
* description: The number of items to skip when retrieving a list.
@@ -74,8 +74,6 @@
* tags:
* - Claims
* responses:
* "200":
* description: OK
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -88,6 +86,10 @@
* $ref: "#/components/responses/invalid_request_error"
* "500":
* $ref: "#/components/responses/500_error"
* requestBody:
* content:
* application/json:
* schema: {}
*
*/
@@ -3,6 +3,11 @@
* type: object
* description: SUMMARY
* x-schemaName: AdminImportProductRequest
* required:
* - file
* properties:
* file:
* $ref: "#/components/schemas/File"
*
*/
@@ -0,0 +1,13 @@
/**
* @schema AdminPostCancelClaimReqSchema
* type: object
* description: SUMMARY
* x-schemaName: AdminPostCancelClaimReqSchema
* properties:
* no_notification:
* type: boolean
* title: no_notification
* description: The claim's no notification.
*
*/
@@ -3,17 +3,11 @@
* type: object
* description: SUMMARY
* x-schemaName: AdminPostCancelReturnReqSchema
* required:
* - internal_note
* properties:
* no_notification:
* type: boolean
* title: no_notification
* description: The return's no notification.
* internal_note:
* type: string
* title: internal_note
* description: The return's internal note.
*
*/
@@ -0,0 +1,50 @@
/**
* @schema File
* type: object
* description: The product's file.
* x-schemaName: File
* required:
* - lastModified
* - name
* - webkitRelativePath
* - size
* - type
* - arrayBuffer
* - stream
* - text
* properties:
* lastModified:
* type: number
* title: lastModified
* description: The file's lastmodified.
* name:
* type: string
* title: name
* description: The file's name.
* webkitRelativePath:
* type: string
* title: webkitRelativePath
* description: The file's webkitrelativepath.
* size:
* type: number
* title: size
* description: The file's size.
* type:
* type: string
* title: type
* description: The file's type.
* arrayBuffer:
* type: object
* description: The file's arraybuffer.
* slice:
* type: object
* description: The file's slice.
* stream:
* type: object
* description: The file's stream.
* text:
* type: object
* description: The file's text.
*
*/