@endora-commerce/mod-dictionaries 0.100.0

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.
Files changed (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +60 -0
  3. package/dist/admin/api/client.d.ts +76 -0
  4. package/dist/admin/api/client.d.ts.map +1 -0
  5. package/dist/admin/api/client.js +87 -0
  6. package/dist/admin/api/client.js.map +1 -0
  7. package/dist/admin/components/EntryStatusBadges.d.ts +9 -0
  8. package/dist/admin/components/EntryStatusBadges.d.ts.map +1 -0
  9. package/dist/admin/components/EntryStatusBadges.js +8 -0
  10. package/dist/admin/components/EntryStatusBadges.js.map +1 -0
  11. package/dist/admin/components/LanguagePicker.d.ts +8 -0
  12. package/dist/admin/components/LanguagePicker.d.ts.map +1 -0
  13. package/dist/admin/components/LanguagePicker.js +30 -0
  14. package/dist/admin/components/LanguagePicker.js.map +1 -0
  15. package/dist/admin/components/TranslationsDrawer.d.ts +10 -0
  16. package/dist/admin/components/TranslationsDrawer.d.ts.map +1 -0
  17. package/dist/admin/components/TranslationsDrawer.js +90 -0
  18. package/dist/admin/components/TranslationsDrawer.js.map +1 -0
  19. package/dist/admin/index.d.ts +48 -0
  20. package/dist/admin/index.d.ts.map +1 -0
  21. package/dist/admin/index.js +82 -0
  22. package/dist/admin/index.js.map +1 -0
  23. package/dist/admin/pages/AuditPage.d.ts +9 -0
  24. package/dist/admin/pages/AuditPage.d.ts.map +1 -0
  25. package/dist/admin/pages/AuditPage.js +80 -0
  26. package/dist/admin/pages/AuditPage.js.map +1 -0
  27. package/dist/admin/pages/DictionaryPage.d.ts +9 -0
  28. package/dist/admin/pages/DictionaryPage.d.ts.map +1 -0
  29. package/dist/admin/pages/DictionaryPage.js +38 -0
  30. package/dist/admin/pages/DictionaryPage.js.map +1 -0
  31. package/dist/admin/tabs/CountriesTab.d.ts +3 -0
  32. package/dist/admin/tabs/CountriesTab.d.ts.map +1 -0
  33. package/dist/admin/tabs/CountriesTab.js +233 -0
  34. package/dist/admin/tabs/CountriesTab.js.map +1 -0
  35. package/dist/admin/tabs/CurrenciesTab.d.ts +3 -0
  36. package/dist/admin/tabs/CurrenciesTab.d.ts.map +1 -0
  37. package/dist/admin/tabs/CurrenciesTab.js +209 -0
  38. package/dist/admin/tabs/CurrenciesTab.js.map +1 -0
  39. package/dist/admin/tabs/LanguagesTab.d.ts +3 -0
  40. package/dist/admin/tabs/LanguagesTab.d.ts.map +1 -0
  41. package/dist/admin/tabs/LanguagesTab.js +268 -0
  42. package/dist/admin/tabs/LanguagesTab.js.map +1 -0
  43. package/dist/backend/entities/country.entity.d.ts +35 -0
  44. package/dist/backend/entities/country.entity.d.ts.map +1 -0
  45. package/dist/backend/entities/country.entity.js +107 -0
  46. package/dist/backend/entities/country.entity.js.map +1 -0
  47. package/dist/backend/entities/dictionary-translation.entity.d.ts +25 -0
  48. package/dist/backend/entities/dictionary-translation.entity.d.ts.map +1 -0
  49. package/dist/backend/entities/dictionary-translation.entity.js +65 -0
  50. package/dist/backend/entities/dictionary-translation.entity.js.map +1 -0
  51. package/dist/backend/entities/language-country.entity.d.ts +17 -0
  52. package/dist/backend/entities/language-country.entity.d.ts.map +1 -0
  53. package/dist/backend/entities/language-country.entity.js +49 -0
  54. package/dist/backend/entities/language-country.entity.js.map +1 -0
  55. package/dist/backend/index.d.ts +85 -0
  56. package/dist/backend/index.d.ts.map +1 -0
  57. package/dist/backend/index.js +155 -0
  58. package/dist/backend/index.js.map +1 -0
  59. package/dist/backend/routes.admin.d.ts +39 -0
  60. package/dist/backend/routes.admin.d.ts.map +1 -0
  61. package/dist/backend/routes.admin.js +317 -0
  62. package/dist/backend/routes.admin.js.map +1 -0
  63. package/dist/backend/routes.storefront.d.ts +7 -0
  64. package/dist/backend/routes.storefront.d.ts.map +1 -0
  65. package/dist/backend/routes.storefront.js +34 -0
  66. package/dist/backend/routes.storefront.js.map +1 -0
  67. package/dist/backend/seed/countries.d.ts +28 -0
  68. package/dist/backend/seed/countries.d.ts.map +1 -0
  69. package/dist/backend/seed/countries.js +121 -0
  70. package/dist/backend/seed/countries.js.map +1 -0
  71. package/dist/backend/seed/currencies.d.ts +9 -0
  72. package/dist/backend/seed/currencies.d.ts.map +1 -0
  73. package/dist/backend/seed/currencies.js +76 -0
  74. package/dist/backend/seed/currencies.js.map +1 -0
  75. package/dist/backend/seed/language-countries.d.ts +7 -0
  76. package/dist/backend/seed/language-countries.d.ts.map +1 -0
  77. package/dist/backend/seed/language-countries.js +19 -0
  78. package/dist/backend/seed/language-countries.js.map +1 -0
  79. package/dist/backend/seed/translations.pl-PL.d.ts +10 -0
  80. package/dist/backend/seed/translations.pl-PL.d.ts.map +1 -0
  81. package/dist/backend/seed/translations.pl-PL.js +74 -0
  82. package/dist/backend/seed/translations.pl-PL.js.map +1 -0
  83. package/dist/backend/services/country-currency-reference.d.ts +13 -0
  84. package/dist/backend/services/country-currency-reference.d.ts.map +1 -0
  85. package/dist/backend/services/country-currency-reference.js +25 -0
  86. package/dist/backend/services/country-currency-reference.js.map +1 -0
  87. package/dist/backend/services/country-reference-registry.d.ts +30 -0
  88. package/dist/backend/services/country-reference-registry.d.ts.map +1 -0
  89. package/dist/backend/services/country-reference-registry.js +54 -0
  90. package/dist/backend/services/country-reference-registry.js.map +1 -0
  91. package/dist/backend/services/country-service.d.ts +69 -0
  92. package/dist/backend/services/country-service.d.ts.map +1 -0
  93. package/dist/backend/services/country-service.js +193 -0
  94. package/dist/backend/services/country-service.js.map +1 -0
  95. package/dist/backend/services/dictionary-cache.d.ts +27 -0
  96. package/dist/backend/services/dictionary-cache.d.ts.map +1 -0
  97. package/dist/backend/services/dictionary-cache.js +57 -0
  98. package/dist/backend/services/dictionary-cache.js.map +1 -0
  99. package/dist/backend/services/dictionary-read-service.d.ts +36 -0
  100. package/dist/backend/services/dictionary-read-service.d.ts.map +1 -0
  101. package/dist/backend/services/dictionary-read-service.js +232 -0
  102. package/dist/backend/services/dictionary-read-service.js.map +1 -0
  103. package/dist/backend/services/dictionary-validator.d.ts +26 -0
  104. package/dist/backend/services/dictionary-validator.d.ts.map +1 -0
  105. package/dist/backend/services/dictionary-validator.js +72 -0
  106. package/dist/backend/services/dictionary-validator.js.map +1 -0
  107. package/dist/backend/services/dispatch-validator-mode.d.ts +19 -0
  108. package/dist/backend/services/dispatch-validator-mode.d.ts.map +1 -0
  109. package/dist/backend/services/dispatch-validator-mode.js +19 -0
  110. package/dist/backend/services/dispatch-validator-mode.js.map +1 -0
  111. package/dist/backend/services/label-resolver.d.ts +57 -0
  112. package/dist/backend/services/label-resolver.d.ts.map +1 -0
  113. package/dist/backend/services/label-resolver.js +116 -0
  114. package/dist/backend/services/label-resolver.js.map +1 -0
  115. package/dist/backend/services/language-country-service.d.ts +26 -0
  116. package/dist/backend/services/language-country-service.d.ts.map +1 -0
  117. package/dist/backend/services/language-country-service.js +108 -0
  118. package/dist/backend/services/language-country-service.js.map +1 -0
  119. package/dist/backend/services/seed-reconciler.d.ts +22 -0
  120. package/dist/backend/services/seed-reconciler.d.ts.map +1 -0
  121. package/dist/backend/services/seed-reconciler.js +149 -0
  122. package/dist/backend/services/seed-reconciler.js.map +1 -0
  123. package/dist/backend/services/translation-service.d.ts +29 -0
  124. package/dist/backend/services/translation-service.d.ts.map +1 -0
  125. package/dist/backend/services/translation-service.js +99 -0
  126. package/dist/backend/services/translation-service.js.map +1 -0
  127. package/dist/manifest.d.ts +174 -0
  128. package/dist/manifest.d.ts.map +1 -0
  129. package/dist/manifest.js +178 -0
  130. package/dist/manifest.js.map +1 -0
  131. package/dist/migrations/20260506T112634_dictionaries_dictionary_init.d.ts +33 -0
  132. package/dist/migrations/20260506T112634_dictionaries_dictionary_init.d.ts.map +1 -0
  133. package/dist/migrations/20260506T112634_dictionaries_dictionary_init.js +157 -0
  134. package/dist/migrations/20260506T112634_dictionaries_dictionary_init.js.map +1 -0
  135. package/dist/migrations/index.d.ts +27 -0
  136. package/dist/migrations/index.d.ts.map +1 -0
  137. package/dist/migrations/index.js +29 -0
  138. package/dist/migrations/index.js.map +1 -0
  139. package/docs/dictionaries/index.md +89 -0
  140. package/i18n/en.json +88 -0
  141. package/i18n/pl.json +88 -0
  142. package/package.json +99 -0
  143. package/tailwind.css +14 -0
@@ -0,0 +1,9 @@
1
+ export interface CurrencySeedRow {
2
+ code: string;
3
+ label: string;
4
+ symbol: string;
5
+ symbolPosition?: 'prefix' | 'suffix';
6
+ decimalPlaces?: number;
7
+ }
8
+ export declare const CURRENCY_SEED: readonly CurrencySeedRow[];
9
+ //# sourceMappingURL=currencies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.d.ts","sourceRoot":"","sources":["../../../src/backend/seed/currencies.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACrC,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,aAAa,EAAE,SAAS,eAAe,EAoEnD,CAAC"}
@@ -0,0 +1,76 @@
1
+ // Currency seed metadata for the Dictionary module (feature 017 / R6).
2
+ //
3
+ // The legacy migration 012 created the `currencies` table with `PLN` and
4
+ // `EUR` already present. This catalogue covers every currency referenced
5
+ // by the country seed (`countries.ts`) so the SeedReconciler can ensure
6
+ // the FK `countries.default_currency_code → currencies(code)` is
7
+ // satisfiable on a fresh install. Existing operator-edited rows are
8
+ // preserved (R6 idempotency rule).
9
+ //
10
+ // `decimalPlaces` follows ISO 4217 minor-unit convention; `symbolPosition`
11
+ // reflects common rendering practice. Operators may edit either via
12
+ // Admin UI → Dictionary → Currencies.
13
+ export const CURRENCY_SEED = [
14
+ // Already created by migration 012; the reconciler updates the new
15
+ // columns (symbol_position, decimal_places) only when they hold the
16
+ // default value left by the migration.
17
+ { code: 'PLN', label: 'Polish złoty', symbol: 'zł', symbolPosition: 'suffix', decimalPlaces: 2 },
18
+ { code: 'EUR', label: 'Euro', symbol: '€', symbolPosition: 'suffix', decimalPlaces: 2 },
19
+ // Major non-EUR Western currencies.
20
+ { code: 'USD', label: 'US dollar', symbol: '$', symbolPosition: 'prefix', decimalPlaces: 2 },
21
+ { code: 'GBP', label: 'Pound sterling', symbol: '£', symbolPosition: 'prefix', decimalPlaces: 2 },
22
+ { code: 'CHF', label: 'Swiss franc', symbol: 'CHF', symbolPosition: 'suffix', decimalPlaces: 2 },
23
+ { code: 'CAD', label: 'Canadian dollar', symbol: 'CA$', symbolPosition: 'prefix', decimalPlaces: 2 },
24
+ { code: 'AUD', label: 'Australian dollar', symbol: 'A$', symbolPosition: 'prefix', decimalPlaces: 2 },
25
+ { code: 'NZD', label: 'New Zealand dollar', symbol: 'NZ$', symbolPosition: 'prefix', decimalPlaces: 2 },
26
+ // EU non-EUR.
27
+ { code: 'BGN', label: 'Bulgarian lev', symbol: 'лв', symbolPosition: 'suffix', decimalPlaces: 2 },
28
+ { code: 'CZK', label: 'Czech koruna', symbol: 'Kč', symbolPosition: 'suffix', decimalPlaces: 2 },
29
+ { code: 'DKK', label: 'Danish krone', symbol: 'kr', symbolPosition: 'suffix', decimalPlaces: 2 },
30
+ { code: 'HUF', label: 'Hungarian forint', symbol: 'Ft', symbolPosition: 'suffix', decimalPlaces: 2 },
31
+ { code: 'NOK', label: 'Norwegian krone', symbol: 'kr', symbolPosition: 'suffix', decimalPlaces: 2 },
32
+ { code: 'RON', label: 'Romanian leu', symbol: 'lei', symbolPosition: 'suffix', decimalPlaces: 2 },
33
+ { code: 'SEK', label: 'Swedish krona', symbol: 'kr', symbolPosition: 'suffix', decimalPlaces: 2 },
34
+ { code: 'ISK', label: 'Icelandic króna', symbol: 'kr', symbolPosition: 'suffix', decimalPlaces: 0 },
35
+ // Other Europe.
36
+ { code: 'UAH', label: 'Ukrainian hryvnia', symbol: '₴', symbolPosition: 'suffix', decimalPlaces: 2 },
37
+ { code: 'RSD', label: 'Serbian dinar', symbol: 'дин', symbolPosition: 'suffix', decimalPlaces: 2 },
38
+ { code: 'ALL', label: 'Albanian lek', symbol: 'L', symbolPosition: 'suffix', decimalPlaces: 2 },
39
+ { code: 'BAM', label: 'Convertible mark', symbol: 'KM', symbolPosition: 'suffix', decimalPlaces: 2 },
40
+ { code: 'MKD', label: 'Macedonian denar', symbol: 'ден', symbolPosition: 'suffix', decimalPlaces: 2 },
41
+ { code: 'TRY', label: 'Turkish lira', symbol: '₺', symbolPosition: 'suffix', decimalPlaces: 2 },
42
+ { code: 'MDL', label: 'Moldovan leu', symbol: 'L', symbolPosition: 'suffix', decimalPlaces: 2 },
43
+ { code: 'RUB', label: 'Russian ruble', symbol: '₽', symbolPosition: 'suffix', decimalPlaces: 2 },
44
+ { code: 'BYN', label: 'Belarusian ruble', symbol: 'Br', symbolPosition: 'suffix', decimalPlaces: 2 },
45
+ // Americas.
46
+ { code: 'MXN', label: 'Mexican peso', symbol: 'Mex$', symbolPosition: 'prefix', decimalPlaces: 2 },
47
+ { code: 'BRL', label: 'Brazilian real', symbol: 'R$', symbolPosition: 'prefix', decimalPlaces: 2 },
48
+ { code: 'ARS', label: 'Argentine peso', symbol: '$', symbolPosition: 'prefix', decimalPlaces: 2 },
49
+ { code: 'CLP', label: 'Chilean peso', symbol: '$', symbolPosition: 'prefix', decimalPlaces: 0 },
50
+ { code: 'COP', label: 'Colombian peso', symbol: '$', symbolPosition: 'prefix', decimalPlaces: 2 },
51
+ { code: 'PEN', label: 'Peruvian sol', symbol: 'S/', symbolPosition: 'prefix', decimalPlaces: 2 },
52
+ // Asia.
53
+ { code: 'CNY', label: 'Renminbi', symbol: '¥', symbolPosition: 'prefix', decimalPlaces: 2 },
54
+ { code: 'JPY', label: 'Japanese yen', symbol: '¥', symbolPosition: 'prefix', decimalPlaces: 0 },
55
+ { code: 'KRW', label: 'South Korean won', symbol: '₩', symbolPosition: 'prefix', decimalPlaces: 0 },
56
+ { code: 'INR', label: 'Indian rupee', symbol: '₹', symbolPosition: 'prefix', decimalPlaces: 2 },
57
+ { code: 'SGD', label: 'Singapore dollar', symbol: 'S$', symbolPosition: 'prefix', decimalPlaces: 2 },
58
+ { code: 'HKD', label: 'Hong Kong dollar', symbol: 'HK$', symbolPosition: 'prefix', decimalPlaces: 2 },
59
+ { code: 'TWD', label: 'New Taiwan dollar', symbol: 'NT$', symbolPosition: 'prefix', decimalPlaces: 2 },
60
+ { code: 'THB', label: 'Thai baht', symbol: '฿', symbolPosition: 'prefix', decimalPlaces: 2 },
61
+ { code: 'VND', label: 'Vietnamese đồng', symbol: '₫', symbolPosition: 'suffix', decimalPlaces: 0 },
62
+ { code: 'IDR', label: 'Indonesian rupiah', symbol: 'Rp', symbolPosition: 'prefix', decimalPlaces: 2 },
63
+ { code: 'MYR', label: 'Malaysian ringgit', symbol: 'RM', symbolPosition: 'prefix', decimalPlaces: 2 },
64
+ { code: 'PHP', label: 'Philippine peso', symbol: '₱', symbolPosition: 'prefix', decimalPlaces: 2 },
65
+ { code: 'ILS', label: 'Israeli new shekel', symbol: '₪', symbolPosition: 'prefix', decimalPlaces: 2 },
66
+ { code: 'AED', label: 'UAE dirham', symbol: 'AED', symbolPosition: 'suffix', decimalPlaces: 2 },
67
+ { code: 'SAR', label: 'Saudi riyal', symbol: 'SAR', symbolPosition: 'suffix', decimalPlaces: 2 },
68
+ { code: 'KZT', label: 'Kazakhstani tenge', symbol: '₸', symbolPosition: 'suffix', decimalPlaces: 2 },
69
+ // Africa.
70
+ { code: 'ZAR', label: 'South African rand', symbol: 'R', symbolPosition: 'prefix', decimalPlaces: 2 },
71
+ { code: 'EGP', label: 'Egyptian pound', symbol: 'E£', symbolPosition: 'prefix', decimalPlaces: 2 },
72
+ { code: 'MAD', label: 'Moroccan dirham', symbol: 'DH', symbolPosition: 'suffix', decimalPlaces: 2 },
73
+ { code: 'NGN', label: 'Nigerian naira', symbol: '₦', symbolPosition: 'prefix', decimalPlaces: 2 },
74
+ { code: 'KES', label: 'Kenyan shilling', symbol: 'KSh', symbolPosition: 'prefix', decimalPlaces: 2 },
75
+ ];
76
+ //# sourceMappingURL=currencies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currencies.js","sourceRoot":"","sources":["../../../src/backend/seed/currencies.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,EAAE;AACF,yEAAyE;AACzE,yEAAyE;AACzE,wEAAwE;AACxE,iEAAiE;AACjE,oEAAoE;AACpE,mCAAmC;AACnC,EAAE;AACF,2EAA2E;AAC3E,oEAAoE;AACpE,sCAAsC;AAUtC,MAAM,CAAC,MAAM,aAAa,GAA+B;IACvD,mEAAmE;IACnE,oEAAoE;IACpE,uCAAuC;IACvC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAW,MAAM,EAAE,IAAI,EAAG,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAC1G,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAmB,MAAM,EAAE,GAAG,EAAI,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAE1G,oCAAoC;IACpC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAc,MAAM,EAAE,GAAG,EAAI,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAC1G,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,EAAS,MAAM,EAAE,GAAG,EAAI,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAC1G,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAY,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAC1G,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAQ,MAAM,EAAE,KAAK,EAAE,c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,EAAS,MAAM,EAAE,GAAG,EAAI,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;IAC1G,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAQ,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,aAAa,EAAE,CAAC,EAAE;CAC3G,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface LanguageCountrySeedRow {
2
+ languageCode: string;
3
+ countryCode: string;
4
+ isPrimary: boolean;
5
+ }
6
+ export declare const LANGUAGE_COUNTRY_SEED: readonly LanguageCountrySeedRow[];
7
+ //# sourceMappingURL=language-countries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-countries.d.ts","sourceRoot":"","sources":["../../../src/backend/seed/language-countries.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,qBAAqB,EAAE,SAAS,sBAAsB,EAWlE,CAAC"}
@@ -0,0 +1,19 @@
1
+ // Primary language↔country associations seeded for the Dictionary module
2
+ // (feature 017 / R6 / T009).
3
+ //
4
+ // Each row pins a Language as the primary choice for storefront locale
5
+ // auto-detection when a customer arrives with a Country signal (geolocation,
6
+ // shipping address). The "at most one primary per Country" invariant is
7
+ // enforced by a partial unique index in the migration.
8
+ export const LANGUAGE_COUNTRY_SEED = [
9
+ // pl-PL is primary for Poland.
10
+ { languageCode: 'pl-PL', countryCode: 'PL', isPrimary: true },
11
+ // en-US is primary for English-speaking markets the platform serves first.
12
+ { languageCode: 'en-US', countryCode: 'US', isPrimary: true },
13
+ { languageCode: 'en-US', countryCode: 'GB', isPrimary: true },
14
+ { languageCode: 'en-US', countryCode: 'IE', isPrimary: true },
15
+ { languageCode: 'en-US', countryCode: 'CA', isPrimary: true },
16
+ { languageCode: 'en-US', countryCode: 'AU', isPrimary: true },
17
+ { languageCode: 'en-US', countryCode: 'NZ', isPrimary: true },
18
+ ];
19
+ //# sourceMappingURL=language-countries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-countries.js","sourceRoot":"","sources":["../../../src/backend/seed/language-countries.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,6BAA6B;AAC7B,EAAE;AACF,uEAAuE;AACvE,6EAA6E;AAC7E,wEAAwE;AACxE,uDAAuD;AAQvD,MAAM,CAAC,MAAM,qBAAqB,GAAsC;IACtE,+BAA+B;IAC/B,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAE7D,2EAA2E;IAC3E,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;IAC7D,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE;CAC9D,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { DictionaryEntryType } from '@endora-commerce/contracts';
2
+ export interface TranslationSeedRow {
3
+ entryType: DictionaryEntryType;
4
+ entryCode: string;
5
+ /** The locale this translation is FOR. */
6
+ languageCode: string;
7
+ label: string;
8
+ }
9
+ export declare const POLISH_TRANSLATION_SEED: readonly TranslationSeedRow[];
10
+ //# sourceMappingURL=translations.pl-PL.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.pl-PL.d.ts","sourceRoot":"","sources":["../../../src/backend/seed/translations.pl-PL.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,0CAA0C;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,kBAAkB,EAkEhE,CAAC"}
@@ -0,0 +1,74 @@
1
+ // Polish (`pl-PL`) seed translations for the Dictionary module
2
+ // (feature 017 / R6 / T008).
3
+ //
4
+ // Covers the active-by-default subset of the country catalogue plus the
5
+ // seeded currencies and languages so a fresh-install Polish-locale
6
+ // storefront renders idiomatic Polish names without operator action.
7
+ // The reconciler is idempotent — operator edits to existing translation
8
+ // rows are not overwritten.
9
+ export const POLISH_TRANSLATION_SEED = [
10
+ // ── Languages ─────────────────────────────────────────────────────
11
+ { entryType: 'language', entryCode: 'en-US', languageCode: 'pl-PL', label: 'Angielski (US)' },
12
+ { entryType: 'language', entryCode: 'pl-PL', languageCode: 'pl-PL', label: 'Polski' },
13
+ // ── Currencies ────────────────────────────────────────────────────
14
+ { entryType: 'currency', entryCode: 'PLN', languageCode: 'pl-PL', label: 'Polski złoty' },
15
+ { entryType: 'currency', entryCode: 'EUR', languageCode: 'pl-PL', label: 'Euro' },
16
+ { entryType: 'currency', entryCode: 'USD', languageCode: 'pl-PL', label: 'Dolar amerykański' },
17
+ { entryType: 'currency', entryCode: 'GBP', languageCode: 'pl-PL', label: 'Funt brytyjski' },
18
+ { entryType: 'currency', entryCode: 'CHF', languageCode: 'pl-PL', label: 'Frank szwajcarski' },
19
+ { entryType: 'currency', entryCode: 'CZK', languageCode: 'pl-PL', label: 'Korona czeska' },
20
+ { entryType: 'currency', entryCode: 'HUF', languageCode: 'pl-PL', label: 'Forint węgierski' },
21
+ { entryType: 'currency', entryCode: 'NOK', languageCode: 'pl-PL', label: 'Korona norweska' },
22
+ { entryType: 'currency', entryCode: 'SEK', languageCode: 'pl-PL', label: 'Korona szwedzka' },
23
+ { entryType: 'currency', entryCode: 'DKK', languageCode: 'pl-PL', label: 'Korona duńska' },
24
+ { entryType: 'currency', entryCode: 'JPY', languageCode: 'pl-PL', label: 'Jen japoński' },
25
+ { entryType: 'currency', entryCode: 'CNY', languageCode: 'pl-PL', label: 'Juan chiński' },
26
+ // ── Countries (everyday-commerce subset) ──────────────────────────
27
+ { entryType: 'country', entryCode: 'PL', languageCode: 'pl-PL', label: 'Polska' },
28
+ { entryType: 'country', entryCode: 'AT', languageCode: 'pl-PL', label: 'Austria' },
29
+ { entryType: 'country', entryCode: 'BE', languageCode: 'pl-PL', label: 'Belgia' },
30
+ { entryType: 'country', entryCode: 'BG', languageCode: 'pl-PL', label: 'Bułgaria' },
31
+ { entryType: 'country', entryCode: 'HR', languageCode: 'pl-PL', label: 'Chorwacja' },
32
+ { entryType: 'country', entryCode: 'CY', languageCode: 'pl-PL', label: 'Cypr' },
33
+ { entryType: 'country', entryCode: 'CZ', languageCode: 'pl-PL', label: 'Czechy' },
34
+ { entryType: 'country', entryCode: 'DK', languageCode: 'pl-PL', label: 'Dania' },
35
+ { entryType: 'country', entryCode: 'EE', languageCode: 'pl-PL', label: 'Estonia' },
36
+ { entryType: 'country', entryCode: 'FI', languageCode: 'pl-PL', label: 'Finlandia' },
37
+ { entryType: 'country', entryCode: 'FR', languageCode: 'pl-PL', label: 'Francja' },
38
+ { entryType: 'country', entryCode: 'DE', languageCode: 'pl-PL', label: 'Niemcy' },
39
+ { entryType: 'country', entryCode: 'GR', languageCode: 'pl-PL', label: 'Grecja' },
40
+ { entryType: 'country', entryCode: 'HU', languageCode: 'pl-PL', label: 'Węgry' },
41
+ { entryType: 'country', entryCode: 'IE', languageCode: 'pl-PL', label: 'Irlandia' },
42
+ { entryType: 'country', entryCode: 'IT', languageCode: 'pl-PL', label: 'Włochy' },
43
+ { entryType: 'country', entryCode: 'LV', languageCode: 'pl-PL', label: 'Łotwa' },
44
+ { entryType: 'country', entryCode: 'LT', languageCode: 'pl-PL', label: 'Litwa' },
45
+ { entryType: 'country', entryCode: 'LU', languageCode: 'pl-PL', label: 'Luksemburg' },
46
+ { entryType: 'country', entryCode: 'MT', languageCode: 'pl-PL', label: 'Malta' },
47
+ { entryType: 'country', entryCode: 'NL', languageCode: 'pl-PL', label: 'Holandia' },
48
+ { entryType: 'country', entryCode: 'PT', languageCode: 'pl-PL', label: 'Portugalia' },
49
+ { entryType: 'country', entryCode: 'RO', languageCode: 'pl-PL', label: 'Rumunia' },
50
+ { entryType: 'country', entryCode: 'SK', languageCode: 'pl-PL', label: 'Słowacja' },
51
+ { entryType: 'country', entryCode: 'SI', languageCode: 'pl-PL', label: 'Słowenia' },
52
+ { entryType: 'country', entryCode: 'ES', languageCode: 'pl-PL', label: 'Hiszpania' },
53
+ { entryType: 'country', entryCode: 'SE', languageCode: 'pl-PL', label: 'Szwecja' },
54
+ { entryType: 'country', entryCode: 'CH', languageCode: 'pl-PL', label: 'Szwajcaria' },
55
+ { entryType: 'country', entryCode: 'GB', languageCode: 'pl-PL', label: 'Wielka Brytania' },
56
+ { entryType: 'country', entryCode: 'NO', languageCode: 'pl-PL', label: 'Norwegia' },
57
+ { entryType: 'country', entryCode: 'IS', languageCode: 'pl-PL', label: 'Islandia' },
58
+ { entryType: 'country', entryCode: 'UA', languageCode: 'pl-PL', label: 'Ukraina' },
59
+ { entryType: 'country', entryCode: 'TR', languageCode: 'pl-PL', label: 'Turcja' },
60
+ { entryType: 'country', entryCode: 'US', languageCode: 'pl-PL', label: 'Stany Zjednoczone' },
61
+ { entryType: 'country', entryCode: 'CA', languageCode: 'pl-PL', label: 'Kanada' },
62
+ { entryType: 'country', entryCode: 'MX', languageCode: 'pl-PL', label: 'Meksyk' },
63
+ { entryType: 'country', entryCode: 'BR', languageCode: 'pl-PL', label: 'Brazylia' },
64
+ { entryType: 'country', entryCode: 'CN', languageCode: 'pl-PL', label: 'Chiny' },
65
+ { entryType: 'country', entryCode: 'JP', languageCode: 'pl-PL', label: 'Japonia' },
66
+ { entryType: 'country', entryCode: 'KR', languageCode: 'pl-PL', label: 'Korea Południowa' },
67
+ { entryType: 'country', entryCode: 'IN', languageCode: 'pl-PL', label: 'Indie' },
68
+ { entryType: 'country', entryCode: 'IL', languageCode: 'pl-PL', label: 'Izrael' },
69
+ { entryType: 'country', entryCode: 'AE', languageCode: 'pl-PL', label: 'Zjednoczone Emiraty Arabskie' },
70
+ { entryType: 'country', entryCode: 'AU', languageCode: 'pl-PL', label: 'Australia' },
71
+ { entryType: 'country', entryCode: 'NZ', languageCode: 'pl-PL', label: 'Nowa Zelandia' },
72
+ { entryType: 'country', entryCode: 'ZA', languageCode: 'pl-PL', label: 'Republika Południowej Afryki' },
73
+ ];
74
+ //# sourceMappingURL=translations.pl-PL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations.pl-PL.js","sourceRoot":"","sources":["../../../src/backend/seed/translations.pl-PL.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,6BAA6B;AAC7B,EAAE;AACF,wEAAwE;AACxE,mEAAmE;AACnE,qEAAqE;AACrE,wEAAwE;AACxE,4BAA4B;AAY5B,MAAM,CAAC,MAAM,uBAAuB,GAAkC;IACpE,qEAAqE;IACrE,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE;IAC7F,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE;IAErF,qEAAqE;IACrE,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO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;IACxF,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,8BAA8B,EAAE;CACxG,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { DictionaryReferenceRegistryPort } from '@endora-commerce/contracts';
2
+ import type { EntityManager } from '@mikro-orm/postgresql';
3
+ /**
4
+ * This module's own reference into `currencies` (feature 077, D-87).
5
+ *
6
+ * `countries.default_currency_code` is a foreign key with `on delete set
7
+ * null`, so it is reported but does not block: an operator deleting the
8
+ * currency is blanking a column, not orphaning a row. That decision belongs
9
+ * to this module, which owns the table and wrote the key, which is why it
10
+ * travels on the descriptor rather than in `currencies`' exception list.
11
+ */
12
+ export declare function registerCountryCurrencyReference(registry: DictionaryReferenceRegistryPort, emFactory: () => EntityManager): void;
13
+ //# sourceMappingURL=country-currency-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-currency-reference.d.ts","sourceRoot":"","sources":["../../../src/backend/services/country-currency-reference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D;;;;;;;;GAQG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,+BAA+B,EACzC,SAAS,EAAE,MAAM,aAAa,GAC7B,IAAI,CAoBN"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * This module's own reference into `currencies` (feature 077, D-87).
3
+ *
4
+ * `countries.default_currency_code` is a foreign key with `on delete set
5
+ * null`, so it is reported but does not block: an operator deleting the
6
+ * currency is blanking a column, not orphaning a row. That decision belongs
7
+ * to this module, which owns the table and wrote the key, which is why it
8
+ * travels on the descriptor rather than in `currencies`' exception list.
9
+ */
10
+ export function registerCountryCurrencyReference(registry, emFactory) {
11
+ registry.register({
12
+ ownerModuleId: 'dictionaries',
13
+ consumer: 'countries',
14
+ tableName: 'countries',
15
+ columnName: 'default_currency_code',
16
+ blocking: false,
17
+ countReferences: async (code) => {
18
+ const rows = (await emFactory().execute(`select count(*)::int as n from "countries" where "default_currency_code" = ?`, [code]));
19
+ return rows[0]?.n ?? 0;
20
+ },
21
+ usedCodes: async () => (await emFactory().execute(`select "default_currency_code" as code, count(*)::int as count
22
+ from "countries" where "default_currency_code" is not null group by "default_currency_code"`)),
23
+ });
24
+ }
25
+ //# sourceMappingURL=country-currency-reference.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-currency-reference.js","sourceRoot":"","sources":["../../../src/backend/services/country-currency-reference.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,MAAM,UAAU,gCAAgC,CAC9C,QAAyC,EACzC,SAA8B;IAE9B,QAAQ,CAAC,QAAQ,CAAC;QAChB,aAAa,EAAE,cAAc;QAC7B,QAAQ,EAAE,WAAW;QACrB,SAAS,EAAE,WAAW;QACtB,UAAU,EAAE,uBAAuB;QACnC,QAAQ,EAAE,KAAK;QACf,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;YAC9B,MAAM,IAAI,GAAG,CAAC,MAAM,SAAS,EAAE,CAAC,OAAO,CACrC,8EAA8E,EAC9E,CAAC,IAAI,CAAC,CACP,CAAyB,CAAC;YAC3B,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC;QACD,SAAS,EAAE,KAAK,IAAI,EAAE,CACpB,CAAC,MAAM,SAAS,EAAE,CAAC,OAAO,CACxB;uGAC+F,CAChG,CAA2C;KAC/C,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { DictionaryReference, DictionaryReferenceDescriptor, DictionaryReferenceRegistryPort } from '@endora-commerce/contracts';
2
+ /**
3
+ * In-process registry of "who still points at this country code" descriptors
4
+ * (feature 077, D-87 drain).
5
+ *
6
+ * Registered under `countryReferenceRegistry` and contributed to from other modules'
7
+ * boot hooks. This module consults it before deleting a country, and
8
+ * `dictionaries` consults it to build the orphan report.
9
+ *
10
+ * **Enumeration policy: honoured while the contributing module is absent.**
11
+ * D-39's default is to skip, and honouring needs a written reason: this is
12
+ * referential integrity, not a surface. A switched-off module still owns the
13
+ * rows that carry the code, so skipping its descriptor would let an operator
14
+ * delete a country that comes back as a dangling reference the moment the module
15
+ * is switched on again — data loss caused by an action Constitution XVII
16
+ * promises is non-destructive and reversible.
17
+ *
18
+ * `ownerModuleId` is recorded on every descriptor even though this registry
19
+ * does not filter on it, because the alternative is a registry that could not
20
+ * express the decision either way, and because it attributes a 409 to a module.
21
+ */
22
+ export declare class CountryReferenceRegistry implements DictionaryReferenceRegistryPort {
23
+ private readonly descriptors;
24
+ register(descriptor: DictionaryReferenceDescriptor): void;
25
+ /** The contributing module of every registered descriptor, in registration order. */
26
+ owners(): readonly string[];
27
+ countReferences(code: string): Promise<DictionaryReference[]>;
28
+ usedCodes(): Promise<DictionaryReference[]>;
29
+ }
30
+ //# sourceMappingURL=country-reference-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-reference-registry.d.ts","sourceRoot":"","sources":["../../../src/backend/services/country-reference-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,6BAA6B,EAC7B,+BAA+B,EAChC,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,wBAAyB,YAAW,+BAA+B;IAC9E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAuC;IAEnE,QAAQ,CAAC,UAAU,EAAE,6BAA6B,GAAG,IAAI;IAMzD,qFAAqF;IACrF,MAAM,IAAI,SAAS,MAAM,EAAE;IAIrB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAS7D,SAAS,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;CAQlD"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * In-process registry of "who still points at this country code" descriptors
3
+ * (feature 077, D-87 drain).
4
+ *
5
+ * Registered under `countryReferenceRegistry` and contributed to from other modules'
6
+ * boot hooks. This module consults it before deleting a country, and
7
+ * `dictionaries` consults it to build the orphan report.
8
+ *
9
+ * **Enumeration policy: honoured while the contributing module is absent.**
10
+ * D-39's default is to skip, and honouring needs a written reason: this is
11
+ * referential integrity, not a surface. A switched-off module still owns the
12
+ * rows that carry the code, so skipping its descriptor would let an operator
13
+ * delete a country that comes back as a dangling reference the moment the module
14
+ * is switched on again — data loss caused by an action Constitution XVII
15
+ * promises is non-destructive and reversible.
16
+ *
17
+ * `ownerModuleId` is recorded on every descriptor even though this registry
18
+ * does not filter on it, because the alternative is a registry that could not
19
+ * express the decision either way, and because it attributes a 409 to a module.
20
+ */
21
+ export class CountryReferenceRegistry {
22
+ descriptors = [];
23
+ register(descriptor) {
24
+ if (!this.descriptors.includes(descriptor)) {
25
+ this.descriptors.push(descriptor);
26
+ }
27
+ }
28
+ /** The contributing module of every registered descriptor, in registration order. */
29
+ owners() {
30
+ return this.descriptors.map((d) => d.ownerModuleId);
31
+ }
32
+ async countReferences(code) {
33
+ const counts = await Promise.all(this.descriptors.map(async (d) => ({ descriptor: d, count: await d.countReferences(code) })));
34
+ return counts
35
+ .filter((row) => row.count > 0)
36
+ .map(({ descriptor, count }) => describe(descriptor, code, count));
37
+ }
38
+ async usedCodes() {
39
+ const perDescriptor = await Promise.all(this.descriptors.map(async (d) => ({ descriptor: d, rows: await d.usedCodes() })));
40
+ return perDescriptor.flatMap(({ descriptor, rows }) => rows.map((row) => describe(descriptor, row.code, row.count)));
41
+ }
42
+ }
43
+ function describe(descriptor, code, count) {
44
+ return {
45
+ ownerModuleId: descriptor.ownerModuleId,
46
+ consumer: descriptor.consumer,
47
+ tableName: descriptor.tableName,
48
+ columnName: descriptor.columnName,
49
+ code,
50
+ count,
51
+ blocking: descriptor.blocking,
52
+ };
53
+ }
54
+ //# sourceMappingURL=country-reference-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-reference-registry.js","sourceRoot":"","sources":["../../../src/backend/services/country-reference-registry.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,wBAAwB;IAClB,WAAW,GAAoC,EAAE,CAAC;IAEnE,QAAQ,CAAC,UAAyC;QAChD,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpC,CAAC;IACH,CAAC;IAED,qFAAqF;IACrF,MAAM;QACJ,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC;IACtD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,IAAY;QAChC,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAC7F,CAAC;QACF,OAAO,MAAM;aACV,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC;aAC9B,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,KAAK,CAAC,SAAS;QACb,MAAM,aAAa,GAAG,MAAM,OAAO,CAAC,GAAG,CACrC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAClF,CAAC;QACF,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,CACpD,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAC7D,CAAC;IACJ,CAAC;CACF;AAED,SAAS,QAAQ,CACf,UAAyC,EACzC,IAAY,EACZ,KAAa;IAEb,OAAO;QACL,aAAa,EAAE,UAAU,CAAC,aAAa;QACvC,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;QAC/B,UAAU,EAAE,UAAU,CAAC,UAAU;QACjC,IAAI;QACJ,KAAK;QACL,QAAQ,EAAE,UAAU,CAAC,QAAQ;KAC9B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { EntityManager } from '@mikro-orm/postgresql';
2
+ import { type DictionaryReference, type DictionaryReferenceRegistryPort } from '@endora-commerce/contracts';
3
+ import { Country } from '../entities/country.entity.js';
4
+ import type { AuditPort } from '@endora-commerce/platform/kernel';
5
+ export interface CreateCountryInput {
6
+ code: string;
7
+ alpha3Code: string;
8
+ numericCode: string;
9
+ label: string;
10
+ region: 'Africa' | 'Americas' | 'Asia' | 'Europe' | 'Oceania' | 'Antarctic';
11
+ subregion?: string | null;
12
+ dialCode?: string | null;
13
+ isEuMember?: boolean;
14
+ defaultCurrencyCode?: string | null;
15
+ isActive?: boolean;
16
+ sortOrder?: number;
17
+ }
18
+ export interface UpdateCountryInput {
19
+ alpha3Code?: string;
20
+ numericCode?: string;
21
+ label?: string;
22
+ region?: 'Africa' | 'Americas' | 'Asia' | 'Europe' | 'Oceania' | 'Antarctic';
23
+ subregion?: string | null;
24
+ dialCode?: string | null;
25
+ isEuMember?: boolean;
26
+ defaultCurrencyCode?: string | null;
27
+ isActive?: boolean;
28
+ sortOrder?: number;
29
+ }
30
+ export declare class CountryService {
31
+ #private;
32
+ private readonly emFactory;
33
+ private readonly invalidateDictionaryCache?;
34
+ private readonly auditLog?;
35
+ /**
36
+ * Resolved per call rather than captured: the registry is a singleton this
37
+ * module owns, but the accessor keeps the constructor honest for the tests
38
+ * that build the service without one.
39
+ */
40
+ private readonly referenceRegistry?;
41
+ constructor(emFactory: () => EntityManager, invalidateDictionaryCache?: (() => Promise<void>) | undefined, auditLog?: AuditPort | undefined,
42
+ /**
43
+ * Resolved per call rather than captured: the registry is a singleton this
44
+ * module owns, but the accessor keeps the constructor honest for the tests
45
+ * that build the service without one.
46
+ */
47
+ referenceRegistry?: (() => DictionaryReferenceRegistryPort) | undefined);
48
+ list(): Promise<Country[]>;
49
+ listActive(): Promise<Country[]>;
50
+ getDefault(): Promise<Country | null>;
51
+ getByCode(code: string): Promise<Country | null>;
52
+ create(input: CreateCountryInput): Promise<Country>;
53
+ update(code: string, input: UpdateCountryInput): Promise<Country>;
54
+ setDefault(code: string): Promise<Country>;
55
+ /**
56
+ * Every consumer reference to `code` (feature 077, D-87).
57
+ *
58
+ * Three hand-written `count(*)` statements over `addresses`, `taxes` and
59
+ * `organizations` used to live here, and a comment explaining that
60
+ * `warehouses` was skipped because its country sits inside a JSONB column and
61
+ * "covering that path requires a separate scan that v1 defers". The scan is
62
+ * `inventory`'s to write and it writes it: the descriptor it contributes
63
+ * answers the same question about its own table, so the gap closed as a side
64
+ * effect of moving the question to the module that can answer it.
65
+ */
66
+ countDependents(code: string): Promise<DictionaryReference[]>;
67
+ remove(code: string): Promise<void>;
68
+ }
69
+ //# sourceMappingURL=country-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-service.d.ts","sourceRoot":"","sources":["../../../src/backend/services/country-service.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,aAAa,EA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