diff --git a/www/apps/api-reference/components/Tags/Operation/DescriptionSection/Parameters/index.tsx b/www/apps/api-reference/components/Tags/Operation/DescriptionSection/Parameters/index.tsx index 001aa9d868b03..5ee1604ccb629 100644 --- a/www/apps/api-reference/components/Tags/Operation/DescriptionSection/Parameters/index.tsx +++ b/www/apps/api-reference/components/Tags/Operation/DescriptionSection/Parameters/index.tsx @@ -18,6 +18,11 @@ const TagsOperationDescriptionSectionParameters = ({ required: [], properties: {}, } + const headerParameters: SchemaObject = { + type: "object", + required: [], + properties: {}, + } parameters.forEach((parameter) => { const parameterObject = { @@ -37,11 +42,27 @@ const TagsOperationDescriptionSectionParameters = ({ queryParameters.required?.push(parameter.name) } queryParameters.properties[parameter.name] = parameterObject + } else if (parameter.in === "header") { + if (parameter.required) { + headerParameters.required?.push(parameter.name) + } + headerParameters.properties[parameter.name] = parameterObject } }) return ( <> + {Object.values(headerParameters.properties).length > 0 && ( + <> +

+ Header Parameters +

+ + + )} {Object.values(pathParameters.properties).length > 0 && ( <>

diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionPriceRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionPriceRule.yaml index c0525130ff5dd..95a5cc6d50f13 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionPriceRule.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionPriceRule.yaml @@ -17,8 +17,13 @@ properties: title: id description: The price rule's ID. value: - type: string - title: value + oneOf: + - type: string + title: value + description: The price rule's value. + - type: number + title: value + description: The price rule's value. description: The price rule's value. operator: type: string diff --git a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionRule.yaml b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionRule.yaml index 26069d9a56e62..1fcc34fd59075 100644 --- a/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionRule.yaml +++ b/www/apps/api-reference/specs/admin/components/schemas/AdminShippingOptionRule.yaml @@ -26,18 +26,8 @@ properties: description: The shipping option rule's operator. example: eq value: - oneOf: - - type: string - title: value - description: The rule's value. - example: '"true"' - - type: array - description: The rule's values. - items: - type: string - title: value - description: A rule's value - example: '"true"' + type: string + title: value shipping_option_id: type: string title: shipping_option_id diff --git a/www/apps/api-reference/specs/admin/openapi.full.yaml b/www/apps/api-reference/specs/admin/openapi.full.yaml index 7184767dc5a65..2cf520b5b1710 100644 --- a/www/apps/api-reference/specs/admin/openapi.full.yaml +++ b/www/apps/api-reference/specs/admin/openapi.full.yaml @@ -53046,8 +53046,13 @@ components: title: id description: The price rule's ID. value: - type: string - title: value + oneOf: + - type: string + title: value + description: The price rule's value. + - type: number + title: value + description: The price rule's value. description: The price rule's value. operator: type: string @@ -53126,18 +53131,8 @@ components: description: The shipping option rule's operator. example: eq value: - oneOf: - - type: string - title: value - description: The rule's value. - example: '"true"' - - type: array - description: The rule's values. - items: - type: string - title: value - description: A rule's value - example: '"true"' + type: string + title: value shipping_option_id: type: string title: shipping_option_id diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionPriceRule.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionPriceRule.yaml index c0525130ff5dd..95a5cc6d50f13 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionPriceRule.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionPriceRule.yaml @@ -17,8 +17,13 @@ properties: title: id description: The price rule's ID. value: - type: string - title: value + oneOf: + - type: string + title: value + description: The price rule's value. + - type: number + title: value + description: The price rule's value. description: The price rule's value. operator: type: string diff --git a/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionRule.yaml b/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionRule.yaml index 26069d9a56e62..1fcc34fd59075 100644 --- a/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionRule.yaml +++ b/www/apps/api-reference/specs/store/components/schemas/AdminShippingOptionRule.yaml @@ -26,18 +26,8 @@ properties: description: The shipping option rule's operator. example: eq value: - oneOf: - - type: string - title: value - description: The rule's value. - example: '"true"' - - type: array - description: The rule's values. - items: - type: string - title: value - description: A rule's value - example: '"true"' + type: string + title: value shipping_option_id: type: string title: shipping_option_id diff --git a/www/apps/api-reference/specs/store/openapi.full.yaml b/www/apps/api-reference/specs/store/openapi.full.yaml index 2575bab09fe97..5e8ff2416926c 100644 --- a/www/apps/api-reference/specs/store/openapi.full.yaml +++ b/www/apps/api-reference/specs/store/openapi.full.yaml @@ -568,6 +568,14 @@ paths: description: Create a cart. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -632,6 +640,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -681,6 +697,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -754,6 +778,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -857,6 +889,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -915,6 +955,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -987,6 +1035,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1057,6 +1113,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1136,6 +1200,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1208,6 +1280,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1269,6 +1349,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1344,6 +1432,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -1392,6 +1488,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list description: 'Storefront guide: How to retrieve a list of collections.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2020,6 +2124,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2064,6 +2176,14 @@ paths: description: Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2184,6 +2304,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2231,6 +2359,14 @@ paths: description: 'Storefront guide: How to register a customer.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2297,6 +2433,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve description: 'Storefront guide: How to retrieve the logged-in customer.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2347,6 +2491,14 @@ paths: description: 'Storefront guide: How to edit a customer''s profile.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2412,6 +2564,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses description: 'Storefront guide: How to retrieve the logged-in customer''s addresses.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2544,6 +2704,14 @@ paths: description: 'Storefront guide: How to create an address for the logged-in customer.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2677,6 +2845,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2734,6 +2910,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2858,6 +3042,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -2935,6 +3127,14 @@ paths: description: Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated. x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -3113,6 +3313,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -3165,6 +3373,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -3229,6 +3445,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -3287,6 +3511,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -3351,6 +3583,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -3410,6 +3650,14 @@ paths: description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -3474,6 +3722,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -3531,6 +3787,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment description: 'Storefront guide: How to implement payment during checkout.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -3643,6 +3907,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list description: 'Storefront guide: How to retrieve a list of product categories.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -4298,6 +4570,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -4361,6 +4641,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/products/price description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5143,6 +5431,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5188,6 +5484,36 @@ paths: type: string title: cart_id description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. + - 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: 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: 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' x-codeSamples: - lang: Shell label: cURL @@ -5225,6 +5551,14 @@ paths: url: https://docs.medusajs.com/v2/resources/storefront-development/regions/list description: 'Storefront guide: How to retrieve a list of regions.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5402,6 +5736,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5500,6 +5842,15 @@ paths: '500': $ref: '#/components/responses/500_error' x-workflow: createAndCompleteReturnOrderWorkflow + parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key /store/return-reasons: get: operationId: GetReturnReasons @@ -5507,6 +5858,14 @@ paths: description: Retrieve a list of return reasons. The return reasons can be sorted or paginated. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5614,6 +5973,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5664,6 +6031,14 @@ paths: description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - 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. @@ -5779,6 +6154,14 @@ paths: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: |- @@ -15284,8 +15667,13 @@ components: title: id description: The price rule's ID. value: - type: string - title: value + oneOf: + - type: string + title: value + description: The price rule's value. + - type: number + title: value + description: The price rule's value. description: The price rule's value. operator: type: string @@ -15364,18 +15752,8 @@ components: description: The shipping option rule's operator. example: eq value: - oneOf: - - type: string - title: value - description: The rule's value. - example: '"true"' - - type: array - description: The rule's values. - items: - type: string - title: value - description: A rule's value - example: '"true"' + type: string + title: value shipping_option_id: type: string title: shipping_option_id diff --git a/www/apps/api-reference/specs/store/paths/store_carts.yaml b/www/apps/api-reference/specs/store/paths/store_carts.yaml index abe31e16ded1e..2abc350063814 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts.yaml @@ -4,6 +4,14 @@ post: description: Create a cart. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml index b84ab4e7c84d0..8b69fbd01166a 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}.yaml @@ -12,6 +12,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -70,6 +78,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml index c10b9db5d8433..3c4759c94db95 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_complete.yaml @@ -14,6 +14,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml index f6beb6b8333aa..ad6eea51235e9 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_customer.yaml @@ -17,6 +17,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml index 0e15e4f2ae48e..be9239f653a43 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items.yaml @@ -15,6 +15,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml index e59e05a17bcd4..67549c2e46678 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_line-items_{line_id}.yaml @@ -21,6 +21,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -94,6 +102,14 @@ delete: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml index c8d7a97049fd1..5fedae058c31e 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_promotions.yaml @@ -11,6 +11,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -84,6 +92,14 @@ delete: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml index 9e15c18dd92b1..8440d54a98795 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_shipping-methods.yaml @@ -17,6 +17,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml index 6384c4d49b2ce..f3e718695da54 100644 --- a/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml +++ b/www/apps/api-reference/specs/store/paths/store_carts_{id}_taxes.yaml @@ -11,6 +11,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_collections.yaml b/www/apps/api-reference/specs/store/paths/store_collections.yaml index ba8f514b9a2be..c74c40f5ebca9 100644 --- a/www/apps/api-reference/specs/store/paths/store_collections.yaml +++ b/www/apps/api-reference/specs/store/paths/store_collections.yaml @@ -10,6 +10,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list description: 'Storefront guide: How to retrieve a list of collections.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml index e071f754f38b2..b2cd92c22a72d 100644 --- a/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_collections_{id}.yaml @@ -16,6 +16,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_currencies.yaml b/www/apps/api-reference/specs/store/paths/store_currencies.yaml index 5ccfc03d1071b..dd91e0f46b28a 100644 --- a/www/apps/api-reference/specs/store/paths/store_currencies.yaml +++ b/www/apps/api-reference/specs/store/paths/store_currencies.yaml @@ -6,6 +6,14 @@ get: as `code`. The currencies can also be sorted or paginated. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml b/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml index 02cffa86e92f1..9be0e0170a317 100644 --- a/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_currencies_{code}.yaml @@ -12,6 +12,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_customers.yaml b/www/apps/api-reference/specs/store/paths/store_customers.yaml index ac96f39ce0499..c3b0ff17daf28 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers.yaml @@ -11,6 +11,14 @@ post: description: 'Storefront guide: How to register a customer.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml index 50fd19afabbe1..d44278bfd1b59 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me.yaml @@ -11,6 +11,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve description: 'Storefront guide: How to retrieve the logged-in customer.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -68,6 +76,14 @@ post: description: 'Storefront guide: How to edit a customer''s profile.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml index 0ce04420faf3c..8440a7fc2de86 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses.yaml @@ -12,6 +12,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses description: 'Storefront guide: How to retrieve the logged-in customer''s addresses.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -156,6 +164,14 @@ post: description: 'Storefront guide: How to create an address for the logged-in customer.' x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml index 416754e314400..38289fba90017 100644 --- a/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_customers_me_addresses_{address_id}.yaml @@ -13,6 +13,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -77,6 +85,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -209,6 +225,14 @@ delete: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders.yaml b/www/apps/api-reference/specs/store/paths/store_orders.yaml index c6ce7ddb951b9..e555db9f7c73a 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders.yaml @@ -7,6 +7,14 @@ get: fields such as `id`. The orders can also be sorted or paginated. x-authenticated: true parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml index 9cc9e0baca995..fe93686fa0525 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}.yaml @@ -12,6 +12,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_accept.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_accept.yaml index 9d4fa276a66a8..7dc8f69a757de 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_accept.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_accept.yaml @@ -18,6 +18,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_cancel.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_cancel.yaml index d1786bc3de6ad..6b524974c5c1c 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_cancel.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_cancel.yaml @@ -15,6 +15,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_decline.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_decline.yaml index 3849b015b812a..32aa23de61bef 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_decline.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_decline.yaml @@ -14,6 +14,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_request.yaml b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_request.yaml index 4ccfc02588bf5..eada17f2577a5 100644 --- a/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_request.yaml +++ b/www/apps/api-reference/specs/store/paths/store_orders_{id}_transfer_request.yaml @@ -15,6 +15,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml index 4e0b7594ef57b..a565762fdef12 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-collections.yaml @@ -10,6 +10,14 @@ post: description: 'Storefront guide: How to implement payment during checkout.' x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml index 6e0baa651a9e0..97dea219e8bfd 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-collections_{id}_payment-sessions.yaml @@ -19,6 +19,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml b/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml index 7a2420d6f52e2..9556fb2f62f21 100644 --- a/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml +++ b/www/apps/api-reference/specs/store/paths/store_payment-providers.yaml @@ -10,6 +10,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment description: 'Storefront guide: How to implement payment during checkout.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories.yaml index 4baf703dc5856..f1aa4a515b5eb 100644 --- a/www/apps/api-reference/specs/store/paths/store_product-categories.yaml +++ b/www/apps/api-reference/specs/store/paths/store_product-categories.yaml @@ -11,6 +11,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list description: 'Storefront guide: How to retrieve a list of product categories.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml index 4b4dd734c8874..924298e3dea79 100644 --- a/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_product-categories_{id}.yaml @@ -16,6 +16,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_products.yaml b/www/apps/api-reference/specs/store/paths/store_products.yaml index 54cbe6aaaa392..9e710182ae802 100644 --- a/www/apps/api-reference/specs/store/paths/store_products.yaml +++ b/www/apps/api-reference/specs/store/paths/store_products.yaml @@ -10,6 +10,14 @@ get: https://docs.medusajs.com/v2/resources/storefront-development/products/price description: 'Storefront guide: How to retrieve a product variants'' prices.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml index ab09b59ce3516..70b2fa101222d 100644 --- a/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_products_{id}.yaml @@ -16,6 +16,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- @@ -89,6 +97,41 @@ get: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. + - 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: 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: 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' x-codeSamples: - lang: Shell label: cURL diff --git a/www/apps/api-reference/specs/store/paths/store_regions.yaml b/www/apps/api-reference/specs/store/paths/store_regions.yaml index 7c6204dc43634..4fd2f000271df 100644 --- a/www/apps/api-reference/specs/store/paths/store_regions.yaml +++ b/www/apps/api-reference/specs/store/paths/store_regions.yaml @@ -9,6 +9,14 @@ get: url: https://docs.medusajs.com/v2/resources/storefront-development/regions/list description: 'Storefront guide: How to retrieve a list of regions.' parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml index 27546147ee47c..757e5405fb2c2 100644 --- a/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_regions_{id}.yaml @@ -12,6 +12,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml b/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml index c5f4062f5be80..53246815cff03 100644 --- a/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml +++ b/www/apps/api-reference/specs/store/paths/store_return-reasons.yaml @@ -6,6 +6,14 @@ get: paginated. x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml b/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml index e212f0db83775..7147b284e8df8 100644 --- a/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml +++ b/www/apps/api-reference/specs/store/paths/store_return-reasons_{id}.yaml @@ -12,6 +12,14 @@ get: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_return.yaml b/www/apps/api-reference/specs/store/paths/store_return.yaml index 536d2d6f0bed2..62713dc6e2c12 100644 --- a/www/apps/api-reference/specs/store/paths/store_return.yaml +++ b/www/apps/api-reference/specs/store/paths/store_return.yaml @@ -37,3 +37,12 @@ post: '500': $ref: ../components/responses/500_error.yaml x-workflow: createAndCompleteReturnOrderWorkflow + parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key diff --git a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml b/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml index 42454c2442f97..66831d2008e40 100644 --- a/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml +++ b/www/apps/api-reference/specs/store/paths/store_shipping-options.yaml @@ -13,6 +13,14 @@ get: description: 'Storefront guide: How to implement shipping during checkout.' x-authenticated: false parameters: + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/apps/api-reference/specs/store/paths/store_shipping-options_{id}_calculate.yaml b/www/apps/api-reference/specs/store/paths/store_shipping-options_{id}_calculate.yaml index 95380229f8c96..b68831abf17c5 100644 --- a/www/apps/api-reference/specs/store/paths/store_shipping-options_{id}_calculate.yaml +++ b/www/apps/api-reference/specs/store/paths/store_shipping-options_{id}_calculate.yaml @@ -10,6 +10,14 @@ post: required: true schema: type: string + - name: x-publishable-api-key + in: header + description: Publishable API Key created in the Medusa Admin. + required: true + schema: + type: string + externalDocs: + url: https://docs.medusajs.com/api/store#publishable-api-key - name: fields in: query description: >- diff --git a/www/packages/docs-ui/src/utils/capitalize.ts b/www/packages/docs-ui/src/utils/capitalize.ts index bbaffbf32067c..8d5e54dbbed1a 100644 --- a/www/packages/docs-ui/src/utils/capitalize.ts +++ b/www/packages/docs-ui/src/utils/capitalize.ts @@ -1,3 +1,3 @@ export function capitalize(str: string): string { - return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase() + return str.charAt(0).toUpperCase() + str.slice(1) } diff --git a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_line-items_[line_id].ts b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_line-items_[line_id].ts index 5b5b82c463c01..b0233f0e03270 100644 --- a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_line-items_[line_id].ts +++ b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_line-items_[line_id].ts @@ -21,6 +21,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_promotions.ts b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_promotions.ts index d2917541b98cd..2236afa5a7b0c 100644 --- a/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_promotions.ts +++ b/www/utils/generated/oas-output/operations/store/delete_store_carts_[id]_promotions.ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/delete_store_customers_me_addresses_[address_id].ts b/www/utils/generated/oas-output/operations/store/delete_store_customers_me_addresses_[address_id].ts index b4604844255f1..7b4f1a3525e86 100644 --- a/www/utils/generated/oas-output/operations/store/delete_store_customers_me_addresses_[address_id].ts +++ b/www/utils/generated/oas-output/operations/store/delete_store_customers_me_addresses_[address_id].ts @@ -15,6 +15,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_carts_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_carts_[id].ts index 7985a7f93ef06..060fe78204786 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_carts_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_carts_[id].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_collections.ts b/www/utils/generated/oas-output/operations/store/get_store_collections.ts index 936ced0d25449..9d1788e0c2f31 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_collections.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_collections.ts @@ -8,6 +8,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/products/collections/list * description: "Storefront guide: How to retrieve a list of collections." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_collections_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_collections_[id].ts index 701a6eb6f0025..e467d71a3a964 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_collections_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_collections_[id].ts @@ -14,6 +14,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_currencies.ts b/www/utils/generated/oas-output/operations/store/get_store_currencies.ts index f5ce66794f1e1..541e77b5de383 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_currencies.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_currencies.ts @@ -5,6 +5,14 @@ * description: Retrieve a list of currencies. The currencies can be filtered by fields such as `code`. The currencies can also be sorted or paginated. * x-authenticated: false * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_currencies_[code].ts b/www/utils/generated/oas-output/operations/store/get_store_currencies_[code].ts index 985e7f71eb6e7..0013196a05fc6 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_currencies_[code].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_currencies_[code].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_customers_me.ts b/www/utils/generated/oas-output/operations/store/get_store_customers_me.ts index ddab2a89cea34..1a4d434dae83a 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_customers_me.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_customers_me.ts @@ -9,6 +9,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/customers/retrieve * description: "Storefront guide: How to retrieve the logged-in customer." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses.ts b/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses.ts index 4d1922d3b78df..ff18582f13023 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses.ts @@ -9,6 +9,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/customers/addresses#list-customer-addresses * description: "Storefront guide: How to retrieve the logged-in customer's addresses." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses_[address_id].ts b/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses_[address_id].ts index 043bc44d5c10f..6c1bfa6d4a77c 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses_[address_id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_customers_me_addresses_[address_id].ts @@ -12,6 +12,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_orders.ts b/www/utils/generated/oas-output/operations/store/get_store_orders.ts index 2058b77ef5b1b..f3454aa2bff23 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_orders.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_orders.ts @@ -6,6 +6,14 @@ * description: Retrieve the orders of the logged-in customer. The orders can be filtered by fields such as `id`. The orders can also be sorted or paginated. * x-authenticated: true * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_orders_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_orders_[id].ts index 30108b60f6f28..c8d7cf0a06eba 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_orders_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_orders_[id].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_payment-providers.ts b/www/utils/generated/oas-output/operations/store/get_store_payment-providers.ts index 14f23ae459baa..f08d0eac3b933 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_payment-providers.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_payment-providers.ts @@ -8,6 +8,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/checkout/payment * description: "Storefront guide: How to implement payment during checkout." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-categories.ts b/www/utils/generated/oas-output/operations/store/get_store_product-categories.ts index 09c139ede45c3..0bcc124b61120 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-categories.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-categories.ts @@ -8,6 +8,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/products/categories/list * description: "Storefront guide: How to retrieve a list of product categories." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-categories_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_product-categories_[id].ts index acd33920403ae..4d6f25172e600 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-categories_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-categories_[id].ts @@ -14,6 +14,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_products.ts b/www/utils/generated/oas-output/operations/store/get_store_products.ts index 442e8f5ffcd67..f0282f89014b5 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_products.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_products.ts @@ -8,6 +8,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/products/price * description: "Storefront guide: How to retrieve a product variants' prices." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_products_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_products_[id].ts index f4ba8c0b30b95..651c5882dc466 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_products_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_products_[id].ts @@ -14,6 +14,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 @@ -61,6 +69,36 @@ * type: string * title: cart_id * description: The ID of the customer's cart. If set, the cart's region and shipping address's country code and province are used instead of the `region_id`, `country_code`, and `province` properties. + * - 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: 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: 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" * x-codeSamples: * - lang: Shell * label: cURL diff --git a/www/utils/generated/oas-output/operations/store/get_store_regions.ts b/www/utils/generated/oas-output/operations/store/get_store_regions.ts index 755fe8afeb9e0..d3677f883dda2 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_regions.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_regions.ts @@ -8,6 +8,14 @@ * url: https://docs.medusajs.com/v2/resources/storefront-development/regions/list * description: "Storefront guide: How to retrieve a list of regions." * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_regions_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_regions_[id].ts index ab838eccde273..444ad54be97ca 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_regions_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_regions_[id].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_return-reasons.ts b/www/utils/generated/oas-output/operations/store/get_store_return-reasons.ts index 439022def8a81..aed274d7117fd 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_return-reasons.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_return-reasons.ts @@ -5,6 +5,14 @@ * description: Retrieve a list of return reasons. The return reasons can be sorted or paginated. * x-authenticated: false * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_return-reasons_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_return-reasons_[id].ts index 635e4de606660..99280caffe5a8 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_return-reasons_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_return-reasons_[id].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/get_store_shipping-options.ts b/www/utils/generated/oas-output/operations/store/get_store_shipping-options.ts index 61757e757567f..c4c2b358e52de 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_shipping-options.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_shipping-options.ts @@ -11,6 +11,14 @@ * description: "Storefront guide: How to implement shipping during checkout." * x-authenticated: false * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts.ts b/www/utils/generated/oas-output/operations/store/post_store_carts.ts index 1a26c097ceff2..6c2a188b6dc48 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts.ts @@ -5,6 +5,14 @@ * description: Create a cart. * x-authenticated: false * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id].ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id].ts index 0f3facb5deae4..3f2ac4eb00bdc 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id].ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id].ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_complete.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_complete.ts index 77ea7b3c09744..dabcbf9170046 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_complete.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_complete.ts @@ -14,6 +14,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts index 37364a55e8ea2..07183e4418f6e 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_customer.ts @@ -15,6 +15,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items.ts index 09f2896b9b4e3..21ccddd7accb0 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items.ts @@ -15,6 +15,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items_[line_id].ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items_[line_id].ts index c0bd685977b86..fbdecbf1cb5ab 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items_[line_id].ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_line-items_[line_id].ts @@ -21,6 +21,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_promotions.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_promotions.ts index c2b429a487afc..8ca8a79620b45 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_promotions.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_promotions.ts @@ -12,6 +12,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_shipping-methods.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_shipping-methods.ts index d86a066b3e01b..952b36fe28373 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_shipping-methods.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_shipping-methods.ts @@ -15,6 +15,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts index b22c62ad1047c..d89ca12c07d14 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_carts_[id]_taxes.ts @@ -12,6 +12,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_customers.ts b/www/utils/generated/oas-output/operations/store/post_store_customers.ts index dd4ae36819ea2..2bdf14bf3e459 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_customers.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_customers.ts @@ -8,6 +8,14 @@ * description: "Storefront guide: How to register a customer." * x-authenticated: true * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_customers_me.ts b/www/utils/generated/oas-output/operations/store/post_store_customers_me.ts index 8060355394ef5..2205f77991e97 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_customers_me.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_customers_me.ts @@ -8,6 +8,14 @@ * description: "Storefront guide: How to edit a customer's profile." * x-authenticated: true * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses.ts b/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses.ts index c09726a405de8..9539a9c9c7024 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses.ts @@ -9,6 +9,14 @@ * description: "Storefront guide: How to create an address for the logged-in customer." * x-authenticated: true * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses_[address_id].ts b/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses_[address_id].ts index 6a60bc180ce5e..453fe38d54026 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses_[address_id].ts +++ b/www/utils/generated/oas-output/operations/store/post_store_customers_me_addresses_[address_id].ts @@ -15,6 +15,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_accept.ts b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_accept.ts index 997341a4e4098..bdc4f8103494a 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_accept.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_accept.ts @@ -14,6 +14,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_cancel.ts b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_cancel.ts index 72d0102c01fcd..8d23d8e98e6c7 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_cancel.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_cancel.ts @@ -12,6 +12,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_decline.ts b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_decline.ts index 225c2f199bcd7..007be77f56ed9 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_decline.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_decline.ts @@ -12,6 +12,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_request.ts b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_request.ts index f7616721ef2a4..299f161b9adac 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_request.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_orders_[id]_transfer_request.ts @@ -13,6 +13,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/operations/store/post_store_payment-collections.ts b/www/utils/generated/oas-output/operations/store/post_store_payment-collections.ts index 5fec1a5c80e3a..daade2aa492ac 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_payment-collections.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_payment-collections.ts @@ -8,6 +8,14 @@ * description: "Storefront guide: How to implement payment during checkout." * x-authenticated: false * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_payment-collections_[id]_payment-sessions.ts b/www/utils/generated/oas-output/operations/store/post_store_payment-collections_[id]_payment-sessions.ts index d825414b84f30..4baa37496d6f9 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_payment-collections_[id]_payment-sessions.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_payment-collections_[id]_payment-sessions.ts @@ -16,6 +16,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - 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 diff --git a/www/utils/generated/oas-output/operations/store/post_store_return.ts b/www/utils/generated/oas-output/operations/store/post_store_return.ts index b651f6a5ca1bd..d0e2951e55217 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_return.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_return.ts @@ -55,6 +55,15 @@ * "500": * $ref: "#/components/responses/500_error" * x-workflow: createAndCompleteReturnOrderWorkflow + * parameters: + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * */ diff --git a/www/utils/generated/oas-output/operations/store/post_store_shipping-options_[id]_calculate.ts b/www/utils/generated/oas-output/operations/store/post_store_shipping-options_[id]_calculate.ts index 4a405bb80f19d..13009e57e2690 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_shipping-options_[id]_calculate.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_shipping-options_[id]_calculate.ts @@ -11,6 +11,14 @@ * required: true * schema: * type: string + * - name: x-publishable-api-key + * in: header + * description: Publishable API Key created in the Medusa Admin. + * required: true + * schema: + * type: string + * externalDocs: + * url: https://docs.medusajs.com/api/store#publishable-api-key * - name: fields * in: query * description: |- diff --git a/www/utils/generated/oas-output/schemas/AdminShippingOptionPriceRule.ts b/www/utils/generated/oas-output/schemas/AdminShippingOptionPriceRule.ts index dcc60a8540727..3d601a7e39ec4 100644 --- a/www/utils/generated/oas-output/schemas/AdminShippingOptionPriceRule.ts +++ b/www/utils/generated/oas-output/schemas/AdminShippingOptionPriceRule.ts @@ -19,8 +19,13 @@ * title: id * description: The price rule's ID. * value: - * type: string - * title: value + * oneOf: + * - type: string + * title: value + * description: The price rule's value. + * - type: number + * title: value + * description: The price rule's value. * description: The price rule's value. * operator: * type: string diff --git a/www/utils/generated/oas-output/schemas/AdminShippingOptionRule.ts b/www/utils/generated/oas-output/schemas/AdminShippingOptionRule.ts index 54d6836dfc880..230d367b3e173 100644 --- a/www/utils/generated/oas-output/schemas/AdminShippingOptionRule.ts +++ b/www/utils/generated/oas-output/schemas/AdminShippingOptionRule.ts @@ -28,18 +28,8 @@ * description: The shipping option rule's operator. * example: eq * value: - * oneOf: - * - type: string - * title: value - * description: The rule's value. - * example: '"true"' - * - type: array - * description: The rule's values. - * items: - * type: string - * title: value - * description: A rule's value - * example: '"true"' + * type: string + * title: value * shipping_option_id: * type: string * title: shipping_option_id diff --git a/www/utils/packages/docs-generator/src/classes/kinds/oas.ts b/www/utils/packages/docs-generator/src/classes/kinds/oas.ts index 73a39f8036265..3dc08cc95f602 100644 --- a/www/utils/packages/docs-generator/src/classes/kinds/oas.ts +++ b/www/utils/packages/docs-generator/src/classes/kinds/oas.ts @@ -45,7 +45,7 @@ type SchemaDescriptionOptions = { export type OasArea = "admin" | "store" -type ParameterType = "query" | "path" +type ParameterType = "query" | "path" | "header" type AuthRequests = { exact?: string @@ -281,6 +281,10 @@ class OasKindGenerator extends FunctionKindGenerator { security: [], } + // get header params + const headerParams = this.getHeaderParameters(oasPath) + oas.parameters?.push(...headerParams) + // retreive query and request parameters const { queryParameters, requestSchema } = this.getRequestParameters({ node, @@ -471,6 +475,11 @@ class OasKindGenerator extends FunctionKindGenerator { // update path parameters const newPathParameters = this.getPathParameters({ oasPath, tagName }) + + // get header params + const headerParams = this.getHeaderParameters(oasPath) + newPathParameters.push(...headerParams) + oas.parameters = this.updateParameters({ oldParameters: oas.parameters as OpenAPIV3.ParameterObject[], newParameters: newPathParameters, @@ -902,7 +911,7 @@ class OasKindGenerator extends FunctionKindGenerator { /** * The parameter type. */ - type: "path" | "query" + type: ParameterType /** * The name of the parameter. */ @@ -1184,6 +1193,33 @@ class OasKindGenerator extends FunctionKindGenerator { } } + /** + * Retrieve the header parameters of the OAS route. + * + * @param oasPath - The OAS path. + * @returns The header parameters of the route. + */ + getHeaderParameters(oasPath: string): OpenAPIV3.ParameterObject[] { + if (!oasPath.startsWith("store")) { + return [] + } + + return [ + this.getParameterObject({ + type: "header", + name: "x-publishable-api-key", + description: "Publishable API Key created in the Medusa Admin.", + required: true, + schema: { + type: "string", + externalDocs: { + url: "https://docs.medusajs.com/api/store#publishable-api-key", + }, + }, + }), + ] + } + /** * Retrieve the response's status. * @@ -1895,9 +1931,13 @@ class OasKindGenerator extends FunctionKindGenerator { if (!oldParameters) { return newParameters || [] } - const oppositeParamType = type === "query" ? "path" : "query" + const oppositeParamType = ["path", "query", "header"].filter( + (item) => item !== type + ) as ParameterType[] const oppositeParams: OpenAPIV3.ParameterObject[] = - oldParameters?.filter((param) => param.in === oppositeParamType) || [] + oldParameters?.filter((param) => + oppositeParamType.includes(param.in as ParameterType) + ) || [] // check and update/add parameters if necessary const existingParams: OpenAPIV3.ParameterObject[] = oldParameters?.filter((param) => param.in === type) || [] @@ -1979,7 +2019,9 @@ class OasKindGenerator extends FunctionKindGenerator { ...oppositeParams, ...(existingParams?.filter( (parameter) => - (parameter as OpenAPIV3.ParameterObject).in === oppositeParamType || + oppositeParamType.includes( + (parameter as OpenAPIV3.ParameterObject).in as ParameterType + ) || !paramsToRemove.has((parameter as OpenAPIV3.ParameterObject).name) ) || []), ]