docs: fixes to API and JS SDK references (#13795)
This commit is contained in:
@@ -9,7 +9,7 @@ export const sdk = new Medusa({
|
||||
})
|
||||
|
||||
sdk.admin.refundReason.create({
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ export const sdk = new Medusa({
|
||||
})
|
||||
|
||||
sdk.admin.refundReason.update("ret_123", {
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -3,5 +3,6 @@ curl -X POST '{backend_url}/admin/refund-reasons' \
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"label": "{value}",
|
||||
"code": "{value}",
|
||||
"description": "{value}"
|
||||
}'
|
||||
@@ -29213,44 +29213,6 @@ paths:
|
||||
type: boolean
|
||||
title: include_descendants_tree
|
||||
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: []
|
||||
@@ -29321,44 +29283,6 @@ paths:
|
||||
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 the [Retrieve Custom 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: []
|
||||
@@ -38236,7 +38160,7 @@ paths:
|
||||
})
|
||||
|
||||
sdk.admin.refundReason.create({
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
@@ -38250,6 +38174,7 @@ paths:
|
||||
-H 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"label": "{value}",
|
||||
"code": "{value}",
|
||||
"description": "{value}"
|
||||
}'
|
||||
tags:
|
||||
@@ -38392,7 +38317,7 @@ paths:
|
||||
})
|
||||
|
||||
sdk.admin.refundReason.update("ret_123", {
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -78,49 +78,6 @@ get:
|
||||
`*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: []
|
||||
@@ -193,49 +150,6 @@ post:
|
||||
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: []
|
||||
|
||||
@@ -95,7 +95,7 @@ To specify the fields and relations to retrieve:
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.retrieve("refr_123", {
|
||||
fields: "id,value"
|
||||
fields: "id,code"
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
console.log(refund_reason)
|
||||
@@ -130,7 +130,7 @@ This is available starting from [Medusa v2.11.0](https://github.com/medusajs/med
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.create({
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
@@ -164,7 +164,7 @@ This is available starting from [Medusa v2.11.0](https://github.com/medusajs/med
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.update("ret_123", {
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -16,7 +16,7 @@ This is available starting from [Medusa v2.11.0](https://github.com/medusajs/med
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.create({
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -27,7 +27,7 @@ To specify the fields and relations to retrieve:
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.retrieve("refr_123", {
|
||||
fields: "id,value"
|
||||
fields: "id,code"
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
console.log(refund_reason)
|
||||
|
||||
@@ -16,7 +16,7 @@ This is available starting from [Medusa v2.11.0](https://github.com/medusajs/med
|
||||
|
||||
```ts
|
||||
sdk.admin.refundReason.update("ret_123", {
|
||||
value: "refund",
|
||||
code: "refund",
|
||||
label: "Refund",
|
||||
})
|
||||
.then(({ refund_reason }) => {
|
||||
|
||||
@@ -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: []
|
||||
|
||||
@@ -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: []
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
* })
|
||||
*
|
||||
* sdk.admin.refundReason.update("ret_123", {
|
||||
* value: "refund",
|
||||
* code: "refund",
|
||||
* label: "Refund",
|
||||
* })
|
||||
* .then(({ refund_reason }) => {
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user