clarion-shared-types 1.0.97 → 1.0.99

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 (62) hide show
  1. package/README.md +47 -0
  2. package/dist/cjs/index.js +1 -0
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.js +97 -0
  5. package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.js.map +1 -0
  6. package/dist/cjs/modules/alert-intake/index.js +23 -0
  7. package/dist/cjs/modules/alert-intake/index.js.map +1 -0
  8. package/dist/cjs/modules/alert-intake/interfaces/alert-intake.js +3 -0
  9. package/dist/cjs/modules/alert-intake/interfaces/alert-intake.js.map +1 -0
  10. package/dist/cjs/modules/alert-intake/utils/alert-intake.util.js +48 -0
  11. package/dist/cjs/modules/alert-intake/utils/alert-intake.util.js.map +1 -0
  12. package/dist/cjs/modules/notification/enums/notification-settings.enums.js +84 -0
  13. package/dist/cjs/modules/notification/enums/notification-settings.enums.js.map +1 -0
  14. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js +5 -0
  15. package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js.map +1 -1
  16. package/dist/cjs/modules/notification/index.js +5 -0
  17. package/dist/cjs/modules/notification/index.js.map +1 -1
  18. package/dist/cjs/modules/notification/interfaces/organization-notification-settings.dto.js +3 -0
  19. package/dist/cjs/modules/notification/interfaces/organization-notification-settings.dto.js.map +1 -0
  20. package/dist/cjs/modules/notification/utils/notification-sender.util.js +96 -0
  21. package/dist/cjs/modules/notification/utils/notification-sender.util.js.map +1 -0
  22. package/dist/cjs/modules/permission/enums/permission-actions.enum.js +17 -0
  23. package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
  24. package/dist/cjs/modules/permission/enums/permissions-moudule.enum.js +2 -0
  25. package/dist/cjs/modules/permission/enums/permissions-moudule.enum.js.map +1 -1
  26. package/dist/esm/index.js +1 -0
  27. package/dist/esm/index.js.map +1 -1
  28. package/dist/esm/modules/alert-intake/enums/alert-intake.enum.js +94 -0
  29. package/dist/esm/modules/alert-intake/enums/alert-intake.enum.js.map +1 -0
  30. package/dist/esm/modules/alert-intake/index.js +7 -0
  31. package/dist/esm/modules/alert-intake/index.js.map +1 -0
  32. package/dist/esm/modules/alert-intake/interfaces/alert-intake.js +2 -0
  33. package/dist/esm/modules/alert-intake/interfaces/alert-intake.js.map +1 -0
  34. package/dist/esm/modules/alert-intake/utils/alert-intake.util.js +42 -0
  35. package/dist/esm/modules/alert-intake/utils/alert-intake.util.js.map +1 -0
  36. package/dist/esm/modules/notification/enums/notification-settings.enums.js +81 -0
  37. package/dist/esm/modules/notification/enums/notification-settings.enums.js.map +1 -0
  38. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js +5 -0
  39. package/dist/esm/modules/notification/enums/sms-provider-name.enum.js.map +1 -1
  40. package/dist/esm/modules/notification/index.js +5 -0
  41. package/dist/esm/modules/notification/index.js.map +1 -1
  42. package/dist/esm/modules/notification/interfaces/organization-notification-settings.dto.js +2 -0
  43. package/dist/esm/modules/notification/interfaces/organization-notification-settings.dto.js.map +1 -0
  44. package/dist/esm/modules/notification/utils/notification-sender.util.js +89 -0
  45. package/dist/esm/modules/notification/utils/notification-sender.util.js.map +1 -0
  46. package/dist/esm/modules/permission/enums/permission-actions.enum.js +17 -0
  47. package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
  48. package/dist/esm/modules/permission/enums/permissions-moudule.enum.js +2 -0
  49. package/dist/esm/modules/permission/enums/permissions-moudule.enum.js.map +1 -1
  50. package/dist/types/index.d.ts +1 -0
  51. package/dist/types/modules/alert-intake/enums/alert-intake.enum.d.ts +83 -0
  52. package/dist/types/modules/alert-intake/index.d.ts +3 -0
  53. package/dist/types/modules/alert-intake/interfaces/alert-intake.d.ts +202 -0
  54. package/dist/types/modules/alert-intake/utils/alert-intake.util.d.ts +24 -0
  55. package/dist/types/modules/notification/enums/notification-settings.enums.d.ts +74 -0
  56. package/dist/types/modules/notification/enums/sms-provider-name.enum.d.ts +6 -1
  57. package/dist/types/modules/notification/index.d.ts +3 -0
  58. package/dist/types/modules/notification/interfaces/organization-notification-settings.dto.d.ts +213 -0
  59. package/dist/types/modules/notification/utils/notification-sender.util.d.ts +44 -0
  60. package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +7 -1
  61. package/dist/types/modules/permission/enums/permissions-moudule.enum.d.ts +3 -1
  62. package/package.json +1 -1
package/README.md CHANGED
@@ -70,3 +70,50 @@ detection are delivered in later phases and should build on these types.
70
70
  ```bash
71
71
  npm test # compiles src/modules/country and runs the country/currency suite
72
72
  ```
73
+
74
+ ## Organization notification settings
75
+
76
+ `src/modules/notification` mirrors the backend contract for an organization's
77
+ notification settings (branding, email senders, SMS senders) that clarion-admin's
78
+ **Notification Settings** page renders. The backend source of truth is
79
+ `grm-shared-library/src/modules/notification`; clarion-notification owns the data.
80
+
81
+ - Enums: `SmsSenderType`, `NotificationSenderStatus`, `EmailSenderVerificationStatus` /
82
+ `Method`, `NotificationSenderSource`, `NotificationBrandingSource`.
83
+ - Shapes: `OrganizationNotificationSettings`, `ResolvedNotificationBranding` (with the
84
+ per-field `sources` the page uses to say "inherited from…"), `OrganizationEmailSender`,
85
+ `OrganizationSmsSender`, `SmsProviderDescriptor`, and plain request interfaces in
86
+ place of the backend's class-validator DTOs.
87
+ - Rules: `validateSmsSenderId`, `SMS_SENDER_ID_PATTERNS` / `_HINTS`,
88
+ `BRAND_COLOUR_PATTERN`, `contrastRatioWithWhite` with `MIN_PRIMARY_COLOUR_CONTRAST`
89
+ and `MIN_ACCENT_COLOUR_CONTRAST`.
90
+
91
+ **The rules must stay byte-identical to the backend's.** The form validates with
92
+ these so the user is told before they submit; the API validates with its own copy and
93
+ is the one that counts. `notification-settings.spec.ts` pins the regex sources and
94
+ thresholds so a drift fails here rather than as a form that accepts what the API
95
+ rejects.
96
+
97
+ ## Alert intake (SMS / WhatsApp / email channels)
98
+
99
+ `src/modules/alert-intake` mirrors the backend contract for how the public reaches an
100
+ organization without the app, which clarion-admin's **Alert Channels** page renders.
101
+ The backend source of truth is `grm-shared-library/src/modules/alert-intake`;
102
+ clarion-alerts owns the data.
103
+
104
+ - Enums: `AlertIntakeChannel`, `AlertIntakeProvider`, `AlertIntakeSecretSource`,
105
+ `AlertIntakeEmergencyPolicy`, `AlertIntakeRouteMatch`, `AlertIntakeWebhookVerification`,
106
+ `AlertIntakeRejectionReason`.
107
+ - Shapes: `OrganizationAlertIntakeSettings`, `AlertIntakeConnection` (never carries a
108
+ credential - `secretsConfigured` says which secrets exist), `AlertIntakeRoute`,
109
+ `AlertIntakePlatformFallback`, `AlertIntakeProviderDescriptor` (the server-driven
110
+ form), `AlertIntakePlatformConnection`, and plain request interfaces
111
+ (`CreateAlertIntakeConnection`, `UpdateAlertIntakeConnection`, `CreateAlertIntakeRoute`,
112
+ `UpdateAlertIntakeRoute`) in place of the backend's class-validator DTOs.
113
+ - Rules: `ALERT_INTAKE_KEYWORD_PATTERN`, `normaliseAlertIntakeKeyword`,
114
+ `extractAlertIntakeKeyword`, `stripAlertIntakeKeyword` and the `MAX_ALERT_INTAKE_*` limits.
115
+
116
+ The enum file and the util file are byte-identical copies of the backend's;
117
+ `alert-intake.spec.ts` pins the values so a drift fails here rather than as a form the
118
+ API refuses. Permission actions `read:alert-intake`, `manage:alert-intake` and
119
+ `manage:alert-intake-platform` (Super-Admin only) are mirrored in `PermissionActions`.
package/dist/cjs/index.js CHANGED
@@ -36,6 +36,7 @@ __exportStar(require("./modules/country/index"), exports);
36
36
  __exportStar(require("./modules/tracking/index"), exports);
37
37
  __exportStar(require("./modules/entitlement/index"), exports);
38
38
  __exportStar(require("./modules/alert-dispatch/index"), exports);
39
+ __exportStar(require("./modules/alert-intake/index"), exports);
39
40
  __exportStar(require("./modules/partner/index"), exports);
40
41
  __exportStar(require("./modules/support/index"), exports);
41
42
  // Interfaces
@@ -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,+DAA6C;AAC7C,uDAAqC;AACrC,0DAAwC;AACxC,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,0DAAwC;AACxC,0DAAwC;AAExC,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;AACxC,2DAAyC;AACzC,8DAA4C;AAC5C,iEAA+C;AAC/C,+DAA6C;AAC7C,0DAAwC;AACxC,0DAAwC;AAExC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ /**
3
+ * Alert intake: how a member of the public reaches an organization WITHOUT the app -
4
+ * an SMS, a WhatsApp message or an email that clarion-alerts turns into an incident.
5
+ *
6
+ * Not to be confused with `alert-dispatch`, which is about who an SOS raised IN the
7
+ * app is sent to.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.AlertIntakeRejectionReason = exports.AlertIntakeWebhookVerification = exports.AlertIntakeRouteMatch = exports.AlertIntakeEmergencyPolicy = exports.AlertIntakeSecretSource = exports.AlertIntakeProvider = exports.AlertIntakeChannel = void 0;
11
+ /** The channel a message arrived on. */
12
+ var AlertIntakeChannel;
13
+ (function (AlertIntakeChannel) {
14
+ AlertIntakeChannel["SMS"] = "SMS";
15
+ AlertIntakeChannel["WHATSAPP"] = "WHATSAPP";
16
+ AlertIntakeChannel["EMAIL"] = "EMAIL";
17
+ })(AlertIntakeChannel || (exports.AlertIntakeChannel = AlertIntakeChannel = {}));
18
+ /**
19
+ * The provider a connection talks to.
20
+ *
21
+ * A code here only RESERVES the name. Whether a provider can be connected is
22
+ * answered by clarion-alerts' provider catalogue (`AlertIntakeProviderDescriptor`),
23
+ * which lists only providers with a registered adapter. UWAZII and CELCOM are
24
+ * reserved without an adapter on purpose: their inbound callback formats have not
25
+ * been confirmed, and until they are, GENERIC_SMS connects them by configuration.
26
+ */
27
+ var AlertIntakeProvider;
28
+ (function (AlertIntakeProvider) {
29
+ // SMS
30
+ AlertIntakeProvider["AFRICASTALKING"] = "africastalking";
31
+ AlertIntakeProvider["UWAZII"] = "uwazii";
32
+ AlertIntakeProvider["CELCOM"] = "celcom";
33
+ /** Any gateway that POSTs flat JSON or form fields; the field names are configured. */
34
+ AlertIntakeProvider["GENERIC_SMS"] = "generic_sms";
35
+ // WhatsApp
36
+ AlertIntakeProvider["WHATSAPP_CLOUD"] = "whatsapp_cloud";
37
+ // Email
38
+ AlertIntakeProvider["IMAP"] = "imap";
39
+ /** An inbound-parse webhook (Mailgun routes, SendGrid Inbound Parse, or a generic JSON post). */
40
+ AlertIntakeProvider["EMAIL_WEBHOOK"] = "email_webhook";
41
+ })(AlertIntakeProvider || (exports.AlertIntakeProvider = AlertIntakeProvider = {}));
42
+ /**
43
+ * Where a connection's credentials live. Never in a plaintext column.
44
+ *
45
+ * ENCRYPTED entered by the organization, encrypted at rest by clarion-alerts
46
+ * (AES-256-GCM, bound to the connection and the field). Write-only:
47
+ * the API never returns them.
48
+ * SECRET_REFERENCE the NAME of a secret the platform operator provisioned (Secret
49
+ * Manager / environment). How the legacy per-tenant credentials
50
+ * keep working, and the option for an operator who does not want
51
+ * a credential in the database at all.
52
+ */
53
+ var AlertIntakeSecretSource;
54
+ (function (AlertIntakeSecretSource) {
55
+ AlertIntakeSecretSource["ENCRYPTED"] = "ENCRYPTED";
56
+ AlertIntakeSecretSource["SECRET_REFERENCE"] = "SECRET_REFERENCE";
57
+ })(AlertIntakeSecretSource || (exports.AlertIntakeSecretSource = AlertIntakeSecretSource = {}));
58
+ /**
59
+ * How the emergency type of an incident raised from a message is decided.
60
+ * AUTO derives it from the organization: a grievance desk never raises an
61
+ * emergency; an incident desk decides from the message's category and priority.
62
+ */
63
+ var AlertIntakeEmergencyPolicy;
64
+ (function (AlertIntakeEmergencyPolicy) {
65
+ AlertIntakeEmergencyPolicy["AUTO"] = "AUTO";
66
+ AlertIntakeEmergencyPolicy["ALWAYS_EMERGENCY"] = "ALWAYS_EMERGENCY";
67
+ AlertIntakeEmergencyPolicy["ALWAYS_NON_EMERGENCY"] = "ALWAYS_NON_EMERGENCY";
68
+ })(AlertIntakeEmergencyPolicy || (exports.AlertIntakeEmergencyPolicy = AlertIntakeEmergencyPolicy = {}));
69
+ /** How a message on a PLATFORM connection finds its organization. */
70
+ var AlertIntakeRouteMatch;
71
+ (function (AlertIntakeRouteMatch) {
72
+ /** The first word of the message, e.g. `G4S fire at ...` on a shared short code. */
73
+ AlertIntakeRouteMatch["KEYWORD"] = "KEYWORD";
74
+ /** Everything no other route claimed. At most one per connection. */
75
+ AlertIntakeRouteMatch["DEFAULT"] = "DEFAULT";
76
+ })(AlertIntakeRouteMatch || (exports.AlertIntakeRouteMatch = AlertIntakeRouteMatch = {}));
77
+ /** How a provider proves a webhook call really came from it. */
78
+ var AlertIntakeWebhookVerification;
79
+ (function (AlertIntakeWebhookVerification) {
80
+ /** The unguessable URL is the only proof (Africa's Talking signs nothing). */
81
+ AlertIntakeWebhookVerification["SECRET_URL"] = "SECRET_URL";
82
+ /** A shared secret the gateway sends in a header, compared in constant time. */
83
+ AlertIntakeWebhookVerification["SHARED_SECRET_HEADER"] = "SHARED_SECRET_HEADER";
84
+ /** `X-Hub-Signature-256`: HMAC-SHA256 of the raw body with the Meta app secret. */
85
+ AlertIntakeWebhookVerification["META_SIGNATURE"] = "META_SIGNATURE";
86
+ })(AlertIntakeWebhookVerification || (exports.AlertIntakeWebhookVerification = AlertIntakeWebhookVerification = {}));
87
+ /** Why a message that arrived did not become an incident. Stored; shown to operators. */
88
+ var AlertIntakeRejectionReason;
89
+ (function (AlertIntakeRejectionReason) {
90
+ AlertIntakeRejectionReason["UNKNOWN_CONNECTION"] = "UNKNOWN_CONNECTION";
91
+ AlertIntakeRejectionReason["CONNECTION_DISABLED"] = "CONNECTION_DISABLED";
92
+ AlertIntakeRejectionReason["VERIFICATION_FAILED"] = "VERIFICATION_FAILED";
93
+ AlertIntakeRejectionReason["NO_ORGANIZATION"] = "NO_ORGANIZATION";
94
+ AlertIntakeRejectionReason["ORGANIZATION_INACTIVE"] = "ORGANIZATION_INACTIVE";
95
+ AlertIntakeRejectionReason["RATE_LIMITED"] = "RATE_LIMITED";
96
+ })(AlertIntakeRejectionReason || (exports.AlertIntakeRejectionReason = AlertIntakeRejectionReason = {}));
97
+ //# sourceMappingURL=alert-intake.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-intake.enum.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/enums/alert-intake.enum.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,wCAAwC;AACxC,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,2CAAqB,CAAA;IACrB,qCAAe,CAAA;AACnB,CAAC,EAJW,kBAAkB,kCAAlB,kBAAkB,QAI7B;AAED;;;;;;;;GAQG;AACH,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,MAAM;IACN,wDAAiC,CAAA;IACjC,wCAAiB,CAAA;IACjB,wCAAiB,CAAA;IACjB,uFAAuF;IACvF,kDAA2B,CAAA;IAC3B,WAAW;IACX,wDAAiC,CAAA;IACjC,QAAQ;IACR,oCAAa,CAAA;IACb,iGAAiG;IACjG,sDAA+B,CAAA;AACnC,CAAC,EAbW,mBAAmB,mCAAnB,mBAAmB,QAa9B;AAED;;;;;;;;;;GAUG;AACH,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,kDAAuB,CAAA;IACvB,gEAAqC,CAAA;AACzC,CAAC,EAHW,uBAAuB,uCAAvB,uBAAuB,QAGlC;AAED;;;;GAIG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,2CAAa,CAAA;IACb,mEAAqC,CAAA;IACrC,2EAA6C,CAAA;AACjD,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED,qEAAqE;AACrE,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,oFAAoF;IACpF,4CAAmB,CAAA;IACnB,qEAAqE;IACrE,4CAAmB,CAAA;AACvB,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC;AAED,gEAAgE;AAChE,IAAY,8BAOX;AAPD,WAAY,8BAA8B;IACtC,8EAA8E;IAC9E,2DAAyB,CAAA;IACzB,gFAAgF;IAChF,+EAA6C,CAAA;IAC7C,mFAAmF;IACnF,mEAAiC,CAAA;AACrC,CAAC,EAPW,8BAA8B,8CAA9B,8BAA8B,QAOzC;AAED,yFAAyF;AACzF,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IAClC,uEAAyC,CAAA;IACzC,yEAA2C,CAAA;IAC3C,yEAA2C,CAAA;IAC3C,iEAAmC,CAAA;IACnC,6EAA+C,CAAA;IAC/C,2DAA6B,CAAA;AACjC,CAAC,EAPW,0BAA0B,0CAA1B,0BAA0B,QAOrC"}
@@ -0,0 +1,23 @@
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/alert-intake.enum"), exports);
19
+ // Response shapes + plain request interfaces
20
+ __exportStar(require("./interfaces/alert-intake"), exports);
21
+ // Utilities
22
+ __exportStar(require("./utils/alert-intake.util"), exports);
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/alert-intake/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,4DAA0C;AAE1C,6CAA6C;AAC7C,4DAA0C;AAE1C,YAAY;AACZ,4DAA0C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=alert-intake.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-intake.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/interfaces/alert-intake.ts"],"names":[],"mappings":""}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAX_ALERT_INTAKE_SETTING_LENGTH = exports.MAX_ALERT_INTAKE_ROUTES_PER_CONNECTION = exports.MAX_ALERT_INTAKE_CONNECTIONS_PER_ORGANIZATION = exports.ALERT_INTAKE_KEYWORD_PATTERN = void 0;
4
+ exports.normaliseAlertIntakeKeyword = normaliseAlertIntakeKeyword;
5
+ exports.extractAlertIntakeKeyword = extractAlertIntakeKeyword;
6
+ exports.stripAlertIntakeKeyword = stripAlertIntakeKeyword;
7
+ /** A routing keyword: 2-20 letters or digits, stored upper-cased. */
8
+ exports.ALERT_INTAKE_KEYWORD_PATTERN = /^[A-Z0-9]{2,20}$/;
9
+ /** Upper bounds that keep one organization's settings a form rather than a list to page through. */
10
+ exports.MAX_ALERT_INTAKE_CONNECTIONS_PER_ORGANIZATION = 20;
11
+ exports.MAX_ALERT_INTAKE_ROUTES_PER_CONNECTION = 200;
12
+ /** One settings value (config or secret). An access token is the longest thing that goes here. */
13
+ exports.MAX_ALERT_INTAKE_SETTING_LENGTH = 4096;
14
+ /** Normalises what an operator typed into the stored form. Null when it is not a valid keyword. */
15
+ function normaliseAlertIntakeKeyword(value) {
16
+ const keyword = (value !== null && value !== void 0 ? value : '').trim().toUpperCase();
17
+ return exports.ALERT_INTAKE_KEYWORD_PATTERN.test(keyword) ? keyword : null;
18
+ }
19
+ /**
20
+ * The routing keyword of a message: its first word, upper-cased, punctuation
21
+ * stripped - `g4s, fire at the gate` and `G4S: fire` both give `G4S`.
22
+ * Null when the first word could not be a keyword.
23
+ *
24
+ * Deliberately only the FIRST word. Matching a keyword anywhere in the text would
25
+ * route "I was robbed near the G4S office" to G4S.
26
+ */
27
+ function extractAlertIntakeKeyword(text) {
28
+ var _a;
29
+ const first = (_a = (text !== null && text !== void 0 ? text : '').trim().split(/\s+/)[0]) !== null && _a !== void 0 ? _a : '';
30
+ return normaliseAlertIntakeKeyword(first.replace(/^[^A-Za-z0-9]+|[^A-Za-z0-9]+$/g, ''));
31
+ }
32
+ /**
33
+ * The message with its routing keyword removed, so "G4S fire at the gate" is
34
+ * analysed as "fire at the gate". Returns the text unchanged when it does not start
35
+ * with that keyword.
36
+ */
37
+ function stripAlertIntakeKeyword(text, keyword) {
38
+ const trimmed = (text !== null && text !== void 0 ? text : '').trim();
39
+ // Keywords are [A-Z0-9] by construction; escaping keeps this safe for a caller that skipped normalising.
40
+ const literal = keyword.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
41
+ const match = new RegExp(`^[^A-Za-z0-9]*${literal}(?![A-Za-z0-9])[^A-Za-z0-9]*`, 'i').exec(trimmed);
42
+ if (!match)
43
+ return text;
44
+ const rest = trimmed.slice(match[0].length).trim();
45
+ // A message that was ONLY the keyword is still a message; do not turn it into nothing.
46
+ return rest.length > 0 ? rest : trimmed;
47
+ }
48
+ //# sourceMappingURL=alert-intake.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alert-intake.util.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/utils/alert-intake.util.ts"],"names":[],"mappings":";;;AAUA,kEAGC;AAUD,8DAGC;AAOD,0DASC;AA1CD,qEAAqE;AACxD,QAAA,4BAA4B,GAAG,kBAAkB,CAAC;AAE/D,oGAAoG;AACvF,QAAA,6CAA6C,GAAG,EAAE,CAAC;AACnD,QAAA,sCAAsC,GAAG,GAAG,CAAC;AAC1D,kGAAkG;AACrF,QAAA,+BAA+B,GAAG,IAAI,CAAC;AAEpD,mGAAmG;AACnG,SAAgB,2BAA2B,CAAC,KAAgC;IACxE,MAAM,OAAO,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACnD,OAAO,oCAA4B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AACvE,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,yBAAyB,CAAC,IAA+B;;IACrE,MAAM,KAAK,GAAG,MAAA,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,mCAAI,EAAE,CAAC;IACxD,OAAO,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5F,CAAC;AAED;;;;GAIG;AACH,SAAgB,uBAAuB,CAAC,IAAY,EAAE,OAAe;IACjE,MAAM,OAAO,GAAG,CAAC,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACpC,yGAAyG;IACzG,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,iBAAiB,OAAO,8BAA8B,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpG,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IACnD,uFAAuF;IACvF,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /**
3
+ * Organization notification settings enums.
4
+ *
5
+ * MIRRORS grm-shared-library (`modules/notification/enums`), values included. The
6
+ * admin renders and submits these strings and clarion-notification validates the
7
+ * same ones, so any drift is a form the API refuses. `notification-settings.spec.ts`
8
+ * pins the values.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.NotificationBrandingSource = exports.NotificationSenderSource = exports.EmailSenderVerificationMethod = exports.EmailSenderVerificationStatus = exports.NotificationSenderStatus = exports.SmsSenderType = void 0;
12
+ /** What kind of identity an SMS is sent from. Decides how the value is validated. */
13
+ var SmsSenderType;
14
+ (function (SmsSenderType) {
15
+ /** A registered alphanumeric sender name, e.g. `G4S`. At most 11 characters. */
16
+ SmsSenderType["ALPHANUMERIC"] = "ALPHANUMERIC";
17
+ /** An E.164 long number, e.g. `+254711000000`. */
18
+ SmsSenderType["PHONE_NUMBER"] = "PHONE_NUMBER";
19
+ /** A telco short code, e.g. `22384`. */
20
+ SmsSenderType["SHORT_CODE"] = "SHORT_CODE";
21
+ /** A provider-side sender pool (Twilio Messaging Service SID, `MG...`). */
22
+ SmsSenderType["MESSAGING_SERVICE"] = "MESSAGING_SERVICE";
23
+ })(SmsSenderType || (exports.SmsSenderType = SmsSenderType = {}));
24
+ /**
25
+ * Lifecycle of an organization-owned SMS sender. An organization REQUESTS a sender
26
+ * (PENDING) and a platform operator ACTIVATES it once the provider and the telco
27
+ * have registered it. Only ACTIVE senders are ever used to send.
28
+ */
29
+ var NotificationSenderStatus;
30
+ (function (NotificationSenderStatus) {
31
+ NotificationSenderStatus["PENDING"] = "PENDING";
32
+ NotificationSenderStatus["ACTIVE"] = "ACTIVE";
33
+ NotificationSenderStatus["SUSPENDED"] = "SUSPENDED";
34
+ NotificationSenderStatus["REJECTED"] = "REJECTED";
35
+ })(NotificationSenderStatus || (exports.NotificationSenderStatus = NotificationSenderStatus = {}));
36
+ /**
37
+ * Whether an email provider will accept mail FROM an organization's address.
38
+ * Tracked per provider: an address can be verified in Twilio SendGrid while its
39
+ * domain is unknown to Mailgun. A provider only sends from an address it has
40
+ * VERIFIED; otherwise it falls back to the platform sender.
41
+ */
42
+ var EmailSenderVerificationStatus;
43
+ (function (EmailSenderVerificationStatus) {
44
+ /** The provider does not know this address or its domain. */
45
+ EmailSenderVerificationStatus["UNVERIFIED"] = "UNVERIFIED";
46
+ /** Verification was started and is waiting on the owner (inbox click or DNS records). */
47
+ EmailSenderVerificationStatus["PENDING"] = "PENDING";
48
+ /** The provider accepts mail from this address. */
49
+ EmailSenderVerificationStatus["VERIFIED"] = "VERIFIED";
50
+ /** The last check could not be completed (provider error). */
51
+ EmailSenderVerificationStatus["FAILED"] = "FAILED";
52
+ })(EmailSenderVerificationStatus || (exports.EmailSenderVerificationStatus = EmailSenderVerificationStatus = {}));
53
+ /** How the provider recognises the address. */
54
+ var EmailSenderVerificationMethod;
55
+ (function (EmailSenderVerificationMethod) {
56
+ /** The exact address was verified on its own (SendGrid Single Sender Verification). */
57
+ EmailSenderVerificationMethod["SINGLE_SENDER"] = "SINGLE_SENDER";
58
+ /** The whole domain is authenticated (SendGrid domain authentication, Mailgun domain). */
59
+ EmailSenderVerificationMethod["DOMAIN"] = "DOMAIN";
60
+ })(EmailSenderVerificationMethod || (exports.EmailSenderVerificationMethod = EmailSenderVerificationMethod = {}));
61
+ /** Whose identity a message actually went out under. */
62
+ var NotificationSenderSource;
63
+ (function (NotificationSenderSource) {
64
+ /** The organization's own verified email address / active SMS sender. */
65
+ NotificationSenderSource["ORGANIZATION"] = "ORGANIZATION";
66
+ /** The platform's default (country-aware) sender. */
67
+ NotificationSenderSource["PLATFORM_DEFAULT"] = "PLATFORM_DEFAULT";
68
+ })(NotificationSenderSource || (exports.NotificationSenderSource = NotificationSenderSource = {}));
69
+ /**
70
+ * Where one resolved branding value came from. Branding resolves field by field,
71
+ * highest precedence first, so a half-filled profile still produces a complete email.
72
+ */
73
+ var NotificationBrandingSource;
74
+ (function (NotificationBrandingSource) {
75
+ /** The organization's notification settings. */
76
+ NotificationBrandingSource["PROFILE"] = "PROFILE";
77
+ /** The organization record (clarion-organization). */
78
+ NotificationBrandingSource["ORGANIZATION"] = "ORGANIZATION";
79
+ /** The legacy per-app defaults (deprecated). */
80
+ NotificationBrandingSource["APP_DEFAULT"] = "APP_DEFAULT";
81
+ /** The platform's own branding. */
82
+ NotificationBrandingSource["PLATFORM_DEFAULT"] = "PLATFORM_DEFAULT";
83
+ })(NotificationBrandingSource || (exports.NotificationBrandingSource = NotificationBrandingSource = {}));
84
+ //# sourceMappingURL=notification-settings.enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-settings.enums.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification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EAAqC,CAAA;AACzC,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC"}
@@ -4,11 +4,16 @@ exports.SmsProviderName = void 0;
4
4
  /**
5
5
  * Identifiers for the SMS providers the notification service can dispatch through.
6
6
  * Provider order/fallback is configuration-driven; new providers can be appended.
7
+ *
8
+ * A code here only RESERVES the name. Whether a provider can actually be used is
9
+ * answered by the notification service's provider catalogue
10
+ * (`SmsProviderDescriptor`), which lists only providers with a registered adapter.
7
11
  */
8
12
  var SmsProviderName;
9
13
  (function (SmsProviderName) {
10
14
  SmsProviderName["TWILIO"] = "twilio";
11
15
  SmsProviderName["UWAZII"] = "uwazii";
12
16
  SmsProviderName["AFRICASTALKING"] = "africastalking";
17
+ SmsProviderName["CELCOM"] = "celcom";
13
18
  })(SmsProviderName || (exports.SmsProviderName = SmsProviderName = {}));
14
19
  //# sourceMappingURL=sms-provider-name.enum.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"sms-provider-name.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/sms-provider-name.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;AACrB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
@@ -20,10 +20,15 @@ __exportStar(require("./enums/sms-provider-name.enum"), exports);
20
20
  __exportStar(require("./enums/email-provider-name.enum"), exports);
21
21
  __exportStar(require("./enums/notification-overall-status.enum"), exports);
22
22
  __exportStar(require("./enums/provider-failure-reason.enum"), exports);
23
+ __exportStar(require("./enums/notification-settings.enums"), exports);
23
24
  // Result/interface contracts (display-safe)
24
25
  __exportStar(require("./interfaces/provider-attempt"), exports);
25
26
  __exportStar(require("./interfaces/per-channel-result"), exports);
26
27
  __exportStar(require("./interfaces/sms-send-result"), exports);
27
28
  __exportStar(require("./interfaces/email-send-result"), exports);
28
29
  __exportStar(require("./interfaces/notification-dispatch-result"), exports);
30
+ // Organization notification settings (branding + sender identity)
31
+ __exportStar(require("./interfaces/organization-notification-settings.dto"), exports);
32
+ // Utilities
33
+ __exportStar(require("./utils/notification-sender.util"), exports);
29
34
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
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;AACrD,sEAAoD;AAEpD,4CAA4C;AAC5C,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D;AAE1D,kEAAkE;AAClE,sFAAoE;AAEpE,YAAY;AACZ,mEAAiD"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=organization-notification-settings.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-notification-settings.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/organization-notification-settings.dto.ts"],"names":[],"mappings":""}
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MIN_ACCENT_COLOUR_CONTRAST = exports.MIN_PRIMARY_COLOUR_CONTRAST = exports.MAX_SMS_SENDERS_PER_ORGANIZATION = exports.MAX_EMAIL_SENDERS_PER_ORGANIZATION = exports.SMS_SENDER_ID_HINTS = exports.SMS_SENDER_ID_PATTERNS = exports.BRAND_COLOUR_PATTERN = void 0;
4
+ exports.validateSmsSenderId = validateSmsSenderId;
5
+ exports.emailDomainOf = emailDomainOf;
6
+ exports.contrastRatioWithWhite = contrastRatioWithWhite;
7
+ exports.darkenHexColour = darkenHexColour;
8
+ const notification_settings_enums_1 = require("../enums/notification-settings.enums");
9
+ /**
10
+ * MIRRORS grm-shared-library (`modules/notification/constants` and `utils`),
11
+ * patterns and thresholds included. The settings form validates with these and
12
+ * clarion-notification validates with the originals, so they must agree to the
13
+ * character: a form that accepts what the API refuses is worse than no check.
14
+ */
15
+ /** `#RRGGBB`. The only colour format accepted, because it is inlined into email CSS. */
16
+ exports.BRAND_COLOUR_PATTERN = /^#[0-9a-fA-F]{6}$/;
17
+ /**
18
+ * What a sender value must look like, per type. ALPHANUMERIC follows the GSM rule
19
+ * every supported provider enforces: 3-11 characters, at least one letter (an
20
+ * all-digit "name" is a number, and telcos reject it as spoofing).
21
+ */
22
+ exports.SMS_SENDER_ID_PATTERNS = Object.freeze({
23
+ [notification_settings_enums_1.SmsSenderType.ALPHANUMERIC]: /^(?=.*[A-Za-z])[A-Za-z0-9 _.&-]{3,11}$/,
24
+ [notification_settings_enums_1.SmsSenderType.PHONE_NUMBER]: /^\+[1-9]\d{6,14}$/,
25
+ [notification_settings_enums_1.SmsSenderType.SHORT_CODE]: /^\d{3,8}$/,
26
+ [notification_settings_enums_1.SmsSenderType.MESSAGING_SERVICE]: /^MG[0-9a-fA-F]{32}$/,
27
+ });
28
+ /** Human-readable form of {@link SMS_SENDER_ID_PATTERNS}, for validation messages and form hints. */
29
+ exports.SMS_SENDER_ID_HINTS = Object.freeze({
30
+ [notification_settings_enums_1.SmsSenderType.ALPHANUMERIC]: '3-11 characters (letters, digits, space, _ . & -) with at least one letter, e.g. G4S',
31
+ [notification_settings_enums_1.SmsSenderType.PHONE_NUMBER]: 'an E.164 number, e.g. +254711000000',
32
+ [notification_settings_enums_1.SmsSenderType.SHORT_CODE]: '3-8 digits, e.g. 22384',
33
+ [notification_settings_enums_1.SmsSenderType.MESSAGING_SERVICE]: 'a Twilio Messaging Service SID (MG followed by 32 hex characters)',
34
+ });
35
+ /** Upper bounds that keep one organization from turning its settings into a list to page through. */
36
+ exports.MAX_EMAIL_SENDERS_PER_ORGANIZATION = 10;
37
+ exports.MAX_SMS_SENDERS_PER_ORGANIZATION = 30;
38
+ /** Large text and UI components (WCAG 1.4.11): buttons and links in the primary colour. */
39
+ exports.MIN_PRIMARY_COLOUR_CONTRAST = 3;
40
+ /** Body-size white text sits on the accent colour (WCAG 1.4.3). */
41
+ exports.MIN_ACCENT_COLOUR_CONTRAST = 4.5;
42
+ /**
43
+ * Validates an SMS sender value against its declared type.
44
+ * Returns null when valid, otherwise a message fit to show an operator.
45
+ */
46
+ function validateSmsSenderId(senderType, senderId) {
47
+ const pattern = exports.SMS_SENDER_ID_PATTERNS[senderType];
48
+ if (!pattern)
49
+ return `Unsupported sender type: ${senderType}`;
50
+ const value = (senderId !== null && senderId !== void 0 ? senderId : '').trim();
51
+ if (!value)
52
+ return 'Sender ID is required';
53
+ return pattern.test(value) ? null : `A ${senderType} sender must be ${exports.SMS_SENDER_ID_HINTS[senderType]}`;
54
+ }
55
+ /** The domain part of an email address, lower-cased. Null when there is none. */
56
+ function emailDomainOf(address) {
57
+ const value = (address !== null && address !== void 0 ? address : '').trim().toLowerCase();
58
+ const at = value.lastIndexOf('@');
59
+ if (at <= 0 || at === value.length - 1)
60
+ return null;
61
+ return value.slice(at + 1);
62
+ }
63
+ /**
64
+ * WCAG contrast ratio of a `#RRGGBB` colour against white, from 1 (white) to 21
65
+ * (black). The email templates put WHITE text on the primary colour (buttons) and
66
+ * on the accent colour (header banner, footer), so a pale brand colour produces
67
+ * an email nobody can read. Returns 0 for anything that is not a hex colour.
68
+ */
69
+ function contrastRatioWithWhite(hex) {
70
+ const match = /^#([0-9a-fA-F]{6})$/.exec((hex !== null && hex !== void 0 ? hex : '').trim());
71
+ if (!match)
72
+ return 0;
73
+ const [r, g, b] = [0, 2, 4].map(offset => {
74
+ const channel = parseInt(match[1].slice(offset, offset + 2), 16) / 255;
75
+ return channel <= 0.03928 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
76
+ });
77
+ const luminance = 0.2126 * r + 0.7152 * g + 0.0722 * b;
78
+ return Math.round((1.05 / (luminance + 0.05)) * 100) / 100;
79
+ }
80
+ /**
81
+ * Darkens a `#RRGGBB` colour by a fraction (0-1). Used to derive the hover/pressed
82
+ * shade of a brand colour so an organization only has to choose one.
83
+ * Returns the input unchanged when it is not a valid hex colour.
84
+ */
85
+ function darkenHexColour(hex, fraction = 0.15) {
86
+ const match = /^#([0-9a-fA-F]{6})$/.exec((hex !== null && hex !== void 0 ? hex : '').trim());
87
+ if (!match)
88
+ return hex;
89
+ const clamped = Math.min(Math.max(fraction, 0), 1);
90
+ const channels = [0, 2, 4].map(offset => {
91
+ const channel = parseInt(match[1].slice(offset, offset + 2), 16);
92
+ return Math.round(channel * (1 - clamped)).toString(16).padStart(2, '0');
93
+ });
94
+ return `#${channels.join('')}`;
95
+ }
96
+ //# sourceMappingURL=notification-sender.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-sender.util.js","sourceRoot":"","sources":["../../../../../src/modules/notification/utils/notification-sender.util.ts"],"names":[],"mappings":";;;AA6CA,kDAMC;AAGD,sCAKC;AAQD,wDASC;AAOD,0CASC;AA5FD,sFAAqE;AAErE;;;;;GAKG;AAEH,w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UPPORT_SYNC"] = "read:support-sync";
111
111
  PermissionActions["MANAGE_SUPPORT_SYNC"] = "manage:support-sync";
112
+ // Module: Notification
113
+ // An organization's notification settings (clarion-notification): how its
114
+ // emails are branded, the address they are sent from, and the sender ID its
115
+ // SMS arrive under. Mirrors grm-shared-library.
116
+ PermissionActions["READ_NOTIFICATION_SETTINGS"] = "read:notification-settings";
117
+ PermissionActions["MANAGE_NOTIFICATION_SETTINGS"] = "manage:notification-settings";
118
+ // Confirming that an SMS sender ID really is registered with the provider.
119
+ // Granted to NO role on the backend: only Super-Admin ('*') passes it.
120
+ PermissionActions["APPROVE_NOTIFICATION_SENDER"] = "approve:notification-sender";
121
+ // Module: Alert Intake
122
+ // The channels the PUBLIC reaches an organization on without the app - its SMS
123
+ // short code, WhatsApp number and mailbox (clarion-alerts). Mirrors grm-shared-library.
124
+ PermissionActions["READ_ALERT_INTAKE"] = "read:alert-intake";
125
+ PermissionActions["MANAGE_ALERT_INTAKE"] = "manage:alert-intake";
126
+ // PLATFORM connections and their routes (which keyword sends a message to which
127
+ // organization). Granted to NO role on the backend: only Super-Admin ('*') passes it.
128
+ PermissionActions["MANAGE_ALERT_INTAKE_PLATFORM"] = "manage:alert-intake-platform";
112
129
  })(PermissionActions || (exports.PermissionActions = PermissionActions = {}));
113
130
  //# sourceMappingURL=permission-actions.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAmHX;AAnHD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAA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/C,oEAA+C,CAAA;IAC/C,kEAA6C,CAAA;IAC7C,gEAA2C,CAAA;IAC3C,kFAA6D,CAAA;IAC7D,sFAAiE,CAAA;IACjE,kEAA6C,CAAA;IAC7C,oEAA+C,CAAA;IAC/C,yEAAyE;IACzE,gEAA2C,CAAA;IAC3C;;;OAGG;IACH,8DAAyC,CAAA;IACzC,mFAAmF;IACnF,wEAAmD,CAAA;IACnD,oEAA+C,CAAA;IAC/C,gFAAgF;IAChF,sEAAiD,CAAA;IACjD,wEAAmD,CAAA;IACnD,0EAAqD,CAAA;IACrD,0EAAqD,CAAA;IACrD,kEAA6C,CAAA;IAC7C,gEAA2C,CAAA;IAC3C,8DAAyC,CAAA;IACzC,kFAA6D,CAAA;IAC7D,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;AAC/C,CAAC,EAnHW,iBAAiB,iCAAjB,iBAAiB,QAmH5B"}
1
+ {"version":3,"file":"permission-actions.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permission-actions.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAsIX;AAtID,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gEAA2C,CAAA;IAE3C,kBAAkB;IAClB,sDAAiC,CAAA;IACjC,kDAA6B,CAAA;IAC7B,sDAAiC,CAAA;IACjC,sDAAiC,CAAA;IACjC,wEAAwE;IACxE,mEAAmE;IACnE,oEAA+C,CAAA;IAC/C,0EAAqD,CAAA;IACrD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,wEAAmD,CAAA;IACnD,2EAA2E;IAC3E,4EAA4E;IAC5E,qEAAqE;IACrE,uDAAuD;IACvD,wEAAmD,CAAA;IACnD,4EAAuD,CAAA;IAEvD,wBAAwB;IACxB,oEAA+C,CAAA;IAC/C,gEAA2C,CAAA;IAC3C,oEAA+C,CAAA;IAC/C,oE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C/C,gFAAgF;IAChF,sEAAiD,CAAA;IACjD,wEAAmD,CAAA;IACnD,0EAAqD,CAAA;IACrD,0EAAqD,CAAA;IACrD,kEAA6C,CAAA;IAC7C,gEAA2C,CAAA;IAC3C,8DAAyC,CAAA;IACzC,kFAA6D,CAAA;IAC7D,gEAA2C,CAAA;IAC3C,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAE3C,uBAAuB;IACvB,0EAA0E;IAC1E,4EAA4E;IAC5E,gDAAgD;IAChD,8EAAyD,CAAA;IACzD,kFAA6D,CAAA;IAC7D,2EAA2E;IAC3E,uEAAuE;IACvE,gFAA2D,CAAA;IAE3D,uBAAuB;IACvB,+EAA+E;IAC/E,wFAAwF;IACxF,4DAAuC,CAAA;IACvC,gEAA2C,CAAA;IAC3C,gFAAgF;IAChF,sFAAsF;IACtF,kFAA6D,CAAA;AACjE,CAAC,EAtIW,iBAAiB,iCAAjB,iBAAiB,QAsI5B"}
@@ -13,5 +13,7 @@ var PermissionsModule;
13
13
  PermissionsModule["RESPONSE_UNIT"] = "Response Unit";
14
14
  PermissionsModule["TRACKING"] = "Tracking";
15
15
  PermissionsModule["SUPPORT"] = "Support";
16
+ PermissionsModule["NOTIFICATION"] = "Notification";
17
+ PermissionsModule["ALERT_INTAKE"] = "Alert Intake";
16
18
  })(PermissionsModule || (exports.PermissionsModule = PermissionsModule = {}));
17
19
  //# sourceMappingURL=permissions-moudule.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions-moudule.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permissions-moudule.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAWX;AAXD,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,2CAAsB,CAAA;IACtB,oDAA+B,CAAA;IAC/B,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;AACvB,CAAC,EAXW,iBAAiB,iCAAjB,iBAAiB,QAW5B"}
1
+ {"version":3,"file":"permissions-moudule.enum.js","sourceRoot":"","sources":["../../../../../src/modules/permission/enums/permissions-moudule.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAaX;AAbD,WAAY,iBAAiB;IACzB,kDAA6B,CAAA;IAC7B,wCAAmB,CAAA;IACnB,sDAAiC,CAAA;IACjC,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,2CAAsB,CAAA;IACtB,oDAA+B,CAAA;IAC/B,0CAAqB,CAAA;IACrB,wCAAmB,CAAA;IACnB,kDAA6B,CAAA;IAC7B,kDAA6B,CAAA;AACjC,CAAC,EAbW,iBAAiB,iCAAjB,iBAAiB,QAa5B"}
package/dist/esm/index.js CHANGED
@@ -20,6 +20,7 @@ export * from './modules/country/index';
20
20
  export * from './modules/tracking/index';
21
21
  export * from './modules/entitlement/index';
22
22
  export * from './modules/alert-dispatch/index';
23
+ export * from './modules/alert-intake/index';
23
24
  export * from './modules/partner/index';
24
25
  export * from './modules/support/index';
25
26
  // Interfaces
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,c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