@managemint-solutions/entities 1.1.31 → 1.1.33
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.
|
@@ -8,8 +8,4 @@ export declare enum NotificationChannel {
|
|
|
8
8
|
EMAIL = "email"
|
|
9
9
|
}
|
|
10
10
|
export declare enum NotificationType {
|
|
11
|
-
INVOICE_PAYMENT_FAILED = "invoice_payment_failed",
|
|
12
|
-
CARD_EXPIRING_SOON = "card_expiring_soon",
|
|
13
|
-
PAYMENT_RECOVERED = "payment_recovered",
|
|
14
|
-
ORGANIZATION_PROVISIONED = "organization_provisioned"
|
|
15
11
|
}
|
|
@@ -16,9 +16,5 @@ var NotificationChannel;
|
|
|
16
16
|
;
|
|
17
17
|
var NotificationType;
|
|
18
18
|
(function (NotificationType) {
|
|
19
|
-
NotificationType["INVOICE_PAYMENT_FAILED"] = "invoice_payment_failed";
|
|
20
|
-
NotificationType["CARD_EXPIRING_SOON"] = "card_expiring_soon";
|
|
21
|
-
NotificationType["PAYMENT_RECOVERED"] = "payment_recovered";
|
|
22
|
-
NotificationType["ORGANIZATION_PROVISIONED"] = "organization_provisioned";
|
|
23
19
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
24
20
|
;
|
|
@@ -2,39 +2,31 @@ import type { UUID } from 'crypto';
|
|
|
2
2
|
import { UserIdentity } from '../users';
|
|
3
3
|
import { NotificationChannel, NotificationStatus, NotificationType } from './enum';
|
|
4
4
|
export * from './enum';
|
|
5
|
+
export type WelcomeEmailTemplateVariables = {
|
|
6
|
+
name: string;
|
|
7
|
+
surname: string;
|
|
8
|
+
email: string;
|
|
9
|
+
};
|
|
10
|
+
export type BillingEmailTemplateVariables = {
|
|
11
|
+
orgName: string;
|
|
12
|
+
invoice_number: string;
|
|
13
|
+
invoice_amount: string;
|
|
14
|
+
invoice_due_date: string;
|
|
15
|
+
};
|
|
5
16
|
export interface NotificationSummary {
|
|
6
17
|
mms_id: UUID;
|
|
7
18
|
created_at: Date;
|
|
8
|
-
recipient: UserIdentity | null;
|
|
9
|
-
recipient_email: string;
|
|
10
19
|
notification_type: NotificationType;
|
|
11
20
|
channel: NotificationChannel;
|
|
12
|
-
template_id: string;
|
|
13
21
|
status: NotificationStatus;
|
|
14
|
-
attempts: number;
|
|
15
|
-
sent_at: Date | null;
|
|
16
|
-
failed_at: Date | null;
|
|
17
|
-
failure_reason: string | null;
|
|
18
|
-
delivered_at: Date | null;
|
|
19
|
-
delivery_delayed_at: Date | null;
|
|
20
|
-
/** First-party: stamped when someone views the notification in the portal. */
|
|
21
|
-
opened_at: Date | null;
|
|
22
|
-
bounced_at: Date | null;
|
|
23
|
-
complained_at: Date | null;
|
|
24
|
-
delivery_failure_reason: string | null;
|
|
25
22
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* fetched from the provider; future channels add their own nullable blocks.
|
|
36
|
-
*/
|
|
37
|
-
export interface NotificationEntity extends NotificationSummary {
|
|
38
|
-
template_variables: Record<string, string | number>;
|
|
39
|
-
email: NotificationEmailContent | null;
|
|
23
|
+
export interface NotificationEntity {
|
|
24
|
+
mms_id: UUID;
|
|
25
|
+
created_at: Date;
|
|
26
|
+
notification_type: NotificationType;
|
|
27
|
+
channel: NotificationChannel;
|
|
28
|
+
status: NotificationStatus;
|
|
29
|
+
html: string;
|
|
30
|
+
template_variables: Record<string, string>;
|
|
31
|
+
created_by?: UserIdentity;
|
|
40
32
|
}
|
package/package.json
CHANGED