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

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]
2025-10-21 09:14:39 +00:00
committed by GitHub
co-authored by Oli Juhl Shahed Nasser
parent 1d63ed8ce9
commit 3d0f4086b4
67 changed files with 2475 additions and 525 deletions
@@ -16,6 +16,23 @@
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: JavaScript
* label: JS SDK
* source: |-
* import Medusa from "@medusajs/js-sdk"
*
* export const sdk = new Medusa({
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
* debug: import.meta.env.DEV,
* auth: {
* type: "session",
* },
* })
*
* sdk.admin.refundReason.delete("ret_123")
* .then(({ deleted }) => {
* console.log(deleted)
* })
* - lang: Shell
* label: cURL
* source: |-
@@ -29,26 +46,7 @@
* content:
* application/json:
* schema:
* type: object
* description: The deletion's details.
* required:
* - id
* - object
* - deleted
* properties:
* id:
* type: string
* title: id
* description: The refund reason's ID.
* object:
* type: string
* title: object
* description: The name of the deleted object.
* default: refund_reason
* deleted:
* type: boolean
* title: deleted
* description: Whether the refund reason was deleted.
* $ref: "#/components/schemas/AdminRefundReasonDeleteResponse"
* "400":
* $ref: "#/components/responses/400_error"
* "401":
@@ -47,6 +47,44 @@
* 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: []
@@ -28,6 +28,23 @@
* - cookie_auth: []
* - jwt_token: []
* x-codeSamples:
* - lang: JavaScript
* label: JS SDK
* source: |-
* import Medusa from "@medusajs/js-sdk"
*
* export const sdk = new Medusa({
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
* debug: import.meta.env.DEV,
* auth: {
* type: "session",
* },
* })
*
* sdk.admin.refundReason.retrieve("refr_123")
* .then(({ refund_reason }) => {
* console.log(refund_reason)
* })
* - lang: Shell
* label: cURL
* source: |-
@@ -2,7 +2,8 @@
* @oas [get] /admin/views/{entity}/configurations
* operationId: GetViewsEntityConfigurations
* summary: List View Configurations
* description: Retrieve a list of view configurations of an entity. The configurations can be filtered by fields like `id`. The configurations can also be paginated. An admin user can only retrieve their own configurations.
* description: Retrieve a list of view configurations of an entity. The configurations can be filtered by fields like `id`. The configurations can also be paginated. An admin user can only retrieve
* their own configurations.
* x-authenticated: true
* parameters:
* - name: entity
@@ -52,7 +52,8 @@
* description: Whether the active view configuration is the system default.
* default_type:
* type: string
* description: The type of the default view configuration if the active view is the system default. It will be `system` if the active view is the system default, `code` if no active view is set, or `undefined` if the active view isn't the system default.
* description: The type of the default view configuration if the active view is the system default. It will be `system` if the active view is the system default, `code` if no active view is set, or
* `undefined` if the active view isn't the system default.
* enum:
* - code
* - system
@@ -19,6 +19,44 @@
* 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: []
@@ -25,6 +25,44 @@
* 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: []
@@ -27,6 +27,26 @@
* schema:
* $ref: "#/components/schemas/AdminCreateRefundReason"
* x-codeSamples:
* - lang: JavaScript
* label: JS SDK
* source: |-
* import Medusa from "@medusajs/js-sdk"
*
* export const sdk = new Medusa({
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
* debug: import.meta.env.DEV,
* auth: {
* type: "session",
* },
* })
*
* sdk.admin.refundReason.create({
* value: "refund",
* label: "Refund",
* })
* .then(({ refund_reason }) => {
* console.log(refund_reason)
* })
* - lang: Shell
* label: cURL
* source: |-
@@ -33,6 +33,26 @@
* schema:
* $ref: "#/components/schemas/AdminUpdatePaymentRefundReason"
* x-codeSamples:
* - lang: JavaScript
* label: JS SDK
* source: |-
* import Medusa from "@medusajs/js-sdk"
*
* export const sdk = new Medusa({
* baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
* debug: import.meta.env.DEV,
* auth: {
* type: "session",
* },
* })
*
* sdk.admin.refundReason.update("ret_123", {
* value: "refund",
* label: "Refund",
* })
* .then(({ refund_reason }) => {
* console.log(refund_reason)
* })
* - lang: Shell
* label: cURL
* source: |-
@@ -25,7 +25,10 @@
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminCreateShippingOption"
* oneOf:
* - $ref: "#/components/schemas/AdminCreateFlatRateShippingOption"
* - $ref: "#/components/schemas/AdminCreateCalculatedShippingOption"
* description: The shipping option's details.
* x-codeSamples:
* - lang: JavaScript
* label: JS SDK
@@ -2,7 +2,8 @@
* @oas [post] /admin/views/{entity}/configurations
* operationId: PostViewsEntityConfigurations
* summary: Create View Configuration
* description: Create a new view configuration for an entity. If `is_system_default` is set to true, the created configuration will be set as the system default for the specified entity. Otherwise, it will be a custom configuration for the admin user.
* description: Create a new view configuration for an entity. If `is_system_default` is set to true, the created configuration will be set as the system default for the specified entity. Otherwise, it
* will be a custom configuration for the admin user.
* x-authenticated: true
* parameters:
* - name: entity
@@ -2,7 +2,9 @@
* @oas [post] /admin/views/{entity}/configurations/active
* operationId: PostViewsEntityConfigurationsActive
* summary: Make View Configuration Active
* description: Make a view configuration active. This will set the given view configuration as the active one for the specified entity for the admin user. An admin user can only set their own configurations as active. If the view configuration ID is `null`, the active view configuration will be cleared, and the `code` or system default view configuration type will be used as the active view.
* description: Make a view configuration active. This will set the given view configuration as the active one for the specified entity for the admin user. An admin user can only set their own
* configurations as active. If the view configuration ID is `null`, the active view configuration will be cleared, and the `code` or system default view configuration type will be used as the active
* view.
* x-authenticated: true
* parameters:
* - name: entity