grm-shared-library 1.1.212 → 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/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/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/index.js +4 -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/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/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/index.js +4 -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/types/modules/notification/dtos/billing-notification.dto.d.ts +56 -0
- package/dist/types/modules/notification/enums/billing-notification.enum.d.ts +27 -0
- package/dist/types/modules/notification/index.d.ts +3 -0
- package/dist/types/modules/notification/interfaces/billing-notification-result.d.ts +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,213 @@
|
|
|
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.BillingSmsNotificationDto = exports.BillingPushNotificationDto = exports.BillingEmailNotificationDto = exports.BillingEmailAttachmentDto = exports.BillingDocumentReferenceDto = 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 billing_notification_enum_1 = require("../enums/billing-notification.enum");
|
|
17
|
+
/**
|
|
18
|
+
* clarion-billing -> clarion-notification, over HTTP.
|
|
19
|
+
*
|
|
20
|
+
* Most billing notifications travel as Kafka events. These three routes exist for
|
|
21
|
+
* the cases where billing wants to know, synchronously, whether the message left:
|
|
22
|
+
* `POST /billing/notifications/email | push | sms`.
|
|
23
|
+
*
|
|
24
|
+
* Every limit here is a guard on a route that turns a request into outbound
|
|
25
|
+
* traffic on somebody's behalf, not a tuning choice.
|
|
26
|
+
*/
|
|
27
|
+
/** No line breaks: the value is placed in a header (Subject) or a filename. */
|
|
28
|
+
const SINGLE_LINE = /^[^\r\n]*$/;
|
|
29
|
+
/** A bare file name - no directory part, so it can never be read as a path. */
|
|
30
|
+
const FILE_NAME = /^[^\\/\r\n\0]+$/;
|
|
31
|
+
const HTTPS_ONLY = { protocols: ['https'], require_protocol: true };
|
|
32
|
+
const toArray = ({ value }) => (value === undefined || value === null || Array.isArray(value) ? value : [value]);
|
|
33
|
+
class BillingDocumentReferenceDto {
|
|
34
|
+
}
|
|
35
|
+
exports.BillingDocumentReferenceDto = BillingDocumentReferenceDto;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, swagger_1.ApiProperty)({ description: 'The clarion-dms document id.' }),
|
|
38
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
39
|
+
(0, class_validator_1.IsInt)(),
|
|
40
|
+
(0, class_validator_1.IsPositive)(),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], BillingDocumentReferenceDto.prototype, "documentId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, swagger_1.ApiProperty)({ enum: billing_notification_enum_1.BillingDocumentType }),
|
|
45
|
+
(0, class_validator_1.IsEnum)(billing_notification_enum_1.BillingDocumentType),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], BillingDocumentReferenceDto.prototype, "documentType", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, swagger_1.ApiPropertyOptional)({ example: 'INV-2026-000123.pdf' }),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
(0, class_validator_1.MaxLength)(150),
|
|
52
|
+
(0, class_validator_1.Matches)(FILE_NAME, { message: 'fileName must be a bare file name' }),
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], BillingDocumentReferenceDto.prototype, "fileName", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
58
|
+
description: 'A pre-signed URL for the document. WITH it the PDF is fetched and attached; WITHOUT it the document ' +
|
|
59
|
+
'is only named in the email. Billing documents are private and their signed URLs expire within the hour, ' +
|
|
60
|
+
'so the URL is never placed in the email itself.',
|
|
61
|
+
}),
|
|
62
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
63
|
+
(0, class_validator_1.MaxLength)(2048),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], BillingDocumentReferenceDto.prototype, "signedUrl", void 0);
|
|
67
|
+
/** @deprecated Raw attachments. Prefer `documents`. */
|
|
68
|
+
class BillingEmailAttachmentDto {
|
|
69
|
+
}
|
|
70
|
+
exports.BillingEmailAttachmentDto = BillingEmailAttachmentDto;
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, swagger_1.ApiProperty)(),
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
74
|
+
(0, class_validator_1.MaxLength)(150),
|
|
75
|
+
(0, class_validator_1.Matches)(FILE_NAME, { message: 'filename must be a bare file name' }),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], BillingEmailAttachmentDto.prototype, "filename", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
80
|
+
(0, class_validator_1.IsUrl)(HTTPS_ONLY),
|
|
81
|
+
(0, class_validator_1.MaxLength)(2048),
|
|
82
|
+
(0, class_validator_1.IsOptional)(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], BillingEmailAttachmentDto.prototype, "url", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Base64. About 10 MB of file at most.' }),
|
|
87
|
+
(0, class_validator_1.IsBase64)(),
|
|
88
|
+
(0, class_validator_1.MaxLength)(14000000),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], BillingEmailAttachmentDto.prototype, "content", void 0);
|
|
92
|
+
class BillingEmailNotificationDto {
|
|
93
|
+
}
|
|
94
|
+
exports.BillingEmailNotificationDto = BillingEmailNotificationDto;
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, swagger_1.ApiProperty)({ type: [String], description: 'One address or several. Each recipient gets an individual email.' }),
|
|
97
|
+
(0, class_transformer_1.Transform)(toArray),
|
|
98
|
+
(0, class_validator_1.IsArray)(),
|
|
99
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
100
|
+
(0, class_validator_1.ArrayMaxSize)(50),
|
|
101
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
102
|
+
(0, class_validator_1.IsEmail)({}, { each: true }),
|
|
103
|
+
__metadata("design:type", Array)
|
|
104
|
+
], BillingEmailNotificationDto.prototype, "to", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, swagger_1.ApiProperty)(),
|
|
107
|
+
(0, class_validator_1.IsString)(),
|
|
108
|
+
(0, class_validator_1.MinLength)(1),
|
|
109
|
+
(0, class_validator_1.MaxLength)(200),
|
|
110
|
+
(0, class_validator_1.Matches)(SINGLE_LINE, { message: 'subject may not contain line breaks' }),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], BillingEmailNotificationDto.prototype, "subject", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, swagger_1.ApiProperty)({ enum: billing_notification_enum_1.BillingEmailTemplate }),
|
|
115
|
+
(0, class_validator_1.IsEnum)(billing_notification_enum_1.BillingEmailTemplate),
|
|
116
|
+
__metadata("design:type", String)
|
|
117
|
+
], BillingEmailNotificationDto.prototype, "template", void 0);
|
|
118
|
+
__decorate([
|
|
119
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
120
|
+
description: 'The organization the email is sent on behalf of: decides the branding and the From address.',
|
|
121
|
+
}),
|
|
122
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
123
|
+
(0, class_validator_1.IsInt)(),
|
|
124
|
+
(0, class_validator_1.IsPositive)(),
|
|
125
|
+
(0, class_validator_1.IsOptional)(),
|
|
126
|
+
__metadata("design:type", Number)
|
|
127
|
+
], BillingEmailNotificationDto.prototype, "organizationId", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
(0, swagger_1.ApiProperty)({ description: 'See BillingEmailTemplateData.' }),
|
|
130
|
+
(0, class_validator_1.IsObject)(),
|
|
131
|
+
__metadata("design:type", Object)
|
|
132
|
+
], BillingEmailNotificationDto.prototype, "data", void 0);
|
|
133
|
+
__decorate([
|
|
134
|
+
(0, swagger_1.ApiPropertyOptional)({ type: [BillingDocumentReferenceDto] }),
|
|
135
|
+
(0, class_validator_1.IsArray)(),
|
|
136
|
+
(0, class_validator_1.ArrayMaxSize)(10),
|
|
137
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
138
|
+
(0, class_transformer_1.Type)(() => BillingDocumentReferenceDto),
|
|
139
|
+
(0, class_validator_1.IsOptional)(),
|
|
140
|
+
__metadata("design:type", Array)
|
|
141
|
+
], BillingEmailNotificationDto.prototype, "documents", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, swagger_1.ApiPropertyOptional)({ type: [BillingEmailAttachmentDto], deprecated: true }),
|
|
144
|
+
(0, class_validator_1.IsArray)(),
|
|
145
|
+
(0, class_validator_1.ArrayMaxSize)(10),
|
|
146
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
147
|
+
(0, class_transformer_1.Type)(() => BillingEmailAttachmentDto),
|
|
148
|
+
(0, class_validator_1.IsOptional)(),
|
|
149
|
+
__metadata("design:type", Array)
|
|
150
|
+
], BillingEmailNotificationDto.prototype, "attachments", void 0);
|
|
151
|
+
class BillingPushNotificationDto {
|
|
152
|
+
}
|
|
153
|
+
exports.BillingPushNotificationDto = BillingPushNotificationDto;
|
|
154
|
+
__decorate([
|
|
155
|
+
(0, swagger_1.ApiProperty)({ type: [Number] }),
|
|
156
|
+
(0, class_validator_1.IsArray)(),
|
|
157
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
158
|
+
(0, class_validator_1.ArrayMaxSize)(500),
|
|
159
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
160
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
161
|
+
(0, class_validator_1.IsInt)({ each: true }),
|
|
162
|
+
(0, class_validator_1.IsPositive)({ each: true }),
|
|
163
|
+
__metadata("design:type", Array)
|
|
164
|
+
], BillingPushNotificationDto.prototype, "userIds", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
(0, swagger_1.ApiProperty)(),
|
|
167
|
+
(0, class_validator_1.IsString)(),
|
|
168
|
+
(0, class_validator_1.MinLength)(1),
|
|
169
|
+
(0, class_validator_1.MaxLength)(120),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], BillingPushNotificationDto.prototype, "title", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, swagger_1.ApiProperty)(),
|
|
174
|
+
(0, class_validator_1.IsString)(),
|
|
175
|
+
(0, class_validator_1.MinLength)(1),
|
|
176
|
+
(0, class_validator_1.MaxLength)(500),
|
|
177
|
+
__metadata("design:type", String)
|
|
178
|
+
], BillingPushNotificationDto.prototype, "body", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Delivered to the app as FCM data; non-string values are JSON-encoded.' }),
|
|
181
|
+
(0, class_validator_1.IsObject)(),
|
|
182
|
+
(0, class_validator_1.IsOptional)(),
|
|
183
|
+
__metadata("design:type", Object)
|
|
184
|
+
], BillingPushNotificationDto.prototype, "data", void 0);
|
|
185
|
+
class BillingSmsNotificationDto {
|
|
186
|
+
}
|
|
187
|
+
exports.BillingSmsNotificationDto = BillingSmsNotificationDto;
|
|
188
|
+
__decorate([
|
|
189
|
+
(0, swagger_1.ApiProperty)({ type: [String], description: 'E.164, or local numbers of a supported country.' }),
|
|
190
|
+
(0, class_validator_1.IsArray)(),
|
|
191
|
+
(0, class_validator_1.ArrayMinSize)(1),
|
|
192
|
+
(0, class_validator_1.ArrayMaxSize)(100),
|
|
193
|
+
(0, class_validator_1.ArrayUnique)(),
|
|
194
|
+
(0, class_validator_1.IsString)({ each: true }),
|
|
195
|
+
(0, class_validator_1.MaxLength)(20, { each: true }),
|
|
196
|
+
__metadata("design:type", Array)
|
|
197
|
+
], BillingSmsNotificationDto.prototype, "phoneNumbers", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
(0, swagger_1.ApiProperty)({ description: 'At most 1000 characters (about six SMS segments).' }),
|
|
200
|
+
(0, class_validator_1.IsString)(),
|
|
201
|
+
(0, class_validator_1.MinLength)(1),
|
|
202
|
+
(0, class_validator_1.MaxLength)(1000),
|
|
203
|
+
__metadata("design:type", String)
|
|
204
|
+
], BillingSmsNotificationDto.prototype, "message", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
(0, swagger_1.ApiPropertyOptional)({ description: 'Decides the sender ID the SMS arrives under.' }),
|
|
207
|
+
(0, class_transformer_1.Type)(() => Number),
|
|
208
|
+
(0, class_validator_1.IsInt)(),
|
|
209
|
+
(0, class_validator_1.IsPositive)(),
|
|
210
|
+
(0, class_validator_1.IsOptional)(),
|
|
211
|
+
__metadata("design:type", Number)
|
|
212
|
+
], BillingSmsNotificationDto.prototype, "organizationId", void 0);
|
|
213
|
+
//# sourceMappingURL=billing-notification.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/dtos/billing-notification.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAAmE;AACnE,yDAAoD;AACpD,qDAkByB;AACzB,kFAA+F;AAE/F;;;;;;;;;GASG;AAEH,+EAA+E;AAC/E,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,+EAA+E;AAC/E,MAAM,SAAS,GAAG,iBAAiB,CAAC;AACpC,MAAM,UAAU,GAAG,EAAE,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;AAEpE,MAAM,OAAO,GAAG,CAAC,EAAE,KAAK,EAAsB,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AAErI,MAAa,2BAA2B;CAqBvC;AArBD,kEAqBC;AAlBG;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;IAC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C;IAC7G,IAAA,0BAAQ,GAAE;IAAE,IAAA,4BAAU,GAAE;;wDACE;AAG/B,MAAa,yBAAyB;CAarC;AAbD,8DAaC;AATG;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC;IAC/F,IAAA,yBAAO,GAAE;IAAE,IAAA,8BAAY,EAAC,CAAC,CAAC;IAAE,IAAA,8BAAY,EAAC,GAAG,CAAC;IAAE,IAAA,6BAAW,GAAE;IAC5D,IAAA,0BAAQ,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAAE,IAAA,2BAAS,EAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;+DAChC;AAIxB;IAFC,IAAA,qBAAW,EAAC,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;IACjF,IAAA,0BAAQ,GAAE;IAAE,IAAA,2BAAS,EAAC,CAAC,CAAC;IAAE,IAAA,2BAAS,EAAC,IAAI,CAAC;;0DACzB;AAIjB;IAFC,IAAA,6BAAmB,EAAC,EAAE,WAAW,EAAE,8CAA8C,EAAE,CAAC;IACpF,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,MAAM,CAAC;IAAE,IAAA,uBAAK,GAAE;IAAE,IAAA,4BAAU,GAAE;IAAE,IAAA,4BAAU,GAAE;;iEAChC"}
|
|
@@ -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"}
|
|
@@ -39,4 +39,8 @@ __exportStar(require("./interfaces/organization-notification-settings"), exports
|
|
|
39
39
|
__exportStar(require("./dtos/organization-notification-settings.dto"), exports);
|
|
40
40
|
__exportStar(require("./constants/notification-sender.const"), exports);
|
|
41
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);
|
|
42
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;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"}
|
|
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,205 @@
|
|
|
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 { Transform, Type } from 'class-transformer';
|
|
12
|
+
import { ArrayMaxSize, ArrayMinSize, ArrayUnique, IsArray, IsBase64, IsEmail, IsEnum, IsInt, IsObject, IsOptional, IsPositive, IsString, IsUrl, Matches, MaxLength, MinLength, ValidateNested, } from 'class-validator';
|
|
13
|
+
import { BillingDocumentType, BillingEmailTemplate } from '../enums/billing-notification.enum';
|
|
14
|
+
/**
|
|
15
|
+
* clarion-billing -> clarion-notification, over HTTP.
|
|
16
|
+
*
|
|
17
|
+
* Most billing notifications travel as Kafka events. These three routes exist for
|
|
18
|
+
* the cases where billing wants to know, synchronously, whether the message left:
|
|
19
|
+
* `POST /billing/notifications/email | push | sms`.
|
|
20
|
+
*
|
|
21
|
+
* Every limit here is a guard on a route that turns a request into outbound
|
|
22
|
+
* traffic on somebody's behalf, not a tuning choice.
|
|
23
|
+
*/
|
|
24
|
+
/** No line breaks: the value is placed in a header (Subject) or a filename. */
|
|
25
|
+
const SINGLE_LINE = /^[^\r\n]*$/;
|
|
26
|
+
/** A bare file name - no directory part, so it can never be read as a path. */
|
|
27
|
+
const FILE_NAME = /^[^\\/\r\n\0]+$/;
|
|
28
|
+
const HTTPS_ONLY = { protocols: ['https'], require_protocol: true };
|
|
29
|
+
const toArray = ({ value }) => (value === undefined || value === null || Array.isArray(value) ? value : [value]);
|
|
30
|
+
export class BillingDocumentReferenceDto {
|
|
31
|
+
}
|
|
32
|
+
__decorate([
|
|
33
|
+
ApiProperty({ description: 'The clarion-dms document id.' }),
|
|
34
|
+
Type(() => Number),
|
|
35
|
+
IsInt(),
|
|
36
|
+
IsPositive(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], BillingDocumentReferenceDto.prototype, "documentId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
ApiProperty({ enum: BillingDocumentType }),
|
|
41
|
+
IsEnum(BillingDocumentType),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], BillingDocumentReferenceDto.prototype, "documentType", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
ApiPropertyOptional({ example: 'INV-2026-000123.pdf' }),
|
|
46
|
+
IsString(),
|
|
47
|
+
MaxLength(150),
|
|
48
|
+
Matches(FILE_NAME, { message: 'fileName must be a bare file name' }),
|
|
49
|
+
IsOptional(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], BillingDocumentReferenceDto.prototype, "fileName", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
ApiPropertyOptional({
|
|
54
|
+
description: 'A pre-signed URL for the document. WITH it the PDF is fetched and attached; WITHOUT it the document ' +
|
|
55
|
+
'is only named in the email. Billing documents are private and their signed URLs expire within the hour, ' +
|
|
56
|
+
'so the URL is never placed in the email itself.',
|
|
57
|
+
}),
|
|
58
|
+
IsUrl(HTTPS_ONLY),
|
|
59
|
+
MaxLength(2048),
|
|
60
|
+
IsOptional(),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], BillingDocumentReferenceDto.prototype, "signedUrl", void 0);
|
|
63
|
+
/** @deprecated Raw attachments. Prefer `documents`. */
|
|
64
|
+
export class BillingEmailAttachmentDto {
|
|
65
|
+
}
|
|
66
|
+
__decorate([
|
|
67
|
+
ApiProperty(),
|
|
68
|
+
IsString(),
|
|
69
|
+
MaxLength(150),
|
|
70
|
+
Matches(FILE_NAME, { message: 'filename must be a bare file name' }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], BillingEmailAttachmentDto.prototype, "filename", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
ApiPropertyOptional(),
|
|
75
|
+
IsUrl(HTTPS_ONLY),
|
|
76
|
+
MaxLength(2048),
|
|
77
|
+
IsOptional(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], BillingEmailAttachmentDto.prototype, "url", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
ApiPropertyOptional({ description: 'Base64. About 10 MB of file at most.' }),
|
|
82
|
+
IsBase64(),
|
|
83
|
+
MaxLength(14000000),
|
|
84
|
+
IsOptional(),
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], BillingEmailAttachmentDto.prototype, "content", void 0);
|
|
87
|
+
export class BillingEmailNotificationDto {
|
|
88
|
+
}
|
|
89
|
+
__decorate([
|
|
90
|
+
ApiProperty({ type: [String], description: 'One address or several. Each recipient gets an individual email.' }),
|
|
91
|
+
Transform(toArray),
|
|
92
|
+
IsArray(),
|
|
93
|
+
ArrayMinSize(1),
|
|
94
|
+
ArrayMaxSize(50),
|
|
95
|
+
ArrayUnique(),
|
|
96
|
+
IsEmail({}, { each: true }),
|
|
97
|
+
__metadata("design:type", Array)
|
|
98
|
+
], BillingEmailNotificationDto.prototype, "to", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
ApiProperty(),
|
|
101
|
+
IsString(),
|
|
102
|
+
MinLength(1),
|
|
103
|
+
MaxLength(200),
|
|
104
|
+
Matches(SINGLE_LINE, { message: 'subject may not contain line breaks' }),
|
|
105
|
+
__metadata("design:type", String)
|
|
106
|
+
], BillingEmailNotificationDto.prototype, "subject", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
ApiProperty({ enum: BillingEmailTemplate }),
|
|
109
|
+
IsEnum(BillingEmailTemplate),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], BillingEmailNotificationDto.prototype, "template", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
ApiPropertyOptional({
|
|
114
|
+
description: 'The organization the email is sent on behalf of: decides the branding and the From address.',
|
|
115
|
+
}),
|
|
116
|
+
Type(() => Number),
|
|
117
|
+
IsInt(),
|
|
118
|
+
IsPositive(),
|
|
119
|
+
IsOptional(),
|
|
120
|
+
__metadata("design:type", Number)
|
|
121
|
+
], BillingEmailNotificationDto.prototype, "organizationId", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
ApiProperty({ description: 'See BillingEmailTemplateData.' }),
|
|
124
|
+
IsObject(),
|
|
125
|
+
__metadata("design:type", Object)
|
|
126
|
+
], BillingEmailNotificationDto.prototype, "data", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
ApiPropertyOptional({ type: [BillingDocumentReferenceDto] }),
|
|
129
|
+
IsArray(),
|
|
130
|
+
ArrayMaxSize(10),
|
|
131
|
+
ValidateNested({ each: true }),
|
|
132
|
+
Type(() => BillingDocumentReferenceDto),
|
|
133
|
+
IsOptional(),
|
|
134
|
+
__metadata("design:type", Array)
|
|
135
|
+
], BillingEmailNotificationDto.prototype, "documents", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
ApiPropertyOptional({ type: [BillingEmailAttachmentDto], deprecated: true }),
|
|
138
|
+
IsArray(),
|
|
139
|
+
ArrayMaxSize(10),
|
|
140
|
+
ValidateNested({ each: true }),
|
|
141
|
+
Type(() => BillingEmailAttachmentDto),
|
|
142
|
+
IsOptional(),
|
|
143
|
+
__metadata("design:type", Array)
|
|
144
|
+
], BillingEmailNotificationDto.prototype, "attachments", void 0);
|
|
145
|
+
export class BillingPushNotificationDto {
|
|
146
|
+
}
|
|
147
|
+
__decorate([
|
|
148
|
+
ApiProperty({ type: [Number] }),
|
|
149
|
+
IsArray(),
|
|
150
|
+
ArrayMinSize(1),
|
|
151
|
+
ArrayMaxSize(500),
|
|
152
|
+
ArrayUnique(),
|
|
153
|
+
Type(() => Number),
|
|
154
|
+
IsInt({ each: true }),
|
|
155
|
+
IsPositive({ each: true }),
|
|
156
|
+
__metadata("design:type", Array)
|
|
157
|
+
], BillingPushNotificationDto.prototype, "userIds", void 0);
|
|
158
|
+
__decorate([
|
|
159
|
+
ApiProperty(),
|
|
160
|
+
IsString(),
|
|
161
|
+
MinLength(1),
|
|
162
|
+
MaxLength(120),
|
|
163
|
+
__metadata("design:type", String)
|
|
164
|
+
], BillingPushNotificationDto.prototype, "title", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
ApiProperty(),
|
|
167
|
+
IsString(),
|
|
168
|
+
MinLength(1),
|
|
169
|
+
MaxLength(500),
|
|
170
|
+
__metadata("design:type", String)
|
|
171
|
+
], BillingPushNotificationDto.prototype, "body", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
ApiPropertyOptional({ description: 'Delivered to the app as FCM data; non-string values are JSON-encoded.' }),
|
|
174
|
+
IsObject(),
|
|
175
|
+
IsOptional(),
|
|
176
|
+
__metadata("design:type", Object)
|
|
177
|
+
], BillingPushNotificationDto.prototype, "data", void 0);
|
|
178
|
+
export class BillingSmsNotificationDto {
|
|
179
|
+
}
|
|
180
|
+
__decorate([
|
|
181
|
+
ApiProperty({ type: [String], description: 'E.164, or local numbers of a supported country.' }),
|
|
182
|
+
IsArray(),
|
|
183
|
+
ArrayMinSize(1),
|
|
184
|
+
ArrayMaxSize(100),
|
|
185
|
+
ArrayUnique(),
|
|
186
|
+
IsString({ each: true }),
|
|
187
|
+
MaxLength(20, { each: true }),
|
|
188
|
+
__metadata("design:type", Array)
|
|
189
|
+
], BillingSmsNotificationDto.prototype, "phoneNumbers", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
ApiProperty({ description: 'At most 1000 characters (about six SMS segments).' }),
|
|
192
|
+
IsString(),
|
|
193
|
+
MinLength(1),
|
|
194
|
+
MaxLength(1000),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], BillingSmsNotificationDto.prototype, "message", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
ApiPropertyOptional({ description: 'Decides the sender ID the SMS arrives under.' }),
|
|
199
|
+
Type(() => Number),
|
|
200
|
+
IsInt(),
|
|
201
|
+
IsPositive(),
|
|
202
|
+
IsOptional(),
|
|
203
|
+
__metadata("design:type", Number)
|
|
204
|
+
], BillingSmsNotificationDto.prototype, "organizationId", void 0);
|
|
205
|
+
//# sourceMappingURL=billing-notification.dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billing-notification.dto.js","sourceRoot":"","sources":["../../../../../src/modules/notification/dtos/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
/**
|
|
2
|
+
* The emails clarion-billing can ask clarion-notification to send.
|
|
3
|
+
*
|
|
4
|
+
* A closed set on purpose. The route renders a template BY NAME on the say-so of
|
|
5
|
+
* another service; accepting any string would let a caller render any template in
|
|
6
|
+
* the notification service (an OTP email, a password reset) with a body of its
|
|
7
|
+
* choosing. Each value here has copy defaults in the notification service - add
|
|
8
|
+
* the value and the defaults together.
|
|
9
|
+
*/
|
|
10
|
+
export var BillingEmailTemplate;
|
|
11
|
+
(function (BillingEmailTemplate) {
|
|
12
|
+
/** An invoice or settlement invoice is ready. Normally carries the PDF. */
|
|
13
|
+
BillingEmailTemplate["INVOICE"] = "billing_invoice";
|
|
14
|
+
/** A payment was received. Normally carries the receipt PDF. */
|
|
15
|
+
BillingEmailTemplate["RECEIPT"] = "billing_receipt";
|
|
16
|
+
/** A corporate order was placed or confirmed. */
|
|
17
|
+
BillingEmailTemplate["ORDER_CONFIRMATION"] = "billing_order_confirmation";
|
|
18
|
+
/** Anything else billing needs to say; the caller supplies heading and intro. */
|
|
19
|
+
BillingEmailTemplate["GENERIC"] = "billing_generic";
|
|
20
|
+
})(BillingEmailTemplate || (BillingEmailTemplate = {}));
|
|
21
|
+
/** What a referenced billing document is. Mirrors the documents clarion-billing stores in clarion-dms. */
|
|
22
|
+
export var BillingDocumentType;
|
|
23
|
+
(function (BillingDocumentType) {
|
|
24
|
+
BillingDocumentType["INVOICE"] = "INVOICE";
|
|
25
|
+
BillingDocumentType["RECEIPT"] = "RECEIPT";
|
|
26
|
+
BillingDocumentType["CORPORATE_ORDER"] = "CORPORATE_ORDER";
|
|
27
|
+
BillingDocumentType["SETTLEMENT_INVOICE"] = "SETTLEMENT_INVOICE";
|
|
28
|
+
BillingDocumentType["SETTLEMENT_RECEIPT"] = "SETTLEMENT_RECEIPT";
|
|
29
|
+
})(BillingDocumentType || (BillingDocumentType = {}));
|
|
30
|
+
//# 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,MAAM,CAAN,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,KAApB,oBAAoB,QAS/B;AAED,0GAA0G;AAC1G,MAAM,CAAN,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,0DAAmC,CAAA;IACnC,gEAAyC,CAAA;IACzC,gEAAyC,CAAA;AAC7C,CAAC,EANW,mBAAmB,KAAnB,mBAAmB,QAM9B"}
|
|
@@ -23,4 +23,8 @@ export * from './interfaces/organization-notification-settings';
|
|
|
23
23
|
export * from './dtos/organization-notification-settings.dto';
|
|
24
24
|
export * from './constants/notification-sender.const';
|
|
25
25
|
export * from './utils/notification-sender.util';
|
|
26
|
+
// clarion-billing -> clarion-notification HTTP contract (POST /billing/notifications/*)
|
|
27
|
+
export * from './enums/billing-notification.enum';
|
|
28
|
+
export * from './dtos/billing-notification.dto';
|
|
29
|
+
export * from './interfaces/billing-notification-result';
|
|
26
30
|
//# 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,CAA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
|
1
|
+
{"version":3,"file":"billing-notification-result.js","sourceRoot":"","sources":["../../../../../src/modules/notification/interfaces/billing-notification-result.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BillingDocumentType, BillingEmailTemplate } from '../enums/billing-notification.enum';
|
|
2
|
+
export declare class BillingDocumentReferenceDto {
|
|
3
|
+
documentId: number;
|
|
4
|
+
documentType: BillingDocumentType;
|
|
5
|
+
fileName?: string;
|
|
6
|
+
signedUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
/** @deprecated Raw attachments. Prefer `documents`. */
|
|
9
|
+
export declare class BillingEmailAttachmentDto {
|
|
10
|
+
filename: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* The keys the billing email layout reads from `data`. All optional: each
|
|
16
|
+
* template has defaults. Values are rendered as TEXT (escaped), never as markup.
|
|
17
|
+
* Money arrives already formatted - only billing knows the currency's decimals.
|
|
18
|
+
*/
|
|
19
|
+
export interface BillingEmailTemplateData {
|
|
20
|
+
/** Greeting name. Defaults to "Customer". */
|
|
21
|
+
recipientName?: string;
|
|
22
|
+
heading?: string;
|
|
23
|
+
/** One paragraph, or several. */
|
|
24
|
+
intro?: string | string[];
|
|
25
|
+
/** Label/value rows, e.g. invoice number, amount, due date. At most 30 are rendered. */
|
|
26
|
+
summary?: Array<{
|
|
27
|
+
label: string;
|
|
28
|
+
value: string | number;
|
|
29
|
+
}>;
|
|
30
|
+
/** A button. Rendered only when `actionUrl` is https. */
|
|
31
|
+
actionLabel?: string;
|
|
32
|
+
actionUrl?: string;
|
|
33
|
+
/** Small print under the summary. */
|
|
34
|
+
note?: string;
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export declare class BillingEmailNotificationDto {
|
|
38
|
+
to: string[];
|
|
39
|
+
subject: string;
|
|
40
|
+
template: BillingEmailTemplate;
|
|
41
|
+
organizationId?: number;
|
|
42
|
+
data: BillingEmailTemplateData;
|
|
43
|
+
documents?: BillingDocumentReferenceDto[];
|
|
44
|
+
attachments?: BillingEmailAttachmentDto[];
|
|
45
|
+
}
|
|
46
|
+
export declare class BillingPushNotificationDto {
|
|
47
|
+
userIds: number[];
|
|
48
|
+
title: string;
|
|
49
|
+
body: string;
|
|
50
|
+
data?: Record<string, any>;
|
|
51
|
+
}
|
|
52
|
+
export declare class BillingSmsNotificationDto {
|
|
53
|
+
phoneNumbers: string[];
|
|
54
|
+
message: string;
|
|
55
|
+
organizationId?: number;
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The emails clarion-billing can ask clarion-notification to send.
|
|
3
|
+
*
|
|
4
|
+
* A closed set on purpose. The route renders a template BY NAME on the say-so of
|
|
5
|
+
* another service; accepting any string would let a caller render any template in
|
|
6
|
+
* the notification service (an OTP email, a password reset) with a body of its
|
|
7
|
+
* choosing. Each value here has copy defaults in the notification service - add
|
|
8
|
+
* the value and the defaults together.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum BillingEmailTemplate {
|
|
11
|
+
/** An invoice or settlement invoice is ready. Normally carries the PDF. */
|
|
12
|
+
INVOICE = "billing_invoice",
|
|
13
|
+
/** A payment was received. Normally carries the receipt PDF. */
|
|
14
|
+
RECEIPT = "billing_receipt",
|
|
15
|
+
/** A corporate order was placed or confirmed. */
|
|
16
|
+
ORDER_CONFIRMATION = "billing_order_confirmation",
|
|
17
|
+
/** Anything else billing needs to say; the caller supplies heading and intro. */
|
|
18
|
+
GENERIC = "billing_generic"
|
|
19
|
+
}
|
|
20
|
+
/** What a referenced billing document is. Mirrors the documents clarion-billing stores in clarion-dms. */
|
|
21
|
+
export declare enum BillingDocumentType {
|
|
22
|
+
INVOICE = "INVOICE",
|
|
23
|
+
RECEIPT = "RECEIPT",
|
|
24
|
+
CORPORATE_ORDER = "CORPORATE_ORDER",
|
|
25
|
+
SETTLEMENT_INVOICE = "SETTLEMENT_INVOICE",
|
|
26
|
+
SETTLEMENT_RECEIPT = "SETTLEMENT_RECEIPT"
|
|
27
|
+
}
|
|
@@ -19,3 +19,6 @@ export * from './interfaces/organization-notification-settings';
|
|
|
19
19
|
export * from './dtos/organization-notification-settings.dto';
|
|
20
20
|
export * from './constants/notification-sender.const';
|
|
21
21
|
export * from './utils/notification-sender.util';
|
|
22
|
+
export * from './enums/billing-notification.enum';
|
|
23
|
+
export * from './dtos/billing-notification.dto';
|
|
24
|
+
export * from './interfaces/billing-notification-result';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NotificationChannel } from '../enums/notification-channel.enum';
|
|
2
|
+
import { EmailSendResult } from './email-send-result';
|
|
3
|
+
import { SmsSendResult } from './sms-send-result';
|
|
4
|
+
/**
|
|
5
|
+
* What `POST /billing/notifications/*` answers with.
|
|
6
|
+
*
|
|
7
|
+
* The status code is the confirmation; the body is the detail:
|
|
8
|
+
*
|
|
9
|
+
* 200 everything asked for was handed to a provider
|
|
10
|
+
* 207 (sms only) some recipients were, some were not - NOT retried by the
|
|
11
|
+
* caller, because a retry would message the ones that succeeded again
|
|
12
|
+
* 422 the request can never succeed as sent (bad number, expired document URL)
|
|
13
|
+
* 502 a provider or the document store failed; nothing was sent; retry is safe
|
|
14
|
+
* 503 no provider is configured for the channel
|
|
15
|
+
*
|
|
16
|
+
* On 4xx/5xx the same result object is the error body.
|
|
17
|
+
*/
|
|
18
|
+
export interface BillingEmailNotificationResult extends EmailSendResult {
|
|
19
|
+
documents: {
|
|
20
|
+
/** File names attached to the email. */
|
|
21
|
+
attached: string[];
|
|
22
|
+
/** Documents named in the email but not attached (no signed URL was supplied). */
|
|
23
|
+
referenced: string[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export type BillingSmsNotificationResult = SmsSendResult;
|
|
27
|
+
export interface BillingPushNotificationResult {
|
|
28
|
+
channel: NotificationChannel.PUSH;
|
|
29
|
+
/** True when no send failed. A user with no registered device is not a failure. */
|
|
30
|
+
success: boolean;
|
|
31
|
+
/** Devices a send was attempted to. Zero means none of the users has the app registered. */
|
|
32
|
+
totalAttempted: number;
|
|
33
|
+
successCount: number;
|
|
34
|
+
failureCount: number;
|
|
35
|
+
}
|