chore: generate and update OAS for translations (#14281)

* chore: generate and update OAS for translations

* support localization header

* add locale to all store routes

* fixes

* small fix
This commit is contained in:
Shahed Nasser
2025-12-16 15:52:33 +02:00
committed by GitHub
parent 6815b3d7db
commit 53cdbaa069
75 changed files with 2322 additions and 6 deletions

View File

@@ -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})"
}
}