@medusajs/translation 3.0.0-snapshot-20251216103925 → 3.0.0-snapshot-20251216135612

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,12 @@
1
1
  declare const Locale: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
2
  id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
+ /**
4
+ * The BCP 47 language tag code of the locale (e.g., "en-US", "da-DK").
5
+ */
3
6
  code: import("@medusajs/framework/utils").TextProperty;
7
+ /**
8
+ * The human-readable name of the locale (e.g., "English (US)", "Danish").
9
+ */
4
10
  name: import("@medusajs/framework/utils").TextProperty;
5
11
  }>, "locale">;
6
12
  export default Locale;
@@ -1 +1 @@
1
- {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../src/models/locale.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;;;aAWR,CAAA;AAEJ,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../src/models/locale.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;IAGR;;OAEG;;IAEH;;OAEG;;aAQH,CAAA;AAEJ,eAAe,MAAM,CAAA"}
@@ -4,8 +4,14 @@ const utils_1 = require("@medusajs/framework/utils");
4
4
  const Locale = utils_1.model
5
5
  .define("locale", {
6
6
  id: utils_1.model.id({ prefix: "loc" }).primaryKey(),
7
- code: utils_1.model.text().searchable(), // BCP 47 language tag, e.g., "en-US", "da-DK"
8
- name: utils_1.model.text().searchable(), // Human-readable name, e.g., "English (US)", "Danish"
7
+ /**
8
+ * The BCP 47 language tag code of the locale (e.g., "en-US", "da-DK").
9
+ */
10
+ code: utils_1.model.text().searchable(),
11
+ /**
12
+ * The human-readable name of the locale (e.g., "English (US)", "Danish").
13
+ */
14
+ name: utils_1.model.text().searchable(),
9
15
  })
10
16
  .indexes([
11
17
  {
@@ -1 +1 @@
1
- {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/models/locale.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,MAAM,MAAM,GAAG,aAAK;KACjB,MAAM,CAAC,QAAQ,EAAE;IAChB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE;IAC5C,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,8CAA8C;IAC/E,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,sDAAsD;CACxF,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,MAAM,CAAC;QACZ,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAA;AAEJ,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"locale.js","sourceRoot":"","sources":["../../src/models/locale.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,MAAM,MAAM,GAAG,aAAK;KACjB,MAAM,CAAC,QAAQ,EAAE;IAChB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE;IAC5C;;OAEG;IACH,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IAC/B;;OAEG;IACH,IAAI,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;CAChC,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,MAAM,CAAC;QACZ,MAAM,EAAE,IAAI;KACb;CACF,CAAC,CAAA;AAEJ,kBAAe,MAAM,CAAA"}
@@ -1,9 +1,35 @@
1
1
  declare const Translation: import("@medusajs/framework/utils").DmlEntity<import("@medusajs/framework/utils").DMLEntitySchemaBuilder<{
2
2
  id: import("@medusajs/framework/utils").PrimaryKeyModifier<string, import("@medusajs/framework/utils").IdProperty>;
3
+ /**
4
+ * The ID of the entity that the translation belongs to. For example, the ID of a product or a product variant.
5
+ */
3
6
  reference_id: import("@medusajs/framework/utils").TextProperty;
7
+ /**
8
+ * The name of the table that the translation belongs to. For example, "product" or "product_variant".
9
+ */
4
10
  reference: import("@medusajs/framework/utils").TextProperty;
11
+ /**
12
+ * The BCP 47 language tag code of the locale
13
+ *
14
+ * @example
15
+ * "en-US"
16
+ */
5
17
  locale_code: import("@medusajs/framework/utils").TextProperty;
18
+ /**
19
+ * The translations of the entity.
20
+ * The object's keys are the field names of the entity, and its value is the translated value.
21
+ *
22
+ * @example
23
+ * {
24
+ * "title": "Product Title",
25
+ * "description": "Product Description",
26
+ * }
27
+ */
6
28
  translations: import("@medusajs/framework/utils").JSONProperty;
29
+ /**
30
+ * Precomputed count of translated fields of a resource.
31
+ * Useful for optimization purposes.
32
+ */
7
33
  translated_field_count: import("@medusajs/framework/utils").NumberProperty;
8
34
  }>, "translation">;
9
35
  export default Translation;
@@ -1 +1 @@
1
- {"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../src/models/translation.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW;;;;;;;kBA0Bb,CAAA;AAEJ,eAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"translation.d.ts","sourceRoot":"","sources":["../../src/models/translation.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,WAAW;;IAGb;;OAEG;;IAEH;;OAEG;;IAEH;;;;;OAKG;;IAEH;;;;;;;;;OASG;;IAEH;;;OAGG;;kBAoBH,CAAA;AAEJ,eAAe,WAAW,CAAA"}
@@ -4,11 +4,37 @@ const utils_1 = require("@medusajs/framework/utils");
4
4
  const Translation = utils_1.model
5
5
  .define("translation", {
6
6
  id: utils_1.model.id({ prefix: "trans" }).primaryKey(),
7
+ /**
8
+ * The ID of the entity that the translation belongs to. For example, the ID of a product or a product variant.
9
+ */
7
10
  reference_id: utils_1.model.text().searchable(),
8
- reference: utils_1.model.text().searchable(), // e.g., "product", "product_variant", "product_category"
9
- locale_code: utils_1.model.text().searchable(), // BCP 47 language tag, e.g., "en-US", "da-DK"
11
+ /**
12
+ * The name of the table that the translation belongs to. For example, "product" or "product_variant".
13
+ */
14
+ reference: utils_1.model.text().searchable(),
15
+ /**
16
+ * The BCP 47 language tag code of the locale
17
+ *
18
+ * @example
19
+ * "en-US"
20
+ */
21
+ locale_code: utils_1.model.text().searchable(),
22
+ /**
23
+ * The translations of the entity.
24
+ * The object's keys are the field names of the entity, and its value is the translated value.
25
+ *
26
+ * @example
27
+ * {
28
+ * "title": "Product Title",
29
+ * "description": "Product Description",
30
+ * }
31
+ */
10
32
  translations: utils_1.model.json(),
11
- translated_field_count: utils_1.model.number().default(0), // Precomputed count of translated fields for performance
33
+ /**
34
+ * Precomputed count of translated fields of a resource.
35
+ * Useful for optimization purposes.
36
+ */
37
+ translated_field_count: utils_1.model.number().default(0),
12
38
  })
13
39
  .indexes([
14
40
  {
@@ -1 +1 @@
1
- {"version":3,"file":"translation.js","sourceRoot":"","sources":["../../src/models/translation.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,MAAM,WAAW,GAAG,aAAK;KACtB,MAAM,CAAC,aAAa,EAAE;IACrB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE;IAC9C,YAAY,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACvC,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,yDAAyD;IAC/F,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE,EAAE,8CAA8C;IACtF,YAAY,EAAE,aAAK,CAAC,IAAI,EAAE;IAC1B,sBAAsB,EAAE,aAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,yDAAyD;CAC7G,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;QACnC,MAAM,EAAE,IAAI;KACb;IACD;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,WAAW,EAAE,aAAa,CAAC;KACjD;IACD;QACE,EAAE,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;KACjC;IACD;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;KAClC;IACD;QACE,EAAE,EAAE,CAAC,aAAa,CAAC;KACpB;CACF,CAAC,CAAA;AAEJ,kBAAe,WAAW,CAAA"}
1
+ {"version":3,"file":"translation.js","sourceRoot":"","sources":["../../src/models/translation.ts"],"names":[],"mappings":";;AAAA,qDAAiD;AAEjD,MAAM,WAAW,GAAG,aAAK;KACtB,MAAM,CAAC,aAAa,EAAE;IACrB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,EAAE;IAC9C;;OAEG;IACH,YAAY,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACvC;;OAEG;IACH,SAAS,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACpC;;;;;OAKG;IACH,WAAW,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,UAAU,EAAE;IACtC;;;;;;;;;OASG;IACH,YAAY,EAAE,aAAK,CAAC,IAAI,EAAE;IAC1B;;;OAGG;IACH,sBAAsB,EAAE,aAAK,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CAClD,CAAC;KACD,OAAO,CAAC;IACP;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,aAAa,CAAC;QACnC,MAAM,EAAE,IAAI;KACb;IACD;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,WAAW,EAAE,aAAa,CAAC;KACjD;IACD;QACE,EAAE,EAAE,CAAC,WAAW,EAAE,aAAa,CAAC;KACjC;IACD;QACE,EAAE,EAAE,CAAC,cAAc,EAAE,WAAW,CAAC;KAClC;IACD;QACE,EAAE,EAAE,CAAC,aAAa,CAAC;KACpB;CACF,CAAC,CAAA;AAEJ,kBAAe,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/translation",
3
- "version": "3.0.0-snapshot-20251216103925",
3
+ "version": "3.0.0-snapshot-20251216135612",
4
4
  "description": "Medusa Translation module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -36,10 +36,10 @@
36
36
  "orm:cache:clear": "MIKRO_ORM_CLI_CONFIG=./mikro-orm.config.dev.ts MIKRO_ORM_ALLOW_GLOBAL_CLI=true medusa-mikro-orm cache:clear"
37
37
  },
38
38
  "devDependencies": {
39
- "@medusajs/framework": "3.0.0-snapshot-20251216103925",
40
- "@medusajs/test-utils": "3.0.0-snapshot-20251216103925"
39
+ "@medusajs/framework": "3.0.0-snapshot-20251216135612",
40
+ "@medusajs/test-utils": "3.0.0-snapshot-20251216135612"
41
41
  },
42
42
  "peerDependencies": {
43
- "@medusajs/framework": "3.0.0-snapshot-20251216103925"
43
+ "@medusajs/framework": "3.0.0-snapshot-20251216135612"
44
44
  }
45
45
  }