grm-shared-library 1.1.211 → 1.1.213
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/README.md +51 -0
- package/dist/cjs/kafka/dtos/account-deletion/account-deletion-request-payload.dto.js +6 -0
- package/dist/cjs/kafka/dtos/account-deletion/account-deletion-request-payload.dto.js.map +1 -1
- package/dist/cjs/kafka/dtos/otp/create-otp-payload.dto.js +6 -0
- package/dist/cjs/kafka/dtos/otp/create-otp-payload.dto.js.map +1 -1
- package/dist/cjs/kafka/dtos/password/password-reset-payload.dto.js +6 -0
- package/dist/cjs/kafka/dtos/password/password-reset-payload.dto.js.map +1 -1
- package/dist/cjs/kafka/dtos/user/create-user-registered-payload.dto.js +6 -0
- package/dist/cjs/kafka/dtos/user/create-user-registered-payload.dto.js.map +1 -1
- package/dist/cjs/modules/notification/constants/notification-sender.const.js +30 -0
- package/dist/cjs/modules/notification/constants/notification-sender.const.js.map +1 -0
- package/dist/cjs/modules/notification/dtos/billing-notification.dto.js +213 -0
- package/dist/cjs/modules/notification/dtos/billing-notification.dto.js.map +1 -0
- package/dist/cjs/modules/notification/dtos/organization-notification-settings.dto.js +354 -0
- package/dist/cjs/modules/notification/dtos/organization-notification-settings.dto.js.map +1 -0
- package/dist/cjs/modules/notification/enums/billing-notification.enum.js +33 -0
- package/dist/cjs/modules/notification/enums/billing-notification.enum.js.map +1 -0
- package/dist/cjs/modules/notification/enums/email-sender-verification.enum.js +33 -0
- package/dist/cjs/modules/notification/enums/email-sender-verification.enum.js.map +1 -0
- package/dist/cjs/modules/notification/enums/notification-branding-source.enum.js +22 -0
- package/dist/cjs/modules/notification/enums/notification-branding-source.enum.js.map +1 -0
- package/dist/cjs/modules/notification/enums/notification-sender-source.enum.js +15 -0
- package/dist/cjs/modules/notification/enums/notification-sender-source.enum.js.map +1 -0
- package/dist/cjs/modules/notification/enums/notification-sender-status.enum.js +24 -0
- package/dist/cjs/modules/notification/enums/notification-sender-status.enum.js.map +1 -0
- package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js +5 -0
- package/dist/cjs/modules/notification/enums/sms-provider-name.enum.js.map +1 -1
- package/dist/cjs/modules/notification/enums/sms-sender-type.enum.js +22 -0
- package/dist/cjs/modules/notification/enums/sms-sender-type.enum.js.map +1 -0
- package/dist/cjs/modules/notification/index.js +14 -0
- package/dist/cjs/modules/notification/index.js.map +1 -1
- package/dist/cjs/modules/notification/interfaces/billing-notification-result.js +3 -0
- package/dist/cjs/modules/notification/interfaces/billing-notification-result.js.map +1 -0
- package/dist/cjs/modules/notification/interfaces/organization-notification-settings.js +3 -0
- package/dist/cjs/modules/notification/interfaces/organization-notification-settings.js.map +1 -0
- package/dist/cjs/modules/notification/utils/notification-sender.util.js +67 -0
- package/dist/cjs/modules/notification/utils/notification-sender.util.js.map +1 -0
- package/dist/cjs/modules/permission/data/permissions.data.js +8 -0
- package/dist/cjs/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js +15 -0
- package/dist/cjs/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/cjs/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/cjs/modules/role/data/roles.data.js +8 -0
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/kafka/dtos/account-deletion/account-deletion-request-payload.dto.js +7 -1
- package/dist/esm/kafka/dtos/account-deletion/account-deletion-request-payload.dto.js.map +1 -1
- package/dist/esm/kafka/dtos/otp/create-otp-payload.dto.js +7 -1
- package/dist/esm/kafka/dtos/otp/create-otp-payload.dto.js.map +1 -1
- package/dist/esm/kafka/dtos/password/password-reset-payload.dto.js +7 -1
- package/dist/esm/kafka/dtos/password/password-reset-payload.dto.js.map +1 -1
- package/dist/esm/kafka/dtos/user/create-user-registered-payload.dto.js +7 -1
- package/dist/esm/kafka/dtos/user/create-user-registered-payload.dto.js.map +1 -1
- package/dist/esm/modules/notification/constants/notification-sender.const.js +27 -0
- package/dist/esm/modules/notification/constants/notification-sender.const.js.map +1 -0
- package/dist/esm/modules/notification/dtos/billing-notification.dto.js +205 -0
- package/dist/esm/modules/notification/dtos/billing-notification.dto.js.map +1 -0
- package/dist/esm/modules/notification/dtos/organization-notification-settings.dto.js +343 -0
- package/dist/esm/modules/notification/dtos/organization-notification-settings.dto.js.map +1 -0
- package/dist/esm/modules/notification/enums/billing-notification.enum.js +30 -0
- package/dist/esm/modules/notification/enums/billing-notification.enum.js.map +1 -0
- package/dist/esm/modules/notification/enums/email-sender-verification.enum.js +30 -0
- package/dist/esm/modules/notification/enums/email-sender-verification.enum.js.map +1 -0
- package/dist/esm/modules/notification/enums/notification-branding-source.enum.js +19 -0
- package/dist/esm/modules/notification/enums/notification-branding-source.enum.js.map +1 -0
- package/dist/esm/modules/notification/enums/notification-sender-source.enum.js +12 -0
- package/dist/esm/modules/notification/enums/notification-sender-source.enum.js.map +1 -0
- package/dist/esm/modules/notification/enums/notification-sender-status.enum.js +21 -0
- package/dist/esm/modules/notification/enums/notification-sender-status.enum.js.map +1 -0
- package/dist/esm/modules/notification/enums/sms-provider-name.enum.js +5 -0
- package/dist/esm/modules/notification/enums/sms-provider-name.enum.js.map +1 -1
- package/dist/esm/modules/notification/enums/sms-sender-type.enum.js +19 -0
- package/dist/esm/modules/notification/enums/sms-sender-type.enum.js.map +1 -0
- package/dist/esm/modules/notification/index.js +14 -0
- package/dist/esm/modules/notification/index.js.map +1 -1
- package/dist/esm/modules/notification/interfaces/billing-notification-result.js +2 -0
- package/dist/esm/modules/notification/interfaces/billing-notification-result.js.map +1 -0
- package/dist/esm/modules/notification/interfaces/organization-notification-settings.js +2 -0
- package/dist/esm/modules/notification/interfaces/organization-notification-settings.js.map +1 -0
- package/dist/esm/modules/notification/utils/notification-sender.util.js +60 -0
- package/dist/esm/modules/notification/utils/notification-sender.util.js.map +1 -0
- package/dist/esm/modules/permission/data/permissions.data.js +8 -0
- package/dist/esm/modules/permission/data/permissions.data.js.map +1 -1
- package/dist/esm/modules/permission/enums/permission-actions.enum.js +15 -0
- package/dist/esm/modules/permission/enums/permission-actions.enum.js.map +1 -1
- package/dist/esm/modules/permission/enums/permissions-module.enum.js +1 -0
- package/dist/esm/modules/permission/enums/permissions-module.enum.js.map +1 -1
- package/dist/esm/modules/role/data/roles.data.js +8 -0
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/types/kafka/dtos/account-deletion/account-deletion-request-payload.dto.d.ts +6 -0
- package/dist/types/kafka/dtos/otp/create-otp-payload.dto.d.ts +6 -0
- package/dist/types/kafka/dtos/password/password-reset-payload.dto.d.ts +6 -0
- package/dist/types/kafka/dtos/user/create-user-registered-payload.dto.d.ts +6 -0
- package/dist/types/modules/notification/constants/notification-sender.const.d.ts +16 -0
- package/dist/types/modules/notification/dtos/billing-notification.dto.d.ts +56 -0
- package/dist/types/modules/notification/dtos/organization-notification-settings.dto.d.ts +64 -0
- package/dist/types/modules/notification/enums/billing-notification.enum.d.ts +27 -0
- package/dist/types/modules/notification/enums/email-sender-verification.enum.d.ts +27 -0
- package/dist/types/modules/notification/enums/notification-branding-source.enum.d.ts +17 -0
- package/dist/types/modules/notification/enums/notification-sender-source.enum.d.ts +10 -0
- package/dist/types/modules/notification/enums/notification-sender-status.enum.d.ts +19 -0
- package/dist/types/modules/notification/enums/sms-provider-name.enum.d.ts +6 -1
- package/dist/types/modules/notification/enums/sms-sender-type.enum.d.ts +17 -0
- package/dist/types/modules/notification/index.d.ts +12 -0
- package/dist/types/modules/notification/interfaces/billing-notification-result.d.ts +35 -0
- package/dist/types/modules/notification/interfaces/email-send-request.d.ts +6 -0
- package/dist/types/modules/notification/interfaces/email-send-result.d.ts +7 -0
- package/dist/types/modules/notification/interfaces/organization-notification-settings.d.ts +163 -0
- package/dist/types/modules/notification/interfaces/provider-attempt.d.ts +5 -0
- package/dist/types/modules/notification/interfaces/sms-send-result.d.ts +7 -0
- package/dist/types/modules/notification/utils/notification-sender.util.d.ts +25 -0
- package/dist/types/modules/permission/enums/permission-actions.enum.d.ts +4 -1
- package/dist/types/modules/permission/enums/permissions-module.enum.d.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,354 @@
|
|
|
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.SendTestNotificationEmailDto = exports.ReviewOrganizationSmsSenderDto = exports.UpdateOrganizationSmsSenderDto = exports.CreateOrganizationSmsSenderDto = exports.UpdateOrganizationEmailSenderDto = exports.CreateOrganizationEmailSenderDto = exports.UpsertOrganizationNotificationBrandingDto = exports.NotificationSocialLinksDto = 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
|
+
const country_code_enum_1 = require("../../country/enums/country-code.enum");
|
|
17
|
+
const incident_app_id_enum_1 = require("../../incident/enums/incident-app-id.enum");
|
|
18
|
+
const notification_sender_const_1 = require("../constants/notification-sender.const");
|
|
19
|
+
const notification_sender_status_enum_1 = require("../enums/notification-sender-status.enum");
|
|
20
|
+
const sms_provider_name_enum_1 = require("../enums/sms-provider-name.enum");
|
|
21
|
+
const sms_sender_type_enum_1 = require("../enums/sms-sender-type.enum");
|
|
22
|
+
/**
|
|
23
|
+
* A cleared form field arrives as `""`. Branding is resolved field by field, so
|
|
24
|
+
* "cleared" has a real meaning - stop overriding, inherit again - and is stored
|
|
25
|
+
* as null. Without this an empty string would override the inherited value with
|
|
26
|
+
* nothing, and the email would go out with a blank footer.
|
|
27
|
+
*/
|
|
28
|
+
const emptyToNull = ({ value }) => typeof value === 'string' && value.trim() === '' ? null : typeof value === 'string' ? value.trim() : value;
|
|
29
|
+
/** Validate only when a value was actually supplied; null (inherit) and undefined (untouched) pass. */
|
|
30
|
+
const whenPresent = (_, value) => value !== null && value !== undefined;
|
|
31
|
+
const HTTPS_ONLY = { protocols: ['https'], require_protocol: true };
|
|
32
|
+
const COLOUR_MESSAGE = 'must be a #RRGGBB hex colour, e.g. #FC1B23';
|
|
33
|
+
class NotificationSocialLinksDto {
|
|
34
|
+
}
|
|
35
|
+
exports.NotificationSocialLinksDto = NotificationSocialLinksDto;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
38
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
39
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
40
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
41
|
+
(0, class_validator_1.MaxLength)(255),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], NotificationSocialLinksDto.prototype, "facebook", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
46
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
47
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
48
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
49
|
+
(0, class_validator_1.MaxLength)(255),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], NotificationSocialLinksDto.prototype, "x", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
54
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
55
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
56
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
57
|
+
(0, class_validator_1.MaxLength)(255),
|
|
58
|
+
__metadata("design:type", Object)
|
|
59
|
+
], NotificationSocialLinksDto.prototype, "instagram", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
62
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
63
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
64
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
65
|
+
(0, class_validator_1.MaxLength)(255),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], NotificationSocialLinksDto.prototype, "linkedin", void 0);
|
|
68
|
+
/**
|
|
69
|
+
* Saves an organization's branding. A PUT of the whole profile: a field sent as
|
|
70
|
+
* null (or "") stops overriding and inherits again; a field left out is untouched.
|
|
71
|
+
*/
|
|
72
|
+
class UpsertOrganizationNotificationBrandingDto {
|
|
73
|
+
}
|
|
74
|
+
exports.UpsertOrganizationNotificationBrandingDto = UpsertOrganizationNotificationBrandingDto;
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
77
|
+
enum: incident_app_id_enum_1.IncidentAppId,
|
|
78
|
+
nullable: true,
|
|
79
|
+
description: 'Super-admin only. Lets events that still carry only an appId resolve to this organization.',
|
|
80
|
+
}),
|
|
81
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
82
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
83
|
+
(0, class_validator_1.IsEnum)(incident_app_id_enum_1.IncidentAppId),
|
|
84
|
+
__metadata("design:type", Object)
|
|
85
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "appId", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: 'G4S Kenya Ltd' }),
|
|
88
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
89
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
(0, class_validator_1.MaxLength)(100),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "companyName", void 0);
|
|
94
|
+
__decorate([
|
|
95
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: 'G4S Kenya' }),
|
|
96
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
97
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
98
|
+
(0, class_validator_1.IsString)(),
|
|
99
|
+
(0, class_validator_1.MaxLength)(60),
|
|
100
|
+
__metadata("design:type", Object)
|
|
101
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "appName", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, description: 'HTTPS only: email clients block anything else.' }),
|
|
104
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
105
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
106
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
107
|
+
(0, class_validator_1.MaxLength)(500),
|
|
108
|
+
__metadata("design:type", Object)
|
|
109
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "logoUrl", void 0);
|
|
110
|
+
__decorate([
|
|
111
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: '#FC1B23' }),
|
|
112
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
113
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
114
|
+
(0, class_validator_1.Matches)(notification_sender_const_1.BRAND_COLOUR_PATTERN, { message: `primaryColour ${COLOUR_MESSAGE}` }),
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "primaryColour", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, description: 'Derived from the primary colour when omitted.' }),
|
|
119
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
120
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
121
|
+
(0, class_validator_1.Matches)(notification_sender_const_1.BRAND_COLOUR_PATTERN, { message: `primaryColourDark ${COLOUR_MESSAGE}` }),
|
|
122
|
+
__metadata("design:type", Object)
|
|
123
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "primaryColourDark", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: '#101010' }),
|
|
126
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
127
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
128
|
+
(0, class_validator_1.Matches)(notification_sender_const_1.BRAND_COLOUR_PATTERN, { message: `accentColour ${COLOUR_MESSAGE}` }),
|
|
129
|
+
__metadata("design:type", Object)
|
|
130
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "accentColour", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
133
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
134
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
135
|
+
(0, class_validator_1.IsString)(),
|
|
136
|
+
(0, class_validator_1.MaxLength)(255),
|
|
137
|
+
__metadata("design:type", Object)
|
|
138
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "physicalAddress", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: '+254 709 555 000' }),
|
|
141
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
142
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
143
|
+
(0, class_validator_1.IsString)(),
|
|
144
|
+
(0, class_validator_1.Matches)(/^[+0-9 ()-]{5,30}$/, { message: 'phoneNumber may contain digits, spaces, +, ( ) and - only' }),
|
|
145
|
+
__metadata("design:type", Object)
|
|
146
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "phoneNumber", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
149
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
150
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
151
|
+
(0, class_validator_1.IsEmail)(),
|
|
152
|
+
(0, class_validator_1.MaxLength)(254),
|
|
153
|
+
__metadata("design:type", Object)
|
|
154
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "contactEmail", void 0);
|
|
155
|
+
__decorate([
|
|
156
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
157
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
158
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
159
|
+
(0, class_validator_1.IsEmail)(),
|
|
160
|
+
(0, class_validator_1.MaxLength)(254),
|
|
161
|
+
__metadata("design:type", Object)
|
|
162
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "supportEmail", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
165
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
166
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
167
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
168
|
+
(0, class_validator_1.MaxLength)(255),
|
|
169
|
+
__metadata("design:type", Object)
|
|
170
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "websiteUrl", void 0);
|
|
171
|
+
__decorate([
|
|
172
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
173
|
+
nullable: true,
|
|
174
|
+
description: 'Where links in a notification point. Plain http is accepted so a local client can be targeted.',
|
|
175
|
+
}),
|
|
176
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
177
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
178
|
+
(0, class_validator_1.IsUrl)({ protocols: ['http', 'https'], require_protocol: true, require_tld: false }),
|
|
179
|
+
(0, class_validator_1.MaxLength)(255),
|
|
180
|
+
__metadata("design:type", Object)
|
|
181
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "clientBaseUrl", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, swagger_1.ApiPropertyOptional)({ type: NotificationSocialLinksDto, nullable: true }),
|
|
184
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
185
|
+
(0, class_validator_1.ValidateNested)(),
|
|
186
|
+
(0, class_transformer_1.Type)(() => NotificationSocialLinksDto),
|
|
187
|
+
__metadata("design:type", Object)
|
|
188
|
+
], UpsertOrganizationNotificationBrandingDto.prototype, "social", void 0);
|
|
189
|
+
class CreateOrganizationEmailSenderDto {
|
|
190
|
+
}
|
|
191
|
+
exports.CreateOrganizationEmailSenderDto = CreateOrganizationEmailSenderDto;
|
|
192
|
+
__decorate([
|
|
193
|
+
(0, swagger_1.ApiProperty)({ example: 'notifications@ke.g4s.com', description: 'The address mail is sent from.' }),
|
|
194
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim().toLowerCase() : value)),
|
|
195
|
+
(0, class_validator_1.IsEmail)(),
|
|
196
|
+
(0, class_validator_1.MaxLength)(254),
|
|
197
|
+
__metadata("design:type", String)
|
|
198
|
+
], CreateOrganizationEmailSenderDto.prototype, "fromEmail", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, example: 'G4S Kenya', description: 'Falls back to the company name.' }),
|
|
201
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
202
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
203
|
+
(0, class_validator_1.IsString)(),
|
|
204
|
+
(0, class_validator_1.MaxLength)(100)
|
|
205
|
+
// A display name is interpolated into the From header; a line break there is header injection.
|
|
206
|
+
,
|
|
207
|
+
(0, class_validator_1.Matches)(/^[^\r\n<>"]*$/, { message: 'fromName may not contain line breaks, quotes or angle brackets' }),
|
|
208
|
+
__metadata("design:type", Object)
|
|
209
|
+
], CreateOrganizationEmailSenderDto.prototype, "fromName", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, description: 'Falls back to fromEmail.' }),
|
|
212
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
213
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
214
|
+
(0, class_validator_1.IsEmail)(),
|
|
215
|
+
(0, class_validator_1.MaxLength)(254),
|
|
216
|
+
__metadata("design:type", Object)
|
|
217
|
+
], CreateOrganizationEmailSenderDto.prototype, "replyTo", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Make this the sender used by default. The first sender always is.' }),
|
|
220
|
+
(0, class_validator_1.IsBoolean)(),
|
|
221
|
+
(0, class_validator_1.IsOptional)(),
|
|
222
|
+
__metadata("design:type", Boolean)
|
|
223
|
+
], CreateOrganizationEmailSenderDto.prototype, "isDefault", void 0);
|
|
224
|
+
class UpdateOrganizationEmailSenderDto {
|
|
225
|
+
}
|
|
226
|
+
exports.UpdateOrganizationEmailSenderDto = UpdateOrganizationEmailSenderDto;
|
|
227
|
+
__decorate([
|
|
228
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
229
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
230
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
231
|
+
(0, class_validator_1.IsString)(),
|
|
232
|
+
(0, class_validator_1.MaxLength)(100),
|
|
233
|
+
(0, class_validator_1.Matches)(/^[^\r\n<>"]*$/, { message: 'fromName may not contain line breaks, quotes or angle brackets' }),
|
|
234
|
+
__metadata("design:type", Object)
|
|
235
|
+
], UpdateOrganizationEmailSenderDto.prototype, "fromName", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
238
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
239
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
240
|
+
(0, class_validator_1.IsEmail)(),
|
|
241
|
+
(0, class_validator_1.MaxLength)(254),
|
|
242
|
+
__metadata("design:type", Object)
|
|
243
|
+
], UpdateOrganizationEmailSenderDto.prototype, "replyTo", void 0);
|
|
244
|
+
__decorate([
|
|
245
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
246
|
+
(0, class_validator_1.IsBoolean)(),
|
|
247
|
+
(0, class_validator_1.IsOptional)(),
|
|
248
|
+
__metadata("design:type", Boolean)
|
|
249
|
+
], UpdateOrganizationEmailSenderDto.prototype, "isDefault", void 0);
|
|
250
|
+
__decorate([
|
|
251
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
252
|
+
(0, class_validator_1.IsBoolean)(),
|
|
253
|
+
(0, class_validator_1.IsOptional)(),
|
|
254
|
+
__metadata("design:type", Boolean)
|
|
255
|
+
], UpdateOrganizationEmailSenderDto.prototype, "active", void 0);
|
|
256
|
+
class CreateOrganizationSmsSenderDto {
|
|
257
|
+
}
|
|
258
|
+
exports.CreateOrganizationSmsSenderDto = CreateOrganizationSmsSenderDto;
|
|
259
|
+
__decorate([
|
|
260
|
+
(0, swagger_1.ApiProperty)({ enum: sms_provider_name_enum_1.SmsProviderName, description: 'The provider account the sender is registered with.' }),
|
|
261
|
+
(0, class_validator_1.IsEnum)(sms_provider_name_enum_1.SmsProviderName),
|
|
262
|
+
__metadata("design:type", String)
|
|
263
|
+
], CreateOrganizationSmsSenderDto.prototype, "provider", void 0);
|
|
264
|
+
__decorate([
|
|
265
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
266
|
+
enum: country_code_enum_1.CountryCode,
|
|
267
|
+
nullable: true,
|
|
268
|
+
description: 'Destination country the sender is registered for. Omit for every country the provider serves.',
|
|
269
|
+
}),
|
|
270
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
271
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
272
|
+
(0, class_validator_1.IsEnum)(country_code_enum_1.CountryCode),
|
|
273
|
+
__metadata("design:type", Object)
|
|
274
|
+
], CreateOrganizationSmsSenderDto.prototype, "countryCode", void 0);
|
|
275
|
+
__decorate([
|
|
276
|
+
(0, swagger_1.ApiProperty)({ enum: sms_sender_type_enum_1.SmsSenderType }),
|
|
277
|
+
(0, class_validator_1.IsEnum)(sms_sender_type_enum_1.SmsSenderType),
|
|
278
|
+
__metadata("design:type", String)
|
|
279
|
+
], CreateOrganizationSmsSenderDto.prototype, "senderType", void 0);
|
|
280
|
+
__decorate([
|
|
281
|
+
(0, swagger_1.ApiProperty)({ example: 'G4S', description: 'Validated against senderType by the service.' }),
|
|
282
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
|
|
283
|
+
(0, class_validator_1.IsString)(),
|
|
284
|
+
(0, class_validator_1.MaxLength)(40),
|
|
285
|
+
__metadata("design:type", String)
|
|
286
|
+
], CreateOrganizationSmsSenderDto.prototype, "senderId", void 0);
|
|
287
|
+
__decorate([
|
|
288
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true, description: 'Registration reference or anything the operator needs later.' }),
|
|
289
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
290
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
291
|
+
(0, class_validator_1.IsString)(),
|
|
292
|
+
(0, class_validator_1.MaxLength)(500),
|
|
293
|
+
__metadata("design:type", Object)
|
|
294
|
+
], CreateOrganizationSmsSenderDto.prototype, "notes", void 0);
|
|
295
|
+
class UpdateOrganizationSmsSenderDto {
|
|
296
|
+
}
|
|
297
|
+
exports.UpdateOrganizationSmsSenderDto = UpdateOrganizationSmsSenderDto;
|
|
298
|
+
__decorate([
|
|
299
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: country_code_enum_1.CountryCode, nullable: true }),
|
|
300
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
301
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
302
|
+
(0, class_validator_1.IsEnum)(country_code_enum_1.CountryCode),
|
|
303
|
+
__metadata("design:type", Object)
|
|
304
|
+
], UpdateOrganizationSmsSenderDto.prototype, "countryCode", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
(0, swagger_1.ApiPropertyOptional)({ enum: sms_sender_type_enum_1.SmsSenderType }),
|
|
307
|
+
(0, class_validator_1.IsEnum)(sms_sender_type_enum_1.SmsSenderType),
|
|
308
|
+
(0, class_validator_1.IsOptional)(),
|
|
309
|
+
__metadata("design:type", String)
|
|
310
|
+
], UpdateOrganizationSmsSenderDto.prototype, "senderType", void 0);
|
|
311
|
+
__decorate([
|
|
312
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Changing the value sends the sender back to PENDING.' }),
|
|
313
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim() : value)),
|
|
314
|
+
(0, class_validator_1.IsString)(),
|
|
315
|
+
(0, class_validator_1.MaxLength)(40),
|
|
316
|
+
(0, class_validator_1.IsOptional)(),
|
|
317
|
+
__metadata("design:type", String)
|
|
318
|
+
], UpdateOrganizationSmsSenderDto.prototype, "senderId", void 0);
|
|
319
|
+
__decorate([
|
|
320
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
321
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
322
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
323
|
+
(0, class_validator_1.IsString)(),
|
|
324
|
+
(0, class_validator_1.MaxLength)(500),
|
|
325
|
+
__metadata("design:type", Object)
|
|
326
|
+
], UpdateOrganizationSmsSenderDto.prototype, "notes", void 0);
|
|
327
|
+
/** Platform operators only: records the outcome of registering the sender with the provider. */
|
|
328
|
+
class ReviewOrganizationSmsSenderDto {
|
|
329
|
+
}
|
|
330
|
+
exports.ReviewOrganizationSmsSenderDto = ReviewOrganizationSmsSenderDto;
|
|
331
|
+
__decorate([
|
|
332
|
+
(0, swagger_1.ApiProperty)({ enum: notification_sender_status_enum_1.NotificationSenderStatus }),
|
|
333
|
+
(0, class_validator_1.IsEnum)(notification_sender_status_enum_1.NotificationSenderStatus),
|
|
334
|
+
__metadata("design:type", String)
|
|
335
|
+
], ReviewOrganizationSmsSenderDto.prototype, "status", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
(0, swagger_1.ApiPropertyOptional)({ nullable: true }),
|
|
338
|
+
(0, class_transformer_1.Transform)(emptyToNull),
|
|
339
|
+
(0, class_validator_1.ValidateIf)(whenPresent),
|
|
340
|
+
(0, class_validator_1.IsString)(),
|
|
341
|
+
(0, class_validator_1.MaxLength)(500),
|
|
342
|
+
__metadata("design:type", Object)
|
|
343
|
+
], ReviewOrganizationSmsSenderDto.prototype, "notes", void 0);
|
|
344
|
+
class SendTestNotificationEmailDto {
|
|
345
|
+
}
|
|
346
|
+
exports.SendTestNotificationEmailDto = SendTestNotificationEmailDto;
|
|
347
|
+
__decorate([
|
|
348
|
+
(0, swagger_1.ApiProperty)({ description: 'Where the branded test email goes.' }),
|
|
349
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.trim().toLowerCase() : value)),
|
|
350
|
+
(0, class_validator_1.IsEmail)(),
|
|
351
|
+
(0, class_validator_1.MaxLength)(254),
|
|
352
|
+
__metadata("design:type", String)
|
|
353
|
+
], SendTestNotificationEmailDto.prototype, "to", void 0);
|
|
354
|
+
//# sourceMappingURL=organization-notification-settings.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-notification-settings.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/dtos/organization-notification-settings.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAoD;AACpD,qDAWyB;AACzB,6EAAoE;AACpE,oFAA0E;AAC1E,sFAA8E;AAC9E,8FAAoF;AACpF,4EAAkE;AAClE,wEAA8D;AAE9D;;;;;GAKG;AACH,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE,CAClD,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;AAE/G,uGAAuG;AACvG,MAAM,WAAW,GAAG,CAAC,CAAU,EAAE,KAAc,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;AAE1F,MAAM,UAAU,GAAG,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;AACpE,MAAM,cAAc,GAAG,4CAA4C,CAAC;AAEpE,MAAa,0BAA0B;CAgBtC;AAhBD,gEAgBC;AAbG;IAFC,IAAA,6BAAmB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,IAAA,6BAAS,EAAC,WAAW,CAAC;IAAE,IAAA,4BAAU,EAAC,WAAW,CAAC;IAAE,IAAA,uBAAK,EAAC,UAAU,CAAC;IAAE,IAAA,2BAAS,EAAC,GAAG,CAAC;;4DAC1D;AAIzB;IAFC,IAAA,6BAAmB,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvC,IAAA,6BAAS,EAAC,WAAW,CA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,qBAAW,EAAC,EAAE,WAAW,EAAE,oCAAoC,EAAE,CAAC;IAClE,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC1F,IAAA,yBAAO,GAAE;IAAE,IAAA,2BAAS,EAAC,GAAG,CAAC;;wDACd"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingDocumentType = exports.BillingEmailTemplate = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* The emails clarion-billing can ask clarion-notification to send.
|
|
6
|
+
*
|
|
7
|
+
* A closed set on purpose. The route renders a template BY NAME on the say-so of
|
|
8
|
+
* another service; accepting any string would let a caller render any template in
|
|
9
|
+
* the notification service (an OTP email, a password reset) with a body of its
|
|
10
|
+
* choosing. Each value here has copy defaults in the notification service - add
|
|
11
|
+
* the value and the defaults together.
|
|
12
|
+
*/
|
|
13
|
+
var BillingEmailTemplate;
|
|
14
|
+
(function (BillingEmailTemplate) {
|
|
15
|
+
/** An invoice or settlement invoice is ready. Normally carries the PDF. */
|
|
16
|
+
BillingEmailTemplate["INVOICE"] = "billing_invoice";
|
|
17
|
+
/** A payment was received. Normally carries the receipt PDF. */
|
|
18
|
+
BillingEmailTemplate["RECEIPT"] = "billing_receipt";
|
|
19
|
+
/** A corporate order was placed or confirmed. */
|
|
20
|
+
BillingEmailTemplate["ORDER_CONFIRMATION"] = "billing_order_confirmation";
|
|
21
|
+
/** Anything else billing needs to say; the caller supplies heading and intro. */
|
|
22
|
+
BillingEmailTemplate["GENERIC"] = "billing_generic";
|
|
23
|
+
})(BillingEmailTemplate || (exports.BillingEmailTemplate = BillingEmailTemplate = {}));
|
|
24
|
+
/** What a referenced billing document is. Mirrors the documents clarion-billing stores in clarion-dms. */
|
|
25
|
+
var BillingDocumentType;
|
|
26
|
+
(function (BillingDocumentType) {
|
|
27
|
+
BillingDocumentType["INVOICE"] = "INVOICE";
|
|
28
|
+
BillingDocumentType["RECEIPT"] = "RECEIPT";
|
|
29
|
+
BillingDocumentType["CORPORATE_ORDER"] = "CORPORATE_ORDER";
|
|
30
|
+
BillingDocumentType["SETTLEMENT_INVOICE"] = "SETTLEMENT_INVOICE";
|
|
31
|
+
BillingDocumentType["SETTLEMENT_RECEIPT"] = "SETTLEMENT_RECEIPT";
|
|
32
|
+
})(BillingDocumentType || (exports.BillingDocumentType = BillingDocumentType = {}));
|
|
33
|
+
//# sourceMappingURL=billing-notification.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-notification.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/billing-notification.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,IAAY,oBASX;AATD,WAAY,oBAAoB;IAC5B,2EAA2E;IAC3E,mDAA2B,CAAA;IAC3B,gEAAgE;IAChE,mDAA2B,CAAA;IAC3B,iDAAiD;IACjD,yEAAiD,CAAA;IACjD,iFAAiF;IACjF,mDAA2B,CAAA;AAC/B,CAAC,EATW,oBAAoB,oCAApB,oBAAoB,QAS/B;AAED,0GAA0G;AAC1G,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,0DAAmC,CAAA;IACnC,gEAAyC,CAAA;IACzC,gEAAyC,CAAA;AAC7C,CAAC,EANW,mBAAmB,mCAAnB,mBAAmB,QAM9B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailSenderVerificationMethod = exports.EmailSenderVerificationStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Whether an email provider will accept mail FROM an organization's address.
|
|
6
|
+
*
|
|
7
|
+
* Tracked per provider because the answer differs per provider: an address can be
|
|
8
|
+
* a verified sender in Twilio SendGrid while its domain is unknown to Mailgun.
|
|
9
|
+
* A provider only ever sends from an address it has VERIFIED; for every other
|
|
10
|
+
* state that provider falls back to the platform sender (keeping the
|
|
11
|
+
* organization's display name and reply-to), so a half-configured organization
|
|
12
|
+
* never loses mail to an "unverified sender" rejection.
|
|
13
|
+
*/
|
|
14
|
+
var EmailSenderVerificationStatus;
|
|
15
|
+
(function (EmailSenderVerificationStatus) {
|
|
16
|
+
/** The provider does not know this address or its domain. */
|
|
17
|
+
EmailSenderVerificationStatus["UNVERIFIED"] = "UNVERIFIED";
|
|
18
|
+
/** Verification was started and is waiting on the owner (inbox click or DNS records). */
|
|
19
|
+
EmailSenderVerificationStatus["PENDING"] = "PENDING";
|
|
20
|
+
/** The provider accepts mail from this address. */
|
|
21
|
+
EmailSenderVerificationStatus["VERIFIED"] = "VERIFIED";
|
|
22
|
+
/** The last check could not be completed (provider error); the previous answer no longer holds. */
|
|
23
|
+
EmailSenderVerificationStatus["FAILED"] = "FAILED";
|
|
24
|
+
})(EmailSenderVerificationStatus || (exports.EmailSenderVerificationStatus = EmailSenderVerificationStatus = {}));
|
|
25
|
+
/** How the provider recognises the address. */
|
|
26
|
+
var EmailSenderVerificationMethod;
|
|
27
|
+
(function (EmailSenderVerificationMethod) {
|
|
28
|
+
/** The exact address was verified on its own (SendGrid Single Sender Verification). */
|
|
29
|
+
EmailSenderVerificationMethod["SINGLE_SENDER"] = "SINGLE_SENDER";
|
|
30
|
+
/** The whole domain is authenticated (SendGrid domain authentication, Mailgun domain). */
|
|
31
|
+
EmailSenderVerificationMethod["DOMAIN"] = "DOMAIN";
|
|
32
|
+
})(EmailSenderVerificationMethod || (exports.EmailSenderVerificationMethod = EmailSenderVerificationMethod = {}));
|
|
33
|
+
//# sourceMappingURL=email-sender-verification.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"email-sender-verification.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/email-sender-verification.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;GASG;AACH,IAAY,6BASX;AATD,WAAY,6BAA6B;IACrC,6DAA6D;IAC7D,0DAAyB,CAAA;IACzB,yFAAyF;IACzF,oDAAmB,CAAA;IACnB,mDAAmD;IACnD,sDAAqB,CAAA;IACrB,mGAAmG;IACnG,kDAAiB,CAAA;AACrB,CAAC,EATW,6BAA6B,6CAA7B,6BAA6B,QASxC;AAED,+CAA+C;AAC/C,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACrC,uFAAuF;IACvF,gEAA+B,CAAA;IAC/B,0FAA0F;IAC1F,kDAAiB,CAAA;AACrB,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationBrandingSource = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Where one resolved branding value came from. Branding is resolved field by
|
|
6
|
+
* field, highest precedence first, so a half-filled profile still produces a
|
|
7
|
+
* complete email:
|
|
8
|
+
*
|
|
9
|
+
* PROFILE the organization's notification settings
|
|
10
|
+
* ORGANIZATION the organization record (clarion-organization)
|
|
11
|
+
* APP_DEFAULT the legacy per-app defaults (deprecated; kept so nothing
|
|
12
|
+
* changes for an organization that has configured nothing)
|
|
13
|
+
* PLATFORM_DEFAULT the platform's own branding
|
|
14
|
+
*/
|
|
15
|
+
var NotificationBrandingSource;
|
|
16
|
+
(function (NotificationBrandingSource) {
|
|
17
|
+
NotificationBrandingSource["PROFILE"] = "PROFILE";
|
|
18
|
+
NotificationBrandingSource["ORGANIZATION"] = "ORGANIZATION";
|
|
19
|
+
NotificationBrandingSource["APP_DEFAULT"] = "APP_DEFAULT";
|
|
20
|
+
NotificationBrandingSource["PLATFORM_DEFAULT"] = "PLATFORM_DEFAULT";
|
|
21
|
+
})(NotificationBrandingSource || (exports.NotificationBrandingSource = NotificationBrandingSource = {}));
|
|
22
|
+
//# sourceMappingURL=notification-branding-source.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-branding-source.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification-branding-source.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;GAUG;AACH,IAAY,0BAKX;AALD,WAAY,0BAA0B;IAClC,iDAAmB,CAAA;IACnB,2DAA6B,CAAA;IAC7B,yDAA2B,CAAA;IAC3B,mEAAqC,CAAA;AACzC,CAAC,EALW,0BAA0B,0CAA1B,0BAA0B,QAKrC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationSenderSource = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Whose identity a message actually went out under. Recorded on every delivery
|
|
6
|
+
* log so "why did this customer get an Upesy-branded SMS?" is a query, not a guess.
|
|
7
|
+
*/
|
|
8
|
+
var NotificationSenderSource;
|
|
9
|
+
(function (NotificationSenderSource) {
|
|
10
|
+
/** The organization's own verified email address / active SMS sender. */
|
|
11
|
+
NotificationSenderSource["ORGANIZATION"] = "ORGANIZATION";
|
|
12
|
+
/** The platform's default (country-aware) sender. */
|
|
13
|
+
NotificationSenderSource["PLATFORM_DEFAULT"] = "PLATFORM_DEFAULT";
|
|
14
|
+
})(NotificationSenderSource || (exports.NotificationSenderSource = NotificationSenderSource = {}));
|
|
15
|
+
//# sourceMappingURL=notification-sender-source.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-sender-source.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification-sender-source.enum.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAChC,yEAAyE;IACzE,yDAA6B,CAAA;IAC7B,qDAAqD;IACrD,iEAAqC,CAAA;AACzC,CAAC,EALW,wBAAwB,wCAAxB,wBAAwB,QAKnC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationSenderStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Lifecycle of an organization-owned SMS sender.
|
|
6
|
+
*
|
|
7
|
+
* A sender ID only works once the provider (and, behind it, the telco) has
|
|
8
|
+
* registered it, which happens outside Clarion. So an organization REQUESTS a
|
|
9
|
+
* sender and a platform operator ACTIVATES it after the registration is real.
|
|
10
|
+
* Only ACTIVE senders are ever used to send; every other state falls back to the
|
|
11
|
+
* platform's country-aware default sender.
|
|
12
|
+
*/
|
|
13
|
+
var NotificationSenderStatus;
|
|
14
|
+
(function (NotificationSenderStatus) {
|
|
15
|
+
/** Requested by the organization; not yet confirmed as registered with the provider. */
|
|
16
|
+
NotificationSenderStatus["PENDING"] = "PENDING";
|
|
17
|
+
/** Registered with the provider and in use. */
|
|
18
|
+
NotificationSenderStatus["ACTIVE"] = "ACTIVE";
|
|
19
|
+
/** Temporarily taken out of use (e.g. the telco suspended it). Kept for history. */
|
|
20
|
+
NotificationSenderStatus["SUSPENDED"] = "SUSPENDED";
|
|
21
|
+
/** The provider or the operator refused the registration. */
|
|
22
|
+
NotificationSenderStatus["REJECTED"] = "REJECTED";
|
|
23
|
+
})(NotificationSenderStatus || (exports.NotificationSenderStatus = NotificationSenderStatus = {}));
|
|
24
|
+
//# sourceMappingURL=notification-sender-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-sender-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/notification-sender-status.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;GAQG;AACH,IAAY,wBASX;AATD,WAAY,wBAAwB;IAChC,wFAAwF;IACxF,+CAAmB,CAAA;IACnB,+CAA+C;IAC/C,6CAAiB,CAAA;IACjB,oFAAoF;IACpF,mDAAuB,CAAA;IACvB,6DAA6D;IAC7D,iDAAqB,CAAA;AACzB,CAAC,EATW,wBAAwB,wCAAxB,wBAAwB,QASnC"}
|
|
@@ -4,11 +4,16 @@ exports.SmsProviderName = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* Identifiers for the SMS providers the notification service can dispatch through.
|
|
6
6
|
* Provider order/fallback is configuration-driven; new providers can be appended.
|
|
7
|
+
*
|
|
8
|
+
* A code here only RESERVES the name. Whether a provider can actually be used is
|
|
9
|
+
* answered by the notification service's provider catalog
|
|
10
|
+
* (`SmsProviderDescriptor`), which lists only providers with a registered adapter.
|
|
7
11
|
*/
|
|
8
12
|
var SmsProviderName;
|
|
9
13
|
(function (SmsProviderName) {
|
|
10
14
|
SmsProviderName["TWILIO"] = "twilio";
|
|
11
15
|
SmsProviderName["UWAZII"] = "uwazii";
|
|
12
16
|
SmsProviderName["AFRICASTALKING"] = "africastalking";
|
|
17
|
+
SmsProviderName["CELCOM"] = "celcom";
|
|
13
18
|
})(SmsProviderName || (exports.SmsProviderName = SmsProviderName = {}));
|
|
14
19
|
//# sourceMappingURL=sms-provider-name.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sms-provider-name.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/sms-provider-name.enum.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"sms-provider-name.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/sms-provider-name.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;IACjB,oDAAiC,CAAA;IACjC,oCAAiB,CAAA;AACrB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SmsSenderType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* What kind of identity an SMS is sent from.
|
|
6
|
+
*
|
|
7
|
+
* The type decides how the value is validated and how a provider is handed it:
|
|
8
|
+
* an alphanumeric name and a phone number both travel as the provider's "from",
|
|
9
|
+
* while a Twilio Messaging Service SID replaces the from entirely.
|
|
10
|
+
*/
|
|
11
|
+
var SmsSenderType;
|
|
12
|
+
(function (SmsSenderType) {
|
|
13
|
+
/** A registered alphanumeric sender name, e.g. `G4S`. At most 11 characters. */
|
|
14
|
+
SmsSenderType["ALPHANUMERIC"] = "ALPHANUMERIC";
|
|
15
|
+
/** An E.164 long number, e.g. `+254711000000`. */
|
|
16
|
+
SmsSenderType["PHONE_NUMBER"] = "PHONE_NUMBER";
|
|
17
|
+
/** A telco short code, e.g. `22384`. */
|
|
18
|
+
SmsSenderType["SHORT_CODE"] = "SHORT_CODE";
|
|
19
|
+
/** A provider-side sender pool (Twilio Messaging Service SID, `MG…`). */
|
|
20
|
+
SmsSenderType["MESSAGING_SERVICE"] = "MESSAGING_SERVICE";
|
|
21
|
+
})(SmsSenderType || (exports.SmsSenderType = SmsSenderType = {}));
|
|
22
|
+
//# sourceMappingURL=sms-sender-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sms-sender-type.enum.js","sourceRoot":"","sources":["../../../../../src/modules/notification/enums/sms-sender-type.enum.ts"],"names":[],"mappings":";;;AAAA;;;;;;GAMG;AACH,IAAY,aASX;AATD,WAAY,aAAa;IACrB,gFAAgF;IAChF,8CAA6B,CAAA;IAC7B,kDAAkD;IAClD,8CAA6B,CAAA;IAC7B,wCAAwC;IACxC,0CAAyB,CAAA;IACzB,yEAAyE;IACzE,wDAAuC,CAAA;AAC3C,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB"}
|
|
@@ -20,6 +20,11 @@ __exportStar(require("./enums/sms-provider-name.enum"), exports);
|
|
|
20
20
|
__exportStar(require("./enums/email-provider-name.enum"), exports);
|
|
21
21
|
__exportStar(require("./enums/notification-overall-status.enum"), exports);
|
|
22
22
|
__exportStar(require("./enums/provider-failure-reason.enum"), exports);
|
|
23
|
+
__exportStar(require("./enums/sms-sender-type.enum"), exports);
|
|
24
|
+
__exportStar(require("./enums/notification-sender-status.enum"), exports);
|
|
25
|
+
__exportStar(require("./enums/email-sender-verification.enum"), exports);
|
|
26
|
+
__exportStar(require("./enums/notification-sender-source.enum"), exports);
|
|
27
|
+
__exportStar(require("./enums/notification-branding-source.enum"), exports);
|
|
23
28
|
// Result/interface contracts (display-safe)
|
|
24
29
|
__exportStar(require("./interfaces/provider-attempt"), exports);
|
|
25
30
|
__exportStar(require("./interfaces/per-channel-result"), exports);
|
|
@@ -29,4 +34,13 @@ __exportStar(require("./interfaces/notification-dispatch-result"), exports);
|
|
|
29
34
|
// Backend/service-level request contracts
|
|
30
35
|
__exportStar(require("./interfaces/sms-send-request"), exports);
|
|
31
36
|
__exportStar(require("./interfaces/email-send-request"), exports);
|
|
37
|
+
// Organization notification settings (branding + sender identity)
|
|
38
|
+
__exportStar(require("./interfaces/organization-notification-settings"), exports);
|
|
39
|
+
__exportStar(require("./dtos/organization-notification-settings.dto"), exports);
|
|
40
|
+
__exportStar(require("./constants/notification-sender.const"), exports);
|
|
41
|
+
__exportStar(require("./utils/notification-sender.util"), exports);
|
|
42
|
+
// clarion-billing -> clarion-notification HTTP contract (POST /billing/notifications/*)
|
|
43
|
+
__exportStar(require("./enums/billing-notification.enum"), exports);
|
|
44
|
+
__exportStar(require("./dtos/billing-notification.dto"), exports);
|
|
45
|
+
__exportStar(require("./interfaces/billing-notification-result"), exports);
|
|
32
46
|
//# 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;
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-notification-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/billing-notification-result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-notification-settings.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/organization-notification-settings.ts"],"names":[],"mappings":""}
|