grm-shared-library 1.1.214 → 1.1.216
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 +161 -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 +73 -1
- package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.js.map +1 -1
- 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/cjs/modules/notification/dtos/alert-acknowledgement.dto.js +55 -0
- package/dist/cjs/modules/notification/dtos/alert-acknowledgement.dto.js.map +1 -0
- package/dist/cjs/modules/notification/index.js +2 -0
- package/dist/cjs/modules/notification/index.js.map +1 -1
- package/dist/esm/modules/alert-intake/dtos/alert-intake.dto.js +157 -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 +72 -0
- package/dist/esm/modules/alert-intake/enums/alert-intake.enum.js.map +1 -1
- 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/esm/modules/notification/dtos/alert-acknowledgement.dto.js +51 -0
- package/dist/esm/modules/notification/dtos/alert-acknowledgement.dto.js.map +1 -0
- package/dist/esm/modules/notification/index.js +2 -0
- package/dist/esm/modules/notification/index.js.map +1 -1
- package/dist/types/modules/alert-intake/dtos/alert-intake.dto.d.ts +40 -1
- package/dist/types/modules/alert-intake/enums/alert-intake.enum.d.ts +67 -0
- package/dist/types/modules/alert-intake/interfaces/alert-intake.d.ts +147 -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/dist/types/modules/notification/dtos/alert-acknowledgement.dto.d.ts +17 -0
- package/dist/types/modules/notification/index.d.ts +1 -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.UpdateAlertIntakeRouteDto = exports.CreateAlertIntakeRouteDto = exports.UpdateAlertIntakeConnectionDto = exports.CreateAlertIntakeConnectionDto = void 0;
|
|
12
|
+
exports.ReviewAlertIntakeScreenedMessagesDto = 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");
|
|
@@ -226,4 +226,164 @@ __decorate([
|
|
|
226
226
|
(0, class_validator_1.IsOptional)(),
|
|
227
227
|
__metadata("design:type", Boolean)
|
|
228
228
|
], UpdateAlertIntakeRouteDto.prototype, "enabled", void 0);
|
|
229
|
+
const toBoolean = ({ value }) => (value === true || value === 'true' ? true : value === false || value === 'false' ? false : value);
|
|
230
|
+
/** Filters for an organization's stored messages. Query-string values, so numbers and booleans are coerced. */
|
|
231
|
+
class ListAlertIntakeMessagesQueryDto {
|
|
232
|
+
}
|
|
233
|
+
exports.ListAlertIntakeMessagesQueryDto = ListAlertIntakeMessagesQueryDto;
|
|
234
|
+
__decorate([
|
|
235
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeMessageState }),
|
|
236
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeMessageState),
|
|
237
|
+
(0, class_validator_1.IsOptional)(),
|
|
238
|
+
__metadata("design:type", String)
|
|
239
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "state", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeChannel }),
|
|
242
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeChannel),
|
|
243
|
+
(0, class_validator_1.IsOptional)(),
|
|
244
|
+
__metadata("design:type", String)
|
|
245
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "channel", void 0);
|
|
246
|
+
__decorate([
|
|
247
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
248
|
+
(0, class_validator_1.IsUUID)(),
|
|
249
|
+
(0, class_validator_1.IsOptional)(),
|
|
250
|
+
__metadata("design:type", String)
|
|
251
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "connectionId", void 0);
|
|
252
|
+
__decorate([
|
|
253
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: alert_intake_enum_1.AlertIntakeRejectionReason }),
|
|
254
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeRejectionReason),
|
|
255
|
+
(0, class_validator_1.IsOptional)(),
|
|
256
|
+
__metadata("design:type", String)
|
|
257
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "reason", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 1 }),
|
|
260
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
261
|
+
(0, class_validator_1.IsInt)(),
|
|
262
|
+
(0, class_validator_1.Min)(1),
|
|
263
|
+
(0, class_validator_1.Max)(10000),
|
|
264
|
+
(0, class_validator_1.IsOptional)(),
|
|
265
|
+
__metadata("design:type", Number)
|
|
266
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "page", void 0);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, swagger_1.ApiPropertyOptional)({ default: 25, maximum: 100 }),
|
|
269
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
270
|
+
(0, class_validator_1.IsInt)(),
|
|
271
|
+
(0, class_validator_1.Min)(1),
|
|
272
|
+
(0, class_validator_1.Max)(100),
|
|
273
|
+
(0, class_validator_1.IsOptional)(),
|
|
274
|
+
__metadata("design:type", Number)
|
|
275
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "limit", void 0);
|
|
276
|
+
/** Platform operators: every organization's messages, and those no organization has yet. */
|
|
277
|
+
class ListPlatformAlertIntakeMessagesQueryDto extends ListAlertIntakeMessagesQueryDto {
|
|
278
|
+
}
|
|
279
|
+
exports.ListPlatformAlertIntakeMessagesQueryDto = ListPlatformAlertIntakeMessagesQueryDto;
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
282
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
283
|
+
(0, class_validator_1.IsInt)(),
|
|
284
|
+
(0, class_validator_1.IsPositive)(),
|
|
285
|
+
(0, class_validator_1.IsOptional)(),
|
|
286
|
+
__metadata("design:type", Number)
|
|
287
|
+
], ListPlatformAlertIntakeMessagesQueryDto.prototype, "organizationId", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Only messages no organization has been found for.' }),
|
|
290
|
+
(0, class_transformer_1.Transform)(toBoolean),
|
|
291
|
+
(0, class_validator_1.IsBoolean)(),
|
|
292
|
+
(0, class_validator_1.IsOptional)(),
|
|
293
|
+
__metadata("design:type", Boolean)
|
|
294
|
+
], ListPlatformAlertIntakeMessagesQueryDto.prototype, "unrouted", void 0);
|
|
295
|
+
/** Platform operators: give a message no route claimed to an organization, and raise it. */
|
|
296
|
+
class AssignAlertIntakeMessageDto {
|
|
297
|
+
}
|
|
298
|
+
exports.AssignAlertIntakeMessageDto = AssignAlertIntakeMessageDto;
|
|
299
|
+
__decorate([
|
|
300
|
+
(0, swagger_1.ApiProperty)(),
|
|
301
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
302
|
+
(0, class_validator_1.IsInt)(),
|
|
303
|
+
(0, class_validator_1.IsPositive)(),
|
|
304
|
+
__metadata("design:type", Number)
|
|
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
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
360
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
361
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
362
|
+
* on is reported as skipped, and the rest still go through.
|
|
363
|
+
*/
|
|
364
|
+
class ReviewAlertIntakeScreenedMessagesDto {
|
|
365
|
+
}
|
|
366
|
+
exports.ReviewAlertIntakeScreenedMessagesDto = ReviewAlertIntakeScreenedMessagesDto;
|
|
367
|
+
__decorate([
|
|
368
|
+
(0, swagger_1.ApiProperty)({ type: [String], maxItems: 100 }),
|
|
369
|
+
(0, class_validator_1.IsArray)(),
|
|
370
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
371
|
+
(0, class_validator_1.ArrayMaxSize)(100),
|
|
372
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
373
|
+
(0, class_validator_1.IsUUID)('all', { each: true }),
|
|
374
|
+
__metadata("design:type", Array)
|
|
375
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "ids", void 0);
|
|
376
|
+
__decorate([
|
|
377
|
+
(0, swagger_1.ApiProperty)({ enum: alert_intake_enum_1.AlertIntakeScreeningDecision }),
|
|
378
|
+
(0, class_validator_1.IsEnum)(alert_intake_enum_1.AlertIntakeScreeningDecision),
|
|
379
|
+
__metadata("design:type", String)
|
|
380
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "decision", void 0);
|
|
381
|
+
__decorate([
|
|
382
|
+
(0, swagger_1.ApiPropertyOptional)({ maxLength: 300, description: 'Why, for the record.' }),
|
|
383
|
+
(0, class_transformer_1.Transform)(trim),
|
|
384
|
+
(0, class_validator_1.IsString)(),
|
|
385
|
+
(0, class_validator_1.MaxLength)(300),
|
|
386
|
+
(0, class_validator_1.IsOptional)(),
|
|
387
|
+
__metadata("design:type", String)
|
|
388
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "note", void 0);
|
|
229
389
|
//# 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,6CAAmE;AACnE,yDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"alert-intake.dto.js","sourceRoot":"","sources":["../../../../../src/modules/alert-intake/dtos/alert-intake.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAoD;AACpD,qDAsByB;AACzB,kEAWoC;AACpC,kEAA2G;AAE3G,MAAM,IAAI,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACnG,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;;GAKG;AACH,SAAS,cAAc,CAAC,UAAqC,EAAE,EAAE,iBAAqC;IAClG,OAAO,CAAC,MAAc,EAAE,YAAoB,EAAE,EAAE,CAC5C,IAAA,mCAAiB,EAAC;QACd,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,MAAM,CAAC,WAAW;QAC1B,YAAY;QACZ,OAAO,EAAE,iBAAiB;QAC1B,SAAS,EAAE;YACP,QAAQ,CAAC,KAAc;gBACnB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;oBAAE,OAAO,KAAK,CAAC;gBACtF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,CAAC;gBACjE,IAAI,OAAO,CAAC,MAAM,GAAG,YAAY;oBAAE,OAAO,KAAK,CAAC;gBAChD,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE;oBACjC,IAAI,CAAC,8BAA8B,CAAC,I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AS,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.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) {
|
|
@@ -94,4 +94,76 @@ var AlertIntakeRejectionReason;
|
|
|
94
94
|
AlertIntakeRejectionReason["ORGANIZATION_INACTIVE"] = "ORGANIZATION_INACTIVE";
|
|
95
95
|
AlertIntakeRejectionReason["RATE_LIMITED"] = "RATE_LIMITED";
|
|
96
96
|
})(AlertIntakeRejectionReason || (exports.AlertIntakeRejectionReason = AlertIntakeRejectionReason = {}));
|
|
97
|
+
/**
|
|
98
|
+
* Where a stored message stands, as an operator reads it. Derived from the pipeline's
|
|
99
|
+
* processing status, retry schedule and rejection reason - not stored.
|
|
100
|
+
*
|
|
101
|
+
* QUEUED waiting for, or being worked on by, the pipeline
|
|
102
|
+
* RAISED became an incident
|
|
103
|
+
* RETRYING failed; another attempt is scheduled
|
|
104
|
+
* PARKED failed and will not be retried on its own: it ran out of attempts, or it
|
|
105
|
+
* has a `rejectionReason` (no organization, organization inactive)
|
|
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
|
|
108
|
+
*/
|
|
109
|
+
var AlertIntakeMessageState;
|
|
110
|
+
(function (AlertIntakeMessageState) {
|
|
111
|
+
AlertIntakeMessageState["QUEUED"] = "QUEUED";
|
|
112
|
+
AlertIntakeMessageState["RAISED"] = "RAISED";
|
|
113
|
+
AlertIntakeMessageState["RETRYING"] = "RETRYING";
|
|
114
|
+
AlertIntakeMessageState["PARKED"] = "PARKED";
|
|
115
|
+
AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
|
|
116
|
+
AlertIntakeMessageState["FILTERED"] = "FILTERED";
|
|
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 = {}));
|
|
97
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"}
|
|
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,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7B,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"}
|
|
@@ -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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mB;AAYhC;IANC,IAAA,6BAAmB,EAAC;QACjB,WAAW,EAAE,sGAAsG;QACnH,OAAO,EAAE,IAAI;KAChB,CAAC;IACD,IAAA,2BAAS,GAAE;IACX,IAAA,4BAAU,GAAE;;0DACa"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AlertAcknowledgementSmsDto = void 0;
|
|
13
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
+
const class_transformer_1 = require("class-transformer");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
/**
|
|
17
|
+
* clarion-alerts -> clarion-notification: tell the person who texted an alert that it
|
|
18
|
+
* was received (POST /alert-intake/notifications/sms). Sent under the ORGANIZATION's
|
|
19
|
+
* SMS sender ID, so the reply comes from the organization they reached.
|
|
20
|
+
*
|
|
21
|
+
* One recipient: an acknowledgement answers one message. The caller decides whether
|
|
22
|
+
* one is due (opt-in per connection, throttled per sender); this route only sends.
|
|
23
|
+
*/
|
|
24
|
+
class AlertAcknowledgementSmsDto {
|
|
25
|
+
}
|
|
26
|
+
exports.AlertAcknowledgementSmsDto = AlertAcknowledgementSmsDto;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, swagger_1.ApiProperty)({ description: 'The sender of the alert: E.164, or a local number of a supported country.' }),
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
(0, class_validator_1.MinLength)(3),
|
|
31
|
+
(0, class_validator_1.MaxLength)(20),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AlertAcknowledgementSmsDto.prototype, "phoneNumber", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, swagger_1.ApiProperty)({ description: 'At most 480 characters (three SMS segments).' }),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
(0, class_validator_1.MinLength)(1),
|
|
38
|
+
(0, class_validator_1.MaxLength)(480),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AlertAcknowledgementSmsDto.prototype, "message", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, swagger_1.ApiProperty)({ description: 'The organization the alert was raised for: decides the sender ID.' }),
|
|
43
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
44
|
+
(0, class_validator_1.IsInt)(),
|
|
45
|
+
(0, class_validator_1.IsPositive)(),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], AlertAcknowledgementSmsDto.prototype, "organizationId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'The alerts message id, for tracing. Never shown to the recipient.' }),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.Matches)(/^[A-Za-z0-9-]{1,64}$/),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], AlertAcknowledgementSmsDto.prototype, "reference", void 0);
|
|
55
|
+
//# sourceMappingURL=alert-acknowledgement.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-acknowledgement.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/dtos/alert-acknowledgement.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAyC;AACzC,qDAAyG;AAGzG;;;;;;;GAOG;AACH,MAAa,0BAA0B;CAgBtC;AAhBD,gEAgBC;AAbG;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,2EAA2E,EAAE,CAAC;IACzG,IAAA,0BAAQ,GAAE;IAAE,IAAA,2BAAS,EAAC,CAAC,CAAC;IAAE,IAAA,2BAAS,EAAC,EAAE,CAAC;;+DACnB;AAIrB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;IAC5E,IAAA,0BAAQ,GAAE;IAAE,IAAA,2BAAS,EAAC,CAAC,CAAC;IAAE,IAAA,2BAAS,EAAC,GAAG,CAAC;;2DACxB;AAIjB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;IACjG,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,IAAA,uBAAK,GAAE;IAAE,IAAA,4BAAU,GAAE;;kEAClB;AAIxB;IAFC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;IACzG,IAAA,0BAAQ,GAAE;IAAE,IAAA,yBAAO,EAAC,sBAAsB,CAAC;IAAE,IAAA,4BAAU,GAAE;;6DACvC"}
|
|
@@ -43,4 +43,6 @@ __exportStar(require("./utils/notification-sender.util"), exports);
|
|
|
43
43
|
__exportStar(require("./enums/billing-notification.enum"), exports);
|
|
44
44
|
__exportStar(require("./dtos/billing-notification.dto"), exports);
|
|
45
45
|
__exportStar(require("./interfaces/billing-notification-result"), exports);
|
|
46
|
+
// clarion-alerts -> clarion-notification: acknowledge an alert to its sender (POST /alert-intake/notifications/sms)
|
|
47
|
+
__exportStar(require("./dtos/alert-acknowledgement.dto"), exports);
|
|
46
48
|
//# 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;AACrD,+DAA6C;AAC7C,0EAAwD;AACxD,yEAAuD;AACvD,0EAAwD;AACxD,4EAA0D;AAE1D,4CAA4C;AAC5C,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D;AAE1D,0CAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD;AAEhD,kEAAkE;AAClE,kFAAgE;AAChE,gFAA8D;AAC9D,wEAAsD;AACtD,mEAAiD;AAEjD,wFAAwF;AACxF,oEAAkD;AAClD,kEAAgD;AAChD,2EAAyD"}
|
|
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,+DAA6C;AAC7C,0EAAwD;AACxD,yEAAuD;AACvD,0EAAwD;AACxD,4EAA0D;AAE1D,4CAA4C;AAC5C,gEAA8C;AAC9C,kEAAgD;AAChD,+DAA6C;AAC7C,iEAA+C;AAC/C,4EAA0D;AAE1D,0CAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD;AAEhD,kEAAkE;AAClE,kFAAgE;AAChE,gFAA8D;AAC9D,wEAAsD;AACtD,mEAAiD;AAEjD,wFAAwF;AACxF,oEAAkD;AAClD,kEAAgD;AAChD,2EAAyD;AAEzD,oHAAoH;AACpH,mEAAiD"}
|
|
@@ -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, Matches, MaxLength, MinLength, registerDecorator, ValidateIf, } from 'class-validator';
|
|
13
|
-
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeProvider, AlertIntakeRouteMatch, } from '../enums/alert-intake.enum';
|
|
12
|
+
import { ArrayMaxSize, ArrayMinSize, ArrayUnique, IsArray, 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, 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]*$/;
|
|
@@ -219,4 +219,159 @@ __decorate([
|
|
|
219
219
|
IsOptional(),
|
|
220
220
|
__metadata("design:type", Boolean)
|
|
221
221
|
], UpdateAlertIntakeRouteDto.prototype, "enabled", void 0);
|
|
222
|
+
const toBoolean = ({ value }) => (value === true || value === 'true' ? true : value === false || value === 'false' ? false : value);
|
|
223
|
+
/** Filters for an organization's stored messages. Query-string values, so numbers and booleans are coerced. */
|
|
224
|
+
export class ListAlertIntakeMessagesQueryDto {
|
|
225
|
+
}
|
|
226
|
+
__decorate([
|
|
227
|
+
ApiPropertyOptional({ enum: AlertIntakeMessageState }),
|
|
228
|
+
IsEnum(AlertIntakeMessageState),
|
|
229
|
+
IsOptional(),
|
|
230
|
+
__metadata("design:type", String)
|
|
231
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "state", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
ApiPropertyOptional({ enum: AlertIntakeChannel }),
|
|
234
|
+
IsEnum(AlertIntakeChannel),
|
|
235
|
+
IsOptional(),
|
|
236
|
+
__metadata("design:type", String)
|
|
237
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "channel", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
ApiPropertyOptional(),
|
|
240
|
+
IsUUID(),
|
|
241
|
+
IsOptional(),
|
|
242
|
+
__metadata("design:type", String)
|
|
243
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "connectionId", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
ApiPropertyOptional({ enum: AlertIntakeRejectionReason }),
|
|
246
|
+
IsEnum(AlertIntakeRejectionReason),
|
|
247
|
+
IsOptional(),
|
|
248
|
+
__metadata("design:type", String)
|
|
249
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "reason", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
ApiPropertyOptional({ default: 1 }),
|
|
252
|
+
Type(() => Number),
|
|
253
|
+
IsInt(),
|
|
254
|
+
Min(1),
|
|
255
|
+
Max(10000),
|
|
256
|
+
IsOptional(),
|
|
257
|
+
__metadata("design:type", Number)
|
|
258
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "page", void 0);
|
|
259
|
+
__decorate([
|
|
260
|
+
ApiPropertyOptional({ default: 25, maximum: 100 }),
|
|
261
|
+
Type(() => Number),
|
|
262
|
+
IsInt(),
|
|
263
|
+
Min(1),
|
|
264
|
+
Max(100),
|
|
265
|
+
IsOptional(),
|
|
266
|
+
__metadata("design:type", Number)
|
|
267
|
+
], ListAlertIntakeMessagesQueryDto.prototype, "limit", void 0);
|
|
268
|
+
/** Platform operators: every organization's messages, and those no organization has yet. */
|
|
269
|
+
export class ListPlatformAlertIntakeMessagesQueryDto extends ListAlertIntakeMessagesQueryDto {
|
|
270
|
+
}
|
|
271
|
+
__decorate([
|
|
272
|
+
ApiPropertyOptional(),
|
|
273
|
+
Type(() => Number),
|
|
274
|
+
IsInt(),
|
|
275
|
+
IsPositive(),
|
|
276
|
+
IsOptional(),
|
|
277
|
+
__metadata("design:type", Number)
|
|
278
|
+
], ListPlatformAlertIntakeMessagesQueryDto.prototype, "organizationId", void 0);
|
|
279
|
+
__decorate([
|
|
280
|
+
ApiPropertyOptional({ description: 'Only messages no organization has been found for.' }),
|
|
281
|
+
Transform(toBoolean),
|
|
282
|
+
IsBoolean(),
|
|
283
|
+
IsOptional(),
|
|
284
|
+
__metadata("design:type", Boolean)
|
|
285
|
+
], ListPlatformAlertIntakeMessagesQueryDto.prototype, "unrouted", void 0);
|
|
286
|
+
/** Platform operators: give a message no route claimed to an organization, and raise it. */
|
|
287
|
+
export class AssignAlertIntakeMessageDto {
|
|
288
|
+
}
|
|
289
|
+
__decorate([
|
|
290
|
+
ApiProperty(),
|
|
291
|
+
Type(() => Number),
|
|
292
|
+
IsInt(),
|
|
293
|
+
IsPositive(),
|
|
294
|
+
__metadata("design:type", Number)
|
|
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
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
349
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
350
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
351
|
+
* on is reported as skipped, and the rest still go through.
|
|
352
|
+
*/
|
|
353
|
+
export class ReviewAlertIntakeScreenedMessagesDto {
|
|
354
|
+
}
|
|
355
|
+
__decorate([
|
|
356
|
+
ApiProperty({ type: [String], maxItems: 100 }),
|
|
357
|
+
IsArray(),
|
|
358
|
+
ArrayMinSize(1),
|
|
359
|
+
ArrayMaxSize(100),
|
|
360
|
+
ArrayUnique(),
|
|
361
|
+
IsUUID('all', { each: true }),
|
|
362
|
+
__metadata("design:type", Array)
|
|
363
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "ids", void 0);
|
|
364
|
+
__decorate([
|
|
365
|
+
ApiProperty({ enum: AlertIntakeScreeningDecision }),
|
|
366
|
+
IsEnum(AlertIntakeScreeningDecision),
|
|
367
|
+
__metadata("design:type", String)
|
|
368
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "decision", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
ApiPropertyOptional({ maxLength: 300, description: 'Why, for the record.' }),
|
|
371
|
+
Transform(trim),
|
|
372
|
+
IsString(),
|
|
373
|
+
MaxLength(300),
|
|
374
|
+
IsOptional(),
|
|
375
|
+
__metadata("design:type", String)
|
|
376
|
+
], ReviewAlertIntakeScreenedMessagesDto.prototype, "note", void 0);
|
|
222
377
|
//# 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,EAEL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,iBAAiB,EACjB,UAAU,GAGb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACH,kBAAkB,EAClB,0BAA0B,EAC1B,mBAAmB,EACnB,qBAAqB,
|
|
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,EAEL,UAAU,EACV,UAAU,EACV,QAAQ,EACR,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,EAAsB,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACnG,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB;;;;;GAKG;AACH,SAAS,cAAc,CAAC,UAAqC,EAAE,EA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IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,KAAK,EAAE;IAAE,GAAG,CAAC,CAAC,CAAC;IAAE,GAAG,CAAC,GAAG,CAAC;IAAE,UAAU,EAAE;;sEAC7C;AAGnB;;;;;GAKG;AACH,MAAM,OAAO,oCAAoC;CAYhD;AATG;IAFC,WAAW,CAAC,EAAE,IAAI,EAAE,CAAC,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"}
|
|
@@ -91,4 +91,76 @@ export var AlertIntakeRejectionReason;
|
|
|
91
91
|
AlertIntakeRejectionReason["ORGANIZATION_INACTIVE"] = "ORGANIZATION_INACTIVE";
|
|
92
92
|
AlertIntakeRejectionReason["RATE_LIMITED"] = "RATE_LIMITED";
|
|
93
93
|
})(AlertIntakeRejectionReason || (AlertIntakeRejectionReason = {}));
|
|
94
|
+
/**
|
|
95
|
+
* Where a stored message stands, as an operator reads it. Derived from the pipeline's
|
|
96
|
+
* processing status, retry schedule and rejection reason - not stored.
|
|
97
|
+
*
|
|
98
|
+
* QUEUED waiting for, or being worked on by, the pipeline
|
|
99
|
+
* RAISED became an incident
|
|
100
|
+
* RETRYING failed; another attempt is scheduled
|
|
101
|
+
* PARKED failed and will not be retried on its own: it ran out of attempts, or it
|
|
102
|
+
* has a `rejectionReason` (no organization, organization inactive)
|
|
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
|
|
105
|
+
*/
|
|
106
|
+
export var AlertIntakeMessageState;
|
|
107
|
+
(function (AlertIntakeMessageState) {
|
|
108
|
+
AlertIntakeMessageState["QUEUED"] = "QUEUED";
|
|
109
|
+
AlertIntakeMessageState["RAISED"] = "RAISED";
|
|
110
|
+
AlertIntakeMessageState["RETRYING"] = "RETRYING";
|
|
111
|
+
AlertIntakeMessageState["PARKED"] = "PARKED";
|
|
112
|
+
AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
|
|
113
|
+
AlertIntakeMessageState["FILTERED"] = "FILTERED";
|
|
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 = {}));
|
|
94
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;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;IAChF,+EAA6C,CAAA;IAC7C,mFAAmF;IACnF,mEAAiC,CAAA;AACrC,CAAC,EAPW,8BAA8B,KAA9B,8BAA8B,QAOzC;AAED,yFAAyF;AACzF,MAAM,CAAN,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,KAA1B,0BAA0B,QAOrC"}
|
|
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;AAC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AAC,EAPW,uBAAuB,KAAvB,uBAAuB,QAOlC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAN,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,KAA1B,0BAA0B,QASrC;AAED,wFAAwF;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"}
|
|
@@ -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":["../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AE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;wDACY;AASzB;IAPC,WAAW,CAAC;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"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { IsInt, IsOptional, IsPositive, IsString, Matches, MaxLength, MinLength } from 'class-validator';
|
|
13
|
+
/**
|
|
14
|
+
* clarion-alerts -> clarion-notification: tell the person who texted an alert that it
|
|
15
|
+
* was received (POST /alert-intake/notifications/sms). Sent under the ORGANIZATION's
|
|
16
|
+
* SMS sender ID, so the reply comes from the organization they reached.
|
|
17
|
+
*
|
|
18
|
+
* One recipient: an acknowledgement answers one message. The caller decides whether
|
|
19
|
+
* one is due (opt-in per connection, throttled per sender); this route only sends.
|
|
20
|
+
*/
|
|
21
|
+
export class AlertAcknowledgementSmsDto {
|
|
22
|
+
}
|
|
23
|
+
__decorate([
|
|
24
|
+
ApiProperty({ description: 'The sender of the alert: E.164, or a local number of a supported country.' }),
|
|
25
|
+
IsString(),
|
|
26
|
+
MinLength(3),
|
|
27
|
+
MaxLength(20),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], AlertAcknowledgementSmsDto.prototype, "phoneNumber", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
ApiProperty({ description: 'At most 480 characters (three SMS segments).' }),
|
|
32
|
+
IsString(),
|
|
33
|
+
MinLength(1),
|
|
34
|
+
MaxLength(480),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AlertAcknowledgementSmsDto.prototype, "message", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
ApiProperty({ description: 'The organization the alert was raised for: decides the sender ID.' }),
|
|
39
|
+
Type(() => Number),
|
|
40
|
+
IsInt(),
|
|
41
|
+
IsPositive(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], AlertAcknowledgementSmsDto.prototype, "organizationId", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
ApiPropertyOptional({ description: 'The alerts message id, for tracing. Never shown to the recipient.' }),
|
|
46
|
+
IsString(),
|
|
47
|
+
Matches(/^[A-Za-z0-9-]{1,64}$/),
|
|
48
|
+
IsOptional(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], AlertAcknowledgementSmsDto.prototype, "reference", void 0);
|
|
51
|
+
//# sourceMappingURL=alert-acknowledgement.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-acknowledgement.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/dtos/alert-acknowledgement.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGzG;;;;;;;GAOG;AACH,MAAM,OAAO,0BAA0B;CAgBtC;AAbG;IAFC,WAAW,CAAC,EAAE,WAAW,EAAE,2EAA2E,EAAE,CAAC;IACzG,QAAQ,EAAE;IAAE,SAAS,CAAC,CAAC,CAAC;IAAE,SAAS,CAAC,EAAE,CAAC;;+DACnB;AAIrB;IAFC,WAAW,CAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;IAC5E,QAAQ,EAAE;IAAE,SAAS,CAAC,CAAC,CAAC;IAAE,SAAS,CAAC,GAAG,CAAC;;2DACxB;AAIjB;IAFC,WAAW,CAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;IACjG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,KAAK,EAAE;IAAE,UAAU,EAAE;;kEAClB;AAIxB;IAFC,mBAAmB,CAAC,EAAE,WAAW,EAAE,mEAAmE,EAAE,CAAC;IACzG,QAAQ,EAAE;IAAE,OAAO,CAAC,sBAAsB,CAAC;IAAE,UAAU,EAAE;;6DACvC"}
|
|
@@ -27,4 +27,6 @@ export * from './utils/notification-sender.util';
|
|
|
27
27
|
export * from './enums/billing-notification.enum';
|
|
28
28
|
export * from './dtos/billing-notification.dto';
|
|
29
29
|
export * from './interfaces/billing-notification-result';
|
|
30
|
+
// clarion-alerts -> clarion-notification: acknowledge an alert to its sender (POST /alert-intake/notifications/sms)
|
|
31
|
+
export * from './dtos/alert-acknowledgement.dto';
|
|
30
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/notification/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAE1D,4CAA4C;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAE1D,0CAA0C;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,kEAAkE;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AAEjD,wFAAwF;AACxF,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/notification/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAE1D,4CAA4C;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAE1D,0CAA0C;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,kEAAkE;AAClE,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,kCAAkC,CAAC;AAEjD,wFAAwF;AACxF,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AAEzD,oHAAoH;AACpH,cAAc,kCAAkC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeProvider, 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;
|
|
@@ -35,3 +35,42 @@ export declare class UpdateAlertIntakeRouteDto {
|
|
|
35
35
|
organizationId?: number;
|
|
36
36
|
enabled?: boolean;
|
|
37
37
|
}
|
|
38
|
+
/** Filters for an organization's stored messages. Query-string values, so numbers and booleans are coerced. */
|
|
39
|
+
export declare class ListAlertIntakeMessagesQueryDto {
|
|
40
|
+
state?: AlertIntakeMessageState;
|
|
41
|
+
channel?: AlertIntakeChannel;
|
|
42
|
+
connectionId?: string;
|
|
43
|
+
reason?: AlertIntakeRejectionReason;
|
|
44
|
+
page?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
}
|
|
47
|
+
/** Platform operators: every organization's messages, and those no organization has yet. */
|
|
48
|
+
export declare class ListPlatformAlertIntakeMessagesQueryDto extends ListAlertIntakeMessagesQueryDto {
|
|
49
|
+
organizationId?: number;
|
|
50
|
+
unrouted?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/** Platform operators: give a message no route claimed to an organization, and raise it. */
|
|
53
|
+
export declare class AssignAlertIntakeMessageDto {
|
|
54
|
+
organizationId: number;
|
|
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
|
+
* A reviewer's decision on one or more screened messages. ELEVATE raises each as an
|
|
68
|
+
* incident (a grievance, for a grievance desk) without screening it again; DISMISS
|
|
69
|
+
* confirms it is not a report. Each message is decided on its own: one that has moved
|
|
70
|
+
* on is reported as skipped, and the rest still go through.
|
|
71
|
+
*/
|
|
72
|
+
export declare class ReviewAlertIntakeScreenedMessagesDto {
|
|
73
|
+
ids: string[];
|
|
74
|
+
decision: AlertIntakeScreeningDecision;
|
|
75
|
+
note?: string;
|
|
76
|
+
}
|
|
@@ -81,3 +81,70 @@ export declare enum AlertIntakeRejectionReason {
|
|
|
81
81
|
ORGANIZATION_INACTIVE = "ORGANIZATION_INACTIVE",
|
|
82
82
|
RATE_LIMITED = "RATE_LIMITED"
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Where a stored message stands, as an operator reads it. Derived from the pipeline's
|
|
86
|
+
* processing status, retry schedule and rejection reason - not stored.
|
|
87
|
+
*
|
|
88
|
+
* QUEUED waiting for, or being worked on by, the pipeline
|
|
89
|
+
* RAISED became an incident
|
|
90
|
+
* RETRYING failed; another attempt is scheduled
|
|
91
|
+
* PARKED failed and will not be retried on its own: it ran out of attempts, or it
|
|
92
|
+
* has a `rejectionReason` (no organization, organization inactive)
|
|
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
|
|
95
|
+
*/
|
|
96
|
+
export declare enum AlertIntakeMessageState {
|
|
97
|
+
QUEUED = "QUEUED",
|
|
98
|
+
RAISED = "RAISED",
|
|
99
|
+
RETRYING = "RETRYING",
|
|
100
|
+
PARKED = "PARKED",
|
|
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"
|
|
150
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CountryCode } from '../../country/enums/country-code.enum';
|
|
2
|
-
import { AlertIntakeChannel, AlertIntakeEmergencyPolicy, AlertIntakeProvider, 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
|
*
|
|
@@ -142,6 +142,152 @@ export interface OrganizationAlertIntakeSettings {
|
|
|
142
142
|
platformFallbacks: AlertIntakePlatformFallback[];
|
|
143
143
|
/** False when the service has no key to encrypt credentials with: only secret references can be used. */
|
|
144
144
|
encryptedSecretsAvailable: boolean;
|
|
145
|
+
/** What arrived for this organization recently, and what needs someone's attention. */
|
|
146
|
+
activity?: AlertIntakeActivitySummary;
|
|
147
|
+
}
|
|
148
|
+
/** Counts over the last `windowHours` - except `parked` and `failingConnections`, which are as of now. */
|
|
149
|
+
export interface AlertIntakeActivitySummary {
|
|
150
|
+
windowHours: number;
|
|
151
|
+
received: number;
|
|
152
|
+
raised: number;
|
|
153
|
+
duplicates: number;
|
|
154
|
+
retrying: number;
|
|
155
|
+
/** Waiting for an operator: out of attempts, or held for a reason (no organization, organization inactive). */
|
|
156
|
+
parked: number;
|
|
157
|
+
/** Enabled connections whose last attempt failed (a rejected call, a mailbox that could not be read). */
|
|
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;
|
|
163
|
+
}
|
|
164
|
+
/** What is kept of a file that came with a message. Never its contents. */
|
|
165
|
+
export interface AlertIntakeMessageAttachment {
|
|
166
|
+
fileName: string;
|
|
167
|
+
mimeType: string;
|
|
168
|
+
size: number;
|
|
169
|
+
/** True once the file is stored in DMS and linked to the incident. */
|
|
170
|
+
attached: boolean;
|
|
171
|
+
/** Why it was not attached, when it was not. */
|
|
172
|
+
error: string | null;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* A stored message, as an operator sees it in a list. `preview` is the start of the
|
|
176
|
+
* text; the whole of it is only in the detail.
|
|
177
|
+
*/
|
|
178
|
+
export interface AlertIntakeMessage {
|
|
179
|
+
id: string;
|
|
180
|
+
/** Null while no organization has been found for it. */
|
|
181
|
+
organizationId: number | null;
|
|
182
|
+
connectionId: string | null;
|
|
183
|
+
connectionName: string | null;
|
|
184
|
+
channel: AlertIntakeChannel;
|
|
185
|
+
/** Phone number, WhatsApp number or email address, as stored. */
|
|
186
|
+
sender: string | null;
|
|
187
|
+
senderName: string | null;
|
|
188
|
+
subject: string | null;
|
|
189
|
+
preview: string;
|
|
190
|
+
/** The keyword that routed it, on a platform connection. */
|
|
191
|
+
routeKeyword: string | null;
|
|
192
|
+
state: AlertIntakeMessageState;
|
|
193
|
+
rejectionReason: AlertIntakeRejectionReason | null;
|
|
194
|
+
/** Why it was screened out, for FILTERED (and for one raised after review). */
|
|
195
|
+
screeningReason?: AlertIntakeScreeningReason | null;
|
|
196
|
+
/** The last error, for RETRYING and PARKED. */
|
|
197
|
+
error: string | null;
|
|
198
|
+
attempts: number;
|
|
199
|
+
nextAttemptAt: string | null;
|
|
200
|
+
/** The incident it raised. */
|
|
201
|
+
incidentId: number | null;
|
|
202
|
+
attachmentCount: number;
|
|
203
|
+
/** When the sender was told their message was received, if they were. */
|
|
204
|
+
acknowledgedAt: string | null;
|
|
205
|
+
receivedAt: string;
|
|
206
|
+
updatedAt: string;
|
|
207
|
+
/** What the CALLER may do with it now. */
|
|
208
|
+
actions: {
|
|
209
|
+
/** Try again: a PARKED message that ran out of attempts, or whose organization is active again. */
|
|
210
|
+
retry: boolean;
|
|
211
|
+
/** Raise a message that was taken for a duplicate. */
|
|
212
|
+
raiseAnyway: boolean;
|
|
213
|
+
/** Give a message no route claimed to an organization (platform operators). */
|
|
214
|
+
assign: boolean;
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
export interface AlertIntakeMessageDetail extends AlertIntakeMessage {
|
|
218
|
+
/** What the incident is raised from (a routing keyword removed). */
|
|
219
|
+
content: string;
|
|
220
|
+
/** Exactly as received. */
|
|
221
|
+
originalContent: string;
|
|
222
|
+
attachments: AlertIntakeMessageAttachment[];
|
|
223
|
+
acknowledgementError: string | null;
|
|
224
|
+
}
|
|
225
|
+
export interface AlertIntakeMessagePage {
|
|
226
|
+
items: AlertIntakeMessage[];
|
|
227
|
+
total: number;
|
|
228
|
+
page: number;
|
|
229
|
+
limit: number;
|
|
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
|
+
}>;
|
|
145
291
|
}
|
|
146
292
|
export interface AlertIntakeConnectionTestResult {
|
|
147
293
|
success: boolean;
|
|
@@ -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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SmsSendResult } from '../interfaces/sms-send-result';
|
|
2
|
+
/**
|
|
3
|
+
* clarion-alerts -> clarion-notification: tell the person who texted an alert that it
|
|
4
|
+
* was received (POST /alert-intake/notifications/sms). Sent under the ORGANIZATION's
|
|
5
|
+
* SMS sender ID, so the reply comes from the organization they reached.
|
|
6
|
+
*
|
|
7
|
+
* One recipient: an acknowledgement answers one message. The caller decides whether
|
|
8
|
+
* one is due (opt-in per connection, throttled per sender); this route only sends.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AlertAcknowledgementSmsDto {
|
|
11
|
+
phoneNumber: string;
|
|
12
|
+
message: string;
|
|
13
|
+
organizationId: number;
|
|
14
|
+
reference?: string;
|
|
15
|
+
}
|
|
16
|
+
/** 200 sent · 422 can never be sent (e.g. the number) · 502 not sent, safe to retry · 503 no provider. */
|
|
17
|
+
export type AlertAcknowledgementSmsResult = SmsSendResult;
|