clarion-shared-types 1.0.100 → 1.0.101

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.
@@ -7,7 +7,7 @@
7
7
  * app is sent to.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AlertIntakeMessageState = exports.AlertIntakeRejectionReason = exports.AlertIntakeWebhookVerification = exports.AlertIntakeRouteMatch = exports.AlertIntakeEmergencyPolicy = exports.AlertIntakeSecretSource = exports.AlertIntakeProvider = exports.AlertIntakeChannel = void 0;
10
+ exports.AlertIntakeScreeningDecision = exports.AlertIntakeScreeningStatus = exports.AlertIntakeScreeningSource = exports.AlertIntakeScreeningReason = exports.AlertIntakeMessageState = exports.AlertIntakeRejectionReason = exports.AlertIntakeWebhookVerification = exports.AlertIntakeRouteMatch = exports.AlertIntakeEmergencyPolicy = exports.AlertIntakeSecretSource = exports.AlertIntakeProvider = exports.AlertIntakeChannel = void 0;
11
11
  /** The channel a message arrived on. */
12
12
  var AlertIntakeChannel;
13
13
  (function (AlertIntakeChannel) {
@@ -104,6 +104,7 @@ var AlertIntakeRejectionReason;
104
104
  * PARKED failed and will not be retried on its own: it ran out of attempts, or it
105
105
  * has a `rejectionReason` (no organization, organization inactive)
106
106
  * DUPLICATE the same sender repeating themselves; not raised
107
+ * FILTERED screened out as not a report (a greeting, a link, an advert); held for review
107
108
  */
108
109
  var AlertIntakeMessageState;
109
110
  (function (AlertIntakeMessageState) {
@@ -112,5 +113,57 @@ var AlertIntakeMessageState;
112
113
  AlertIntakeMessageState["RETRYING"] = "RETRYING";
113
114
  AlertIntakeMessageState["PARKED"] = "PARKED";
114
115
  AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
116
+ AlertIntakeMessageState["FILTERED"] = "FILTERED";
115
117
  })(AlertIntakeMessageState || (exports.AlertIntakeMessageState = AlertIntakeMessageState = {}));
118
+ /**
119
+ * Why a message was screened out instead of raised. Everything that arrives on a
120
+ * connection is kept: a screened message waits for a person to raise it or dismiss it.
121
+ *
122
+ * EMPTY nothing to read: no text, no file, no location
123
+ * SYSTEM_EVENT a notice from the channel itself (WhatsApp "changed number")
124
+ * UNSUPPORTED_CONTENT something the channel could not deliver, a reaction or a sticker
125
+ * GREETING a greeting or pleasantry and nothing else ("Hi", "How are you?")
126
+ * LINK_ONLY a link and nothing else (a forwarded post or video)
127
+ * SPAM an advert, a promotion, a chain message, a scam
128
+ * OFF_TOPIC reports nothing the organization handles (chat, unrelated questions)
129
+ * TEST someone testing the number
130
+ */
131
+ var AlertIntakeScreeningReason;
132
+ (function (AlertIntakeScreeningReason) {
133
+ AlertIntakeScreeningReason["EMPTY"] = "EMPTY";
134
+ AlertIntakeScreeningReason["SYSTEM_EVENT"] = "SYSTEM_EVENT";
135
+ AlertIntakeScreeningReason["UNSUPPORTED_CONTENT"] = "UNSUPPORTED_CONTENT";
136
+ AlertIntakeScreeningReason["GREETING"] = "GREETING";
137
+ AlertIntakeScreeningReason["LINK_ONLY"] = "LINK_ONLY";
138
+ AlertIntakeScreeningReason["SPAM"] = "SPAM";
139
+ AlertIntakeScreeningReason["OFF_TOPIC"] = "OFF_TOPIC";
140
+ AlertIntakeScreeningReason["TEST"] = "TEST";
141
+ })(AlertIntakeScreeningReason || (exports.AlertIntakeScreeningReason = AlertIntakeScreeningReason = {}));
142
+ /** What decided a message was not a report: a fixed rule, or the AI screening model. */
143
+ var AlertIntakeScreeningSource;
144
+ (function (AlertIntakeScreeningSource) {
145
+ AlertIntakeScreeningSource["RULE"] = "RULE";
146
+ AlertIntakeScreeningSource["AI"] = "AI";
147
+ })(AlertIntakeScreeningSource || (exports.AlertIntakeScreeningSource = AlertIntakeScreeningSource = {}));
148
+ /**
149
+ * A screened message, from a reviewer's side.
150
+ *
151
+ * PENDING_REVIEW screened out; nobody has looked at it yet
152
+ * ELEVATED a person decided it IS a report: it was raised as an incident
153
+ * DISMISSED a person confirmed it is not a report
154
+ */
155
+ var AlertIntakeScreeningStatus;
156
+ (function (AlertIntakeScreeningStatus) {
157
+ AlertIntakeScreeningStatus["PENDING_REVIEW"] = "PENDING_REVIEW";
158
+ AlertIntakeScreeningStatus["ELEVATED"] = "ELEVATED";
159
+ AlertIntakeScreeningStatus["DISMISSED"] = "DISMISSED";
160
+ })(AlertIntakeScreeningStatus || (exports.AlertIntakeScreeningStatus = AlertIntakeScreeningStatus = {}));
161
+ /** A reviewer's decision on screened messages. */
162
+ var AlertIntakeScreeningDecision;
163
+ (function (AlertIntakeScreeningDecision) {
164
+ /** Raise it as an incident (or a grievance, for a grievance desk) after all. */
165
+ AlertIntakeScreeningDecision["ELEVATE"] = "ELEVATE";
166
+ /** Confirm it is not a report. */
167
+ AlertIntakeScreeningDecision["DISMISS"] = "DISMISS";
168
+ })(AlertIntakeScreeningDecision || (exports.AlertIntakeScreeningDecision = AlertIntakeScreeningDecision = {}));
116
169
  //# sourceMappingURL=alert-intake.enum.js.map
@@ -1 +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;AAED;;;;;;;;;;GAUG;AACH,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;AAC3B,CAAC,EANW,uBAAuB,uCAAvB,uBAAuB,QAMlC"}
1
+ {"version":3,"file":"alert-intake.enum.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/enums/alert-intake.enum.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAEH,wCAA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AAA;IACzC,yEAA2C,CAAA;IAC3C,yEAA2C,CAAA;IAC3C,iEAAmC,CAAA;IACnC,6EAA+C,CAAA;IAC/C,2DAA6B,CAAA;AACjC,CAAC,EAPW,0BAA0B,0CAA1B,0BAA0B,QAOrC;AAED;;;;;;;;;;;GAWG;AACH,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IAC/B,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,gDAAqB,CAAA;AACzB,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC;AAED;;;;;;;;;;;;GAYG;AACH,IAAY,0BASX;AATD,WAAY,0BAA0B;IAClC,6CAAe,CAAA;IACf,2DAA6B,CAAA;IAC7B,yEAA2C,CAAA;IAC3C,mDAAqB,CAAA;IACrB,qDAAuB,CAAA;IACvB,2CAAa,CAAA;IACb,qDAAuB,CAAA;IACvB,2CAAa,CAAA;AACjB,CAAC,EATW,0BAA0B,0CAA1B,0BAA0B,QASrC;AAED,wFAAwF;AACxF,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IAClC,2CAAa,CAAA;IACb,uCAAS,CAAA;AACb,CAAC,EAHW,0BAA0B,0CAA1B,0BAA0B,QAGrC;AAED;;;;;;GAMG;AACH,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,+DAAiC,CAAA;IACjC,mDAAqB,CAAA;IACrB,qDAAuB,CAAA;AAC3B,CAAC,EAJW,0BAA0B,0CAA1B,0BAA0B,QAIrC;AAED,kDAAkD;AAClD,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,gFAAgF;IAChF,mDAAmB,CAAA;IACnB,kCAAkC;IAClC,mDAAmB,CAAA;AACvB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC"}
@@ -101,6 +101,7 @@ export var AlertIntakeRejectionReason;
101
101
  * PARKED failed and will not be retried on its own: it ran out of attempts, or it
102
102
  * has a `rejectionReason` (no organization, organization inactive)
103
103
  * DUPLICATE the same sender repeating themselves; not raised
104
+ * FILTERED screened out as not a report (a greeting, a link, an advert); held for review
104
105
  */
105
106
  export var AlertIntakeMessageState;
106
107
  (function (AlertIntakeMessageState) {
@@ -109,5 +110,57 @@ export var AlertIntakeMessageState;
109
110
  AlertIntakeMessageState["RETRYING"] = "RETRYING";
110
111
  AlertIntakeMessageState["PARKED"] = "PARKED";
111
112
  AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
113
+ AlertIntakeMessageState["FILTERED"] = "FILTERED";
112
114
  })(AlertIntakeMessageState || (AlertIntakeMessageState = {}));
115
+ /**
116
+ * Why a message was screened out instead of raised. Everything that arrives on a
117
+ * connection is kept: a screened message waits for a person to raise it or dismiss it.
118
+ *
119
+ * EMPTY nothing to read: no text, no file, no location
120
+ * SYSTEM_EVENT a notice from the channel itself (WhatsApp "changed number")
121
+ * UNSUPPORTED_CONTENT something the channel could not deliver, a reaction or a sticker
122
+ * GREETING a greeting or pleasantry and nothing else ("Hi", "How are you?")
123
+ * LINK_ONLY a link and nothing else (a forwarded post or video)
124
+ * SPAM an advert, a promotion, a chain message, a scam
125
+ * OFF_TOPIC reports nothing the organization handles (chat, unrelated questions)
126
+ * TEST someone testing the number
127
+ */
128
+ export var AlertIntakeScreeningReason;
129
+ (function (AlertIntakeScreeningReason) {
130
+ AlertIntakeScreeningReason["EMPTY"] = "EMPTY";
131
+ AlertIntakeScreeningReason["SYSTEM_EVENT"] = "SYSTEM_EVENT";
132
+ AlertIntakeScreeningReason["UNSUPPORTED_CONTENT"] = "UNSUPPORTED_CONTENT";
133
+ AlertIntakeScreeningReason["GREETING"] = "GREETING";
134
+ AlertIntakeScreeningReason["LINK_ONLY"] = "LINK_ONLY";
135
+ AlertIntakeScreeningReason["SPAM"] = "SPAM";
136
+ AlertIntakeScreeningReason["OFF_TOPIC"] = "OFF_TOPIC";
137
+ AlertIntakeScreeningReason["TEST"] = "TEST";
138
+ })(AlertIntakeScreeningReason || (AlertIntakeScreeningReason = {}));
139
+ /** What decided a message was not a report: a fixed rule, or the AI screening model. */
140
+ export var AlertIntakeScreeningSource;
141
+ (function (AlertIntakeScreeningSource) {
142
+ AlertIntakeScreeningSource["RULE"] = "RULE";
143
+ AlertIntakeScreeningSource["AI"] = "AI";
144
+ })(AlertIntakeScreeningSource || (AlertIntakeScreeningSource = {}));
145
+ /**
146
+ * A screened message, from a reviewer's side.
147
+ *
148
+ * PENDING_REVIEW screened out; nobody has looked at it yet
149
+ * ELEVATED a person decided it IS a report: it was raised as an incident
150
+ * DISMISSED a person confirmed it is not a report
151
+ */
152
+ export var AlertIntakeScreeningStatus;
153
+ (function (AlertIntakeScreeningStatus) {
154
+ AlertIntakeScreeningStatus["PENDING_REVIEW"] = "PENDING_REVIEW";
155
+ AlertIntakeScreeningStatus["ELEVATED"] = "ELEVATED";
156
+ AlertIntakeScreeningStatus["DISMISSED"] = "DISMISSED";
157
+ })(AlertIntakeScreeningStatus || (AlertIntakeScreeningStatus = {}));
158
+ /** A reviewer's decision on screened messages. */
159
+ export var AlertIntakeScreeningDecision;
160
+ (function (AlertIntakeScreeningDecision) {
161
+ /** Raise it as an incident (or a grievance, for a grievance desk) after all. */
162
+ AlertIntakeScreeningDecision["ELEVATE"] = "ELEVATE";
163
+ /** Confirm it is not a report. */
164
+ AlertIntakeScreeningDecision["DISMISS"] = "DISMISS";
165
+ })(AlertIntakeScreeningDecision || (AlertIntakeScreeningDecision = {}));
113
166
  //# sourceMappingURL=alert-intake.enum.js.map
@@ -1 +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,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,2CAAqB,CAAA;IACrB,qCAAe,CAAA;AACnB,CAAC,EAJW,k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AAmC,CAAA;IACnC,6EAA+C,CAAA;IAC/C,2DAA6B,CAAA;AACjC,CAAC,EAPW,0BAA0B,KAA1B,0BAA0B,QAOrC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;AAC3B,CAAC,EANW,uBAAuB,KAAvB,uBAAuB,QAMlC"}
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,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC1B,iCAAW,CAAA;IACX,2CAAqB,CAAA;IACrB,qCAAe,CAAA;AACnB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAN,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,KAAnB,mBAAmB,QAa9B;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,uBAGX;AAHD,WAAY,uBAAuB;IAC/B,kDAAuB,CAAA;IACvB,gEAAqC,CAAA;AACzC,CAAC,EAHW,uBAAuB,KAAvB,uBAAuB,QAGlC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,2CAAa,CAAA;IACb,mEAAqC,CAAA;IACrC,2EAA6C,CAAA;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AACxF,MAAM,CAAN,IAAY,0BAGX;AAHD,WAAY,0BAA0B;IAClC,2CAAa,CAAA;IACb,uCAAS,CAAA;AACb,CAAC,EAHW,0BAA0B,KAA1B,0BAA0B,QAGrC;AAED;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,0BAIX;AAJD,WAAY,0BAA0B;IAClC,+DAAiC,CAAA;IACjC,mDAAqB,CAAA;IACrB,qDAAuB,CAAA;AAC3B,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAED,kDAAkD;AAClD,MAAM,CAAN,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,gFAAgF;IAChF,mDAAmB,CAAA;IACnB,kCAAkC;IAClC,mDAAmB,CAAA;AACvB,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC"}
@@ -91,11 +91,60 @@ export declare enum AlertIntakeRejectionReason {
91
91
  * PARKED failed and will not be retried on its own: it ran out of attempts, or it
92
92
  * has a `rejectionReason` (no organization, organization inactive)
93
93
  * DUPLICATE the same sender repeating themselves; not raised
94
+ * FILTERED screened out as not a report (a greeting, a link, an advert); held for review
94
95
  */
95
96
  export declare enum AlertIntakeMessageState {
96
97
  QUEUED = "QUEUED",
97
98
  RAISED = "RAISED",
98
99
  RETRYING = "RETRYING",
99
100
  PARKED = "PARKED",
100
- DUPLICATE = "DUPLICATE"
101
+ DUPLICATE = "DUPLICATE",
102
+ FILTERED = "FILTERED"
103
+ }
104
+ /**
105
+ * Why a message was screened out instead of raised. Everything that arrives on a
106
+ * connection is kept: a screened message waits for a person to raise it or dismiss it.
107
+ *
108
+ * EMPTY nothing to read: no text, no file, no location
109
+ * SYSTEM_EVENT a notice from the channel itself (WhatsApp "changed number")
110
+ * UNSUPPORTED_CONTENT something the channel could not deliver, a reaction or a sticker
111
+ * GREETING a greeting or pleasantry and nothing else ("Hi", "How are you?")
112
+ * LINK_ONLY a link and nothing else (a forwarded post or video)
113
+ * SPAM an advert, a promotion, a chain message, a scam
114
+ * OFF_TOPIC reports nothing the organization handles (chat, unrelated questions)
115
+ * TEST someone testing the number
116
+ */
117
+ export declare enum AlertIntakeScreeningReason {
118
+ EMPTY = "EMPTY",
119
+ SYSTEM_EVENT = "SYSTEM_EVENT",
120
+ UNSUPPORTED_CONTENT = "UNSUPPORTED_CONTENT",
121
+ GREETING = "GREETING",
122
+ LINK_ONLY = "LINK_ONLY",
123
+ SPAM = "SPAM",
124
+ OFF_TOPIC = "OFF_TOPIC",
125
+ TEST = "TEST"
126
+ }
127
+ /** What decided a message was not a report: a fixed rule, or the AI screening model. */
128
+ export declare enum AlertIntakeScreeningSource {
129
+ RULE = "RULE",
130
+ AI = "AI"
131
+ }
132
+ /**
133
+ * A screened message, from a reviewer's side.
134
+ *
135
+ * PENDING_REVIEW screened out; nobody has looked at it yet
136
+ * ELEVATED a person decided it IS a report: it was raised as an incident
137
+ * DISMISSED a person confirmed it is not a report
138
+ */
139
+ export declare enum AlertIntakeScreeningStatus {
140
+ PENDING_REVIEW = "PENDING_REVIEW",
141
+ ELEVATED = "ELEVATED",
142
+ DISMISSED = "DISMISSED"
143
+ }
144
+ /** A reviewer's decision on screened messages. */
145
+ export declare enum AlertIntakeScreeningDecision {
146
+ /** Raise it as an incident (or a grievance, for a grievance desk) after all. */
147
+ ELEVATE = "ELEVATE",
148
+ /** Confirm it is not a report. */
149
+ DISMISS = "DISMISS"
101
150
  }
@@ -1,5 +1,5 @@
1
1
  import { CountryCode } from '../../country/enums/country-code.enum';
2
- import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch, AlertIntakeSecretSource, AlertIntakeWebhookVerification } from '../enums/alert-intake.enum';
2
+ import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch, AlertIntakeScreeningDecision, AlertIntakeScreeningReason, AlertIntakeScreeningSource, AlertIntakeScreeningStatus, AlertIntakeSecretSource, AlertIntakeWebhookVerification } from '../enums/alert-intake.enum';
3
3
  /**
4
4
  * Alert intake settings.
5
5
  *
@@ -160,6 +160,10 @@ export interface AlertIntakeActivitySummary {
160
160
  parked: number;
161
161
  /** Enabled connections whose last attempt failed (a rejected call, a mailbox that could not be read). */
162
162
  failingConnections: number;
163
+ /** Screened out as not a report, in the window. */
164
+ screened?: number;
165
+ /** Screened messages nobody has reviewed yet (as of now). */
166
+ awaitingReview?: number;
163
167
  }
164
168
  /** What is kept of a file that came with a message. Never its contents. */
165
169
  export interface AlertIntakeMessageAttachment {
@@ -191,6 +195,8 @@ export interface AlertIntakeMessage {
191
195
  routeKeyword: string | null;
192
196
  state: AlertIntakeMessageState;
193
197
  rejectionReason: AlertIntakeRejectionReason | null;
198
+ /** Why it was screened out, for FILTERED (and for one raised after review). */
199
+ screeningReason?: AlertIntakeScreeningReason | null;
194
200
  /** The last error, for RETRYING and PARKED. */
195
201
  error: string | null;
196
202
  attempts: number;
@@ -226,6 +232,67 @@ export interface AlertIntakeMessagePage {
226
232
  page: number;
227
233
  limit: number;
228
234
  }
235
+ /**
236
+ * A message screened out as not a report, waiting for (or after) a person's review.
237
+ * Kept in its own table: the review queue. Raising one ("elevate") sends it through the
238
+ * pipeline without the screening step, and links the incident it becomes.
239
+ */
240
+ export interface AlertIntakeScreenedMessage {
241
+ id: string;
242
+ /** The stored message (see the messages API). */
243
+ messageId: string;
244
+ organizationId: number;
245
+ connectionId: string | null;
246
+ connectionName: string | null;
247
+ channel: AlertIntakeChannel;
248
+ sender: string | null;
249
+ senderName: string | null;
250
+ subject: string | null;
251
+ preview: string;
252
+ /** ISO 639-1 code of the language it was written in, when known. */
253
+ language: string | null;
254
+ /** English translation, when it was written in another language. */
255
+ translation: string | null;
256
+ reason: AlertIntakeScreeningReason;
257
+ /** One sentence, for the reviewer: why it was screened out. */
258
+ explanation: string;
259
+ decidedBy: AlertIntakeScreeningSource;
260
+ /** The screening model's confidence (0-1). Null for a rule. */
261
+ confidence: number | null;
262
+ status: AlertIntakeScreeningStatus;
263
+ reviewedBy: number | null;
264
+ reviewedAt: string | null;
265
+ reviewNote: string | null;
266
+ /** The incident it became, once elevated and raised. */
267
+ incidentId: number | null;
268
+ attachmentCount: number;
269
+ receivedAt: string;
270
+ screenedAt: string;
271
+ /** What the CALLER may do with it now. */
272
+ actions: {
273
+ elevate: boolean;
274
+ dismiss: boolean;
275
+ };
276
+ }
277
+ export interface AlertIntakeScreenedMessageDetail extends AlertIntakeScreenedMessage {
278
+ /** Exactly as received. */
279
+ content: string;
280
+ attachments: AlertIntakeMessageAttachment[];
281
+ }
282
+ export interface AlertIntakeScreenedMessagePage {
283
+ items: AlertIntakeScreenedMessage[];
284
+ total: number;
285
+ page: number;
286
+ limit: number;
287
+ }
288
+ /** The outcome of a review: which messages changed, and why the others did not. */
289
+ export interface AlertIntakeScreeningReviewResult {
290
+ updated: string[];
291
+ skipped: Array<{
292
+ id: string;
293
+ reason: string;
294
+ }>;
295
+ }
229
296
  export interface AlertIntakeConnectionTestResult {
230
297
  success: boolean;
231
298
  /** Operator-facing. Never contains a credential. */
@@ -298,3 +365,24 @@ export interface ListPlatformAlertIntakeMessagesQuery extends ListAlertIntakeMes
298
365
  export interface AssignAlertIntakeMessage {
299
366
  organizationId: number;
300
367
  }
368
+ /** Filters for an organization's screened messages (the review queue). `limit` is at most 100. */
369
+ export interface ListAlertIntakeScreenedMessagesQuery {
370
+ /** Omit for every status. */
371
+ status?: AlertIntakeScreeningStatus;
372
+ reason?: AlertIntakeScreeningReason;
373
+ decidedBy?: AlertIntakeScreeningSource;
374
+ channel?: AlertIntakeChannel;
375
+ connectionId?: string;
376
+ page?: number;
377
+ limit?: number;
378
+ }
379
+ /**
380
+ * A reviewer's decision on 1-100 screened messages. ELEVATE raises each as an incident
381
+ * without screening it again; DISMISS confirms it is not a report.
382
+ */
383
+ export interface ReviewAlertIntakeScreenedMessages {
384
+ ids: string[];
385
+ decision: AlertIntakeScreeningDecision;
386
+ /** At most 300 characters. */
387
+ note?: string;
388
+ }
@@ -30,6 +30,13 @@ export interface Incident {
30
30
  categoryId?: number;
31
31
  typeId?: number;
32
32
  description?: string;
33
+ /**
34
+ * The report as the reporter wrote it, when `description` is its English
35
+ * translation (messages received by SMS, WhatsApp or email in another language).
36
+ */
37
+ originalDescription?: string | null;
38
+ /** ISO 639-1 code of `originalDescription`'s language, e.g. `sw`. */
39
+ originalLanguage?: string | null;
33
40
  status?: IncidentStatus;
34
41
  statusDetails?: IncidentStatusDetails;
35
42
  priority?: IncidentPriority;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clarion-shared-types",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",