clarion-shared-types 1.0.75 → 1.0.77

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 (122) hide show
  1. package/README.md +72 -2
  2. package/dist/cjs/index.js +2 -0
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/modules/country/constants/country-defaults.const.js +20 -0
  5. package/dist/cjs/modules/country/constants/country-defaults.const.js.map +1 -0
  6. package/dist/cjs/modules/country/constants/supported-countries.const.js +64 -0
  7. package/dist/cjs/modules/country/constants/supported-countries.const.js.map +1 -0
  8. package/dist/cjs/modules/country/constants/supported-currencies.const.js +36 -0
  9. package/dist/cjs/modules/country/constants/supported-currencies.const.js.map +1 -0
  10. package/dist/cjs/modules/country/enums/calling-code.enum.js +19 -0
  11. package/dist/cjs/modules/country/enums/calling-code.enum.js.map +1 -0
  12. package/dist/cjs/modules/country/enums/country-code.enum.js +21 -0
  13. package/dist/cjs/modules/country/enums/country-code.enum.js.map +1 -0
  14. package/dist/cjs/modules/country/enums/currency-code.enum.js +20 -0
  15. package/dist/cjs/modules/country/enums/currency-code.enum.js.map +1 -0
  16. package/dist/cjs/modules/country/index.js +32 -0
  17. package/dist/cjs/modules/country/index.js.map +1 -0
  18. package/dist/cjs/modules/country/interfaces/geo-coordinates.js +3 -0
  19. package/dist/cjs/modules/country/interfaces/geo-coordinates.js.map +1 -0
  20. package/dist/cjs/modules/country/interfaces/map-bounds.js +3 -0
  21. package/dist/cjs/modules/country/interfaces/map-bounds.js.map +1 -0
  22. package/dist/cjs/modules/country/interfaces/supported-country-config.js +3 -0
  23. package/dist/cjs/modules/country/interfaces/supported-country-config.js.map +1 -0
  24. package/dist/cjs/modules/country/interfaces/supported-currency-config.js +3 -0
  25. package/dist/cjs/modules/country/interfaces/supported-currency-config.js.map +1 -0
  26. package/dist/cjs/modules/country/utils/country.util.js +60 -0
  27. package/dist/cjs/modules/country/utils/country.util.js.map +1 -0
  28. package/dist/cjs/modules/notification/enums/email-provider-name.enum.js +15 -0
  29. package/dist/cjs/modules/notification/enums/email-provider-name.enum.js.map +1 -0
  30. package/dist/cjs/modules/notification/enums/notification-channel.enum.js +15 -0
  31. package/dist/cjs/modules/notification/enums/notification-channel.enum.js.map +1 -0
  32. package/dist/cjs/modules/notification/enums/notification-overall-status.enum.js +16 -0
  33. package/dist/cjs/modules/notification/enums/notification-overall-status.enum.js.map +1 -0
  34. package/dist/cjs/modules/notification/enums/provider-failure-reason.enum.js +28 -0
  35. package/dist/cjs/modules/notification/enums/provider-failure-reason.enum.js.map +1 -0
  36. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js +14 -0
  37. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js.map +1 -0
  38. package/dist/cjs/modules/notification/index.js +29 -0
  39. package/dist/cjs/modules/notification/index.js.map +1 -0
  40. package/dist/cjs/modules/notification/interfaces/email-send-result.js +3 -0
  41. package/dist/cjs/modules/notification/interfaces/email-send-result.js.map +1 -0
  42. package/dist/cjs/modules/notification/interfaces/notification-dispatch-result.js +3 -0
  43. package/dist/cjs/modules/notification/interfaces/notification-dispatch-result.js.map +1 -0
  44. package/dist/cjs/modules/notification/interfaces/per-channel-result.js +3 -0
  45. package/dist/cjs/modules/notification/interfaces/per-channel-result.js.map +1 -0
  46. package/dist/cjs/modules/notification/interfaces/provider-attempt.js +3 -0
  47. package/dist/cjs/modules/notification/interfaces/provider-attempt.js.map +1 -0
  48. package/dist/cjs/modules/notification/interfaces/sms-send-result.js +3 -0
  49. package/dist/cjs/modules/notification/interfaces/sms-send-result.js.map +1 -0
  50. package/dist/esm/index.js +2 -0
  51. package/dist/esm/index.js.map +1 -1
  52. package/dist/esm/modules/country/constants/country-defaults.const.js +17 -0
  53. package/dist/esm/modules/country/constants/country-defaults.const.js.map +1 -0
  54. package/dist/esm/modules/country/constants/supported-countries.const.js +61 -0
  55. package/dist/esm/modules/country/constants/supported-countries.const.js.map +1 -0
  56. package/dist/esm/modules/country/constants/supported-currencies.const.js +33 -0
  57. package/dist/esm/modules/country/constants/supported-currencies.const.js.map +1 -0
  58. package/dist/esm/modules/country/enums/calling-code.enum.js +16 -0
  59. package/dist/esm/modules/country/enums/calling-code.enum.js.map +1 -0
  60. package/dist/esm/modules/country/enums/country-code.enum.js +18 -0
  61. package/dist/esm/modules/country/enums/country-code.enum.js.map +1 -0
  62. package/dist/esm/modules/country/enums/currency-code.enum.js +17 -0
  63. package/dist/esm/modules/country/enums/currency-code.enum.js.map +1 -0
  64. package/dist/esm/modules/country/index.js +16 -0
  65. package/dist/esm/modules/country/index.js.map +1 -0
  66. package/dist/esm/modules/country/interfaces/geo-coordinates.js +2 -0
  67. package/dist/esm/modules/country/interfaces/geo-coordinates.js.map +1 -0
  68. package/dist/esm/modules/country/interfaces/map-bounds.js +2 -0
  69. package/dist/esm/modules/country/interfaces/map-bounds.js.map +1 -0
  70. package/dist/esm/modules/country/interfaces/supported-country-config.js +2 -0
  71. package/dist/esm/modules/country/interfaces/supported-country-config.js.map +1 -0
  72. package/dist/esm/modules/country/interfaces/supported-currency-config.js +2 -0
  73. package/dist/esm/modules/country/interfaces/supported-currency-config.js.map +1 -0
  74. package/dist/esm/modules/country/utils/country.util.js +51 -0
  75. package/dist/esm/modules/country/utils/country.util.js.map +1 -0
  76. package/dist/esm/modules/notification/enums/email-provider-name.enum.js +12 -0
  77. package/dist/esm/modules/notification/enums/email-provider-name.enum.js.map +1 -0
  78. package/dist/esm/modules/notification/enums/notification-channel.enum.js +12 -0
  79. package/dist/esm/modules/notification/enums/notification-channel.enum.js.map +1 -0
  80. package/dist/esm/modules/notification/enums/notification-overall-status.enum.js +13 -0
  81. package/dist/esm/modules/notification/enums/notification-overall-status.enum.js.map +1 -0
  82. package/dist/esm/modules/notification/enums/provider-failure-reason.enum.js +25 -0
  83. package/dist/esm/modules/notification/enums/provider-failure-reason.enum.js.map +1 -0
  84. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js +11 -0
  85. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js.map +1 -0
  86. package/dist/esm/modules/notification/index.js +13 -0
  87. package/dist/esm/modules/notification/index.js.map +1 -0
  88. package/dist/esm/modules/notification/interfaces/email-send-result.js +2 -0
  89. package/dist/esm/modules/notification/interfaces/email-send-result.js.map +1 -0
  90. package/dist/esm/modules/notification/interfaces/notification-dispatch-result.js +2 -0
  91. package/dist/esm/modules/notification/interfaces/notification-dispatch-result.js.map +1 -0
  92. package/dist/esm/modules/notification/interfaces/per-channel-result.js +2 -0
  93. package/dist/esm/modules/notification/interfaces/per-channel-result.js.map +1 -0
  94. package/dist/esm/modules/notification/interfaces/provider-attempt.js +2 -0
  95. package/dist/esm/modules/notification/interfaces/provider-attempt.js.map +1 -0
  96. package/dist/esm/modules/notification/interfaces/sms-send-result.js +2 -0
  97. package/dist/esm/modules/notification/interfaces/sms-send-result.js.map +1 -0
  98. package/dist/types/index.d.ts +2 -0
  99. package/dist/types/modules/country/constants/country-defaults.const.d.ts +15 -0
  100. package/dist/types/modules/country/constants/supported-countries.const.d.ts +13 -0
  101. package/dist/types/modules/country/constants/supported-currencies.const.d.ts +11 -0
  102. package/dist/types/modules/country/enums/calling-code.enum.d.ts +14 -0
  103. package/dist/types/modules/country/enums/country-code.enum.d.ts +16 -0
  104. package/dist/types/modules/country/enums/currency-code.enum.d.ts +15 -0
  105. package/dist/types/modules/country/index.d.ts +11 -0
  106. package/dist/types/modules/country/interfaces/geo-coordinates.d.ts +12 -0
  107. package/dist/types/modules/country/interfaces/map-bounds.d.ts +16 -0
  108. package/dist/types/modules/country/interfaces/supported-country-config.d.ts +39 -0
  109. package/dist/types/modules/country/interfaces/supported-currency-config.d.ts +19 -0
  110. package/dist/types/modules/country/utils/country.util.d.ts +27 -0
  111. package/dist/types/modules/notification/enums/email-provider-name.enum.d.ts +10 -0
  112. package/dist/types/modules/notification/enums/notification-channel.enum.d.ts +10 -0
  113. package/dist/types/modules/notification/enums/notification-overall-status.enum.d.ts +11 -0
  114. package/dist/types/modules/notification/enums/provider-failure-reason.enum.d.ts +23 -0
  115. package/dist/types/modules/notification/enums/sms-provider-name.enum.d.ts +9 -0
  116. package/dist/types/modules/notification/index.d.ts +10 -0
  117. package/dist/types/modules/notification/interfaces/email-send-result.d.ts +22 -0
  118. package/dist/types/modules/notification/interfaces/notification-dispatch-result.d.ts +26 -0
  119. package/dist/types/modules/notification/interfaces/per-channel-result.d.ts +22 -0
  120. package/dist/types/modules/notification/interfaces/provider-attempt.d.ts +25 -0
  121. package/dist/types/modules/notification/interfaces/sms-send-result.d.ts +22 -0
  122. package/package.json +4 -3
package/README.md CHANGED
@@ -1,2 +1,72 @@
1
- # clarion-shared-types
2
- Shared pure types
1
+ # clarion-shared-types
2
+
3
+ Shared pure TypeScript types for the Clarion **admin** web frontend
4
+ (`clarion-admin`, Angular). Frontend-safe: no NestJS / class-validator / runtime
5
+ framework dependencies.
6
+
7
+ ## Country & Currency (multi-country foundation)
8
+
9
+ Platform-level, Angular-safe primitives for country-aware admin forms, pickers,
10
+ billing and maps. Mirrors the backend `grm-shared-library` country module so the
11
+ same codes and configuration are used end to end.
12
+
13
+ **Supported countries** (ISO 3166-1 alpha-2):
14
+
15
+ | Code | Country | Calling code | Currency | Symbol | Decimals | Timezone | Locale |
16
+ |------|----------|--------------|----------|--------|----------|------------------------|---------|
17
+ | `KE` | Kenya | `+254` | `KES` | `KSh` | 2 | `Africa/Nairobi` | `en-KE` |
18
+ | `UG` | Uganda | `+256` | `UGX` | `USh` | 0 | `Africa/Kampala` | `en-UG` |
19
+ | `TZ` | Tanzania | `+255` | `TZS` | `TSh` | 0 | `Africa/Dar_es_Salaam` | `en-TZ` |
20
+
21
+ **Supported currencies** (ISO 4217): `KES`, `UGX`, `TZS`.
22
+
23
+ ### Importing
24
+
25
+ Everything is re-exported from the package root:
26
+
27
+ ```ts
28
+ import {
29
+ CountryCode,
30
+ CurrencyCode,
31
+ CallingCode,
32
+ SupportedCountryConfig,
33
+ SupportedCurrencyConfig,
34
+ SUPPORTED_COUNTRIES, // readonly SupportedCountryConfig[] — ideal for *ngFor pickers
35
+ SUPPORTED_COUNTRIES_BY_CODE, // Record<CountryCode, SupportedCountryConfig>
36
+ SUPPORTED_CURRENCIES,
37
+ SUPPORTED_CURRENCIES_BY_CODE,
38
+ DEFAULT_COUNTRY_CODE, // CountryCode.KE
39
+ DEFAULT_CURRENCY_CODE, // CurrencyCode.KES
40
+ getSupportedCountryConfig,
41
+ getSupportedCurrencyConfig,
42
+ getCurrencyForCountry,
43
+ getCallingCodeForCountry,
44
+ getCountryByCallingCode,
45
+ isSupportedCountryCode,
46
+ isSupportedCurrencyCode,
47
+ } from 'clarion-shared-types';
48
+
49
+ // Country picker options
50
+ SUPPORTED_COUNTRIES.map((c) => ({ label: c.name, value: c.code }));
51
+ ```
52
+
53
+ > Note: `SUPPORTED_COUNTRIES` is an array (picker-friendly). Prefer the array or
54
+ > the helper functions over indexing `SUPPORTED_COUNTRIES_BY_CODE` directly, to
55
+ > stay compatible with the admin's `noPropertyAccessFromIndexSignature` setting.
56
+
57
+ ### Backward compatibility
58
+
59
+ **Kenya (`KE` / `KES`) is the default market.** Use `DEFAULT_COUNTRY_CODE` /
60
+ `DEFAULT_CURRENCY_CODE` wherever a country/currency is not explicit. Existing
61
+ admin flows are unaffected.
62
+
63
+ ### Scope
64
+
65
+ Primitives only. The country picker UI, country-scoped admin forms and country
66
+ detection are delivered in later phases and should build on these types.
67
+
68
+ ### Tests
69
+
70
+ ```bash
71
+ npm test # compiles src/modules/country and runs the country/currency suite
72
+ ```
package/dist/cjs/index.js CHANGED
@@ -30,7 +30,9 @@ __exportStar(require("./modules/sms/index"), exports);
30
30
  __exportStar(require("./modules/gis/index"), exports);
31
31
  __exportStar(require("./modules/socket/index"), exports);
32
32
  __exportStar(require("./modules/web-notification/index"), exports);
33
+ __exportStar(require("./modules/notification/index"), exports);
33
34
  __exportStar(require("./modules/chat/index"), exports);
35
+ __exportStar(require("./modules/country/index"), exports);
34
36
  // Interfaces
35
37
  __exportStar(require("./modules/common/interfaces/server-message"), exports);
36
38
  __exportStar(require("./modules/common/interfaces/pagination"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;AACjD,uDAAqC;AAErC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;AACjD,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AAExC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DEFAULT_LOCALE = exports.DEFAULT_TIMEZONE = exports.DEFAULT_CALLING_CODE = exports.DEFAULT_CURRENCY_CODE = exports.DEFAULT_COUNTRY_CODE = void 0;
4
+ const calling_code_enum_1 = require("../enums/calling-code.enum");
5
+ const country_code_enum_1 = require("../enums/country-code.enum");
6
+ const currency_code_enum_1 = require("../enums/currency-code.enum");
7
+ /**
8
+ * Platform defaults.
9
+ *
10
+ * Kenya remains the default / backward-compatible market: existing users,
11
+ * packages, posts, incidents, OTPs, notifications and billing flows continue
12
+ * to behave exactly as they did before multi-country support was introduced.
13
+ * Use these constants wherever a country/currency is not (yet) explicit.
14
+ */
15
+ exports.DEFAULT_COUNTRY_CODE = country_code_enum_1.CountryCode.KE;
16
+ exports.DEFAULT_CURRENCY_CODE = currency_code_enum_1.CurrencyCode.KES;
17
+ exports.DEFAULT_CALLING_CODE = calling_code_enum_1.CallingCode.KE;
18
+ exports.DEFAULT_TIMEZONE = 'Africa/Nairobi';
19
+ exports.DEFAULT_LOCALE = 'en-KE';
20
+ //# sourceMappingURL=country-defaults.const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-defaults.const.js","sourceRoot":"","sources":["../../../../../src/modules/country/constants/country-defaults.const.ts"],"names":[],"mappings":";;;AAAA,kEAAyD;AACzD,kEAAyD;AACzD,oEAA2D;AAE3D;;;;;;;GAOG;AACU,QAAA,oBAAoB,GAAgB,+BAAW,CAAC,EAAE,CAAC;AACnD,QAAA,qBAAqB,GAAiB,iCAAY,CAAC,GAAG,CAAC;AACvD,QAAA,oBAAoB,GAAW,+BAAW,CAAC,EAAE,CAAC;AAC9C,QAAA,gBAAgB,GAAG,gBAAgB,CAAC;AACpC,QAAA,cAAc,GAAG,OAAO,CAAC"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORTED_COUNTRIES = exports.SUPPORTED_COUNTRIES_BY_CODE = void 0;
4
+ const calling_code_enum_1 = require("../enums/calling-code.enum");
5
+ const country_code_enum_1 = require("../enums/country-code.enum");
6
+ const currency_code_enum_1 = require("../enums/currency-code.enum");
7
+ /**
8
+ * Supported countries keyed by ISO 3166-1 alpha-2 code (source of truth,
9
+ * O(1) lookup).
10
+ *
11
+ * The `Record<CountryCode, ...>` typing enforces at compile time that every
12
+ * country code has a configuration entry. Map centers are the capital cities;
13
+ * bounds are approximate country bounding boxes and can be refined later.
14
+ */
15
+ exports.SUPPORTED_COUNTRIES_BY_CODE = {
16
+ [country_code_enum_1.CountryCode.KE]: {
17
+ code: country_code_enum_1.CountryCode.KE,
18
+ name: 'Kenya',
19
+ callingCode: calling_code_enum_1.CallingCode.KE,
20
+ currencyCode: currency_code_enum_1.CurrencyCode.KES,
21
+ currencySymbol: 'KSh',
22
+ currencyDecimalPlaces: 2,
23
+ timezone: 'Africa/Nairobi',
24
+ defaultLocale: 'en-KE',
25
+ googleMapsRegion: 'KE',
26
+ defaultMapCenter: { lat: -1.2921, lng: 36.8219 }, // Nairobi
27
+ defaultMapZoom: 6,
28
+ mapBounds: { north: 5.019, south: -4.72, east: 41.899, west: 33.909 },
29
+ enabled: true,
30
+ },
31
+ [country_code_enum_1.CountryCode.UG]: {
32
+ code: country_code_enum_1.CountryCode.UG,
33
+ name: 'Uganda',
34
+ callingCode: calling_code_enum_1.CallingCode.UG,
35
+ currencyCode: currency_code_enum_1.CurrencyCode.UGX,
36
+ currencySymbol: 'USh',
37
+ currencyDecimalPlaces: 0,
38
+ timezone: 'Africa/Kampala',
39
+ defaultLocale: 'en-UG',
40
+ googleMapsRegion: 'UG',
41
+ defaultMapCenter: { lat: 0.3476, lng: 32.5825 }, // Kampala
42
+ defaultMapZoom: 6,
43
+ mapBounds: { north: 4.234, south: -1.482, east: 35.036, west: 29.573 },
44
+ enabled: true,
45
+ },
46
+ [country_code_enum_1.CountryCode.TZ]: {
47
+ code: country_code_enum_1.CountryCode.TZ,
48
+ name: 'Tanzania',
49
+ callingCode: calling_code_enum_1.CallingCode.TZ,
50
+ currencyCode: currency_code_enum_1.CurrencyCode.TZS,
51
+ currencySymbol: 'TSh',
52
+ currencyDecimalPlaces: 0,
53
+ timezone: 'Africa/Dar_es_Salaam',
54
+ defaultLocale: 'en-TZ',
55
+ googleMapsRegion: 'TZ',
56
+ defaultMapCenter: { lat: -6.7924, lng: 39.2083 }, // Dar es Salaam
57
+ defaultMapZoom: 6,
58
+ mapBounds: { north: -0.984, south: -11.761, east: 40.444, west: 29.327 },
59
+ enabled: true,
60
+ },
61
+ };
62
+ /** Supported countries as an array (convenient for iteration / pickers). */
63
+ exports.SUPPORTED_COUNTRIES = Object.values(exports.SUPPORTED_COUNTRIES_BY_CODE);
64
+ //# sourceMappingURL=supported-countries.const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-countries.const.js","sourceRoot":"","sources":["../../../../../src/modules/country/constants/supported-countries.const.ts"],"names":[],"mappings":";;;AAAA,kEAAyD;AACzD,kEAAyD;AACzD,oEAA2D;AAG3D;;;;;;;GAOG;AACU,QAAA,2BAA2B,GAA0D;IAC9F,CAAC,+BAAW,CAAC,EAAE,CAAC,EAAE;QACd,IAAI,EAAE,+BAAW,CAAC,EAAE;QACpB,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,+BAAW,CAAC,EAAE;QAC3B,YAAY,EAAE,iCAAY,CAAC,GAAG;QAC9B,cAAc,EAAE,KAAK;QACrB,qBAAqB,EAAE,CAAC;QACxB,QAAQ,EAAE,gBAAgB;QAC1B,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,UAAU;QAC5D,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;QACrE,OAAO,EAAE,IAAI;KAChB;IACD,CAAC,+BAAW,CAAC,EAAE,CAAC,EAAE;QACd,IAAI,EAAE,+BAAW,CAAC,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+BAAW,CAAC,EAAE;QAC3B,YAAY,EAAE,iCAAY,CAAC,GAAG;QAC9B,cAAc,EAAE,KAAK;QACrB,qBAAqB,EAAE,CAAC;QACxB,QAAQ,EAAE,gBAAgB;QAC1B,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,UAAU;QAC3D,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;QACtE,OAAO,EAAE,IAAI;KAChB;IACD,CAAC,+BAAW,CAAC,EAAE,CAAC,EAAE;QACd,IAAI,EAAE,+BAAW,CAAC,EAAE;QACpB,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,+BAAW,CAAC,EAAE;QAC3B,YAAY,EAAE,iCAAY,CAAC,GAAG;QAC9B,cAAc,EAAE,KAAK;QACrB,qBAAqB,EAAE,CAAC;QACxB,QAAQ,EAAE,sBAAsB;QAChC,aAAa,EAAE,OAAO;QACtB,gBAAgB,EAAE,IAAI;QACtB,gBAAgB,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,EAAE,gBAAgB;QAClE,cAAc,EAAE,CAAC;QACjB,SAAS,EAAE,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE;QACxE,OAAO,EAAE,IAAI;KAChB;CACJ,CAAC;AAEF,4EAA4E;AAC/D,QAAA,mBAAmB,GAC5B,MAAM,CAAC,MAAM,CAAC,mCAA2B,CAAC,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUPPORTED_CURRENCIES = exports.SUPPORTED_CURRENCIES_BY_CODE = void 0;
4
+ const currency_code_enum_1 = require("../enums/currency-code.enum");
5
+ /**
6
+ * Supported currencies keyed by ISO 4217 code (source of truth, O(1) lookup).
7
+ *
8
+ * The `Record<CurrencyCode, ...>` typing enforces at compile time that every
9
+ * currency code has a configuration entry.
10
+ */
11
+ exports.SUPPORTED_CURRENCIES_BY_CODE = {
12
+ [currency_code_enum_1.CurrencyCode.KES]: {
13
+ code: currency_code_enum_1.CurrencyCode.KES,
14
+ name: 'Kenyan Shilling',
15
+ symbol: 'KSh',
16
+ decimalPlaces: 2,
17
+ enabled: true,
18
+ },
19
+ [currency_code_enum_1.CurrencyCode.UGX]: {
20
+ code: currency_code_enum_1.CurrencyCode.UGX,
21
+ name: 'Ugandan Shilling',
22
+ symbol: 'USh',
23
+ decimalPlaces: 0,
24
+ enabled: true,
25
+ },
26
+ [currency_code_enum_1.CurrencyCode.TZS]: {
27
+ code: currency_code_enum_1.CurrencyCode.TZS,
28
+ name: 'Tanzanian Shilling',
29
+ symbol: 'TSh',
30
+ decimalPlaces: 0,
31
+ enabled: true,
32
+ },
33
+ };
34
+ /** Supported currencies as an array (convenient for iteration / pickers). */
35
+ exports.SUPPORTED_CURRENCIES = Object.values(exports.SUPPORTED_CURRENCIES_BY_CODE);
36
+ //# sourceMappingURL=supported-currencies.const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-currencies.const.js","sourceRoot":"","sources":["../../../../../src/modules/country/constants/supported-currencies.const.ts"],"names":[],"mappings":";;;AAAA,oEAA2D;AAG3D;;;;;GAKG;AACU,QAAA,4BAA4B,GAA4D;IACjG,CAAC,iCAAY,CAAC,GAAG,CAAC,EAAE;QAChB,IAAI,EAAE,iCAAY,CAAC,GAAG;QACtB,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,KAAK;QACb,aAAa,EAAE,CAAC;QAChB,OAAO,EAAE,IAAI;KAChB;IACD,CAAC,iCAAY,CAAC,GAAG,CAAC,EAAE;QAChB,IAAI,EAAE,iCAAY,CAAC,GAAG;QACtB,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,KAAK;QACb,aAAa,EAAE,CAAC;QAChB,OAAO,EAAE,IAAI;KAChB;IACD,CAAC,iCAAY,CAAC,GAAG,CAAC,EAAE;QAChB,IAAI,EAAE,iCAAY,CAAC,GAAG;QACtB,IAAI,EAAE,oBAAoB;QAC1B,MAAM,EAAE,KAAK;QACb,aAAa,EAAE,CAAC;QAChB,OAAO,EAAE,IAAI;KAChB;CACJ,CAAC;AAEF,6EAA6E;AAChE,QAAA,oBAAoB,GAC7B,MAAM,CAAC,MAAM,CAAC,oCAA4B,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CallingCode = void 0;
4
+ /**
5
+ * E.164 country calling codes, keyed by ISO 3166-1 alpha-2 country code.
6
+ *
7
+ * Kept as a string enum so the value (e.g. '+254') can be used directly when
8
+ * composing phone numbers, and the key (e.g. KE) aligns with {@link CountryCode}.
9
+ */
10
+ var CallingCode;
11
+ (function (CallingCode) {
12
+ /** Kenya */
13
+ CallingCode["KE"] = "+254";
14
+ /** Uganda */
15
+ CallingCode["UG"] = "+256";
16
+ /** Tanzania */
17
+ CallingCode["TZ"] = "+255";
18
+ })(CallingCode || (exports.CallingCode = CallingCode = {}));
19
+ //# sourceMappingURL=calling-code.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calling-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/country/enums/calling-code.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,YAAY;IACZ,0BAAW,CAAA;IACX,aAAa;IACb,0BAAW,CAAA;IACX,eAAe;IACf,0BAAW,CAAA;AACf,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryCode = void 0;
4
+ /**
5
+ * Supported country codes.
6
+ *
7
+ * ISO 3166-1 alpha-2 country codes. These are the platform-level identifiers
8
+ * for every country the Clarion / Upesy platform operates in.
9
+ *
10
+ * Kenya (KE) is the default/backward-compatible market.
11
+ */
12
+ var CountryCode;
13
+ (function (CountryCode) {
14
+ /** Kenya */
15
+ CountryCode["KE"] = "KE";
16
+ /** Uganda */
17
+ CountryCode["UG"] = "UG";
18
+ /** Tanzania */
19
+ CountryCode["TZ"] = "TZ";
20
+ })(CountryCode || (exports.CountryCode = CountryCode = {}));
21
+ //# sourceMappingURL=country-code.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/country/enums/country-code.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,IAAY,WAOX;AAPD,WAAY,WAAW;IACnB,YAAY;IACZ,wBAAS,CAAA;IACT,aAAa;IACb,wBAAS,CAAA;IACT,eAAe;IACf,wBAAS,CAAA;AACb,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CurrencyCode = void 0;
4
+ /**
5
+ * Supported currency codes.
6
+ *
7
+ * ISO 4217 currency codes for the markets the platform operates in.
8
+ *
9
+ * KES (Kenyan Shilling) is the default/backward-compatible currency.
10
+ */
11
+ var CurrencyCode;
12
+ (function (CurrencyCode) {
13
+ /** Kenyan Shilling */
14
+ CurrencyCode["KES"] = "KES";
15
+ /** Ugandan Shilling */
16
+ CurrencyCode["UGX"] = "UGX";
17
+ /** Tanzanian Shilling */
18
+ CurrencyCode["TZS"] = "TZS";
19
+ })(CurrencyCode || (exports.CurrencyCode = CurrencyCode = {}));
20
+ //# sourceMappingURL=currency-code.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency-code.enum.js","sourceRoot":"","sources":["../../../../../src/modules/country/enums/currency-code.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,sBAAsB;IACtB,2BAAW,CAAA;IACX,uBAAuB;IACvB,2BAAW,CAAA;IACX,yBAAyB;IACzB,2BAAW,CAAA;AACf,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Enums
18
+ __exportStar(require("./enums/country-code.enum"), exports);
19
+ __exportStar(require("./enums/currency-code.enum"), exports);
20
+ __exportStar(require("./enums/calling-code.enum"), exports);
21
+ // Interfaces
22
+ __exportStar(require("./interfaces/geo-coordinates"), exports);
23
+ __exportStar(require("./interfaces/map-bounds"), exports);
24
+ __exportStar(require("./interfaces/supported-currency-config"), exports);
25
+ __exportStar(require("./interfaces/supported-country-config"), exports);
26
+ // Constants
27
+ __exportStar(require("./constants/supported-currencies.const"), exports);
28
+ __exportStar(require("./constants/supported-countries.const"), exports);
29
+ __exportStar(require("./constants/country-defaults.const"), exports);
30
+ // Utilities
31
+ __exportStar(require("./utils/country.util"), exports);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/country/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,4DAA0C;AAC1C,6DAA2C;AAC3C,4DAA0C;AAE1C,aAAa;AACb,+DAA6C;AAC7C,0DAAwC;AACxC,yEAAuD;AACvD,wEAAsD;AAEtD,YAAY;AACZ,yEAAuD;AACvD,wEAAsD;AACtD,qEAAmD;AAEnD,YAAY;AACZ,uDAAqC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=geo-coordinates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-coordinates.js","sourceRoot":"","sources":["../../../../../src/modules/country/interfaces/geo-coordinates.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=map-bounds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-bounds.js","sourceRoot":"","sources":["../../../../../src/modules/country/interfaces/map-bounds.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=supported-country-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-country-config.js","sourceRoot":"","sources":["../../../../../src/modules/country/interfaces/supported-country-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=supported-currency-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supported-currency-config.js","sourceRoot":"","sources":["../../../../../src/modules/country/interfaces/supported-currency-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSupportedCountryCode = isSupportedCountryCode;
4
+ exports.isSupportedCurrencyCode = isSupportedCurrencyCode;
5
+ exports.getSupportedCountryConfig = getSupportedCountryConfig;
6
+ exports.getSupportedCurrencyConfig = getSupportedCurrencyConfig;
7
+ exports.getCurrencyForCountry = getCurrencyForCountry;
8
+ exports.getCallingCodeForCountry = getCallingCodeForCountry;
9
+ exports.getCountryByCallingCode = getCountryByCallingCode;
10
+ const supported_countries_const_1 = require("../constants/supported-countries.const");
11
+ const supported_currencies_const_1 = require("../constants/supported-currencies.const");
12
+ /**
13
+ * Country / currency helper utilities.
14
+ *
15
+ * These are intentionally simple, synchronous and dependency-free so they can
16
+ * be reused across the admin frontend without pulling in extra deps.
17
+ */
18
+ /** Type guard: is `value` a supported ISO 3166-1 alpha-2 country code? */
19
+ function isSupportedCountryCode(value) {
20
+ return (typeof value === 'string' &&
21
+ Object.prototype.hasOwnProperty.call(supported_countries_const_1.SUPPORTED_COUNTRIES_BY_CODE, value));
22
+ }
23
+ /** Type guard: is `value` a supported ISO 4217 currency code? */
24
+ function isSupportedCurrencyCode(value) {
25
+ return (typeof value === 'string' &&
26
+ Object.prototype.hasOwnProperty.call(supported_currencies_const_1.SUPPORTED_CURRENCIES_BY_CODE, value));
27
+ }
28
+ /** Get the full config for a supported country, or `undefined` if unsupported. */
29
+ function getSupportedCountryConfig(countryCode) {
30
+ return isSupportedCountryCode(countryCode)
31
+ ? supported_countries_const_1.SUPPORTED_COUNTRIES_BY_CODE[countryCode]
32
+ : undefined;
33
+ }
34
+ /** Get the full config for a supported currency, or `undefined` if unsupported. */
35
+ function getSupportedCurrencyConfig(currencyCode) {
36
+ return isSupportedCurrencyCode(currencyCode)
37
+ ? supported_currencies_const_1.SUPPORTED_CURRENCIES_BY_CODE[currencyCode]
38
+ : undefined;
39
+ }
40
+ /** Resolve the currency used by a supported country, or `undefined`. */
41
+ function getCurrencyForCountry(countryCode) {
42
+ var _a;
43
+ return (_a = getSupportedCountryConfig(countryCode)) === null || _a === void 0 ? void 0 : _a.currencyCode;
44
+ }
45
+ /** Resolve the E.164 calling code (e.g. '+254') for a supported country, or `undefined`. */
46
+ function getCallingCodeForCountry(countryCode) {
47
+ var _a;
48
+ return (_a = getSupportedCountryConfig(countryCode)) === null || _a === void 0 ? void 0 : _a.callingCode;
49
+ }
50
+ /**
51
+ * Reverse lookup: find the supported country whose E.164 calling code matches
52
+ * `callingCode` (e.g. '+254' -> Kenya), or `undefined` if none match.
53
+ */
54
+ function getCountryByCallingCode(callingCode) {
55
+ if (!callingCode) {
56
+ return undefined;
57
+ }
58
+ return supported_countries_const_1.SUPPORTED_COUNTRIES.find((country) => country.callingCode === callingCode);
59
+ }
60
+ //# sourceMappingURL=country.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"country.util.js","sourceRoot":"","sources":["../../../../../src/modules/country/utils/country.util.ts"],"names":[],"mappings":";;AAeA,wDAKC;AAGD,0DAKC;AAGD,8DAMC;AAGD,gEAMC;AAGD,sDAIC;AAGD,4DAIC;AAMD,0DAOC;AAzED,sFAA0G;AAC1G,wFAAuF;AAMvF;;;;;GAKG;AAEH,0EAA0E;AAC1E,SAAgB,sBAAsB,CAAC,KAAc;IACjD,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,uDAA2B,EAAE,KAAK,CAAC,CAC3E,CAAC;AACN,CAAC;AAED,iEAAiE;AACjE,SAAgB,uBAAuB,CAAC,KAAc;IAClD,OAAO,CACH,OAAO,KAAK,KAAK,QAAQ;QACzB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,yDAA4B,EAAE,KAAK,CAAC,CAC5E,CAAC;AACN,CAAC;AAED,kFAAkF;AAClF,SAAgB,yBAAyB,CACrC,WAAsC;IAEtC,OAAO,sBAAsB,CAAC,WAAW,CAAC;QACtC,CAAC,CAAC,uDAA2B,CAAC,WAAW,CAAC;QAC1C,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC;AAED,mFAAmF;AACnF,SAAgB,0BAA0B,CACtC,YAAuC;IAEvC,OAAO,uBAAuB,CAAC,YAAY,CAAC;QACxC,CAAC,CAAC,yDAA4B,CAAC,YAAY,CAAC;QAC5C,CAAC,CAAC,SAAS,CAAC;AACpB,CAAC;AAED,wEAAwE;AACxE,SAAgB,qBAAqB,CACjC,WAAsC;;IAEtC,OAAO,MAAA,yBAAyB,CAAC,WAAW,CAAC,0CAAE,YAAY,CAAC;AAChE,CAAC;AAED,4FAA4F;AAC5F,SAAgB,wBAAwB,CACpC,WAAsC;;IAEtC,OAAO,MAAA,yBAAyB,CAAC,WAAW,CAAC,0CAAE,WAAW,CAAC;AAC/D,CAAC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CACnC,WAAsC;IAEtC,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,+CAAmB,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,KAAK,WAAW,CAAC,CAAC;AACtF,CAAC"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmailProviderName = void 0;
4
+ /**
5
+ * Identifiers for the email providers the notification service can dispatch through.
6
+ * TWILIO_SENDGRID is the Twilio email provider (SendGrid API).
7
+ * Provider order/fallback is configuration-driven; new providers can be appended.
8
+ */
9
+ var EmailProviderName;
10
+ (function (EmailProviderName) {
11
+ EmailProviderName["TWILIO_SENDGRID"] = "twilio_sendgrid";
12
+ EmailProviderName["MAILGUN"] = "mailgun";
13
+ EmailProviderName["SES"] = "ses";
14
+ })(EmailProviderName || (exports.EmailProviderName = EmailProviderName = {}));
15
+ //# sourceMappingURL=email-provider-name.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-provider-name.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/email-provider-name.enum.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IACzB,wDAAmC,CAAA;IACnC,wCAAmB,CAAA;IACnB,gCAAW,CAAA;AACf,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationChannel = void 0;
4
+ /**
5
+ * Delivery channels supported by the clarion-notification service.
6
+ * Used to key per-channel dispatch results.
7
+ */
8
+ var NotificationChannel;
9
+ (function (NotificationChannel) {
10
+ NotificationChannel["SMS"] = "SMS";
11
+ NotificationChannel["EMAIL"] = "EMAIL";
12
+ NotificationChannel["PUSH"] = "PUSH";
13
+ NotificationChannel["WEB"] = "WEB";
14
+ })(NotificationChannel || (exports.NotificationChannel = NotificationChannel = {}));
15
+ //# sourceMappingURL=notification-channel.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-channel.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification-channel.enum.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,kCAAW,CAAA;IACX,sCAAe,CAAA;IACf,oCAAa,CAAA;IACb,kCAAW,CAAA;AACf,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NotificationOverallStatus = void 0;
4
+ /**
5
+ * Aggregate status for a multi-channel notification dispatch.
6
+ * - SUCCESS: every attempted channel succeeded.
7
+ * - PARTIAL_SUCCESS: at least one channel succeeded and at least one failed.
8
+ * - FAILED: no attempted channel succeeded.
9
+ */
10
+ var NotificationOverallStatus;
11
+ (function (NotificationOverallStatus) {
12
+ NotificationOverallStatus["SUCCESS"] = "SUCCESS";
13
+ NotificationOverallStatus["PARTIAL_SUCCESS"] = "PARTIAL_SUCCESS";
14
+ NotificationOverallStatus["FAILED"] = "FAILED";
15
+ })(NotificationOverallStatus || (exports.NotificationOverallStatus = NotificationOverallStatus = {}));
16
+ //# sourceMappingURL=notification-overall-status.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-overall-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification-overall-status.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,gDAAmB,CAAA;IACnB,gEAAmC,CAAA;IACnC,8CAAiB,CAAA;AACrB,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProviderFailureReason = void 0;
4
+ /**
5
+ * Normalized classification of why a provider attempt failed.
6
+ * Drives fallback behaviour: VALIDATION / CONFIG_MISSING are non-retryable
7
+ * (no fallback), the remainder are provider-level failures that trigger fallback.
8
+ */
9
+ var ProviderFailureReason;
10
+ (function (ProviderFailureReason) {
11
+ /** Malformed/invalid request (bad recipient, missing body/subject). Do not fall back. */
12
+ ProviderFailureReason["VALIDATION"] = "VALIDATION";
13
+ /** Provider is not configured/enabled. Skip provider (try next), not a send failure. */
14
+ ProviderFailureReason["CONFIG_MISSING"] = "CONFIG_MISSING";
15
+ /** Authentication/authorization failure with the provider. */
16
+ ProviderFailureReason["AUTH"] = "AUTH";
17
+ /** Provider rate limited the request. */
18
+ ProviderFailureReason["RATE_LIMIT"] = "RATE_LIMIT";
19
+ /** Request timed out. */
20
+ ProviderFailureReason["TIMEOUT"] = "TIMEOUT";
21
+ /** Network/connection error reaching the provider. */
22
+ ProviderFailureReason["NETWORK"] = "NETWORK";
23
+ /** Provider returned a server-side/processing error. */
24
+ ProviderFailureReason["PROVIDER_ERROR"] = "PROVIDER_ERROR";
25
+ /** Unclassified failure. */
26
+ ProviderFailureReason["UNKNOWN"] = "UNKNOWN";
27
+ })(ProviderFailureReason || (exports.ProviderFailureReason = ProviderFailureReason = {}));
28
+ //# sourceMappingURL=provider-failure-reason.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-failure-reason.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/provider-failure-reason.enum.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,qBAiBX;AAjBD,WAAY,qBAAqB;IAC7B,yFAAyF;IACzF,kDAAyB,CAAA;IACzB,wFAAwF;IACxF,0DAAiC,CAAA;IACjC,8DAA8D;IAC9D,sCAAa,CAAA;IACb,yCAAyC;IACzC,kDAAyB,CAAA;IACzB,yBAAyB;IACzB,4CAAmB,CAAA;IACnB,sDAAsD;IACtD,4CAAmB,CAAA;IACnB,wDAAwD;IACxD,0DAAiC,CAAA;IACjC,4BAA4B;IAC5B,4CAAmB,CAAA;AACvB,CAAC,EAjBW,qBAAqB,qCAArB,qBAAqB,QAiBhC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmsProviderName = void 0;
4
+ /**
5
+ * Identifiers for the SMS providers the notification service can dispatch through.
6
+ * Provider order/fallback is configuration-driven; new providers can be appended.
7
+ */
8
+ var SmsProviderName;
9
+ (function (SmsProviderName) {
10
+ SmsProviderName["TWILIO"] = "twilio";
11
+ SmsProviderName["UWAZII"] = "uwazii";
12
+ SmsProviderName["AFRICASTALKING"] = "africastalking";
13
+ })(SmsProviderName || (exports.SmsProviderName = SmsProviderName = {}));
14
+ //# sourceMappingURL=sms-provider-name.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sms-provider-name.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/sms-provider-name.enum.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oDAAiC,CAAA;AACrC,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Enums
18
+ __exportStar(require("./enums/notification-channel.enum"), exports);
19
+ __exportStar(require("./enums/sms-provider-name.enum"), exports);
20
+ __exportStar(require("./enums/email-provider-name.enum"), exports);
21
+ __exportStar(require("./enums/notification-overall-status.enum"), exports);
22
+ __exportStar(require("./enums/provider-failure-reason.enum"), exports);
23
+ // Result/interface contracts (display-safe)
24
+ __exportStar(require("./interfaces/provider-attempt"), exports);
25
+ __exportStar(require("./interfaces/per-channel-result"), exports);
26
+ __exportStar(require("./interfaces/sms-send-result"), exports);
27
+ __exportStar(require("./interfaces/email-send-result"), exports);
28
+ __exportStar(require("./interfaces/notification-dispatch-result"), exports);
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,oEAAkD;AAClD,iEAA+C;AAC/C,mEAAiD;AACjD,2EAAyD;AACzD,uEAAqD;AAErD,4CAA4C;AAC5C,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=email-send-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email-send-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/email-send-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=notification-dispatch-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-dispatch-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/notification-dispatch-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=per-channel-result.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"per-channel-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/per-channel-result.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=provider-attempt.js.map