docs: fixes to API and JS SDK references (#13795)

This commit is contained in:
Shahed Nasser
2025-10-21 13:32:25 +03:00
committed by GitHub
parent 3d0f4086b4
commit c6e58e5144
15 changed files with 7188 additions and 7423 deletions

View File

@@ -47,44 +47,6 @@
* description: Whether to retrieve a list of child categories. If you enable this, add to the `fields` query parameter `category_children` to set the children of a category in this field. You can either
* pass `*category_children` to retreieve the fields of all child categories, or select specific fields to make the response size smaller. For example,
* `fields=category_children.id,category_children.name`.
* - 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.
* externalDocs:
* url: "#pagination"
* - 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.
* externalDocs:
* url: "#pagination"
* - 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 `-`.
* externalDocs:
* url: "#pagination"
* - name: with_deleted
* in: query
* description: Whether to include deleted records in the result.
* required: false
* schema:
* type: boolean
* title: with_deleted
* description: Whether to include deleted records in the result.
* security:
* - api_token: []
* - cookie_auth: []

View File

@@ -25,44 +25,6 @@
* Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation.
* externalDocs:
* url: "#select-fields-and-relations"
* - 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.
* externalDocs:
* url: "#pagination"
* - 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.
* externalDocs:
* url: "#pagination"
* - 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 `-`.
* externalDocs:
* url: "#pagination"
* - name: with_deleted
* in: query
* description: Whether to include deleted records in the result.
* required: false
* schema:
* type: boolean
* title: with_deleted
* description: Whether to include deleted records in the result.
* security:
* - api_token: []
* - cookie_auth: []

View File

@@ -41,7 +41,7 @@
* })
*
* sdk.admin.refundReason.create({
* value: "refund",
* code: "refund",
* label: "Refund",
* })
* .then(({ refund_reason }) => {
@@ -55,6 +55,7 @@
* -H 'Content-Type: application/json' \
* --data-raw '{
* "label": "{value}",
* "code": "{value}",
* "description": "{value}"
* }'
* tags:

View File

@@ -47,7 +47,7 @@
* })
*
* sdk.admin.refundReason.update("ret_123", {
* value: "refund",
* code: "refund",
* label: "Refund",
* })
* .then(({ refund_reason }) => {

View File

@@ -666,10 +666,10 @@
"js-sdk": "sdk.admin.refundReason.retrieve(\"refr_123\")\n.then(({ refund_reason }) => {\n console.log(refund_reason)\n})"
},
"POST /admin/refund-reasons": {
"js-sdk": "sdk.admin.refundReason.create({\n value: \"refund\",\n label: \"Refund\",\n})\n.then(({ refund_reason }) => {\n console.log(refund_reason)\n})"
"js-sdk": "sdk.admin.refundReason.create({\n code: \"refund\",\n label: \"Refund\",\n})\n.then(({ refund_reason }) => {\n console.log(refund_reason)\n})"
},
"POST /admin/refund-reasons/{id}": {
"js-sdk": "sdk.admin.refundReason.update(\"ret_123\", {\n value: \"refund\",\n label: \"Refund\",\n})\n.then(({ refund_reason }) => {\n console.log(refund_reason)\n})"
"js-sdk": "sdk.admin.refundReason.update(\"ret_123\", {\n code: \"refund\",\n label: \"Refund\",\n})\n.then(({ refund_reason }) => {\n console.log(refund_reason)\n})"
},
"DELETE /admin/refund-reasons/{id}": {
"js-sdk": "sdk.admin.refundReason.delete(\"ret_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})"

File diff suppressed because it is too large Load Diff