grm-shared-library 1.1.215 → 1.1.217
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.
- package/dist/cjs/modules/alert-intake/dtos/alert-intake.dto.js +122 -1
- package/dist/cjs/modules/alert-intake/dtos/alert-intake.dto.js.map +1 -1
- package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.js +54 -1
- package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.js.map +1 -1
- package/dist/cjs/modules/alert-intake/index.js +1 -0
- package/dist/cjs/modules/alert-intake/index.js.map +1 -1
- package/dist/cjs/modules/alert-intake/interfaces/alert-intake-analytics.js +3 -0
- package/dist/cjs/modules/alert-intake/interfaces/alert-intake-analytics.js.map +1 -0
- package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js +20 -0
- package/dist/cjs/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
- package/dist/esm/modules/alert-intake/dtos/alert-intake.dto.js +119 -2
- package/dist/esm/modules/alert-intake/dtos/alert-intake.dto.js.map +1 -1
- package/dist/esm/modules/alert-intake/enums/alert-intake.enum.js +53 -0
- package/dist/esm/modules/alert-intake/enums/alert-intake.enum.js.map +1 -1
- package/dist/esm/modules/alert-intake/index.js +1 -0
- package/dist/esm/modules/alert-intake/index.js.map +1 -1
- package/dist/esm/modules/alert-intake/interfaces/alert-intake-analytics.js +2 -0
- package/dist/esm/modules/alert-intake/interfaces/alert-intake-analytics.js.map +1 -0
- package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js +21 -1
- package/dist/esm/modules/incident/dtos/incident/create-incident.dto.js.map +1 -1
- package/dist/types/modules/alert-intake/dtos/alert-intake.dto.d.ts +36 -1
- package/dist/types/modules/alert-intake/enums/alert-intake.enum.d.ts +50 -1
- package/dist/types/modules/alert-intake/index.d.ts +1 -0
- package/dist/types/modules/alert-intake/interfaces/alert-intake-analytics.d.ts +241 -0
- package/dist/types/modules/alert-intake/interfaces/alert-intake.d.ts +68 -1
- package/dist/types/modules/incident/dtos/incident/create-incident.dto.d.ts +2 -0
- package/dist/types/modules/incident/intefaces/incident.d.ts +7 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AssignAlertIntakeMessageDto = exports.ListPlatformAlertIntakeMessagesQueryDto = exports.ListAlertIntakeMessagesQueryDto = exports.UpdateAlertIntakeRouteDto = exports.CreateAlertIntakeRouteDto = exports.UpdateAlertIntakeConnectionDto = exports.CreateAlertIntakeConnectionDto = void 0;
|
|
12
|
+
exports.ReviewAlertIntakeScreenedMessagesDto = exports.PlatformAlertIntakeAnalyticsQueryDto = exports.AlertIntakeAnalyticsQueryDto = exports.ListAlertIntakeScreenedMessagesQueryDto = exports.AssignAlertIntakeMessageDto = exports.ListPlatformAlertIntakeMessagesQueryDto = exports.ListAlertIntakeMessagesQueryDto = exports.UpdateAlertIntakeRouteDto = exports.CreateAlertIntakeRouteDto = exports.UpdateAlertIntakeConnectionDto = exports.CreateAlertIntakeConnectionDto = void 0;
|
|
13
13
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const class_validator_1 = require("class-validator");
|
|
@@ -303,4 +303,125 @@ __decorate([
|
|
|
303
303
|
(0, class_validator_1.IsPositive)(),
|
|
304
304
|
__metadata("design:type", Number)
|
|
305
305
|
], AssignAlertIntakeMessageDto.prototype, "organizationId", void 0);
|
|
306
|
+
/** Filters for an organization's screened messages (the review queue). */
|
|
307
|
+
class ListAlertIntakeScreenedMessagesQueryDto {
|
|
308
|
+
}
|
|
309
|
+
exports.ListAlertIntakeScreenedMessagesQueryDto = ListAlertIntakeScreenedMessagesQueryDto;
|
|
310
|
+
__decorate([
|
|
311
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeScreeningStatus, description: 'Omit for every status.' }),
|
|
312
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeScreeningStatus),
|
|
313
|
+
(0, class_validator_1.IsOptional)(),
|
|
314
|
+
__metadata("design:type", String)
|
|
315
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "status", void 0);
|
|
316
|
+
__decorate([
|
|
317
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeScreeningReason }),
|
|
318
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeScreeningReason),
|
|
319
|
+
(0, class_validator_1.IsOptional)(),
|
|
320
|
+
__metadata("design:type", String)
|
|
321
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "reason", void 0);
|
|
322
|
+
__decorate([
|
|
323
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeScreeningSource }),
|
|
324
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeScreeningSource),
|
|
325
|
+
(0, class_validator_1.IsOptional)(),
|
|
326
|
+
__metadata("design:type", String)
|
|
327
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "decidedBy", void 0);
|
|
328
|
+
__decorate([
|
|
329
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeChannel }),
|
|
330
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeChannel),
|
|
331
|
+
(0, class_validator_1.IsOptional)(),
|
|
332
|
+
__metadata("design:type", String)
|
|
333
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "channel", void 0);
|
|
334
|
+
__decorate([
|
|
335
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
336
|
+
(0, class_validator_1.IsUUID)(),
|
|
337
|
+
(0, class_validator_1.IsOptional)(),
|
|
338
|
+
__metadata("design:type", String)
|
|
339
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "connectionId", void 0);
|
|
340
|
+
__decorate([
|
|
341
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 1 }),
|
|
342
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
343
|
+
(0, class_validator_1.IsInt)(),
|
|
344
|
+
(0, class_validator_1.Min)(1),
|
|
345
|
+
(0, class_validator_1.Max)(10000),
|
|
346
|
+
(0, class_validator_1.IsOptional)(),
|
|
347
|
+
__metadata("design:type", Number)
|
|
348
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "page", void 0);
|
|
349
|
+
__decorate([
|
|
350
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 25, maximum: 100 }),
|
|
351
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
352
|
+
(0, class_validator_1.IsInt)(),
|
|
353
|
+
(0, class_validator_1.Min)(1),
|
|
354
|
+
(0, class_validator_1.Max)(100),
|
|
355
|
+
(0, class_validator_1.IsOptional)(),
|
|
356
|
+
__metadata("design:type", Number)
|
|
357
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "limit", void 0);
|
|
358
|
+
/**
|
|
359
|
+
* The period an analytics read covers. Both ends optional: no `from` is "forever" (from
|
|
360
|
+
* the first message), no `to` is now. The service chooses how finely to cut the period for
|
|
361
|
+
* the charts, and counts arrivals by weekday and hour in `timeZone` (default Africa/Nairobi).
|
|
362
|
+
*/
|
|
363
|
+
class AlertIntakeAnalyticsQueryDto {
|
|
364
|
+
}
|
|
365
|
+
exports.AlertIntakeAnalyticsQueryDto = AlertIntakeAnalyticsQueryDto;
|
|
366
|
+
__decorate([
|
|
367
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '2026-09-01T00:00:00+03:00', description: 'Inclusive. Omit for "forever".' }),
|
|
368
|
+
(0, class_validator_1.IsISO8601)({ strict: true }),
|
|
369
|
+
(0, class_validator_1.IsOptional)(),
|
|
370
|
+
__metadata("design:type", String)
|
|
371
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "from", void 0);
|
|
372
|
+
__decorate([
|
|
373
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '2026-09-22T23:59:59+03:00', description: 'Exclusive. Omit for "now".' }),
|
|
374
|
+
(0, class_validator_1.IsISO8601)({ strict: true }),
|
|
375
|
+
(0, class_validator_1.IsOptional)(),
|
|
376
|
+
__metadata("design:type", String)
|
|
377
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "to", void 0);
|
|
378
|
+
__decorate([
|
|
379
|
+
(0, swagger_1.ApiPropertyOptional)({ example: 'Africa/Nairobi', description: 'IANA time zone for the chart buckets and the hour-of-week grid.' }),
|
|
380
|
+
(0, class_validator_1.IsTimeZone)(),
|
|
381
|
+
(0, class_validator_1.IsOptional)(),
|
|
382
|
+
__metadata("design:type", String)
|
|
383
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "timeZone", void 0);
|
|
384
|
+
/** Platform operators: every organization's analytics, or one organization's. */
|
|
385
|
+
class PlatformAlertIntakeAnalyticsQueryDto extends AlertIntakeAnalyticsQueryDto {
|
|
386
|
+
}
|
|
387
|
+
exports.PlatformAlertIntakeAnalyticsQueryDto = PlatformAlertIntakeAnalyticsQueryDto;
|
|
388
|
+
__decorate([
|
|
389
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
390
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
391
|
+
(0, class_validator_1.IsInt)(),
|
|
392
|
+
(0, class_validator_1.IsPositive)(),
|
|
393
|
+
(0, class_validator_1.IsOptional)(),
|
|
394
|
+
__metadata("design:type", Number)
|
|
395
|
+
], PlatformAlertIntakeAnalyticsQueryDto.prototype, "organizationId", void 0);
|
|
396
|
+
/**
|
|
397
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
398
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
399
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
400
|
+
* on is reported as skipped, and the rest still go through.
|
|
401
|
+
*/
|
|
402
|
+
class ReviewAlertIntakeScreenedMessagesDto {
|
|
403
|
+
}
|
|
404
|
+
exports.ReviewAlertIntakeScreenedMessagesDto = ReviewAlertIntakeScreenedMessagesDto;
|
|
405
|
+
__decorate([
|
|
406
|
+
(0, swagger_1.ApiProperty)({ type: [String], maxItems: 100 }),
|
|
407
|
+
(0, class_validator_1.IsArray)(),
|
|
408
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
409
|
+
(0, class_validator_1.ArrayMaxSize)(100),
|
|
410
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
411
|
+
(0, class_validator_1.IsUUID)('all', { each: true }),
|
|
412
|
+
__metadata("design:type", Array)
|
|
413
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "ids", void 0);
|
|
414
|
+
__decorate([
|
|
415
|
+
(0, swagger_1.ApiProperty)({ enum: alert_intake_enum_1.AlertIntakeScreeningDecision }),
|
|
416
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeScreeningDecision),
|
|
417
|
+
__metadata("design:type", String)
|
|
418
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "decision", void 0);
|
|
419
|
+
__decorate([
|
|
420
|
+
(0, swagger_1.ApiPropertyOptional)({ maxLength: 300, description: 'Why, for the record.' }),
|
|
421
|
+
(0, class_transformer_1.Transform)(trim),
|
|
422
|
+
(0, class_validator_1.IsString)(),
|
|
423
|
+
(0, class_validator_1.MaxLength)(300),
|
|
424
|
+
(0, class_validator_1.IsOptional)(),
|
|
425
|
+
__metadata("design:type", String)
|
|
426
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "note", void 0);
|
|
306
427
|
//# sourceMappingURL=alert-intake.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-intake.dto.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/dtos/alert-intake.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;A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C,MAAM,CAAC;IAAE,IAAA,uBAAK,GAAE;IAAE,IAAA,4BAAU,GAAE;IAAE,IAAA,4BAAU,GAAE;;4EAChC;AAG5B;;;;;GAKG;AACH,MAAa,oCAAoC;CAYhD;AAZD,oFAYC;AATG;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IAC9C,IAAA,yBAAO,GAAE;IAAE,IAAA,8BAAY,EAAC,CAAC,CAAC;IAAE,IAAA,8BAAY,EAAC,GAAG,CAAC;IAAE,IAAA,6BAAW,GAAE;IAAE,IAAA,wBAAM,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;iEAC7E;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,gDAA4B,EAAE,CAAC;IACnD,IAAA,wBAAM,EAAC,gDAA4B,CAAC;;sEACG;AAIxC;IAFC,IAAA,6BAAmB,EAAC,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IAC5E,IAAA,6BAAS,EAAC,IAAI,CAAC;IAAE,IAAA,0BAAQ,GAAE;IAAE,IAAA,2BAAS,EAAC,GAAG,CAAC;IAAE,IAAA,4BAAU,GAAE;;kEAC5C"}
|
|
@@ -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
|
|
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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G;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"}
|
|
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
18
18
|
__exportStar(require("./enums/alert-intake.enum"), exports);
|
|
19
19
|
// Interfaces
|
|
20
20
|
__exportStar(require("./interfaces/alert-intake"), exports);
|
|
21
|
+
__exportStar(require("./interfaces/alert-intake-analytics"), exports);
|
|
21
22
|
// DTOs
|
|
22
23
|
__exportStar(require("./dtos/alert-intake.dto"), exports);
|
|
23
24
|
// Utilities
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/alert-intake/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,4DAA0C;AAE1C,aAAa;AACb,4DAA0C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/alert-intake/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,QAAQ;AACR,4DAA0C;AAE1C,aAAa;AACb,4DAA0C;AAC1C,sEAAoD;AAEpD,OAAO;AACP,0DAAwC;AAExC,YAAY;AACZ,4DAA0C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-intake-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/interfaces/alert-intake-analytics.ts"],"names":[],"mappings":""}
|
|
@@ -112,6 +112,26 @@ __decorate([
|
|
|
112
112
|
(0, class_validator_1.IsOptional)(),
|
|
113
113
|
__metadata("design:type", String)
|
|
114
114
|
], CreateIncidentDto.prototype, "description", void 0);
|
|
115
|
+
__decorate([
|
|
116
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
117
|
+
description: 'The report exactly as the reporter wrote it, when `description` is a translation of it ' +
|
|
118
|
+
'(set by clarion-alerts for messages written in another language). Absent when the report was written in English.',
|
|
119
|
+
example: 'Kuna moto katika jengo, ghorofa ya tatu',
|
|
120
|
+
}),
|
|
121
|
+
(0, class_validator_1.IsString)(),
|
|
122
|
+
(0, class_validator_1.MaxLength)(20000),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
__metadata("design:type", String)
|
|
125
|
+
], CreateIncidentDto.prototype, "originalDescription", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
128
|
+
description: 'ISO 639-1 code of the language `originalDescription` is written in.',
|
|
129
|
+
example: 'sw',
|
|
130
|
+
}),
|
|
131
|
+
(0, class_validator_1.Matches)(/^[a-z]{2,3}$/),
|
|
132
|
+
(0, class_validator_1.IsOptional)(),
|
|
133
|
+
__metadata("design:type", String)
|
|
134
|
+
], CreateIncidentDto.prototype, "originalLanguage", void 0);
|
|
115
135
|
__decorate([
|
|
116
136
|
(0, swagger_1.ApiPropertyOptional)({
|
|
117
137
|
description: 'Current status of the incident',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6I;AAC7I,6CAAmE;AACnE,2EAAiE;AACjE,yEAAgE;AAChE,6EAAoE;AACpE,yDAAyC;AACzC,+EAAsE;AACtE,4CAAiD;AACjD,2EAAkE;AAClE,qGAA8F;AAC9F,2FAAqF;AACrF,2FAAiF;AACjF,6FAAsF;AAEtF,MAAa,iBAAiB;CAuQ7B;AAvQD,8CAuQC;AA/PG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,+CAA+C;QAC5D,IAAI,EAAE,oCAAa;QACnB,OAAO,EAAE,oCAAa,CAAC,KAAK;KAC/B,CAAC;IACD,IAAA,wBAAM,EAAC,oCAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;gDACS;AAStB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,gCAAgC;QAC7C,IAAI,EAAE,mCAAa;QACnB,OAAO,EAAE,mCAAa,CAAC,QAAQ;KAClC,CAAC;IACD,IAAA,wBAAM,EAAC,mCAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;gDACS;AAStB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,oD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;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0DACa"}
|
|
@@ -9,8 +9,8 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
11
11
|
import { Transform, Type } from 'class-transformer';
|
|
12
|
-
import { IsBoolean, IsEnum, IsInt, IsOptional, IsPositive, IsString, IsUUID, Matches, Max, MaxLength, Min, MinLength, registerDecorator, ValidateIf, } from 'class-validator';
|
|
13
|
-
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch, } from '../enums/alert-intake.enum';
|
|
12
|
+
import { ArrayMaxSize, ArrayMinSize, ArrayUnique, IsArray, IsBoolean, IsEnum, IsInt, IsISO8601, IsOptional, IsPositive, IsString, IsTimeZone, IsUUID, Matches, Max, MaxLength, Min, MinLength, registerDecorator, ValidateIf, } from 'class-validator';
|
|
13
|
+
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch, AlertIntakeScreeningDecision, AlertIntakeScreeningReason, AlertIntakeScreeningSource, AlertIntakeScreeningStatus, } from '../enums/alert-intake.enum';
|
|
14
14
|
import { ALERT_INTAKE_KEYWORD_PATTERN, MAX_ALERT_INTAKE_SETTING_LENGTH } from '../utils/alert-intake.util';
|
|
15
15
|
const trim = ({ value }) => (typeof value === 'string' ? value.trim() : value);
|
|
16
16
|
const SINGLE_LINE = /^[^\r\n]*$/;
|
|
@@ -293,4 +293,121 @@ __decorate([
|
|
|
293
293
|
IsPositive(),
|
|
294
294
|
__metadata("design:type", Number)
|
|
295
295
|
], AssignAlertIntakeMessageDto.prototype, "organizationId", void 0);
|
|
296
|
+
/** Filters for an organization's screened messages (the review queue). */
|
|
297
|
+
export class ListAlertIntakeScreenedMessagesQueryDto {
|
|
298
|
+
}
|
|
299
|
+
__decorate([
|
|
300
|
+
ApiPropertyOptional({ enum: AlertIntakeScreeningStatus, description: 'Omit for every status.' }),
|
|
301
|
+
IsEnum(AlertIntakeScreeningStatus),
|
|
302
|
+
IsOptional(),
|
|
303
|
+
__metadata("design:type", String)
|
|
304
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "status", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
ApiPropertyOptional({ enum: AlertIntakeScreeningReason }),
|
|
307
|
+
IsEnum(AlertIntakeScreeningReason),
|
|
308
|
+
IsOptional(),
|
|
309
|
+
__metadata("design:type", String)
|
|
310
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "reason", void 0);
|
|
311
|
+
__decorate([
|
|
312
|
+
ApiPropertyOptional({ enum: AlertIntakeScreeningSource }),
|
|
313
|
+
IsEnum(AlertIntakeScreeningSource),
|
|
314
|
+
IsOptional(),
|
|
315
|
+
__metadata("design:type", String)
|
|
316
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "decidedBy", void 0);
|
|
317
|
+
__decorate([
|
|
318
|
+
ApiPropertyOptional({ enum: AlertIntakeChannel }),
|
|
319
|
+
IsEnum(AlertIntakeChannel),
|
|
320
|
+
IsOptional(),
|
|
321
|
+
__metadata("design:type", String)
|
|
322
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "channel", void 0);
|
|
323
|
+
__decorate([
|
|
324
|
+
ApiPropertyOptional(),
|
|
325
|
+
IsUUID(),
|
|
326
|
+
IsOptional(),
|
|
327
|
+
__metadata("design:type", String)
|
|
328
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "connectionId", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
ApiPropertyOptional({ default: 1 }),
|
|
331
|
+
Type(() => Number),
|
|
332
|
+
IsInt(),
|
|
333
|
+
Min(1),
|
|
334
|
+
Max(10000),
|
|
335
|
+
IsOptional(),
|
|
336
|
+
__metadata("design:type", Number)
|
|
337
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "page", void 0);
|
|
338
|
+
__decorate([
|
|
339
|
+
ApiPropertyOptional({ default: 25, maximum: 100 }),
|
|
340
|
+
Type(() => Number),
|
|
341
|
+
IsInt(),
|
|
342
|
+
Min(1),
|
|
343
|
+
Max(100),
|
|
344
|
+
IsOptional(),
|
|
345
|
+
__metadata("design:type", Number)
|
|
346
|
+
], ListAlertIntakeScreenedMessagesQueryDto.prototype, "limit", void 0);
|
|
347
|
+
/**
|
|
348
|
+
* The period an analytics read covers. Both ends optional: no `from` is "forever" (from
|
|
349
|
+
* the first message), no `to` is now. The service chooses how finely to cut the period for
|
|
350
|
+
* the charts, and counts arrivals by weekday and hour in `timeZone` (default Africa/Nairobi).
|
|
351
|
+
*/
|
|
352
|
+
export class AlertIntakeAnalyticsQueryDto {
|
|
353
|
+
}
|
|
354
|
+
__decorate([
|
|
355
|
+
ApiPropertyOptional({ example: '2026-09-01T00:00:00+03:00', description: 'Inclusive. Omit for "forever".' }),
|
|
356
|
+
IsISO8601({ strict: true }),
|
|
357
|
+
IsOptional(),
|
|
358
|
+
__metadata("design:type", String)
|
|
359
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "from", void 0);
|
|
360
|
+
__decorate([
|
|
361
|
+
ApiPropertyOptional({ example: '2026-09-22T23:59:59+03:00', description: 'Exclusive. Omit for "now".' }),
|
|
362
|
+
IsISO8601({ strict: true }),
|
|
363
|
+
IsOptional(),
|
|
364
|
+
__metadata("design:type", String)
|
|
365
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "to", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
ApiPropertyOptional({ example: 'Africa/Nairobi', description: 'IANA time zone for the chart buckets and the hour-of-week grid.' }),
|
|
368
|
+
IsTimeZone(),
|
|
369
|
+
IsOptional(),
|
|
370
|
+
__metadata("design:type", String)
|
|
371
|
+
], AlertIntakeAnalyticsQueryDto.prototype, "timeZone", void 0);
|
|
372
|
+
/** Platform operators: every organization's analytics, or one organization's. */
|
|
373
|
+
export class PlatformAlertIntakeAnalyticsQueryDto extends AlertIntakeAnalyticsQueryDto {
|
|
374
|
+
}
|
|
375
|
+
__decorate([
|
|
376
|
+
ApiPropertyOptional(),
|
|
377
|
+
Type(() => Number),
|
|
378
|
+
IsInt(),
|
|
379
|
+
IsPositive(),
|
|
380
|
+
IsOptional(),
|
|
381
|
+
__metadata("design:type", Number)
|
|
382
|
+
], PlatformAlertIntakeAnalyticsQueryDto.prototype, "organizationId", void 0);
|
|
383
|
+
/**
|
|
384
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
385
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
386
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
387
|
+
* on is reported as skipped, and the rest still go through.
|
|
388
|
+
*/
|
|
389
|
+
export class ReviewAlertIntakeScreenedMessagesDto {
|
|
390
|
+
}
|
|
391
|
+
__decorate([
|
|
392
|
+
ApiProperty({ type: [String], maxItems: 100 }),
|
|
393
|
+
IsArray(),
|
|
394
|
+
ArrayMinSize(1),
|
|
395
|
+
ArrayMaxSize(100),
|
|
396
|
+
ArrayUnique(),
|
|
397
|
+
IsUUID('all', { each: true }),
|
|
398
|
+
__metadata("design:type", Array)
|
|
399
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "ids", void 0);
|
|
400
|
+
__decorate([
|
|
401
|
+
ApiProperty({ enum: AlertIntakeScreeningDecision }),
|
|
402
|
+
IsEnum(AlertIntakeScreeningDecision),
|
|
403
|
+
__metadata("design:type", String)
|
|
404
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "decision", void 0);
|
|
405
|
+
__decorate([
|
|
406
|
+
ApiPropertyOptional({ maxLength: 300, description: 'Why, for the record.' }),
|
|
407
|
+
Transform(trim),
|
|
408
|
+
IsString(),
|
|
409
|
+
MaxLength(300),
|
|
410
|
+
IsOptional(),
|
|
411
|
+
__metadata("design:type", String)
|
|
412
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "note", void 0);
|
|
296
413
|
//# sourceMappingURL=alert-intake.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-intake.dto.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/dtos/alert-intake.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACH,SAAS,EACT,MAAM,EACN,KAAK,
|
|
1
|
+
{"version":3,"file":"alert-intake.dto.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/dtos/alert-intake.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,OAAO,EACP,SAAS,EACT,MAAM,EACN,KAAK,EACL,SAAS,EAET,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,EACN,OAAO,EACP,GAAG,EACH,SAAS,EACT,GAAG,EACH,SAAS,EACT,iBAAiB,EACjB,UAAU,GAGb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,GAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,4BAA4B,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAE3G,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EA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AAC,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IAC9C,OAAO,EAAE;IAAE,YAAY,CAAC,CAAC,CAAC;IAAE,YAAY,CAAC,GAAG,CAAC;IAAE,WAAW,EAAE;IAAE,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;iEAC7E;AAIf;IAFC,WAAW,CAAC,EAAE,IAAI,EAAE,4BAA4B,EAAE,CAAC;IACnD,MAAM,CAAC,4BAA4B,CAAC;;sEACG;AAIxC;IAFC,mBAAmB,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;IAC5E,SAAS,CAAC,IAAI,CAAC;IAAE,QAAQ,EAAE;IAAE,SAAS,CAAC,GAAG,CAAC;IAAE,UAAU,EAAE;;kEAC5C"}
|
|
@@ -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,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAN,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,MAAM;IACN,wDAAiC,CAAA;I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ert-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;AACjD,CAAC,EAJW,0BAA0B,KAA1B,0BAA0B,QAIrC;AAED,qEAAqE;AACrE,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC7B,oFAAoF;IACpF,4CAAmB,CAAA;IACnB,qEAAqE;IACrE,4CAAmB,CAAA;AACvB,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED,gEAAgE;AAChE,MAAM,CAAN,IAAY,8BAOX;AAPD,WAAY,8BAA8B;IACtC,8EAA8E;IAC9E,2DAAyB,CAAA;IACzB,gFAAgF;I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IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,gFAAgF;IAChF,mDAAmB,CAAA;IACnB,kCAAkC;IAClC,mDAAmB,CAAA;AACvB,CAAC,EALW,4BAA4B,KAA5B,4BAA4B,QAKvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/alert-intake/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,2BAA2B,CAAC;AAE1C,aAAa;AACb,cAAc,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/alert-intake/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,2BAA2B,CAAC;AAE1C,aAAa;AACb,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AAEpD,OAAO;AACP,cAAc,yBAAyB,CAAC;AAExC,YAAY;AACZ,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-intake-analytics.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/interfaces/alert-intake-analytics.ts"],"names":[],"mappings":""}
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import { IsArray, IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, ValidateNested } from "class-validator";
|
|
10
|
+
import { IsArray, IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, Matches, MaxLength, ValidateNested } from "class-validator";
|
|
11
11
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
|
12
12
|
import { IncidentAppId } from "../../enums/incident-app-id.enum";
|
|
13
13
|
import { IncidentClass } from "../../enums/incident-class.enum";
|
|
@@ -108,6 +108,26 @@ __decorate([
|
|
|
108
108
|
IsOptional(),
|
|
109
109
|
__metadata("design:type", String)
|
|
110
110
|
], CreateIncidentDto.prototype, "description", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
ApiPropertyOptional({
|
|
113
|
+
description: 'The report exactly as the reporter wrote it, when `description` is a translation of it ' +
|
|
114
|
+
'(set by clarion-alerts for messages written in another language). Absent when the report was written in English.',
|
|
115
|
+
example: 'Kuna moto katika jengo, ghorofa ya tatu',
|
|
116
|
+
}),
|
|
117
|
+
IsString(),
|
|
118
|
+
MaxLength(20000),
|
|
119
|
+
IsOptional(),
|
|
120
|
+
__metadata("design:type", String)
|
|
121
|
+
], CreateIncidentDto.prototype, "originalDescription", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
ApiPropertyOptional({
|
|
124
|
+
description: 'ISO 639-1 code of the language `originalDescription` is written in.',
|
|
125
|
+
example: 'sw',
|
|
126
|
+
}),
|
|
127
|
+
Matches(/^[a-z]{2,3}$/),
|
|
128
|
+
IsOptional(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], CreateIncidentDto.prototype, "originalLanguage", void 0);
|
|
111
131
|
__decorate([
|
|
112
132
|
ApiPropertyOptional({
|
|
113
133
|
description: 'Current status of the incident',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-incident.dto.js","sourceRoot":"","sources":["../../../../../../src/modules/incident/dtos/incident/create-incident.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,SAAS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QACT,WAAW,EAAE,sDAAsD;QACnE,IAAI,EAAE,6BAA6B;QACnC,OAAO,EAAE,6BAA6B,CAAC,cAAc;KACxD,CAAC;IACD,MAAM,CAAC,6BAA6B,CAAC;IACrC,UAAU,EAAE;;gEACyC;AAQtD;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;0DACY;AAQzB;IANC,WAAW,CAAC;QACT,WAAW,EAAE,gDAAgD;QAC7D,OAAO,EAAE,CAAC;KACb,CAAC;IACD,QAAQ,EAAE;IACV,UAAU,EAAE;;yDACW;AAgBxB;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,kFAAkF;QAC/F,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,SAAS,EAAE;IACX,UAAU,EAAE;;gEACmB;AAYhC;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,sGAAsG;QACnH,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,SAAS,EAAE;IACX,UAAU,EAAE;;0DACa"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch } from '../enums/alert-intake.enum';
|
|
1
|
+
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeMessageState, AlertIntakeProvider, AlertIntakeRejectionReason, AlertIntakeRouteMatch, AlertIntakeScreeningDecision, AlertIntakeScreeningReason, AlertIntakeScreeningSource, AlertIntakeScreeningStatus } from '../enums/alert-intake.enum';
|
|
2
2
|
export declare class CreateAlertIntakeConnectionDto {
|
|
3
3
|
channel: AlertIntakeChannel;
|
|
4
4
|
provider: AlertIntakeProvider;
|
|
@@ -53,3 +53,38 @@ export declare class ListPlatformAlertIntakeMessagesQueryDto extends ListAlertIn
|
|
|
53
53
|
export declare class AssignAlertIntakeMessageDto {
|
|
54
54
|
organizationId: number;
|
|
55
55
|
}
|
|
56
|
+
/** Filters for an organization's screened messages (the review queue). */
|
|
57
|
+
export declare class ListAlertIntakeScreenedMessagesQueryDto {
|
|
58
|
+
status?: AlertIntakeScreeningStatus;
|
|
59
|
+
reason?: AlertIntakeScreeningReason;
|
|
60
|
+
decidedBy?: AlertIntakeScreeningSource;
|
|
61
|
+
channel?: AlertIntakeChannel;
|
|
62
|
+
connectionId?: string;
|
|
63
|
+
page?: number;
|
|
64
|
+
limit?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* The period an analytics read covers. Both ends optional: no `from` is "forever" (from
|
|
68
|
+
* the first message), no `to` is now. The service chooses how finely to cut the period for
|
|
69
|
+
* the charts, and counts arrivals by weekday and hour in `timeZone` (default Africa/Nairobi).
|
|
70
|
+
*/
|
|
71
|
+
export declare class AlertIntakeAnalyticsQueryDto {
|
|
72
|
+
from?: string;
|
|
73
|
+
to?: string;
|
|
74
|
+
timeZone?: string;
|
|
75
|
+
}
|
|
76
|
+
/** Platform operators: every organization's analytics, or one organization's. */
|
|
77
|
+
export declare class PlatformAlertIntakeAnalyticsQueryDto extends AlertIntakeAnalyticsQueryDto {
|
|
78
|
+
organizationId?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
82
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
83
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
84
|
+
* on is reported as skipped, and the rest still go through.
|
|
85
|
+
*/
|
|
86
|
+
export declare class ReviewAlertIntakeScreenedMessagesDto {
|
|
87
|
+
ids: string[];
|
|
88
|
+
decision: AlertIntakeScreeningDecision;
|
|
89
|
+
note?: string;
|
|
90
|
+
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { AlertIntakeChannel, AlertIntakeMessageState, AlertIntakeScreeningReason, AlertIntakeScreeningSource, AlertIntakeScreeningStatus } from '../enums/alert-intake.enum';
|
|
2
|
+
/**
|
|
3
|
+
* Alert intake analytics: what arrived on an organization's channels over a period, what
|
|
4
|
+
* became of it, what the AI made of it and what that cost. One read, computed by
|
|
5
|
+
* clarion-alerts from one consistent snapshot, so every number on a dashboard agrees with
|
|
6
|
+
* every other.
|
|
7
|
+
*
|
|
8
|
+
* Counts only: no message text, sender or credential is ever part of it.
|
|
9
|
+
*/
|
|
10
|
+
/** How the period is cut into points for the charts. Chosen by the service from the length of the period. */
|
|
11
|
+
export type AlertIntakeAnalyticsBucket = 'hour' | 'day' | 'week' | 'month';
|
|
12
|
+
/** The AI tasks whose calls are metered. */
|
|
13
|
+
export type AlertIntakeAiTask = 'triage' | 'analysis' | 'transcription';
|
|
14
|
+
export interface AlertIntakeAnalyticsRange {
|
|
15
|
+
/** Inclusive, ISO 8601. The first message received when the period asked for was "forever". */
|
|
16
|
+
from: string;
|
|
17
|
+
/** Exclusive, ISO 8601. */
|
|
18
|
+
to: string;
|
|
19
|
+
bucket: AlertIntakeAnalyticsBucket;
|
|
20
|
+
/** IANA time zone the buckets and the hour-of-week grid are cut in. */
|
|
21
|
+
timeZone: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The headline counts. Messages are counted by when they arrived.
|
|
25
|
+
*
|
|
26
|
+
* received = raised + screenedOut + duplicates + retrying + parked + queued: every message
|
|
27
|
+
* is in exactly one of those, as it stands now.
|
|
28
|
+
*/
|
|
29
|
+
export interface AlertIntakeAnalyticsTotals {
|
|
30
|
+
received: number;
|
|
31
|
+
/** Became incidents (grievances, for a grievance desk) - including screened messages a reviewer raised. */
|
|
32
|
+
raised: number;
|
|
33
|
+
/** Screened out as not a report and not raised since (waiting for review, or dismissed). */
|
|
34
|
+
screenedOut: number;
|
|
35
|
+
duplicates: number;
|
|
36
|
+
retrying: number;
|
|
37
|
+
parked: number;
|
|
38
|
+
/** Waiting for, or being worked on by, the pipeline. */
|
|
39
|
+
queued: number;
|
|
40
|
+
/** Distinct phone numbers, WhatsApp numbers and email addresses. Never the values themselves. */
|
|
41
|
+
uniqueSenders: number;
|
|
42
|
+
withAttachments: number;
|
|
43
|
+
sharedLocations: number;
|
|
44
|
+
/** Written in a language other than English, and translated. */
|
|
45
|
+
translated: number;
|
|
46
|
+
voiceNotes: number;
|
|
47
|
+
emergencies: number;
|
|
48
|
+
sensitive: number;
|
|
49
|
+
anonymous: number;
|
|
50
|
+
acknowledged: number;
|
|
51
|
+
acknowledgementFailed: number;
|
|
52
|
+
/** Median seconds from arrival to the incident being raised; null when nothing was raised. */
|
|
53
|
+
medianSecondsToIncident: number | null;
|
|
54
|
+
p90SecondsToIncident: number | null;
|
|
55
|
+
/** AI spend in the period, US dollars. */
|
|
56
|
+
aiCostUsd: number;
|
|
57
|
+
}
|
|
58
|
+
/** The previous period of the same length, for the change shown on each headline figure. Null for "forever". */
|
|
59
|
+
export interface AlertIntakeAnalyticsComparison {
|
|
60
|
+
from: string;
|
|
61
|
+
to: string;
|
|
62
|
+
received: number;
|
|
63
|
+
raised: number;
|
|
64
|
+
screenedOut: number;
|
|
65
|
+
uniqueSenders: number;
|
|
66
|
+
medianSecondsToIncident: number | null;
|
|
67
|
+
aiCostUsd: number;
|
|
68
|
+
}
|
|
69
|
+
/** One point on the message timeline. `bucket` is the start of the point, local to `timeZone`, ISO 8601 without an offset. */
|
|
70
|
+
export interface AlertIntakeAnalyticsTimelinePoint {
|
|
71
|
+
bucket: string;
|
|
72
|
+
received: number;
|
|
73
|
+
raised: number;
|
|
74
|
+
screenedOut: number;
|
|
75
|
+
duplicates: number;
|
|
76
|
+
failed: number;
|
|
77
|
+
}
|
|
78
|
+
/** Where messages stand now; the parts add up to `received`. `failed` is retrying and parked together. */
|
|
79
|
+
export interface AlertIntakeAnalyticsOutcomes {
|
|
80
|
+
received: number;
|
|
81
|
+
raised: number;
|
|
82
|
+
screenedOut: number;
|
|
83
|
+
duplicates: number;
|
|
84
|
+
failed: number;
|
|
85
|
+
queued: number;
|
|
86
|
+
}
|
|
87
|
+
export interface AlertIntakeAnalyticsChannelRow extends AlertIntakeAnalyticsOutcomes {
|
|
88
|
+
channel: AlertIntakeChannel;
|
|
89
|
+
medianSecondsToIncident: number | null;
|
|
90
|
+
}
|
|
91
|
+
export interface AlertIntakeAnalyticsConnectionRow extends AlertIntakeAnalyticsOutcomes {
|
|
92
|
+
/** Null for messages received before connections existed. */
|
|
93
|
+
connectionId: string | null;
|
|
94
|
+
name: string;
|
|
95
|
+
channel: AlertIntakeChannel | null;
|
|
96
|
+
provider: string | null;
|
|
97
|
+
enabled: boolean | null;
|
|
98
|
+
lastReceivedAt: string | null;
|
|
99
|
+
/** The connection's current error, if it is failing. */
|
|
100
|
+
lastError: string | null;
|
|
101
|
+
}
|
|
102
|
+
export interface AlertIntakeAnalyticsCount<K extends string | number | null = string> {
|
|
103
|
+
key: K;
|
|
104
|
+
count: number;
|
|
105
|
+
}
|
|
106
|
+
/** Every screening decision on messages received in the period - including those a reviewer later raised. */
|
|
107
|
+
export interface AlertIntakeAnalyticsScreening {
|
|
108
|
+
byReason: AlertIntakeAnalyticsCount<AlertIntakeScreeningReason>[];
|
|
109
|
+
byDecider: AlertIntakeAnalyticsCount<AlertIntakeScreeningSource>[];
|
|
110
|
+
byStatus: AlertIntakeAnalyticsCount<AlertIntakeScreeningStatus>[];
|
|
111
|
+
/** Mean confidence of the model's screening decisions (0-1); null without any. */
|
|
112
|
+
averageAiConfidence: number | null;
|
|
113
|
+
/** Median hours from being screened out to a person's decision; null without reviews. */
|
|
114
|
+
medianHoursToReview: number | null;
|
|
115
|
+
/** Screened messages still waiting for a person - now, whatever the period. */
|
|
116
|
+
awaitingReview: number;
|
|
117
|
+
}
|
|
118
|
+
export interface AlertIntakeAnalyticsLanguageRow {
|
|
119
|
+
/** ISO 639-1, or `und` when it could not be told. */
|
|
120
|
+
language: string;
|
|
121
|
+
count: number;
|
|
122
|
+
translated: number;
|
|
123
|
+
}
|
|
124
|
+
export interface AlertIntakeAnalyticsCategoryRow {
|
|
125
|
+
categoryId: number | null;
|
|
126
|
+
/** The organization's category name; "Uncategorised" for reports filed without one. */
|
|
127
|
+
name: string;
|
|
128
|
+
count: number;
|
|
129
|
+
}
|
|
130
|
+
export interface AlertIntakeAnalyticsLocations {
|
|
131
|
+
/** Reports placed on the map, by how: the sender's shared pin, or a place named in the message. */
|
|
132
|
+
shared: number;
|
|
133
|
+
geocoded: number;
|
|
134
|
+
unresolved: number;
|
|
135
|
+
byCountry: AlertIntakeAnalyticsCount[];
|
|
136
|
+
}
|
|
137
|
+
export interface AlertIntakeAnalyticsAttachments {
|
|
138
|
+
files: number;
|
|
139
|
+
attached: number;
|
|
140
|
+
failed: number;
|
|
141
|
+
/** `image`, `audio`, `video`, `document`. */
|
|
142
|
+
byKind: Array<{
|
|
143
|
+
kind: string;
|
|
144
|
+
files: number;
|
|
145
|
+
attached: number;
|
|
146
|
+
failed: number;
|
|
147
|
+
}>;
|
|
148
|
+
}
|
|
149
|
+
/** Arrivals by weekday (1 = Monday ... 7 = Sunday) and hour (0-23), in `timeZone`. All 168 cells, zeros included. */
|
|
150
|
+
export interface AlertIntakeAnalyticsHeatCell {
|
|
151
|
+
weekday: number;
|
|
152
|
+
hour: number;
|
|
153
|
+
count: number;
|
|
154
|
+
}
|
|
155
|
+
export interface AlertIntakeAiTaskRow {
|
|
156
|
+
task: AlertIntakeAiTask;
|
|
157
|
+
calls: number;
|
|
158
|
+
failed: number;
|
|
159
|
+
cached: number;
|
|
160
|
+
inputTokens: number;
|
|
161
|
+
cachedInputTokens: number;
|
|
162
|
+
outputTokens: number;
|
|
163
|
+
reasoningTokens: number;
|
|
164
|
+
audioSeconds: number;
|
|
165
|
+
costUsd: number;
|
|
166
|
+
averageLatencyMs: number | null;
|
|
167
|
+
p90LatencyMs: number | null;
|
|
168
|
+
}
|
|
169
|
+
export interface AlertIntakeAiModelRow {
|
|
170
|
+
model: string;
|
|
171
|
+
task: AlertIntakeAiTask;
|
|
172
|
+
calls: number;
|
|
173
|
+
inputTokens: number;
|
|
174
|
+
outputTokens: number;
|
|
175
|
+
costUsd: number;
|
|
176
|
+
/** Calls whose model had no price in the service's price table: their cost is not in `costUsd`. */
|
|
177
|
+
unpricedCalls: number;
|
|
178
|
+
}
|
|
179
|
+
export interface AlertIntakeAiTimelinePoint {
|
|
180
|
+
bucket: string;
|
|
181
|
+
calls: number;
|
|
182
|
+
inputTokens: number;
|
|
183
|
+
outputTokens: number;
|
|
184
|
+
costUsd: number;
|
|
185
|
+
}
|
|
186
|
+
export interface AlertIntakeAnalyticsAi {
|
|
187
|
+
calls: number;
|
|
188
|
+
failed: number;
|
|
189
|
+
cached: number;
|
|
190
|
+
inputTokens: number;
|
|
191
|
+
cachedInputTokens: number;
|
|
192
|
+
outputTokens: number;
|
|
193
|
+
reasoningTokens: number;
|
|
194
|
+
audioSeconds: number;
|
|
195
|
+
costUsd: number;
|
|
196
|
+
/** AI spend divided by messages received / incidents raised in the period; null when there were none. */
|
|
197
|
+
costPerMessageUsd: number | null;
|
|
198
|
+
costPerIncidentUsd: number | null;
|
|
199
|
+
byTask: AlertIntakeAiTaskRow[];
|
|
200
|
+
byModel: AlertIntakeAiModelRow[];
|
|
201
|
+
timeline: AlertIntakeAiTimelinePoint[];
|
|
202
|
+
/** When the prices used were last reviewed (the service's price table), ISO date. */
|
|
203
|
+
pricesAsOf: string;
|
|
204
|
+
}
|
|
205
|
+
/** Platform view only: one row per organization. */
|
|
206
|
+
export interface AlertIntakeAnalyticsOrganizationRow {
|
|
207
|
+
organizationId: number | null;
|
|
208
|
+
name: string;
|
|
209
|
+
received: number;
|
|
210
|
+
raised: number;
|
|
211
|
+
screenedOut: number;
|
|
212
|
+
aiCostUsd: number;
|
|
213
|
+
}
|
|
214
|
+
export interface AlertIntakeAnalytics {
|
|
215
|
+
/** Null for the platform view across every organization. */
|
|
216
|
+
organizationId: number | null;
|
|
217
|
+
range: AlertIntakeAnalyticsRange;
|
|
218
|
+
generatedAt: string;
|
|
219
|
+
totals: AlertIntakeAnalyticsTotals;
|
|
220
|
+
previous: AlertIntakeAnalyticsComparison | null;
|
|
221
|
+
timeline: AlertIntakeAnalyticsTimelinePoint[];
|
|
222
|
+
byState: AlertIntakeAnalyticsCount<AlertIntakeMessageState>[];
|
|
223
|
+
/** Every channel, zeros included. */
|
|
224
|
+
byChannel: AlertIntakeAnalyticsChannelRow[];
|
|
225
|
+
/**
|
|
226
|
+
* The organization's own connections - including those that received nothing - and any
|
|
227
|
+
* platform connection that carried its messages (without that connection's status).
|
|
228
|
+
*/
|
|
229
|
+
byConnection: AlertIntakeAnalyticsConnectionRow[];
|
|
230
|
+
screening: AlertIntakeAnalyticsScreening;
|
|
231
|
+
languages: AlertIntakeAnalyticsLanguageRow[];
|
|
232
|
+
categories: AlertIntakeAnalyticsCategoryRow[];
|
|
233
|
+
/** Low, Medium, High, Critical. */
|
|
234
|
+
priorities: AlertIntakeAnalyticsCount[];
|
|
235
|
+
locations: AlertIntakeAnalyticsLocations;
|
|
236
|
+
attachments: AlertIntakeAnalyticsAttachments;
|
|
237
|
+
heatmap: AlertIntakeAnalyticsHeatCell[];
|
|
238
|
+
ai: AlertIntakeAnalyticsAi;
|
|
239
|
+
/** Platform view only. */
|
|
240
|
+
byOrganization?: AlertIntakeAnalyticsOrganizationRow[];
|
|
241
|
+
}
|
|
@@ -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, AlertIntakeScreeningReason, AlertIntakeScreeningSource, AlertIntakeScreeningStatus, AlertIntakeSecretSource, AlertIntakeWebhookVerification } from '../enums/alert-intake.enum';
|
|
3
3
|
/**
|
|
4
4
|
* Alert intake settings.
|
|
5
5
|
*
|
|
@@ -156,6 +156,10 @@ export interface AlertIntakeActivitySummary {
|
|
|
156
156
|
parked: number;
|
|
157
157
|
/** Enabled connections whose last attempt failed (a rejected call, a mailbox that could not be read). */
|
|
158
158
|
failingConnections: number;
|
|
159
|
+
/** Screened out as not a report, in the window. */
|
|
160
|
+
screened?: number;
|
|
161
|
+
/** Screened messages nobody has reviewed yet (as of now). */
|
|
162
|
+
awaitingReview?: number;
|
|
159
163
|
}
|
|
160
164
|
/** What is kept of a file that came with a message. Never its contents. */
|
|
161
165
|
export interface AlertIntakeMessageAttachment {
|
|
@@ -187,6 +191,8 @@ export interface AlertIntakeMessage {
|
|
|
187
191
|
routeKeyword: string | null;
|
|
188
192
|
state: AlertIntakeMessageState;
|
|
189
193
|
rejectionReason: AlertIntakeRejectionReason | null;
|
|
194
|
+
/** Why it was screened out, for FILTERED (and for one raised after review). */
|
|
195
|
+
screeningReason?: AlertIntakeScreeningReason | null;
|
|
190
196
|
/** The last error, for RETRYING and PARKED. */
|
|
191
197
|
error: string | null;
|
|
192
198
|
attempts: number;
|
|
@@ -222,6 +228,67 @@ export interface AlertIntakeMessagePage {
|
|
|
222
228
|
page: number;
|
|
223
229
|
limit: number;
|
|
224
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* A message screened out as not a report, waiting for (or after) a person's review.
|
|
233
|
+
* Kept in its own table: the review queue. Raising one ("elevate") sends it through the
|
|
234
|
+
* pipeline without the screening step, and links the incident it becomes.
|
|
235
|
+
*/
|
|
236
|
+
export interface AlertIntakeScreenedMessage {
|
|
237
|
+
id: string;
|
|
238
|
+
/** The stored message (see the messages API). */
|
|
239
|
+
messageId: string;
|
|
240
|
+
organizationId: number;
|
|
241
|
+
connectionId: string | null;
|
|
242
|
+
connectionName: string | null;
|
|
243
|
+
channel: AlertIntakeChannel;
|
|
244
|
+
sender: string | null;
|
|
245
|
+
senderName: string | null;
|
|
246
|
+
subject: string | null;
|
|
247
|
+
preview: string;
|
|
248
|
+
/** ISO 639-1 code of the language it was written in, when known. */
|
|
249
|
+
language: string | null;
|
|
250
|
+
/** English translation, when it was written in another language. */
|
|
251
|
+
translation: string | null;
|
|
252
|
+
reason: AlertIntakeScreeningReason;
|
|
253
|
+
/** One sentence, for the reviewer: why it was screened out. */
|
|
254
|
+
explanation: string;
|
|
255
|
+
decidedBy: AlertIntakeScreeningSource;
|
|
256
|
+
/** The screening model's confidence (0-1). Null for a rule. */
|
|
257
|
+
confidence: number | null;
|
|
258
|
+
status: AlertIntakeScreeningStatus;
|
|
259
|
+
reviewedBy: number | null;
|
|
260
|
+
reviewedAt: string | null;
|
|
261
|
+
reviewNote: string | null;
|
|
262
|
+
/** The incident it became, once elevated and raised. */
|
|
263
|
+
incidentId: number | null;
|
|
264
|
+
attachmentCount: number;
|
|
265
|
+
receivedAt: string;
|
|
266
|
+
screenedAt: string;
|
|
267
|
+
/** What the CALLER may do with it now. */
|
|
268
|
+
actions: {
|
|
269
|
+
elevate: boolean;
|
|
270
|
+
dismiss: boolean;
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
export interface AlertIntakeScreenedMessageDetail extends AlertIntakeScreenedMessage {
|
|
274
|
+
/** Exactly as received. */
|
|
275
|
+
content: string;
|
|
276
|
+
attachments: AlertIntakeMessageAttachment[];
|
|
277
|
+
}
|
|
278
|
+
export interface AlertIntakeScreenedMessagePage {
|
|
279
|
+
items: AlertIntakeScreenedMessage[];
|
|
280
|
+
total: number;
|
|
281
|
+
page: number;
|
|
282
|
+
limit: number;
|
|
283
|
+
}
|
|
284
|
+
/** The outcome of a review: which messages changed, and why the others did not. */
|
|
285
|
+
export interface AlertIntakeScreeningReviewResult {
|
|
286
|
+
updated: string[];
|
|
287
|
+
skipped: Array<{
|
|
288
|
+
id: string;
|
|
289
|
+
reason: string;
|
|
290
|
+
}>;
|
|
291
|
+
}
|
|
225
292
|
export interface AlertIntakeConnectionTestResult {
|
|
226
293
|
success: boolean;
|
|
227
294
|
/** Operator-facing. Never contains a credential. */
|
|
@@ -18,6 +18,8 @@ export declare class CreateIncidentDto {
|
|
|
18
18
|
categoryId?: number;
|
|
19
19
|
typeId?: number;
|
|
20
20
|
description?: string;
|
|
21
|
+
originalDescription?: string;
|
|
22
|
+
originalLanguage?: string;
|
|
21
23
|
status?: IncidentStatus;
|
|
22
24
|
statusDetails?: CreateIncidentStatusDetailsDto;
|
|
23
25
|
priority?: IncidentPriority;
|
|
@@ -28,6 +28,13 @@ export interface Incident {
|
|
|
28
28
|
categoryId?: number;
|
|
29
29
|
typeId?: number;
|
|
30
30
|
description?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The report as the reporter wrote it, when `description` is its English
|
|
33
|
+
* translation (messages received by SMS, WhatsApp or email in another language).
|
|
34
|
+
*/
|
|
35
|
+
originalDescription?: string | null;
|
|
36
|
+
/** ISO 639-1 code of `originalDescription`'s language, e.g. `sw`. */
|
|
37
|
+
originalLanguage?: string | null;
|
|
31
38
|
status?: IncidentStatus;
|
|
32
39
|
statusDetails?: IncidentStatusDetails;
|
|
33
40
|
priority?: IncidentPriority;
|