diff --git a/www/utils/generated/events-output.json b/www/utils/generated/events-output.json index 0af806f764..6e6dca666b 100644 --- a/www/utils/generated/events-output.json +++ b/www/utils/generated/events-output.json @@ -735,5 +735,44 @@ "refundPaymentWorkflow" ], "deprecated": false + }, + { + "name": "translation.created", + "parentName": "TranslationWorkflowEvents", + "propertyName": "CREATED", + "payload": "```ts\n{\n id, // The ID of the translation\n}\n```", + "description": "Emitted when translations are created.", + "workflows": [ + "createTranslationsWorkflow", + "batchTranslationsWorkflow" + ], + "since": "2.12.3", + "deprecated": false + }, + { + "name": "translation.updated", + "parentName": "TranslationWorkflowEvents", + "propertyName": "UPDATED", + "payload": "```ts\n{\n id, // The ID of the translation\n}\n```", + "description": "Emitted when translations are updated.", + "workflows": [ + "updateTranslationsWorkflow", + "batchTranslationsWorkflow" + ], + "since": "2.12.3", + "deprecated": false + }, + { + "name": "translation.deleted", + "parentName": "TranslationWorkflowEvents", + "propertyName": "DELETED", + "payload": "```ts\n{\n id, // The ID of the translation\n}\n```", + "description": "Emitted when translations are deleted.", + "workflows": [ + "deleteTranslationsWorkflow", + "batchTranslationsWorkflow" + ], + "since": "2.12.3", + "deprecated": false } ] \ No newline at end of file diff --git a/www/utils/generated/oas-output/base/admin.oas.base.yaml b/www/utils/generated/oas-output/base/admin.oas.base.yaml index 6b5a0bff68..7e3eaeb4d4 100644 --- a/www/utils/generated/oas-output/base/admin.oas.base.yaml +++ b/www/utils/generated/oas-output/base/admin.oas.base.yaml @@ -209,6 +209,18 @@ tags: url: https://docs.medusajs.com/resources/commerce-modules/user x-associatedSchema: $ref: "#/components/schemas/AdminInvite" + - name: Locales + description: > + A locale is a language that content is translated into for customers to view + in a storefront. + + Medusa installs locales by default. These API routes allow admin users to retrieve + and view locales. + externalDocs: + description: Learn more about locales and translations. + url: https://docs.medusajs.com/resources/commerce-modules/translation/concepts + x-associatedSchema: + $ref: "#/components/schemas/AdminLocale" - name: Notifications description: > A notification informs an admin user of store changes or status changes of @@ -221,8 +233,8 @@ tags: - name: Order Changes description: > An order change is a proposed change to an order, such as adding or - removing items, changing shipping methods, and more. They can be associated - with order edits, claims, or exchanges. + removing items, changing shipping methods, and more. They can be + associated with order edits, claims, or exchanges. These API routes allow admin users to manage order changes. externalDocs: @@ -642,6 +654,18 @@ tags: x-associatedSchema: $ref: "#/components/schemas/AdminTransactionGroup" + - name: Translations + description: > + A translation is a localized version of content in a specific locale. For + example, a product description in French. + + These API routes allow admin users to manage translations for different + locales and resources. + externalDocs: + description: Learn more about the Translation Module. + url: https://docs.medusajs.com/resources/commerce-modules/translation + x-associatedSchema: + $ref: "#/components/schemas/AdminTranslation" - name: Uploads description: > Use these API routes to upload files to your Medusa application using the diff --git a/www/utils/generated/oas-output/base/store.oas.base.yaml b/www/utils/generated/oas-output/base/store.oas.base.yaml index fbc5278991..0d1fc62508 100644 --- a/www/utils/generated/oas-output/base/store.oas.base.yaml +++ b/www/utils/generated/oas-output/base/store.oas.base.yaml @@ -81,6 +81,18 @@ tags: x-associatedSchema: $ref: "#/components/schemas/StoreGiftCard" + - name: Locales + description: > + A locale is a language that content is translated into for customers to view + in a storefront. + + Medusa installs locales by default. These API routes allow you to retrieve + supported locales in the store. + externalDocs: + description: Learn more about locales and translations. + url: https://docs.medusajs.com/resources/commerce-modules/translation/concepts + x-associatedSchema: + $ref: "#/components/schemas/StoreLocale" - name: Orders description: | Guest and registered customers can view orders they placed. @@ -192,8 +204,9 @@ tags: - name: Store Credit Accounts x-associatedSchema: description: > - A store credit account is a way for customers to manage their store credit balance. - Customers can use their store credit to pay for orders, and view their store credit balance. + A store credit account is a way for customers to manage their store + credit balance. Customers can use their store credit to pay for orders, + and view their store credit balance. These API routes allow customers to view their store credit accounts. diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_locales.ts b/www/utils/generated/oas-output/operations/admin/get_admin_locales.ts new file mode 100644 index 0000000000..0924c3036b --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_locales.ts @@ -0,0 +1,152 @@ +/** + * @oas [get] /admin/locales + * operationId: GetLocales + * summary: List Locales + * description: Retrieve a list of locales. The locales can be filtered by fields such as `code`. The locales can also be sorted or paginated. + * x-authenticated: true + * parameters: + * - name: q + * in: query + * description: Search query to filter locales by code or other fields. + * required: false + * schema: + * type: string + * title: q + * description: Search query to filter locales by code or other fields. + * - name: code + * in: query + * required: false + * schema: + * oneOf: + * - type: string + * title: code + * description: Filter locales by a code. + * - type: array + * description: Filter locales by multiple codes. + * items: + * type: string + * title: code + * description: A locale code. + * - 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" + * - name: with_deleted + * in: query + * description: The locale's with deleted. + * required: false + * schema: + * type: boolean + * title: with_deleted + * description: The locale's with deleted. + * - 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. + * required: false + * schema: + * type: string + * title: fields + * 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. + * externalDocs: + * url: "#select-fields-and-relations" + * - name: $and + * in: query + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $and + * - name: $or + * in: query + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $or + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: JavaScript + * label: JS SDK + * source: |- + * import Medusa from "@medusajs/js-sdk" + * + * export const sdk = new Medusa({ + * baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + * debug: import.meta.env.DEV, + * auth: { + * type: "session", + * }, + * }) + * + * sdk.admin.locale.list() + * .then(({ locales, count, limit, offset }) => { + * console.log(locales) + * }) + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/locales' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Locales + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/AdminLocaleListResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_locales_[code].ts b/www/utils/generated/oas-output/operations/admin/get_admin_locales_[code].ts new file mode 100644 index 0000000000..b24ebb6005 --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_locales_[code].ts @@ -0,0 +1,80 @@ +/** + * @oas [get] /admin/locales/{code} + * operationId: GetLocalesCode + * summary: Get a Locale + * x-sidebar-summary: Get Locale + * description: Retrieve a locale by its code. You can expand the locale's relations or select the fields that should be returned. + * x-authenticated: true + * parameters: + * - name: code + * in: path + * description: The locale's code in [BCP 47 format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). + * example: fr-FR + * required: true + * schema: + * type: string + * - 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. + * required: false + * schema: + * type: string + * title: fields + * 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. + * externalDocs: + * url: "#select-fields-and-relations" + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: JavaScript + * label: JS SDK + * source: |- + * import Medusa from "@medusajs/js-sdk" + * + * export const sdk = new Medusa({ + * baseUrl: import.meta.env.VITE_BACKEND_URL || "/", + * debug: import.meta.env.DEV, + * auth: { + * type: "session", + * }, + * }) + * + * sdk.admin.locale.retrieve("en-US") + * .then(({ locale }) => { + * console.log(locale) + * }) + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/locales/fr-FR' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Locales + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/AdminLocaleResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_translations.ts b/www/utils/generated/oas-output/operations/admin/get_admin_translations.ts new file mode 100644 index 0000000000..2cdfc1c3c7 --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_translations.ts @@ -0,0 +1,195 @@ +/** + * @oas [get] /admin/translations + * operationId: GetTranslations + * summary: List Translations + * description: Retrieve a list of translations. The translations can be filtered by fields such as `reference_id` (For example, the ID of a product). The translations can also be sorted or paginated. + * x-authenticated: true + * parameters: + * - name: q + * in: query + * description: Search query to filter translations by their fields. + * required: false + * schema: + * type: string + * title: q + * description: Search query to filter translations by their fields. + * - name: reference_id + * in: query + * required: false + * schema: + * oneOf: + * - type: string + * title: reference_id + * description: Filter translations by a reference ID. For example, the ID of a product. + * example: prod_123 + * - type: array + * description: Filter translations by multiple reference IDs. For example, the IDs of products. + * items: + * type: string + * title: reference_id + * description: The reference ID's details. For example, the ID of a product. + * example: prod_123 + * - name: reference + * in: query + * description: Filter translations by the resource they belong to. For example, `product` or `product_variant`. + * required: false + * schema: + * type: string + * title: reference + * description: Filter translations by the resource they belong to. For example, `product` or `product_variant`. + * - name: locale_code + * in: query + * required: false + * schema: + * oneOf: + * - type: string + * title: locale_code + * description: Filter translations by a locale code in BCP 47 format. + * example: fr-FR + * - type: array + * description: Filter translations by multiple locale codes in BCP 47 format. + * items: + * type: string + * title: locale_code + * description: A locale code in BCP 47 format. + * example: fr-FR + * - 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" + * - name: with_deleted + * in: query + * description: The translation's with deleted. + * required: false + * schema: + * type: boolean + * title: with_deleted + * description: The translation's with deleted. + * - 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. + * required: false + * schema: + * type: string + * title: fields + * 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. + * externalDocs: + * url: "#select-fields-and-relations" + * - name: $and + * in: query + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $and + * - name: $or + * in: query + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * required: false + * schema: + * type: array + * description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters. + * items: + * type: object + * title: $or + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/translations' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Translations + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * allOf: + * - type: object + * description: The list of translations with pagination. + * required: + * - limit + * - offset + * - count + * properties: + * limit: + * type: number + * title: limit + * description: The maximum number of translations returned. + * offset: + * type: number + * title: offset + * description: The number of translations skipped before retrieving the returned translations. + * count: + * type: number + * title: count + * description: The total number of translations matching the query. + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine + * - type: object + * description: SUMMARY + * required: + * - translations + * properties: + * translations: + * type: array + * description: The list of translations. + * items: + * $ref: "#/components/schemas/AdminTranslation" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_translations_settings.ts b/www/utils/generated/oas-output/operations/admin/get_admin_translations_settings.ts new file mode 100644 index 0000000000..38aee870cb --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_translations_settings.ts @@ -0,0 +1,44 @@ +/** + * @oas [get] /admin/translations/settings + * operationId: GetTranslationsSettings + * summary: List Translation Settings + * x-sidebar-summary: List Settings + * description: Retrieve the list of translatable fields for all entities, such as products and collections. + * x-authenticated: true + * parameters: [] + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/translations/settings' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Translations + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/AdminTranslationSettingsResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/get_admin_translations_statistics.ts b/www/utils/generated/oas-output/operations/admin/get_admin_translations_statistics.ts new file mode 100644 index 0000000000..1e76063e00 --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/get_admin_translations_statistics.ts @@ -0,0 +1,69 @@ +/** + * @oas [get] /admin/translations/statistics + * operationId: GetTranslationsStatistics + * summary: Retrieve Translation Statistics + * x-sidebar-summary: Get Statistics + * description: Get statistics on translations for specified locales and entity types. This includes overall + * translation progress for each entity type, and statistics for each locale within those entity types. + * x-authenticated: true + * parameters: + * - name: locales + * in: query + * description: The locale codes to retrieve translation statistics for. Locale codes are in [BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format. + * required: true + * schema: + * type: array + * description: The locale codes to retrieve translation statistics for. + * items: + * type: string + * title: locales + * description: A locale code in [BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format. + * example: "fr-FR" + * - name: entity_types + * in: query + * description: The table names of entities to retrieve translation statistics for. + * required: true + * schema: + * type: array + * description: The table names of entities to retrieve translation statistics for. + * items: + * type: string + * title: entity_types + * description: The table name of an entity. + * example: products + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * x-codeSamples: + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/admin/translations/statistics' \ + * -H 'Authorization: Bearer {access_token}' + * tags: + * - Translations + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/AdminTranslationStatisticsResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + diff --git a/www/utils/generated/oas-output/operations/admin/post_admin_translations_batch.ts b/www/utils/generated/oas-output/operations/admin/post_admin_translations_batch.ts new file mode 100644 index 0000000000..d835a383d7 --- /dev/null +++ b/www/utils/generated/oas-output/operations/admin/post_admin_translations_batch.ts @@ -0,0 +1,170 @@ +/** + * @oas [post] /admin/translations/batch + * operationId: PostTranslationsBatch + * summary: Manage Translations + * description: Manage translations in bulk by creating, updating, or deleting multiple translations in a single request. You can manage translations for various resources such as products, product + * variants, categories, and more. + * x-authenticated: true + * security: + * - api_token: [] + * - cookie_auth: [] + * - jwt_token: [] + * requestBody: + * content: + * application/json: + * schema: + * type: object + * description: The translations to be created, updated, or deleted in bulk. + * properties: + * create: + * type: array + * description: The translations to create. + * items: + * type: object + * description: The translation's details. + * required: + * - reference + * - reference_id + * - locale_code + * - translations + * properties: + * reference: + * type: string + * title: reference + * description: The resource that the translation belongs to. + * example: product + * reference_id: + * type: string + * title: reference_id + * description: The ID of the resource that the translation belongs to. For example, the ID of a product. + * example: prod_123 + * locale_code: + * type: string + * title: locale_code + * description: The translation's locale code in BCP 47 format. + * example: fr-FR + * translations: + * type: object + * description: The translation key-value pairs. Each key is a field in the resource, and the value is the translated text. + * example: + * title: Chaussures + * description: Des chaussures élégantes. + * update: + * type: array + * description: The translations to update. + * items: + * type: object + * description: The data for updating a translation. + * required: + * - id + * properties: + * id: + * type: string + * title: id + * description: The ID of the translation to update. + * reference: + * type: string + * title: reference + * description: The resource that the translation belongs to. + * example: product + * reference_id: + * type: string + * title: reference_id + * description: The ID of the resource that the translation belongs to. For example, the ID of a product. + * example: prod_123 + * locale_code: + * type: string + * title: locale_code + * description: The translation's locale code in BCP 47 format. + * example: fr-FR + * translations: + * type: object + * description: The translation key-value pairs. Each key is a field in the resource, and the value is the translated text. + * example: + * title: Chaussures Modifiées + * description: Des chaussures élégantes et modifiées. + * delete: + * type: array + * description: The translations to delete. + * items: + * type: string + * title: delete + * description: The ID of a translation to delete. + * x-codeSamples: + * - lang: Shell + * label: cURL + * source: |- + * curl -X POST '{backend_url}/admin/translations/batch' \ + * -H 'Authorization: Bearer {access_token}' \ + * -H 'Content-Type: application/json' \ + * -d '{ + * "create": [ + * { + * "reference": "product", + * "reference_id": "prod_123", + * "locale_code": "fr-FR", + * "translations": { + * "title": "Chaussures", + * "description": "Des chaussures élégantes." + * } + * } + * ] + * }' + * tags: + * - Translations + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/AdminTranslationsBatchResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-workflow: batchTranslationsWorkflow + * x-events: + * - name: translation.created + * payload: |- + * ```ts + * { + * id, // The ID of the translation + * } + * ``` + * description: Emitted when translations are created. + * deprecated: false + * since: 2.12.3 + * - name: translation.updated + * payload: |- + * ```ts + * { + * id, // The ID of the translation + * } + * ``` + * description: Emitted when translations are updated. + * deprecated: false + * since: 2.12.3 + * - name: translation.deleted + * payload: |- + * ```ts + * { + * id, // The ID of the translation + * } + * ``` + * description: Emitted when translations are deleted. + * deprecated: false + * since: 2.12.3 + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + 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 f9252739f0..79e02924dd 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 @@ -29,6 +29,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -41,6 +51,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 49892c2595..04f4cc9d97 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 @@ -22,6 +22,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -34,6 +44,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 adaddc29ad..c65aad41ec 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -37,6 +47,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 00f6f24859..3063b2ce9f 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 771571ebaa..9a107cdf28 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -596,6 +606,16 @@ * type: string * title: id * description: The collection's ID. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 bfa4ae36f6..e2b6a941bd 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 @@ -22,6 +22,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -34,6 +44,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 ca28e0f3a7..02064662c8 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 @@ -13,6 +13,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -103,6 +113,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 0013196a05..7f3ea60b9a 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 37b1bc84bf..600f1359f1 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 @@ -17,6 +17,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 7c9bff0141..a1628eaa27 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 @@ -17,6 +17,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: city * in: query * description: Filter by the address's city. @@ -118,6 +128,16 @@ * items: * type: object * title: $or + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 cd278263f1..4e9cc1b399 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 @@ -20,6 +20,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -34,6 +44,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] diff --git a/www/utils/generated/oas-output/operations/store/get_store_locales.ts b/www/utils/generated/oas-output/operations/store/get_store_locales.ts new file mode 100644 index 0000000000..db446555e1 --- /dev/null +++ b/www/utils/generated/oas-output/operations/store/get_store_locales.ts @@ -0,0 +1,91 @@ +/** + * @oas [get] /store/locales + * operationId: GetLocales + * summary: List Locales + * description: Retrieve the list of supported locales. You can use this list to allow customers to select their preferred locale in your storefront. + * externalDocs: + * url: https://docs.medusajs.com/resources/storefront-development/localization + * description: Learn how to serve localized content in your storefront. + * 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: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. + * x-codeSamples: + * - lang: JavaScript + * label: JS SDK + * source: |- + * import Medusa from "@medusajs/js-sdk" + * + * let MEDUSA_BACKEND_URL = "http://localhost:9000" + * + * if (process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL) { + * MEDUSA_BACKEND_URL = process.env.NEXT_PUBLIC_MEDUSA_BACKEND_URL + * } + * + * export const sdk = new Medusa({ + * baseUrl: MEDUSA_BACKEND_URL, + * debug: process.env.NODE_ENV === "development", + * publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY, + * }) + * + * sdk.store.locale.list() + * .then(({ locales }) => { + * console.log(locales) + * }) + * - lang: Shell + * label: cURL + * source: |- + * curl '{backend_url}/store/locales' \ + * -H 'x-publishable-api-key: {your_publishable_api_key}' + * tags: + * - Locales + * responses: + * "200": + * description: OK + * content: + * application/json: + * schema: + * $ref: "#/components/schemas/StoreLocaleListResponse" + * "400": + * $ref: "#/components/responses/400_error" + * "401": + * $ref: "#/components/responses/unauthorized" + * "404": + * $ref: "#/components/responses/not_found_error" + * "409": + * $ref: "#/components/responses/invalid_state_error" + * "422": + * $ref: "#/components/responses/invalid_request_error" + * "500": + * $ref: "#/components/responses/500_error" + * x-since: 2.12.3 + * x-featureFlag: translation + * +*/ + 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 dac30f3add..c85b31f804 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 @@ -14,6 +14,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -129,6 +139,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 83c25f2542..bdeeec10d3 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 c363419257..3eb1c94aba 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -72,6 +82,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 ecc1dcf6d4..2ff460b77c 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -644,6 +654,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 67acd04395..d0865ba0e7 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 @@ -22,6 +22,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -56,6 +66,16 @@ * description: Whether to retrieve a list of child categories. If you enable this, add to the `fields` query parameter `category_children` to set the children of a category in this field. You can either * pass `*category_children` to retreieve the fields of all child categories, or select specific fields to make the response size smaller. For example, * `fields=category_children.id,category_children.name`. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-tags.ts b/www/utils/generated/oas-output/operations/store/get_store_product-tags.ts index 89f088e187..0ed0b04d45 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-tags.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-tags.ts @@ -13,6 +13,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -583,6 +593,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-tags_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_product-tags_[id].ts index b53c69560e..ace6d6a8d1 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-tags_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-tags_[id].ts @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -33,6 +43,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-types.ts b/www/utils/generated/oas-output/operations/store/get_store_product-types.ts index 70240a16db..b35583e839 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-types.ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-types.ts @@ -13,6 +13,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -583,6 +593,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL diff --git a/www/utils/generated/oas-output/operations/store/get_store_product-types_[id].ts b/www/utils/generated/oas-output/operations/store/get_store_product-types_[id].ts index 6a2142157f..4f3bf4871c 100644 --- a/www/utils/generated/oas-output/operations/store/get_store_product-types_[id].ts +++ b/www/utils/generated/oas-output/operations/store/get_store_product-types_[id].ts @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -33,6 +43,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 67dd66296d..ec8deeb0b6 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 @@ -2,7 +2,14 @@ * @oas [get] /store/products * operationId: GetProducts * summary: List Products - * description: Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. + * description: > + * Retrieve a list of products. The products can be filtered by fields such as `id`. The products can also be sorted or paginated. + * + * + * You can retrieve the content of the products translated to a specific locale either by passing the `locale` query parameter or by setting the `Content-Language` header to the desired locale code in BCP 47 format. If you don't pass a locale, and your store has a default locale, the default locale will be used. + * + * + * With localization, the products' content like title and description will be in the specified locale if a translation is available, and fallback to the original content otherwise. Learn more in the [Localization](#localization) section. * x-authenticated: false * externalDocs: * url: https://docs.medusajs.com/resources/storefront-development/products/price @@ -16,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -732,6 +749,16 @@ * type: string * title: cart_id * description: The product's cart id. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 bfcc0ea3f1..ed611f582e 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 @@ -2,7 +2,14 @@ * @oas [get] /store/products/{id} * operationId: GetProductsId * summary: Get a Product - * description: Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. + * description: > + * Retrieve a product by its ID. You can expand the product's relations or select the fields that should be returned. + * + * + * You can retrieve the content of the product translated to a specific locale either by passing the `locale` query parameter or by setting the `Content-Language` header to the desired locale code in BCP 47 format. If you don't pass a locale, and your store has a default locale, the default locale will be used. + * + * + * With localization, the product's content like title and description will be in the specified locale if a translation is available, and fallback to the original content otherwise. Learn more in the [Localization](#localization) section. * x-authenticated: false * externalDocs: * url: https://docs.medusajs.com/resources/storefront-development/products/price @@ -22,6 +29,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -73,6 +90,16 @@ * 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: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 3454f0d9cc..e90d484f59 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -134,6 +144,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 932300e8d2..e561b23416 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 c38c6243c5..3c2088e5e9 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 @@ -13,6 +13,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 +71,16 @@ * type: boolean * title: with_deleted * description: Whether to include deleted records in the result. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 99280caffe..8d19045a8d 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 89355c7f08..f369194149 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -95,6 +105,16 @@ * type: boolean * title: is_return * description: Whether the shipping option can be used for returns. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 69dc08b523..b8bbf9afdc 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 @@ -13,6 +13,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -25,6 +35,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 7fc28c272c..957d103228 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 @@ -21,6 +21,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -33,6 +43,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 51089b0fd4..3d5ec80a66 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 @@ -22,6 +22,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -34,6 +44,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 807219fae5..cd647f313b 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -37,6 +47,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 a42671d32c..7b1ce83d78 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -35,6 +45,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 9c75484d18..ad150c2dd6 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 @@ -29,6 +29,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -41,6 +51,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 cf4fcbeb3d..e5a2a2e784 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -35,6 +45,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 2bc1b8f113..9cac1e1b8d 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -35,6 +45,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 c1716cabb8..645b788898 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 @@ -20,6 +20,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -32,6 +42,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: Shell * label: cURL 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 8785dd9347..ad41346b5e 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -29,6 +39,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 1568372029..b364c8bfb1 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -29,6 +39,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 38797edc18..af4321da40 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 @@ -17,6 +17,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -31,6 +41,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 5332e0b159..0578b63b43 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 @@ -23,6 +23,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -37,6 +47,16 @@ * Links](https://docs.medusajs.com/learn/fundamentals/api-routes/retrieve-custom-links) documentation. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * security: * - cookie_auth: [] * - jwt_token: [] 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 4b30b71f1f..3bd8e41996 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 @@ -22,6 +22,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -36,6 +46,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 943c48b5ef..602f42393c 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 @@ -20,6 +20,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -34,6 +44,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * x-codeSamples: * - lang: JavaScript * label: JS SDK 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 59e679935a..3446d3ae20 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 @@ -20,6 +20,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -34,6 +44,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 b6baa6724b..35412f2b5c 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 @@ -21,6 +21,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -35,6 +45,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 888e2317c6..581fe067c4 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 @@ -16,6 +16,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -28,6 +38,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 92206bd5ec..dbc688bc8a 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 @@ -31,6 +31,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - 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 @@ -43,6 +53,16 @@ * fields. without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: diff --git a/www/utils/generated/oas-output/operations/store/post_store_returns.ts b/www/utils/generated/oas-output/operations/store/post_store_returns.ts index 9d601c28ad..acf5e92f56 100644 --- a/www/utils/generated/oas-output/operations/store/post_store_returns.ts +++ b/www/utils/generated/oas-output/operations/store/post_store_returns.ts @@ -13,6 +13,26 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: 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 b42efcf201..4a9c737c88 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 @@ -19,6 +19,16 @@ * type: string * externalDocs: * url: https://docs.medusajs.com/api/store#publishable-api-key + * - name: Content-Language + * in: header + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * - name: fields * in: query * description: |- @@ -33,6 +43,16 @@ * fields. Without prefix it will replace the entire default fields. * externalDocs: * url: "#select-fields-and-relations" + * - name: locale + * in: query + * description: The locale in BCP 47 format to retrieve localized content. + * required: false + * schema: + * type: string + * example: en-US + * externalDocs: + * url: https://docs.medusajs.com/resources/commerce-modules/translation/storefront + * description: Learn more in the Serve Translations in Storefront guide. * requestBody: * content: * application/json: diff --git a/www/utils/generated/oas-output/schemas/AdminLocale.ts b/www/utils/generated/oas-output/schemas/AdminLocale.ts new file mode 100644 index 0000000000..e8c041f1b1 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminLocale.ts @@ -0,0 +1,39 @@ +/** + * @schema AdminLocale + * type: object + * description: The locale's details. + * x-schemaName: AdminLocale + * required: + * - code + * - name + * - created_at + * - updated_at + * - deleted_at + * properties: + * code: + * type: string + * title: code + * description: The locale's code in BCP 47 format. + * example: fr-FR + * name: + * type: string + * title: name + * description: The locale's display name. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date and time at which the locale was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date and time at which the locale was last updated. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The date and time at which the locale was deleted. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminLocaleListResponse.ts b/www/utils/generated/oas-output/schemas/AdminLocaleListResponse.ts new file mode 100644 index 0000000000..3dae4de916 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminLocaleListResponse.ts @@ -0,0 +1,36 @@ +/** + * @schema AdminLocaleListResponse + * type: object + * description: The list of locales with pagination details. + * x-schemaName: AdminLocaleListResponse + * required: + * - limit + * - offset + * - count + * - locales + * properties: + * limit: + * type: number + * title: limit + * description: The maximum number of locales returned. + * offset: + * type: number + * title: offset + * description: The number of locales skipped before retrieving the returned locales. + * count: + * type: number + * title: count + * description: The total number of locales matching the query. + * estimate_count: + * type: number + * title: estimate_count + * description: The estimated count retrieved from the PostgreSQL query planner, which may be inaccurate. + * x-featureFlag: index_engine + * locales: + * type: array + * description: The list of locales. + * items: + * $ref: "#/components/schemas/AdminLocale" + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminLocaleResponse.ts b/www/utils/generated/oas-output/schemas/AdminLocaleResponse.ts new file mode 100644 index 0000000000..6db29a9a30 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminLocaleResponse.ts @@ -0,0 +1,13 @@ +/** + * @schema AdminLocaleResponse + * type: object + * description: The locale's details. + * x-schemaName: AdminLocaleResponse + * required: + * - locale + * properties: + * locale: + * $ref: "#/components/schemas/AdminLocale" + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminStore.ts b/www/utils/generated/oas-output/schemas/AdminStore.ts index 383adacef0..1f81f56ad6 100644 --- a/www/utils/generated/oas-output/schemas/AdminStore.ts +++ b/www/utils/generated/oas-output/schemas/AdminStore.ts @@ -7,6 +7,7 @@ * - id * - name * - supported_currencies + * - supported_locales * - default_sales_channel_id * - default_region_id * - default_location_id @@ -55,6 +56,11 @@ * format: date-time * title: updated_at * description: The date the store was updated. + * supported_locales: + * type: array + * description: The store's supported locales. + * items: + * $ref: "#/components/schemas/AdminStoreLocale" * */ diff --git a/www/utils/generated/oas-output/schemas/AdminStoreLocale.ts b/www/utils/generated/oas-output/schemas/AdminStoreLocale.ts new file mode 100644 index 0000000000..bb1e5be0e0 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminStoreLocale.ts @@ -0,0 +1,46 @@ +/** + * @schema AdminStoreLocale + * type: object + * description: The details of a store's locale. + * x-schemaName: AdminStoreLocale + * required: + * - id + * - locale_code + * - store_id + * - locale + * - created_at + * - updated_at + * - deleted_at + * properties: + * id: + * type: string + * title: id + * description: The locale's ID. + * locale_code: + * type: string + * title: locale_code + * description: The locale's code in BCP 47 format. + * store_id: + * type: string + * title: store_id + * description: The ID of the store to which the locale belongs. + * locale: + * $ref: "#/components/schemas/AdminLocale" + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date the locale was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date the locale was updated. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The date the locale was deleted. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminTranslation.ts b/www/utils/generated/oas-output/schemas/AdminTranslation.ts new file mode 100644 index 0000000000..57e7e409b6 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminTranslation.ts @@ -0,0 +1,58 @@ +/** + * @schema AdminTranslation + * type: object + * description: The translation's details. + * x-schemaName: AdminTranslation + * required: + * - id + * - reference_id + * - reference + * - locale_code + * - translations + * - created_at + * - updated_at + * - deleted_at + * properties: + * id: + * type: string + * title: id + * description: The translation's ID. + * reference_id: + * type: string + * title: reference_id + * description: The ID of the resource that the translation belongs to. For example, the ID of a product. + * example: prod_123 + * reference: + * type: string + * title: reference + * description: The resource that the translation belongs to. + * example: product + * locale_code: + * type: string + * title: locale_code + * description: The translation's locale code in BCP 47 format. + * example: fr-FR + * translations: + * type: object + * description: The translation key-value pairs. Each key is a field in the resource, and the value is the translated text. + * example: + * title: Chaussures + * description: Des chaussures élégantes. + * created_at: + * type: string + * format: date-time + * title: created_at + * description: The date that the translation was created. + * updated_at: + * type: string + * format: date-time + * title: updated_at + * description: The date that the translation was updated. + * deleted_at: + * type: string + * format: date-time + * title: deleted_at + * description: The date that the translation was deleted. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminTranslationSettingsResponse.ts b/www/utils/generated/oas-output/schemas/AdminTranslationSettingsResponse.ts new file mode 100644 index 0000000000..90f621d579 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminTranslationSettingsResponse.ts @@ -0,0 +1,16 @@ +/** + * @schema AdminTranslationSettingsResponse + * type: object + * description: The translation settings' details. + * x-schemaName: AdminTranslationSettingsResponse + * required: + * - translatable_fields + * properties: + * translatable_fields: + * type: object + * description: Key-value pairs of translatable fields for different entities. Each key is an entity type, and the value is an array of fields that can be translated for that entity. + * example: + * product: ["title", "description"] + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminTranslationStatisticsResponse.ts b/www/utils/generated/oas-output/schemas/AdminTranslationStatisticsResponse.ts new file mode 100644 index 0000000000..d26efcd066 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminTranslationStatisticsResponse.ts @@ -0,0 +1,72 @@ +/** + * @schema AdminTranslationStatisticsResponse + * type: object + * description: The translation statistics details. + * x-schemaName: AdminTranslationStatisticsResponse + * required: + * - statistics + * properties: + * statistics: + * type: object + * description: The translation statistics for different entity types. The key is the entity type, and the value is an object containing the statistics for that entity type. + * example: + * product: + * expected: 150 + * translated: 120 + * missing: 30 + * by_locale: + * fr-FR: + * expected: 150 + * translated: 120 + * missing: 30 + * required: + * - by_locale + * - expected + * - translated + * - missing + * additionalProperties: + * type: object + * properties: + * by_locale: + * type: object + * description: The translation statistics of an entity type broken down by locale. The key is the locale code in BCP 47 format, and + * the value is an object containing the statistics for that locale. + * example: + * fr-FR: + * expected: 150 + * translated: 120 + * missing: 30 + * required: + * - expected + * - translated + * - missing + * additionalProperties: + * type: object + * properties: + * expected: + * type: number + * title: expected + * description: The total number of translatable fields. + * translated: + * type: number + * title: translated + * description: The number of translated fields. + * missing: + * type: number + * title: missing + * description: The number of fields that are yet to be translated. + * expected: + * type: number + * title: expected + * description: The total number of translatable fields across specified locales. + * translated: + * type: number + * title: translated + * description: The number of translated fields across specified locales. + * missing: + * type: number + * title: missing + * description: The number of fields that are yet to be translated across specified locales. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminTranslationsBatchResponse.ts b/www/utils/generated/oas-output/schemas/AdminTranslationsBatchResponse.ts new file mode 100644 index 0000000000..8457cbb644 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminTranslationsBatchResponse.ts @@ -0,0 +1,47 @@ +/** + * @schema AdminTranslationsBatchResponse + * type: object + * description: The batch response for managing translations. + * x-schemaName: AdminTranslationsBatchResponse + * required: + * - created + * - updated + * - deleted + * properties: + * created: + * type: array + * description: The created translations. + * items: + * $ref: "#/components/schemas/AdminTranslation" + * updated: + * type: array + * description: The updated translations. + * items: + * $ref: "#/components/schemas/AdminTranslation" + * deleted: + * type: object + * description: Summary of the deleted translations. + * required: + * - ids + * - object + * - deleted + * properties: + * ids: + * type: array + * description: The IDs of the deleted translations. + * items: + * type: string + * title: ids + * description: A translation ID. + * object: + * type: string + * title: object + * description: The type of object deleted. + * default: translation + * deleted: + * type: boolean + * title: deleted + * description: Whether the translations were successfully deleted. + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts b/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts index 150fec9b89..b221f7dc39 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateOrder.ts @@ -19,6 +19,11 @@ * externalDocs: * url: https://docs.medusajs.com/api/admin#manage-metadata * description: Learn how to manage metadata + * locale: + * type: string + * title: locale + * description: The order's locale in [BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format. + * example: en-US * */ diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateStore.ts b/www/utils/generated/oas-output/schemas/AdminUpdateStore.ts index 1f8d4f82ca..df88fa7650 100644 --- a/www/utils/generated/oas-output/schemas/AdminUpdateStore.ts +++ b/www/utils/generated/oas-output/schemas/AdminUpdateStore.ts @@ -31,6 +31,11 @@ * externalDocs: * url: https://docs.medusajs.com/api/admin#manage-metadata * description: Learn how to manage metadata + * supported_locales: + * type: array + * description: The store's supported locales. + * items: + * $ref: "#/components/schemas/AdminUpdateStoreSupportedLocale" * */ diff --git a/www/utils/generated/oas-output/schemas/AdminUpdateStoreSupportedLocale.ts b/www/utils/generated/oas-output/schemas/AdminUpdateStoreSupportedLocale.ts new file mode 100644 index 0000000000..0acc3a3712 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/AdminUpdateStoreSupportedLocale.ts @@ -0,0 +1,16 @@ +/** + * @schema AdminUpdateStoreSupportedLocale + * type: object + * description: The payload to update a store's supported locale. + * x-schemaName: AdminUpdateStoreSupportedLocale + * required: + * - locale_code + * properties: + * locale_code: + * type: string + * title: locale_code + * description: The locale's code in [BCP 47 format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). + * example: fr-FR + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/Order.ts b/www/utils/generated/oas-output/schemas/Order.ts index 121fffe959..cddc3b97ae 100644 --- a/www/utils/generated/oas-output/schemas/Order.ts +++ b/www/utils/generated/oas-output/schemas/Order.ts @@ -325,6 +325,11 @@ * description: The custom display ID of the order. * externalDocs: * url: https://docs.medusajs.com/resources/commerce-modules/order/custom-display-id + * locale: + * type: string + * title: locale + * description: The order's locale in [BCP 47](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1) format. + * example: en-US * */ diff --git a/www/utils/generated/oas-output/schemas/StoreLocale.ts b/www/utils/generated/oas-output/schemas/StoreLocale.ts new file mode 100644 index 0000000000..55db094628 --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreLocale.ts @@ -0,0 +1,22 @@ +/** + * @schema StoreLocale + * type: object + * description: The store locale's details. + * x-schemaName: StoreLocale + * required: + * - code + * - name + * properties: + * code: + * type: string + * title: code + * description: The locale's code in [BCP 47 format](https://gist.github.com/typpo/b2b828a35e683b9bf8db91b5404f1bd1). + * example: en-US + * name: + * type: string + * title: name + * description: The locale's display name. + * example: English (United States) + * +*/ + diff --git a/www/utils/generated/oas-output/schemas/StoreLocaleListResponse.ts b/www/utils/generated/oas-output/schemas/StoreLocaleListResponse.ts new file mode 100644 index 0000000000..c907a744ad --- /dev/null +++ b/www/utils/generated/oas-output/schemas/StoreLocaleListResponse.ts @@ -0,0 +1,16 @@ +/** + * @schema StoreLocaleListResponse + * type: object + * description: The list of supported locales in the store. + * x-schemaName: StoreLocaleListResponse + * required: + * - locales + * properties: + * locales: + * type: array + * description: The list of supported locales in the store. + * items: + * $ref: "#/components/schemas/StoreLocale" + * +*/ + diff --git a/www/utils/generated/route-examples-output/route-examples.json b/www/utils/generated/route-examples-output/route-examples.json index d2ba3d0811..a07136621d 100644 --- a/www/utils/generated/route-examples-output/route-examples.json +++ b/www/utils/generated/route-examples-output/route-examples.json @@ -413,6 +413,9 @@ "POST /admin/order-changes/{id}": { "js-sdk": "sdk.admin.order.updateOrderChange(\n \"ordch_123\",\n {\n carry_over_promotions: true\n }\n)\n.then(({ order_change }) => {\n console.log(order_change)\n})" }, + "POST /admin/orders/export": { + "js-sdk": "sdk.admin.order.export({})\n.then(({ transaction_id }) => {\n console.log(transaction_id)\n})" + }, "POST /admin/order-edits": { "js-sdk": "sdk.admin.orderEdit.initiateRequest({\n order_id: \"order_123\"\n})\n.then(({ order_change }) => {\n console.log(order_change)\n})" }, @@ -482,6 +485,9 @@ "POST /admin/price-lists/{id}/prices/batch": { "js-sdk": "sdk.admin.priceList.batchPrices(\"plist_123\", {\n create: [{\n variant_id: \"variant_123\",\n currency_code: \"usd\",\n amount: 10,\n rules: {\n region_id: \"reg_123\"\n }\n }],\n update: [{\n id: \"price_123\",\n variant_id: \"variant_123\",\n amount: 20,\n }],\n delete: [\"price_123\"]\n})\n.then(({ created, updated, deleted }) => {\n console.log(created, updated, deleted)\n})" }, + "GET /admin/price-lists/{id}/prices": { + "js-sdk": "sdk.admin.priceList.prices(\"plist_123\")\n.then(({ prices }) => {\n console.log(prices)\n})" + }, "POST /admin/price-lists/{id}/products": { "js-sdk": "sdk.admin.priceList.linkProducts(\"plist_123\", {\n remove: [\"prod_123\"]\n})\n.then(({ price_list }) => {\n console.log(price_list)\n})" }, @@ -959,6 +965,12 @@ "DELETE /admin/shipping-option-types/{id}": { "js-sdk": "sdk.admin.shippingOptionType.delete(\"sotype_123\")\n.then(({ deleted }) => {\n console.log(deleted)\n})" }, + "GET /admin/locales": { + "js-sdk": "sdk.admin.locale.list()\n.then(({ locales, count, limit, offset }) => {\n console.log(locales)\n})" + }, + "GET /admin/locales/{code}": { + "js-sdk": "sdk.admin.locale.retrieve(\"en-US\")\n.then(({ locale }) => {\n console.log(locale)\n})" + }, "POST /auth/{actor}/{method}/register": { "js-sdk": "await sdk.auth.register(\n \"customer\",\n \"emailpass\",\n {\n email: \"customer@gmail.com\",\n password: \"supersecret\"\n }\n)\n\n// all subsequent requests will use the token in the header\nconst { customer } = await sdk.store.customer.create({\n email: \"customer@gmail.com\",\n password: \"supersecret\"\n})" }, @@ -1084,5 +1096,8 @@ }, "DELETE /store/customers/me/addresses/{addressid}": { "js-sdk": "// TODO must be authenticated as the customer to delete their address\nsdk.store.customer.deleteAddress(\"caddr_123\")\n.then(({ deleted, parent: customer }) => {\n console.log(customer)\n})" + }, + "GET /store/locales": { + "js-sdk": "sdk.store.locale.list()\n.then(({ locales }) => {\n console.log(locales)\n})" } } \ No newline at end of file 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 920ef60a28..be83772985 100644 --- a/www/utils/packages/docs-generator/src/classes/kinds/oas.ts +++ b/www/utils/packages/docs-generator/src/classes/kinds/oas.ts @@ -135,6 +135,7 @@ class OasKindGenerator extends FunctionKindGenerator { }, ] readonly RESPONSE_TYPE_NAMES = ["MedusaResponse"] + readonly LOCALIZED_ROUTES = ["store/"] /** * This map collects tags of all the generated OAS, then, once the generation process finishes, @@ -348,6 +349,7 @@ class OasKindGenerator extends FunctionKindGenerator { node, tagName, methodName, + oasPath, }) oas.parameters?.push(...queryParameters) @@ -582,6 +584,7 @@ class OasKindGenerator extends FunctionKindGenerator { node, tagName, methodName, + oasPath, forUpdate: true, }) @@ -1170,6 +1173,7 @@ class OasKindGenerator extends FunctionKindGenerator { node, tagName, methodName, + oasPath, forUpdate = false, }: { /** @@ -1184,6 +1188,10 @@ class OasKindGenerator extends FunctionKindGenerator { * The tag's name. */ tagName?: string + /** + * The OAS path. + */ + oasPath: string /** * Whether the request parameters are retrieved for update purposes only. */ @@ -1200,6 +1208,30 @@ class OasKindGenerator extends FunctionKindGenerator { } { const queryParameters: OpenAPIV3.ParameterObject[] = [] let requestSchema: OpenApiSchema | undefined + const isLocalizedRoute = this.LOCALIZED_ROUTES.some((route) => + oasPath.startsWith(route) + ) + + if (isLocalizedRoute) { + queryParameters.push( + this.getParameterObject({ + type: "query", + name: "locale", + description: + "The locale in BCP 47 format to retrieve localized content.", + required: false, + schema: { + type: "string", + example: "en-US", + externalDocs: { + url: "https://docs.medusajs.com/resources/commerce-modules/translation/storefront", + description: + "Learn more in the Serve Translations in Storefront guide.", + }, + }, + }) + ) + } if ( !node.parameters[0].type || @@ -1343,6 +1375,22 @@ class OasKindGenerator extends FunctionKindGenerator { }, }, }), + this.getParameterObject({ + type: "header", + name: "Content-Language", + description: + "The locale in BCP 47 format to retrieve localized content.", + required: false, + schema: { + type: "string", + example: "en-US", + externalDocs: { + url: "https://docs.medusajs.com/resources/commerce-modules/translation/storefront", + description: + "Learn more in the Serve Translations in Storefront guide.", + }, + }, + }), ] }