diff --git a/docs/api/admin.oas.json b/docs/api/admin.oas.json index cb80d2b965..0b0fd38f9f 100644 --- a/docs/api/admin.oas.json +++ b/docs/api/admin.oas.json @@ -15338,7 +15338,7 @@ "/admin/products/{id}/options": { "post": { "operationId": "PostProductsProductOptions", - "summary": "Add an Option", + "summary": "Add a Product Option", "x-authenticated": true, "description": "Adds a Product Option to a Product", "parameters": [ @@ -15543,7 +15543,7 @@ { "lang": "JavaScript", "label": "JS Client", - "source": "import Medusa from \"@medusajs/medusa-js\"\nconst medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })\n// must be previously logged in or use api token\nmedusa.admin.products.deleteOption(product_id, option_id)\n.then(({ option_id, object, delete, product }) => {\n console.log(product.id);\n});\n" + "source": "import Medusa from \"@medusajs/medusa-js\"\nconst medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })\n// must be previously logged in or use api token\nmedusa.admin.products.deleteOption(product_id, option_id)\n.then(({ option_id, object, deleted, product }) => {\n console.log(product.id);\n});\n" }, { "lang": "Shell", @@ -29085,9 +29085,6 @@ }, "AdminPostProductsProductVariantsVariantReq": { "type": "object", - "required": [ - "prices" - ], "properties": { "title": { "description": "The title to identify the Product Variant by.", @@ -30836,6 +30833,9 @@ "variants", "variants.options", "variants.prices" + ], + "totals": [ + "variants.purchasable" ] }, "required": [ @@ -31953,6 +31953,9 @@ "options", "prices", "product" + ], + "totals": [ + "purchasable" ] }, "required": [ @@ -32389,7 +32392,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -32832,7 +32835,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } } @@ -33942,7 +33945,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -34160,7 +34163,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -34435,7 +34438,7 @@ "description": "The unique randomly generated key used to determine the state of a process.", "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -35781,7 +35784,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -36260,7 +36263,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -36504,7 +36507,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -37673,6 +37676,10 @@ "example": { "car": "white" } + }, + "purchasable": { + "description": "Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n", + "type": "boolean" } } }, @@ -37877,7 +37884,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -38214,7 +38221,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -39512,7 +39519,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -39768,7 +39775,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, diff --git a/docs/api/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js b/docs/api/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js index 108d85da03..17e73e72e3 100644 --- a/docs/api/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js +++ b/docs/api/admin/code_samples/JavaScript/admin_products_{id}_options_{option_id}/delete.js @@ -2,6 +2,6 @@ import Medusa from "@medusajs/medusa-js" const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 }) // must be previously logged in or use api token medusa.admin.products.deleteOption(product_id, option_id) -.then(({ option_id, object, delete, product }) => { +.then(({ option_id, object, deleted, product }) => { console.log(product.id); }); diff --git a/docs/api/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml b/docs/api/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml index c124bbb24d..e9c9fbe3f2 100644 --- a/docs/api/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml +++ b/docs/api/admin/components/schemas/AdminPostProductsProductVariantsVariantReq.yaml @@ -1,6 +1,4 @@ type: object -required: - - prices properties: title: description: The title to identify the Product Variant by. diff --git a/docs/api/admin/components/schemas/AdminProductsListRes.yaml b/docs/api/admin/components/schemas/AdminProductsListRes.yaml index a85acdc2bb..1101d87cfe 100644 --- a/docs/api/admin/components/schemas/AdminProductsListRes.yaml +++ b/docs/api/admin/components/schemas/AdminProductsListRes.yaml @@ -10,6 +10,8 @@ x-expanded-relations: - variants - variants.options - variants.prices + totals: + - variants.purchasable required: - products - count diff --git a/docs/api/admin/components/schemas/AdminVariantsListRes.yaml b/docs/api/admin/components/schemas/AdminVariantsListRes.yaml index 215adc2240..2afb6eb3a2 100644 --- a/docs/api/admin/components/schemas/AdminVariantsListRes.yaml +++ b/docs/api/admin/components/schemas/AdminVariantsListRes.yaml @@ -5,6 +5,8 @@ x-expanded-relations: - options - prices - product + totals: + - purchasable required: - variants - count diff --git a/docs/api/admin/components/schemas/Cart.yaml b/docs/api/admin/components/schemas/Cart.yaml index 649b1149fd..db025e4ca0 100644 --- a/docs/api/admin/components/schemas/Cart.yaml +++ b/docs/api/admin/components/schemas/Cart.yaml @@ -130,7 +130,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. context: description: The context of the cart which can include info like IP or user agent. diff --git a/docs/api/admin/components/schemas/ClaimOrder.yaml b/docs/api/admin/components/schemas/ClaimOrder.yaml index 2bd675041e..3c25d434af 100644 --- a/docs/api/admin/components/schemas/ClaimOrder.yaml +++ b/docs/api/admin/components/schemas/ClaimOrder.yaml @@ -141,5 +141,5 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. diff --git a/docs/api/admin/components/schemas/DecoratedProduct.yaml b/docs/api/admin/components/schemas/DecoratedProduct.yaml deleted file mode 100644 index 6bf5e38002..0000000000 --- a/docs/api/admin/components/schemas/DecoratedProduct.yaml +++ /dev/null @@ -1,10 +0,0 @@ -title: Product with decorated variants -type: object -allOf: - - $ref: ./Product.yaml - - type: object - properties: - variants: - type: array - items: - $ref: ./DecoratedVariant.yaml diff --git a/docs/api/admin/components/schemas/DecoratedVariant.yaml b/docs/api/admin/components/schemas/DecoratedVariant.yaml deleted file mode 100644 index 64161130ef..0000000000 --- a/docs/api/admin/components/schemas/DecoratedVariant.yaml +++ /dev/null @@ -1,9 +0,0 @@ -title: Decorated Product Variant -type: object -allOf: - - $ref: ./PricedVariant.yaml - - type: object - properties: - purchasable: - type: boolean - description: Boolean indicating if variant is purchasable. diff --git a/docs/api/admin/components/schemas/DraftOrder.yaml b/docs/api/admin/components/schemas/DraftOrder.yaml index 0e82842f04..e286c08494 100644 --- a/docs/api/admin/components/schemas/DraftOrder.yaml +++ b/docs/api/admin/components/schemas/DraftOrder.yaml @@ -71,7 +71,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/Fulfillment.yaml b/docs/api/admin/components/schemas/Fulfillment.yaml index 6ab0193bdf..93ed0dba7f 100644 --- a/docs/api/admin/components/schemas/Fulfillment.yaml +++ b/docs/api/admin/components/schemas/Fulfillment.yaml @@ -126,7 +126,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/IdempotencyKey.yaml b/docs/api/admin/components/schemas/IdempotencyKey.yaml index 1ee68e1a5b..e2f83b4b8a 100644 --- a/docs/api/admin/components/schemas/IdempotencyKey.yaml +++ b/docs/api/admin/components/schemas/IdempotencyKey.yaml @@ -26,7 +26,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: Date which the idempotency key was locked. diff --git a/docs/api/admin/components/schemas/Order.yaml b/docs/api/admin/components/schemas/Order.yaml index 8406e48d2f..42959c12a8 100644 --- a/docs/api/admin/components/schemas/Order.yaml +++ b/docs/api/admin/components/schemas/Order.yaml @@ -245,7 +245,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. diff --git a/docs/api/admin/components/schemas/Payment.yaml b/docs/api/admin/components/schemas/Payment.yaml index 2555ec8ed4..19676483f2 100644 --- a/docs/api/admin/components/schemas/Payment.yaml +++ b/docs/api/admin/components/schemas/Payment.yaml @@ -102,7 +102,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/PaymentSession.yaml b/docs/api/admin/components/schemas/PaymentSession.yaml index 453afac944..f11f972388 100644 --- a/docs/api/admin/components/schemas/PaymentSession.yaml +++ b/docs/api/admin/components/schemas/PaymentSession.yaml @@ -82,7 +82,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. amount: description: The amount that the Payment Session has been authorized for. diff --git a/docs/api/admin/components/schemas/ProductVariant.yaml b/docs/api/admin/components/schemas/ProductVariant.yaml index 7f9d451c41..fe8a168efc 100644 --- a/docs/api/admin/components/schemas/ProductVariant.yaml +++ b/docs/api/admin/components/schemas/ProductVariant.yaml @@ -189,3 +189,13 @@ properties: type: object example: car: white + purchasable: + description: | + Only used with the inventory modules. + A boolean value indicating whether the Product Variant is purchasable. + A variant is purchasable if: + - inventory is not managed + - it has no inventory items + - it is in stock + - it is backorderable. + type: boolean diff --git a/docs/api/admin/components/schemas/Refund.yaml b/docs/api/admin/components/schemas/Refund.yaml index fa82dfc64e..9b6074396d 100644 --- a/docs/api/admin/components/schemas/Refund.yaml +++ b/docs/api/admin/components/schemas/Refund.yaml @@ -67,7 +67,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/Return.yaml b/docs/api/admin/components/schemas/Return.yaml index dfbb629cea..e28eb3122d 100644 --- a/docs/api/admin/components/schemas/Return.yaml +++ b/docs/api/admin/components/schemas/Return.yaml @@ -103,7 +103,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. diff --git a/docs/api/admin/components/schemas/Swap.yaml b/docs/api/admin/components/schemas/Swap.yaml index e4ab8da2b8..fe360735f2 100644 --- a/docs/api/admin/components/schemas/Swap.yaml +++ b/docs/api/admin/components/schemas/Swap.yaml @@ -154,7 +154,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/components/schemas/TrackingLink.yaml b/docs/api/admin/components/schemas/TrackingLink.yaml index eb8ccde118..53ba3580ce 100644 --- a/docs/api/admin/components/schemas/TrackingLink.yaml +++ b/docs/api/admin/components/schemas/TrackingLink.yaml @@ -44,7 +44,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/admin/paths/admin_products_{id}_options.yaml b/docs/api/admin/paths/admin_products_{id}_options.yaml index ac1388e566..599b570007 100644 --- a/docs/api/admin/paths/admin_products_{id}_options.yaml +++ b/docs/api/admin/paths/admin_products_{id}_options.yaml @@ -1,6 +1,6 @@ post: operationId: PostProductsProductOptions - summary: Add an Option + summary: Add a Product Option x-authenticated: true description: Adds a Product Option to a Product parameters: diff --git a/docs/api/store.oas.json b/docs/api/store.oas.json index 50908d0a0f..fc125a7070 100644 --- a/docs/api/store.oas.json +++ b/docs/api/store.oas.json @@ -6489,7 +6489,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -6932,7 +6932,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } } @@ -8042,7 +8042,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -8260,7 +8260,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -8535,7 +8535,7 @@ "description": "The unique randomly generated key used to determine the state of a process.", "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -9881,7 +9881,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -10360,7 +10360,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -10604,7 +10604,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -11773,6 +11773,10 @@ "example": { "car": "white" } + }, + "purchasable": { + "description": "Only used with the inventory modules.\nA boolean value indicating whether the Product Variant is purchasable.\nA variant is purchasable if:\n - inventory is not managed\n - it has no inventory items\n - it is in stock\n - it is backorderable.\n", + "type": "boolean" } } }, @@ -11977,7 +11981,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -12296,7 +12300,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -14753,6 +14757,9 @@ "variants", "variants.options", "variants.prices" + ], + "totals": [ + "variants.purchasable" ] }, "required": [ @@ -14796,6 +14803,9 @@ "variants", "variants.options", "variants.prices" + ], + "totals": [ + "variants.purchasable" ] }, "required": [ @@ -14973,6 +14983,9 @@ "prices", "options", "product" + ], + "totals": [ + "purchasable" ] }, "required": [ @@ -14995,6 +15008,9 @@ "prices", "options", "product" + ], + "totals": [ + "purchasable" ] }, "required": [ @@ -15160,7 +15176,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, @@ -15416,7 +15432,7 @@ "nullable": true, "type": "string", "externalDocs": { - "url": "https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key", + "url": "https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key", "description": "Learn more how to use the idempotency key." } }, diff --git a/docs/api/store/components/schemas/Cart.yaml b/docs/api/store/components/schemas/Cart.yaml index 649b1149fd..db025e4ca0 100644 --- a/docs/api/store/components/schemas/Cart.yaml +++ b/docs/api/store/components/schemas/Cart.yaml @@ -130,7 +130,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. context: description: The context of the cart which can include info like IP or user agent. diff --git a/docs/api/store/components/schemas/ClaimOrder.yaml b/docs/api/store/components/schemas/ClaimOrder.yaml index 2bd675041e..3c25d434af 100644 --- a/docs/api/store/components/schemas/ClaimOrder.yaml +++ b/docs/api/store/components/schemas/ClaimOrder.yaml @@ -141,5 +141,5 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. diff --git a/docs/api/store/components/schemas/DecoratedProduct.yaml b/docs/api/store/components/schemas/DecoratedProduct.yaml deleted file mode 100644 index 6bf5e38002..0000000000 --- a/docs/api/store/components/schemas/DecoratedProduct.yaml +++ /dev/null @@ -1,10 +0,0 @@ -title: Product with decorated variants -type: object -allOf: - - $ref: ./Product.yaml - - type: object - properties: - variants: - type: array - items: - $ref: ./DecoratedVariant.yaml diff --git a/docs/api/store/components/schemas/DecoratedVariant.yaml b/docs/api/store/components/schemas/DecoratedVariant.yaml deleted file mode 100644 index 64161130ef..0000000000 --- a/docs/api/store/components/schemas/DecoratedVariant.yaml +++ /dev/null @@ -1,9 +0,0 @@ -title: Decorated Product Variant -type: object -allOf: - - $ref: ./PricedVariant.yaml - - type: object - properties: - purchasable: - type: boolean - description: Boolean indicating if variant is purchasable. diff --git a/docs/api/store/components/schemas/DraftOrder.yaml b/docs/api/store/components/schemas/DraftOrder.yaml index 0e82842f04..e286c08494 100644 --- a/docs/api/store/components/schemas/DraftOrder.yaml +++ b/docs/api/store/components/schemas/DraftOrder.yaml @@ -71,7 +71,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/Fulfillment.yaml b/docs/api/store/components/schemas/Fulfillment.yaml index 6ab0193bdf..93ed0dba7f 100644 --- a/docs/api/store/components/schemas/Fulfillment.yaml +++ b/docs/api/store/components/schemas/Fulfillment.yaml @@ -126,7 +126,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/IdempotencyKey.yaml b/docs/api/store/components/schemas/IdempotencyKey.yaml index 1ee68e1a5b..e2f83b4b8a 100644 --- a/docs/api/store/components/schemas/IdempotencyKey.yaml +++ b/docs/api/store/components/schemas/IdempotencyKey.yaml @@ -26,7 +26,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: Date which the idempotency key was locked. diff --git a/docs/api/store/components/schemas/Order.yaml b/docs/api/store/components/schemas/Order.yaml index 8406e48d2f..42959c12a8 100644 --- a/docs/api/store/components/schemas/Order.yaml +++ b/docs/api/store/components/schemas/Order.yaml @@ -245,7 +245,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. external_id: description: The ID of an external order. diff --git a/docs/api/store/components/schemas/Payment.yaml b/docs/api/store/components/schemas/Payment.yaml index 2555ec8ed4..19676483f2 100644 --- a/docs/api/store/components/schemas/Payment.yaml +++ b/docs/api/store/components/schemas/Payment.yaml @@ -102,7 +102,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/PaymentSession.yaml b/docs/api/store/components/schemas/PaymentSession.yaml index 453afac944..f11f972388 100644 --- a/docs/api/store/components/schemas/PaymentSession.yaml +++ b/docs/api/store/components/schemas/PaymentSession.yaml @@ -82,7 +82,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. amount: description: The amount that the Payment Session has been authorized for. diff --git a/docs/api/store/components/schemas/ProductVariant.yaml b/docs/api/store/components/schemas/ProductVariant.yaml index 7f9d451c41..fe8a168efc 100644 --- a/docs/api/store/components/schemas/ProductVariant.yaml +++ b/docs/api/store/components/schemas/ProductVariant.yaml @@ -189,3 +189,13 @@ properties: type: object example: car: white + purchasable: + description: | + Only used with the inventory modules. + A boolean value indicating whether the Product Variant is purchasable. + A variant is purchasable if: + - inventory is not managed + - it has no inventory items + - it is in stock + - it is backorderable. + type: boolean diff --git a/docs/api/store/components/schemas/Refund.yaml b/docs/api/store/components/schemas/Refund.yaml index fa82dfc64e..9b6074396d 100644 --- a/docs/api/store/components/schemas/Refund.yaml +++ b/docs/api/store/components/schemas/Refund.yaml @@ -67,7 +67,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/Return.yaml b/docs/api/store/components/schemas/Return.yaml index dfbb629cea..e28eb3122d 100644 --- a/docs/api/store/components/schemas/Return.yaml +++ b/docs/api/store/components/schemas/Return.yaml @@ -103,7 +103,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. received_at: description: The date with timezone at which the return was received. diff --git a/docs/api/store/components/schemas/StoreProductsListRes.yaml b/docs/api/store/components/schemas/StoreProductsListRes.yaml index f5b0ce9a4c..7e5d2def7e 100644 --- a/docs/api/store/components/schemas/StoreProductsListRes.yaml +++ b/docs/api/store/components/schemas/StoreProductsListRes.yaml @@ -11,6 +11,8 @@ x-expanded-relations: - variants - variants.options - variants.prices + totals: + - variants.purchasable required: - products - count diff --git a/docs/api/store/components/schemas/StoreProductsRes.yaml b/docs/api/store/components/schemas/StoreProductsRes.yaml index 18276b4392..68fd762db4 100644 --- a/docs/api/store/components/schemas/StoreProductsRes.yaml +++ b/docs/api/store/components/schemas/StoreProductsRes.yaml @@ -11,6 +11,8 @@ x-expanded-relations: - variants - variants.options - variants.prices + totals: + - variants.purchasable required: - product properties: diff --git a/docs/api/store/components/schemas/StoreVariantsListRes.yaml b/docs/api/store/components/schemas/StoreVariantsListRes.yaml index 8f824f9351..2084fd5b61 100644 --- a/docs/api/store/components/schemas/StoreVariantsListRes.yaml +++ b/docs/api/store/components/schemas/StoreVariantsListRes.yaml @@ -5,6 +5,8 @@ x-expanded-relations: - prices - options - product + totals: + - purchasable required: - variants properties: diff --git a/docs/api/store/components/schemas/StoreVariantsRes.yaml b/docs/api/store/components/schemas/StoreVariantsRes.yaml index 04ab6f681e..6128f33e7f 100644 --- a/docs/api/store/components/schemas/StoreVariantsRes.yaml +++ b/docs/api/store/components/schemas/StoreVariantsRes.yaml @@ -5,6 +5,8 @@ x-expanded-relations: - prices - options - product + totals: + - purchasable required: - variant properties: diff --git a/docs/api/store/components/schemas/Swap.yaml b/docs/api/store/components/schemas/Swap.yaml index e4ab8da2b8..fe360735f2 100644 --- a/docs/api/store/components/schemas/Swap.yaml +++ b/docs/api/store/components/schemas/Swap.yaml @@ -154,7 +154,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created. diff --git a/docs/api/store/components/schemas/TrackingLink.yaml b/docs/api/store/components/schemas/TrackingLink.yaml index eb8ccde118..53ba3580ce 100644 --- a/docs/api/store/components/schemas/TrackingLink.yaml +++ b/docs/api/store/components/schemas/TrackingLink.yaml @@ -44,7 +44,7 @@ properties: type: string externalDocs: url: >- - https://docs.medusajs.com/advanced/backend/payment/overview#idempotency-key + https://docs.medusajs.com/modules/carts-and-checkout/cart.md#idempotency-key description: Learn more how to use the idempotency key. created_at: description: The date with timezone at which the resource was created.