feat(): Translation settings + user configuration + admin hook and js sdk + dashboard (#14355)

* feat(): Translation settings + user configuration

* feat(): Translation settings + user configuration

* Create gentle-bees-grow.md

* add entities end point

* add entities end point

* add admin hook and js sdk method

* update changeset

* fix tests

* fix tests

* rm unnecessary copy

* update dashboard to use the new resources

* update dashboard to use the new resources

* update dashboard to use the new resources

* allow type inference through interface augmentation in the defineConfig of medusa-config

* allow type inference through interface augmentation in the defineConfig of medusa-config

* exclude id and _id props

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Adrien de Peretti
2025-12-19 15:29:48 +01:00
committed by GitHub
co-authored by Oli Juhl
parent 797878af26
commit b21a599d11
26 changed files with 1041 additions and 260 deletions
@@ -1,2 +1,3 @@
export { default as Translation } from "./translation"
export { default as Locale } from "./locale"
export { default as Locale } from "./locale"
export { default as Settings } from "./settings"
@@ -0,0 +1,26 @@
import { model } from "@medusajs/framework/utils"
const Settings = model
.define("translation_settings", {
id: model.id({ prefix: "trset" }).primaryKey(),
/**
* The entity type that these settings apply to (e.g., "product", "product_variant").
*/
entity_type: model.text().searchable(),
/**
* The translatable fields for this entity type.
* Array of field names that can be translated.
*
* @example
* ["title", "description", "material"]
*/
fields: model.json(),
})
.indexes([
{
on: ["entity_type"],
unique: true,
},
])
export default Settings