grm-shared-library 1.1.214 → 1.1.215
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 +78 -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 +20 -1
- package/dist/cjs/modules/alert-intake/enums/alert-intake.enum.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 +76 -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 +19 -0
- package/dist/esm/modules/alert-intake/enums/alert-intake.enum.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 +19 -1
- package/dist/types/modules/alert-intake/enums/alert-intake.enum.d.ts +18 -0
- package/dist/types/modules/alert-intake/interfaces/alert-intake.d.ts +80 -1
- 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.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,81 @@ __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);
|
|
229
306
|
//# 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,qDAkByB;AACzB,kEAOoC;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,IAAI,CAA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AI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,IAAA,uBAAK,GAAE;IAAE,IAAA,4BAAU,GAAE;IAAE,IAAA,4BAAU,GAAE;;+EAChC;AAIxB;IAFC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;IACzF,IAAA,6BAAS,EAAC,SAAS,CAAC;IAAE,IAAA,2BAAS,GAAE;IAAE,IAAA,4BAAU,GAAE;;yEAC7B;AAGvB,4FAA4F;AAC5F,MAAa,2BAA2B;CAIvC;AAJD,kEAIC;AADG;IAFC,IAAA,qBAAW,GAAE;IACb,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,IAAA,uBAAK,GAAE;IAAE,IAAA,4BAAU,GAAE;;mEAClB"}
|
|
@@ -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.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,23 @@ 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
|
+
*/
|
|
108
|
+
var AlertIntakeMessageState;
|
|
109
|
+
(function (AlertIntakeMessageState) {
|
|
110
|
+
AlertIntakeMessageState["QUEUED"] = "QUEUED";
|
|
111
|
+
AlertIntakeMessageState["RAISED"] = "RAISED";
|
|
112
|
+
AlertIntakeMessageState["RETRYING"] = "RETRYING";
|
|
113
|
+
AlertIntakeMessageState["PARKED"] = "PARKED";
|
|
114
|
+
AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
|
|
115
|
+
})(AlertIntakeMessageState || (exports.AlertIntakeMessageState = AlertIntakeMessageState = {}));
|
|
97
116
|
//# 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;;;;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AA0B;IAClC,uEAAyC,CAAA;IACzC,yEAA2C,CAAA;IAC3C,yEAA2C,CAAA;IAC3C,iEAAmC,CAAA;IACnC,6EAA+C,CAAA;IAC/C,2DAA6B,CAAA;AACjC,CAAC,EAPW,0BAA0B,0CAA1B,0BAA0B,QAOrC;AAED;;;;;;;;;;GAUG;AACH,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;AAC3B,CAAC,EANW,uBAAuB,uCAAvB,uBAAuB,QAMlC"}
|
|
@@ -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 { 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';
|
|
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,78 @@ __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);
|
|
222
296
|
//# 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,MAA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E,KAAK,EAAE;IAAE,UAAU,EAAE;;iEAClB;AAIxB;IAFC,mBAAmB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IACtC,SAAS,EAAE;IAAE,UAAU,EAAE;;0DACR;AAGtB,MAAM,OAAO,yBAAyB;CAOrC;AAJG;IAFC,mBAAmB,EAAE;IACrB,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,KAAK,EAAE;IAAE,UAAU,EAAE;IAAE,UAAU,EAAE;;iEAChC;AAGxB;IADC,mBAAmB,EAAE;IAAE,SAAS,EAAE;IAAE,UAAU,EAAE;;0DAC/B"}
|
|
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,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,GACxB,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,YA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AAM,CAAC;IAAE,KAAK,EAAE;IAAE,UAAU,EAAE;IAAE,UAAU,EAAE;;+EAChC;AAIxB;IAFC,mBAAmB,CAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;IACzF,SAAS,CAAC,SAAS,CAAC;IAAE,SAAS,EAAE;IAAE,UAAU,EAAE;;yEAC7B;AAGvB,4FAA4F;AAC5F,MAAM,OAAO,2BAA2B;CAIvC;AADG;IAFC,WAAW,EAAE;IACb,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,KAAK,EAAE;IAAE,UAAU,EAAE;;mEAClB"}
|
|
@@ -91,4 +91,23 @@ 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
|
+
*/
|
|
105
|
+
export var AlertIntakeMessageState;
|
|
106
|
+
(function (AlertIntakeMessageState) {
|
|
107
|
+
AlertIntakeMessageState["QUEUED"] = "QUEUED";
|
|
108
|
+
AlertIntakeMessageState["RAISED"] = "RAISED";
|
|
109
|
+
AlertIntakeMessageState["RETRYING"] = "RETRYING";
|
|
110
|
+
AlertIntakeMessageState["PARKED"] = "PARKED";
|
|
111
|
+
AlertIntakeMessageState["DUPLICATE"] = "DUPLICATE";
|
|
112
|
+
})(AlertIntakeMessageState || (AlertIntakeMessageState = {}));
|
|
94
113
|
//# 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;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;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,uBAMX;AAND,WAAY,uBAAuB;IAC/B,4CAAiB,CAAA;IACjB,4CAAiB,CAAA;IACjB,gDAAqB,CAAA;IACrB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;AAC3B,CAAC,EANW,uBAAuB,KAAvB,uBAAuB,QAMlC"}
|
|
@@ -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 } from '../enums/alert-intake.enum';
|
|
2
2
|
export declare class CreateAlertIntakeConnectionDto {
|
|
3
3
|
channel: AlertIntakeChannel;
|
|
4
4
|
provider: AlertIntakeProvider;
|
|
@@ -35,3 +35,21 @@ 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
|
+
}
|
|
@@ -81,3 +81,21 @@ 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
|
+
*/
|
|
95
|
+
export declare enum AlertIntakeMessageState {
|
|
96
|
+
QUEUED = "QUEUED",
|
|
97
|
+
RAISED = "RAISED",
|
|
98
|
+
RETRYING = "RETRYING",
|
|
99
|
+
PARKED = "PARKED",
|
|
100
|
+
DUPLICATE = "DUPLICATE"
|
|
101
|
+
}
|
|
@@ -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, AlertIntakeSecretSource, AlertIntakeWebhookVerification } from '../enums/alert-intake.enum';
|
|
3
3
|
/**
|
|
4
4
|
* Alert intake settings.
|
|
5
5
|
*
|
|
@@ -142,6 +142,85 @@ 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
|
+
}
|
|
160
|
+
/** What is kept of a file that came with a message. Never its contents. */
|
|
161
|
+
export interface AlertIntakeMessageAttachment {
|
|
162
|
+
fileName: string;
|
|
163
|
+
mimeType: string;
|
|
164
|
+
size: number;
|
|
165
|
+
/** True once the file is stored in DMS and linked to the incident. */
|
|
166
|
+
attached: boolean;
|
|
167
|
+
/** Why it was not attached, when it was not. */
|
|
168
|
+
error: string | null;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A stored message, as an operator sees it in a list. `preview` is the start of the
|
|
172
|
+
* text; the whole of it is only in the detail.
|
|
173
|
+
*/
|
|
174
|
+
export interface AlertIntakeMessage {
|
|
175
|
+
id: string;
|
|
176
|
+
/** Null while no organization has been found for it. */
|
|
177
|
+
organizationId: number | null;
|
|
178
|
+
connectionId: string | null;
|
|
179
|
+
connectionName: string | null;
|
|
180
|
+
channel: AlertIntakeChannel;
|
|
181
|
+
/** Phone number, WhatsApp number or email address, as stored. */
|
|
182
|
+
sender: string | null;
|
|
183
|
+
senderName: string | null;
|
|
184
|
+
subject: string | null;
|
|
185
|
+
preview: string;
|
|
186
|
+
/** The keyword that routed it, on a platform connection. */
|
|
187
|
+
routeKeyword: string | null;
|
|
188
|
+
state: AlertIntakeMessageState;
|
|
189
|
+
rejectionReason: AlertIntakeRejectionReason | null;
|
|
190
|
+
/** The last error, for RETRYING and PARKED. */
|
|
191
|
+
error: string | null;
|
|
192
|
+
attempts: number;
|
|
193
|
+
nextAttemptAt: string | null;
|
|
194
|
+
/** The incident it raised. */
|
|
195
|
+
incidentId: number | null;
|
|
196
|
+
attachmentCount: number;
|
|
197
|
+
/** When the sender was told their message was received, if they were. */
|
|
198
|
+
acknowledgedAt: string | null;
|
|
199
|
+
receivedAt: string;
|
|
200
|
+
updatedAt: string;
|
|
201
|
+
/** What the CALLER may do with it now. */
|
|
202
|
+
actions: {
|
|
203
|
+
/** Try again: a PARKED message that ran out of attempts, or whose organization is active again. */
|
|
204
|
+
retry: boolean;
|
|
205
|
+
/** Raise a message that was taken for a duplicate. */
|
|
206
|
+
raiseAnyway: boolean;
|
|
207
|
+
/** Give a message no route claimed to an organization (platform operators). */
|
|
208
|
+
assign: boolean;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
export interface AlertIntakeMessageDetail extends AlertIntakeMessage {
|
|
212
|
+
/** What the incident is raised from (a routing keyword removed). */
|
|
213
|
+
content: string;
|
|
214
|
+
/** Exactly as received. */
|
|
215
|
+
originalContent: string;
|
|
216
|
+
attachments: AlertIntakeMessageAttachment[];
|
|
217
|
+
acknowledgementError: string | null;
|
|
218
|
+
}
|
|
219
|
+
export interface AlertIntakeMessagePage {
|
|
220
|
+
items: AlertIntakeMessage[];
|
|
221
|
+
total: number;
|
|
222
|
+
page: number;
|
|
223
|
+
limit: number;
|
|
145
224
|
}
|
|
146
225
|
export interface AlertIntakeConnectionTestResult {
|
|
147
226
|
success: boolean;
|
|
@@ -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;
|