phx-node 1.0.111 → 1.0.112
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/module/inapp-noti/push-notification.service.d.ts +56 -1
- package/dist/module/inapp-noti/push-notification.service.js +13 -1
- package/dist/module/inapp-noti/push-notification.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/lib/types/inapp-noti.d.ts +0 -55
- package/dist/lib/types/inapp-noti.js +0 -14
- package/dist/lib/types/inapp-noti.js.map +0 -1
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
import { HttpService } from "@nestjs/axios";
|
|
2
2
|
import { ConfigService } from "@nestjs/config";
|
|
3
|
-
|
|
3
|
+
export interface IGroupRequestType {
|
|
4
|
+
group: string;
|
|
5
|
+
count?: number;
|
|
6
|
+
items?: {
|
|
7
|
+
label: string;
|
|
8
|
+
count: number;
|
|
9
|
+
}[];
|
|
10
|
+
}
|
|
11
|
+
export declare enum EmailType {
|
|
12
|
+
TRANSACTION_BASIC = "transaction-basic",
|
|
13
|
+
HRM_REMIND = "hrm-remind",
|
|
14
|
+
ORDER_SUCCESS = "order-success",
|
|
15
|
+
FREESTYLE_CAMPAIGN = "freestyle-campaign"
|
|
16
|
+
}
|
|
17
|
+
export declare enum NotificationType {
|
|
18
|
+
SYSTEM = "SYSTEM",
|
|
19
|
+
TO_ME = "TO_ME"
|
|
20
|
+
}
|
|
21
|
+
export interface Attachment {
|
|
22
|
+
filename: string;
|
|
23
|
+
pathname: string;
|
|
24
|
+
}
|
|
25
|
+
export interface PushNotiMobile {
|
|
26
|
+
title: string;
|
|
27
|
+
message: string;
|
|
28
|
+
module_code: string;
|
|
29
|
+
app: string;
|
|
30
|
+
payload: any;
|
|
31
|
+
related_id?: string;
|
|
32
|
+
preview_text?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SendEmailV3 {
|
|
35
|
+
emailType: EmailType;
|
|
36
|
+
to: string;
|
|
37
|
+
subject: string;
|
|
38
|
+
title: string;
|
|
39
|
+
previewText: string;
|
|
40
|
+
isValidEmail?: boolean;
|
|
41
|
+
callToActionURL?: string;
|
|
42
|
+
callToActionText?: string;
|
|
43
|
+
content?: string;
|
|
44
|
+
listRequests?: IGroupRequestType[];
|
|
45
|
+
description?: string;
|
|
46
|
+
schoolId?: number;
|
|
47
|
+
tag?: string;
|
|
48
|
+
attachments?: Attachment[];
|
|
49
|
+
}
|
|
50
|
+
export interface PushInappNoti {
|
|
51
|
+
user_id: number;
|
|
52
|
+
action_code: string;
|
|
53
|
+
hostname: string;
|
|
54
|
+
student_id?: number;
|
|
55
|
+
type?: NotificationType;
|
|
56
|
+
pushNotiMobile?: PushNotiMobile;
|
|
57
|
+
sendEmailV3?: SendEmailV3;
|
|
58
|
+
}
|
|
4
59
|
export declare class PHXPushNotificationService {
|
|
5
60
|
private readonly httpService;
|
|
6
61
|
private readonly configService;
|
|
@@ -19,11 +19,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
};
|
|
20
20
|
var PHXPushNotificationService_1;
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.PHXPushNotificationService = void 0;
|
|
22
|
+
exports.PHXPushNotificationService = exports.NotificationType = exports.EmailType = void 0;
|
|
23
23
|
const axios_1 = require("@nestjs/axios");
|
|
24
24
|
const common_1 = require("@nestjs/common");
|
|
25
25
|
const config_1 = require("@nestjs/config");
|
|
26
26
|
const rxjs_1 = require("rxjs");
|
|
27
|
+
var EmailType;
|
|
28
|
+
(function (EmailType) {
|
|
29
|
+
EmailType["TRANSACTION_BASIC"] = "transaction-basic";
|
|
30
|
+
EmailType["HRM_REMIND"] = "hrm-remind";
|
|
31
|
+
EmailType["ORDER_SUCCESS"] = "order-success";
|
|
32
|
+
EmailType["FREESTYLE_CAMPAIGN"] = "freestyle-campaign";
|
|
33
|
+
})(EmailType || (exports.EmailType = EmailType = {}));
|
|
34
|
+
var NotificationType;
|
|
35
|
+
(function (NotificationType) {
|
|
36
|
+
NotificationType["SYSTEM"] = "SYSTEM";
|
|
37
|
+
NotificationType["TO_ME"] = "TO_ME";
|
|
38
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
27
39
|
let PHXPushNotificationService = PHXPushNotificationService_1 = class PHXPushNotificationService {
|
|
28
40
|
constructor(httpService, configService) {
|
|
29
41
|
this.httpService = httpService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push-notification.service.js","sourceRoot":"","sources":["../../../src/module/inapp-noti/push-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAAyE;AACzE,2CAA+C;AAC/C,+BAAqC;
|
|
1
|
+
{"version":3,"file":"push-notification.service.js","sourceRoot":"","sources":["../../../src/module/inapp-noti/push-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,yCAA4C;AAC5C,2CAAyE;AACzE,2CAA+C;AAC/C,+BAAqC;AAarC,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,oDAAuC,CAAA;IACvC,sCAAyB,CAAA;IACzB,4CAA+B,CAAA;IAC/B,sDAAyC,CAAA;AAC3C,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AACD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AA8DM,IAAM,0BAA0B,kCAAhC,MAAM,0BAA0B;IAErC,YACmB,WAAwB,EACxB,aAA4B;QAD5B,gBAAW,GAAX,WAAW,CAAa;QACxB,kBAAa,GAAb,aAAa,CAAe;QAH9B,WAAM,GAAG,IAAI,eAAM,CAAC,4BAA0B,CAAC,IAAI,CAAC,CAAC;IAInE,CAAC;IAEU,QAAQ,CAAC,OAAsB;;;YAC3C,MAAM,EAAE,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