phx-node 1.0.51 → 1.0.53

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/index.d.ts CHANGED
@@ -34,4 +34,6 @@ import { GetListActiveSchoolYearServiceV3 } from "./module/school-year-v3/listAc
34
34
  import { GetListNextSchoolYearServiceV3 } from "./module/school-year-v3/listNextSchoolYearV3.service";
35
35
  import { GetSchoolYearServiceV3 } from "./module/school-year-v3/schoolYearV3.service";
36
36
  import { PHXQueryListDetailFeeAdjustment, PHXQueryAdmissionTuition, PHXQueryListDetailFeeAdjustmentBM, PHXQueryAdmissionTuitionBM } from "./query/tuition/debt-record";
37
- export { PHXNestModule, GetSchoolYearService, GetListActiveSchoolYearService, GetActiveSchoolYearAndNextYearService, GetListActiveSchoolYearAndNextYearService, GetListNextSchoolYearService, PHXGraphqlService, PHXGraphqlV2Service, ApiService, PHXStudentInfoService, PHXStudentInfoServiceV3, PHXStudentInfoServiceSystemV3, PHXDateHelpers, PHXGrpcClientService, PHXGrpcClientSystemService, GetActiveSchoolYearAndNextYearServiceV3, GetActiveSchoolYearAndNextYearServiceSystemV3, GetListActiveSchoolYearAndNextYearServiceV3, GetListActiveSchoolYearAndNextYearServiceSystemV3, GetListActiveSchoolYearServiceV3, GetListActiveSchoolYearServiceSystemV3, GetListNextSchoolYearServiceV3, GetListNextSchoolYearServiceSystemV3, GetSchoolYearServiceV3, GetSchoolYearServiceSystemV3, PHXDevToolDataService, PHXCronjobManagerService, PHXCloneCronjob, runWithSentryCheckIn, PHXHostnameService, PHXEnvPublicService, PHXContextStorageService, PHXSettingFormulaPromotion, PHXQueryListDetailFeeAdjustment, PHXQueryAdmissionTuition, PHXQueryListDetailFeeAdjustmentBM, PHXQueryAdmissionTuitionBM, PHXSchoolMonthSystemService, PHXSchoolMonthClientService, };
37
+ import { PHXNotificationByModuleService } from "./module/notification/notification.service";
38
+ import { PHXStatisticalNotificationByModuleService } from "./module/notification/statistical-notification.service";
39
+ export { PHXNestModule, GetSchoolYearService, GetListActiveSchoolYearService, GetActiveSchoolYearAndNextYearService, GetListActiveSchoolYearAndNextYearService, GetListNextSchoolYearService, PHXGraphqlService, PHXGraphqlV2Service, ApiService, PHXStudentInfoService, PHXStudentInfoServiceV3, PHXStudentInfoServiceSystemV3, PHXDateHelpers, PHXGrpcClientService, PHXGrpcClientSystemService, GetActiveSchoolYearAndNextYearServiceV3, GetActiveSchoolYearAndNextYearServiceSystemV3, GetListActiveSchoolYearAndNextYearServiceV3, GetListActiveSchoolYearAndNextYearServiceSystemV3, GetListActiveSchoolYearServiceV3, GetListActiveSchoolYearServiceSystemV3, GetListNextSchoolYearServiceV3, GetListNextSchoolYearServiceSystemV3, GetSchoolYearServiceV3, GetSchoolYearServiceSystemV3, PHXDevToolDataService, PHXCronjobManagerService, PHXCloneCronjob, runWithSentryCheckIn, PHXHostnameService, PHXEnvPublicService, PHXContextStorageService, PHXSettingFormulaPromotion, PHXQueryListDetailFeeAdjustment, PHXQueryAdmissionTuition, PHXQueryListDetailFeeAdjustmentBM, PHXQueryAdmissionTuitionBM, PHXSchoolMonthSystemService, PHXSchoolMonthClientService, PHXNotificationByModuleService, PHXStatisticalNotificationByModuleService };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PHXSchoolMonthClientService = exports.PHXSchoolMonthSystemService = exports.PHXQueryAdmissionTuitionBM = exports.PHXQueryListDetailFeeAdjustmentBM = exports.PHXQueryAdmissionTuition = exports.PHXQueryListDetailFeeAdjustment = exports.PHXSettingFormulaPromotion = exports.PHXContextStorageService = exports.PHXEnvPublicService = exports.PHXHostnameService = exports.runWithSentryCheckIn = exports.PHXCloneCronjob = exports.PHXCronjobManagerService = exports.PHXDevToolDataService = exports.GetSchoolYearServiceSystemV3 = exports.GetSchoolYearServiceV3 = exports.GetListNextSchoolYearServiceSystemV3 = exports.GetListNextSchoolYearServiceV3 = exports.GetListActiveSchoolYearServiceSystemV3 = exports.GetListActiveSchoolYearServiceV3 = exports.GetListActiveSchoolYearAndNextYearServiceSystemV3 = exports.GetListActiveSchoolYearAndNextYearServiceV3 = exports.GetActiveSchoolYearAndNextYearServiceSystemV3 = exports.GetActiveSchoolYearAndNextYearServiceV3 = exports.PHXGrpcClientSystemService = exports.PHXGrpcClientService = exports.PHXDateHelpers = exports.PHXStudentInfoServiceSystemV3 = exports.PHXStudentInfoServiceV3 = exports.PHXStudentInfoService = exports.ApiService = exports.PHXGraphqlV2Service = exports.PHXGraphqlService = exports.GetListNextSchoolYearService = exports.GetListActiveSchoolYearAndNextYearService = exports.GetActiveSchoolYearAndNextYearService = exports.GetListActiveSchoolYearService = exports.GetSchoolYearService = exports.PHXNestModule = void 0;
3
+ exports.PHXStatisticalNotificationByModuleService = exports.PHXNotificationByModuleService = exports.PHXSchoolMonthClientService = exports.PHXSchoolMonthSystemService = exports.PHXQueryAdmissionTuitionBM = exports.PHXQueryListDetailFeeAdjustmentBM = exports.PHXQueryAdmissionTuition = exports.PHXQueryListDetailFeeAdjustment = exports.PHXSettingFormulaPromotion = exports.PHXContextStorageService = exports.PHXEnvPublicService = exports.PHXHostnameService = exports.runWithSentryCheckIn = exports.PHXCloneCronjob = exports.PHXCronjobManagerService = exports.PHXDevToolDataService = exports.GetSchoolYearServiceSystemV3 = exports.GetSchoolYearServiceV3 = exports.GetListNextSchoolYearServiceSystemV3 = exports.GetListNextSchoolYearServiceV3 = exports.GetListActiveSchoolYearServiceSystemV3 = exports.GetListActiveSchoolYearServiceV3 = exports.GetListActiveSchoolYearAndNextYearServiceSystemV3 = exports.GetListActiveSchoolYearAndNextYearServiceV3 = exports.GetActiveSchoolYearAndNextYearServiceSystemV3 = exports.GetActiveSchoolYearAndNextYearServiceV3 = exports.PHXGrpcClientSystemService = exports.PHXGrpcClientService = exports.PHXDateHelpers = exports.PHXStudentInfoServiceSystemV3 = exports.PHXStudentInfoServiceV3 = exports.PHXStudentInfoService = exports.ApiService = exports.PHXGraphqlV2Service = exports.PHXGraphqlService = exports.GetListNextSchoolYearService = exports.GetListActiveSchoolYearAndNextYearService = exports.GetActiveSchoolYearAndNextYearService = exports.GetListActiveSchoolYearService = exports.GetSchoolYearService = exports.PHXNestModule = void 0;
4
4
  const school_month_client_service_1 = require("./module/school-month/school-month-client.service");
5
5
  Object.defineProperty(exports, "PHXSchoolMonthClientService", { enumerable: true, get: function () { return school_month_client_service_1.PHXSchoolMonthClientService; } });
6
6
  const school_month_system_service_1 = require("./module/school-month/school-month-system.service");
@@ -76,4 +76,8 @@ Object.defineProperty(exports, "PHXQueryListDetailFeeAdjustment", { enumerable:
76
76
  Object.defineProperty(exports, "PHXQueryAdmissionTuition", { enumerable: true, get: function () { return debt_record_1.PHXQueryAdmissionTuition; } });
77
77
  Object.defineProperty(exports, "PHXQueryListDetailFeeAdjustmentBM", { enumerable: true, get: function () { return debt_record_1.PHXQueryListDetailFeeAdjustmentBM; } });
78
78
  Object.defineProperty(exports, "PHXQueryAdmissionTuitionBM", { enumerable: true, get: function () { return debt_record_1.PHXQueryAdmissionTuitionBM; } });
79
+ const notification_service_1 = require("./module/notification/notification.service");
80
+ Object.defineProperty(exports, "PHXNotificationByModuleService", { enumerable: true, get: function () { return notification_service_1.PHXNotificationByModuleService; } });
81
+ const statistical_notification_service_1 = require("./module/notification/statistical-notification.service");
82
+ Object.defineProperty(exports, "PHXStatisticalNotificationByModuleService", { enumerable: true, get: function () { return statistical_notification_service_1.PHXStatisticalNotificationByModuleService; } });
79
83
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mGAAgG;AAiF9F,4GAjFO,yDAA2B,OAiFP;AAhF7B,mGAAgG;AA+E9F,4GA/EO,yDAA2B,OA+EP;AA9E7B,yIAA+H;AAyE7H,2GAzEO,8DAA0B,OAyEP;AAxE5B,8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2CP"}
@@ -25,3 +25,5 @@ export declare const SETTING_KEY_EARLY_PROMOTION_TUITION_SCHOLARSHIP = "TUITION_
25
25
  export declare const SETTING_KEY_EARLY_PROMOTION_TUITION_SENIORITY = "TUITION_SENIORITY";
26
26
  export declare const SETTING_KEY_EARLY_PROMOTION_TUITION_ADMISSION = "TUITION_ADMISSION";
27
27
  export declare const SETTING_KEY_EARLY_PROMOTION_TUITION_ADJUSTMENT = "TUITION_ADJUSTMENT";
28
+ export declare const LIMIT_RESPONSE_LIST_NOTIFICATION = 10;
29
+ export declare const NOTIFICATION_TYPE_IMPORTANT = "IMPORTANT";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADJUSTMENT = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADMISSION = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SENIORITY = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SCHOLARSHIP = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_POLICY = exports.SETTING_KEY_EARLY_PROMOTION = exports.SETTING_KEY_LIMIT_BY_SIBLING_BY_FIRST_CHILD = exports.SETTING_KEY_LIMIT_BY_SIBLING_DEFAULT = exports.SETTING_KEY_LIMIT_BY_SIBLING = exports.SETTING_PROMOTION_SERVICE_TYPE = exports.SETTING_PROMOTION_TUITION_TYPE = exports.DETAIL_PROMO_TYPE_ADMISSION_SERVICE = exports.DETAIL_PROMO_TYPE_ADMISSION_TUITION = exports.DETAIL_PROMO_TYPE_SERVICE = exports.DETAIL_PROMO_TYPE_TUITION_SCHOLARSHIP = exports.DETAIL_PROMO_TYPE_TUITION_POLICY = exports.FEE_TYPE_DESC = exports.FEE_TYPE_ASC = exports.CODE_TUITION = exports.CODE_EAT_PROJECT = exports.envProd = exports.ROLE_STUDENT_CODE = exports.STUDENT_STATUS_POTENTIAL = exports.STUDENT_STATUS_STUDYING = exports.STUDENT_STATUS_TRANSFER = exports.GRAPHQL_ENV_V2 = exports.GRAPHQL_ENV = void 0;
3
+ exports.NOTIFICATION_TYPE_IMPORTANT = exports.LIMIT_RESPONSE_LIST_NOTIFICATION = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADJUSTMENT = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADMISSION = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SENIORITY = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SCHOLARSHIP = exports.SETTING_KEY_EARLY_PROMOTION_TUITION_POLICY = exports.SETTING_KEY_EARLY_PROMOTION = exports.SETTING_KEY_LIMIT_BY_SIBLING_BY_FIRST_CHILD = exports.SETTING_KEY_LIMIT_BY_SIBLING_DEFAULT = exports.SETTING_KEY_LIMIT_BY_SIBLING = exports.SETTING_PROMOTION_SERVICE_TYPE = exports.SETTING_PROMOTION_TUITION_TYPE = exports.DETAIL_PROMO_TYPE_ADMISSION_SERVICE = exports.DETAIL_PROMO_TYPE_ADMISSION_TUITION = exports.DETAIL_PROMO_TYPE_SERVICE = exports.DETAIL_PROMO_TYPE_TUITION_SCHOLARSHIP = exports.DETAIL_PROMO_TYPE_TUITION_POLICY = exports.FEE_TYPE_DESC = exports.FEE_TYPE_ASC = exports.CODE_TUITION = exports.CODE_EAT_PROJECT = exports.envProd = exports.ROLE_STUDENT_CODE = exports.STUDENT_STATUS_POTENTIAL = exports.STUDENT_STATUS_STUDYING = exports.STUDENT_STATUS_TRANSFER = exports.GRAPHQL_ENV_V2 = exports.GRAPHQL_ENV = void 0;
4
4
  exports.GRAPHQL_ENV = "GRAPHQL_ENV";
5
5
  exports.GRAPHQL_ENV_V2 = "GRAPHQL_ENV_V2";
6
6
  exports.STUDENT_STATUS_TRANSFER = 1;
@@ -28,4 +28,6 @@ exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SCHOLARSHIP = "TUITION_SCHOLARSHIP";
28
28
  exports.SETTING_KEY_EARLY_PROMOTION_TUITION_SENIORITY = "TUITION_SENIORITY";
29
29
  exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADMISSION = "TUITION_ADMISSION";
30
30
  exports.SETTING_KEY_EARLY_PROMOTION_TUITION_ADJUSTMENT = "TUITION_ADJUSTMENT";
31
+ exports.LIMIT_RESPONSE_LIST_NOTIFICATION = 10;
32
+ exports.NOTIFICATION_TYPE_IMPORTANT = 'IMPORTANT';
31
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/constant/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG,aAAa,CAAC;AAC5B,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAGlC,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAC5B,QAAA,uBAAuB,GAAG,CAAC,CAAC;AAC5B,QAAA,wBAAwB,GAAG,CAAC,CAAC;AAI7B,QAAA,iBAAiB,GAAG,IAAI,CAAC;AAEzB,QAAA,OAAO,GAAG,YAAY,CAAC;AAGvB,QAAA,gBAAgB,GAAG,IAAI,CAAC;AACxB,QAAA,YAAY,GAAG,IAAI,CAAC;AAGpB,QAAA,YAAY,GAAG,KAAK,CAAC;AACrB,QAAA,aAAa,GAAG,MAAM,CAAC;AAGvB,QAAA,gCAAgC,GAAG,gBAAgB,CAAC;AACpD,QAAA,qCAAqC,GAAG,qBAAqB,CAAC;AAC9D,QAAA,yBAAyB,GAAG,SAAS,CAAC;AACtC,QAAA,mCAAmC,GAAG,mBAAmB,CAAC;AAC1D,QAAA,mCAAmC,GAAG,mBAAmB,CAAC;AAG1D,QAAA,8BAA8B,GAAG,SAAS,CAAC;AAC3C,QAAA,8BAA8B,GAAG,SAAS,CAAC;AAG3C,QAAA,4BAA4B,GAAG,kBAAkB,CAAC;AAElD,QAAA,oCAAoC,GAAG,SAAS,CAAC;AACjD,QAAA,2CAA2C,GAAG,gBAAgB,CAAC;AAG/D,QAAA,2BAA2B,GAAG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C1D,qBAAqB,CAAC;AACX,QAAA,6CAA6C,GACxD,mBAAmB,CAAC;AACT,QAAA,6CAA6C,GACxD,mBAAmB,CAAC;AACT,QAAA,8CAA8C,GACzD,oBAAoB,CAAC;AACV,QAAA,gCAAgC,GAAG,EAAE,CAAC;AACtC,QAAA,2BAA2B,GAAG,WAAW,CAAA"}
@@ -0,0 +1,56 @@
1
+ import { Logger } from '@nestjs/common';
2
+ import { PHXGrpcClientSystemService } from "../grpc-client/grpc-client-system.service";
3
+ import { PHXDateHelpers } from "../helpers-service/helpers.service";
4
+ import { PHXStatisticalNotificationByModuleService } from "./statistical-notification.service";
5
+ interface FeatureModuleType {
6
+ id: number;
7
+ title: string;
8
+ content: string;
9
+ created_at: string;
10
+ payload: string;
11
+ action: string;
12
+ module_code: string;
13
+ }
14
+ export declare class PHXNotificationByModuleService {
15
+ private readonly grpcClientSystemService;
16
+ private readonly dateHelpers;
17
+ private readonly statisticalNotificationByModuleService;
18
+ private readonly request;
19
+ logger: Logger;
20
+ constructor(grpcClientSystemService: PHXGrpcClientSystemService, dateHelpers: PHXDateHelpers, statisticalNotificationByModuleService: PHXStatisticalNotificationByModuleService, request: Request);
21
+ getListNotificationByModule({ offset, moduleCode }: {
22
+ offset: number;
23
+ moduleCode: string;
24
+ }): Promise<any>;
25
+ convertDataListNotification(dataFeatureMobilePush: Array<FeatureModuleType>): {
26
+ id: number;
27
+ title: string;
28
+ content: string;
29
+ action: string;
30
+ time: string;
31
+ payload: any;
32
+ module_code: string;
33
+ }[];
34
+ readNotification({ notificationId }: {
35
+ notificationId: number;
36
+ }): Promise<any>;
37
+ updateTotalNotificationAfterRead({ app, deviceId, userId, hostname, moduleCode, notificationType, }: {
38
+ userId: number;
39
+ hostname: string;
40
+ deviceId: string;
41
+ app: string;
42
+ moduleCode: string;
43
+ notificationType: string;
44
+ }): Promise<void>;
45
+ getCurrentTotalNotificationUnreadByModule({ app, deviceId, userId, hostname, moduleCode }: {
46
+ app: string;
47
+ deviceId: string;
48
+ userId: number;
49
+ hostname: string;
50
+ moduleCode: string;
51
+ }): Promise<{
52
+ currentTotalNotificationImportant: any;
53
+ currentTotalNotification: any;
54
+ }>;
55
+ }
56
+ export {};
@@ -0,0 +1,164 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ var PHXNotificationByModuleService_1;
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.PHXNotificationByModuleService = void 0;
26
+ const common_1 = require("@nestjs/common");
27
+ const core_1 = require("@nestjs/core");
28
+ const query_1 = require("../../query/notification/query");
29
+ const constant_1 = require("../../lib/constant");
30
+ const grpc_client_system_service_1 = require("../grpc-client/grpc-client-system.service");
31
+ const helpers_service_1 = require("../helpers-service/helpers.service");
32
+ const statistical_notification_service_1 = require("./statistical-notification.service");
33
+ let PHXNotificationByModuleService = PHXNotificationByModuleService_1 = class PHXNotificationByModuleService {
34
+ constructor(grpcClientSystemService, dateHelpers, statisticalNotificationByModuleService, request) {
35
+ this.grpcClientSystemService = grpcClientSystemService;
36
+ this.dateHelpers = dateHelpers;
37
+ this.statisticalNotificationByModuleService = statisticalNotificationByModuleService;
38
+ this.request = request;
39
+ this.logger = new common_1.Logger(PHXNotificationByModuleService_1.name);
40
+ }
41
+ getListNotificationByModule(_a) {
42
+ return __awaiter(this, arguments, void 0, function* ({ offset = 0, moduleCode }) {
43
+ const headers = this.request.headers;
44
+ const userId = headers['authorization-id'];
45
+ const deviceId = headers['device-id'];
46
+ const app = headers['app'];
47
+ const hostname = headers['hostname'];
48
+ const response = yield this.grpcClientSystemService.queryDataCenter({
49
+ query: query_1.QUERY_GET_LIST_NOTIFICATION_BY_MODULE,
50
+ variables: {
51
+ app,
52
+ device_id: deviceId,
53
+ user_id: Number(userId),
54
+ hostname,
55
+ offset,
56
+ limit: constant_1.LIMIT_RESPONSE_LIST_NOTIFICATION,
57
+ module_code: moduleCode,
58
+ },
59
+ });
60
+ const dataFeatureMobilePush = response.feature_mobile_push;
61
+ return {
62
+ data: this.convertDataListNotification(dataFeatureMobilePush),
63
+ last_page: dataFeatureMobilePush.length <= constant_1.LIMIT_RESPONSE_LIST_NOTIFICATION,
64
+ };
65
+ });
66
+ }
67
+ convertDataListNotification(dataFeatureMobilePush) {
68
+ return dataFeatureMobilePush.map(({ id, created_at, content, title, action, payload, module_code }) => {
69
+ return {
70
+ id,
71
+ title,
72
+ content,
73
+ action,
74
+ time: this.dateHelpers.dateStrToDateTime(created_at, false),
75
+ payload: JSON.parse(payload),
76
+ module_code,
77
+ };
78
+ });
79
+ }
80
+ readNotification(_a) {
81
+ return __awaiter(this, arguments, void 0, function* ({ notificationId }) {
82
+ if (!notificationId)
83
+ return;
84
+ const headers = this.request.headers;
85
+ const userId = headers['authorization-id'];
86
+ const deviceId = headers['device-id'];
87
+ const app = headers['app'];
88
+ const hostname = headers['hostname'];
89
+ return yield this.grpcClientSystemService
90
+ .mutationDataCenter({
91
+ query: query_1.MUTATION_UPDATE_READ_NOTIFICATION,
92
+ variables: { id: notificationId },
93
+ })
94
+ .then((response) => __awaiter(this, void 0, void 0, function* () {
95
+ const { update_feature_mobile_push: { returning }, } = response;
96
+ const readSuccess = returning.length > 0;
97
+ if (!readSuccess)
98
+ return response;
99
+ const { type: notificationType, module_code } = returning[0];
100
+ yield this.updateTotalNotificationAfterRead({
101
+ app,
102
+ deviceId,
103
+ userId,
104
+ hostname,
105
+ moduleCode: module_code,
106
+ notificationType,
107
+ });
108
+ return response;
109
+ }));
110
+ });
111
+ }
112
+ updateTotalNotificationAfterRead(_a) {
113
+ return __awaiter(this, arguments, void 0, function* ({ app, deviceId, userId, hostname, moduleCode, notificationType, }) {
114
+ const { currentTotalNotification, currentTotalNotificationImportant } = yield this.getCurrentTotalNotificationUnreadByModule({
115
+ app,
116
+ deviceId,
117
+ userId,
118
+ hostname,
119
+ moduleCode: moduleCode,
120
+ });
121
+ yield this.statisticalNotificationByModuleService.updateStatisticalNotificationByModule({
122
+ userId,
123
+ deviceId,
124
+ hostname,
125
+ moduleCode,
126
+ totalNotificationImportant: notificationType === constant_1.NOTIFICATION_TYPE_IMPORTANT
127
+ ? currentTotalNotificationImportant - 1
128
+ : currentTotalNotificationImportant,
129
+ appName: app,
130
+ totalNotification: currentTotalNotification - 1
131
+ });
132
+ });
133
+ }
134
+ getCurrentTotalNotificationUnreadByModule(_a) {
135
+ return __awaiter(this, arguments, void 0, function* ({ app, deviceId, userId, hostname, moduleCode }) {
136
+ var _b;
137
+ const response = yield this.grpcClientSystemService.queryDataCenter({
138
+ query: query_1.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE,
139
+ variables: {
140
+ app,
141
+ device_id: deviceId,
142
+ user_id: userId,
143
+ hostname,
144
+ module_code: moduleCode,
145
+ },
146
+ });
147
+ const resultTotal = (_b = response === null || response === void 0 ? void 0 : response.feature_mobile_push_count_notification_unread) === null || _b === void 0 ? void 0 : _b[0];
148
+ return {
149
+ currentTotalNotificationImportant: (resultTotal === null || resultTotal === void 0 ? void 0 : resultTotal.total_notification_important) || 0,
150
+ currentTotalNotification: (resultTotal === null || resultTotal === void 0 ? void 0 : resultTotal.total_notification) || 0,
151
+ };
152
+ });
153
+ }
154
+ };
155
+ exports.PHXNotificationByModuleService = PHXNotificationByModuleService;
156
+ exports.PHXNotificationByModuleService = PHXNotificationByModuleService = PHXNotificationByModuleService_1 = __decorate([
157
+ (0, common_1.Injectable)(),
158
+ __param(3, (0, common_1.Inject)(core_1.REQUEST)),
159
+ __metadata("design:paramtypes", [grpc_client_system_service_1.PHXGrpcClientSystemService,
160
+ helpers_service_1.PHXDateHelpers,
161
+ statistical_notification_service_1.PHXStatisticalNotificationByModuleService,
162
+ Request])
163
+ ], PHXNotificationByModuleService);
164
+ //# sourceMappingURL=notification.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification.service.js","sourceRoot":"","sources":["../../../src/module/notification/notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA0D;AAC1D,uCAAuC;AACvC,0DAIwC;AACxC,iDAAiG;AACjG,0FAAqF;AACrF,wEAAkE;AAClE,yFAA6F;AAatF,IAAM,8BAA8B,sCAApC,MAAM,8BAA8B;IAEvC,YACqB,uBAAmD,EACnD,WAA2B,EAC3B,sCAAiF,EACjF,OAAiC;QAHjC,4BAAuB,GAAvB,uBAAuB,CAA4B;QACnD,gBAAW,GAAX,WAAW,CAAgB;QAC3B,2CAAsC,GAAtC,sCAAsC,CAA2C;QAChE,YAAO,GAAP,OAAO,CAAS;QALtD,WAAM,GAAG,IAAI,eAAM,CAAC,gCAA8B,CAAC,IAAI,CAAC,CAAC;IAMtD,CAAC;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,cAAO,CAAC,CAAA;qCAH0B,uDAA0B;QACtC,gCAAc;QACa,4EAAyC;QACvD,OAAO;GAN7C,8BAA8B,CAqK1C"}
@@ -0,0 +1,16 @@
1
+ import { Logger } from '@nestjs/common';
2
+ import { PHXGrpcClientSystemService } from "../grpc-client/grpc-client-system.service";
3
+ export declare class PHXStatisticalNotificationByModuleService {
4
+ private readonly grpcClientSystemService;
5
+ logger: Logger;
6
+ constructor(grpcClientSystemService: PHXGrpcClientSystemService);
7
+ updateStatisticalNotificationByModule({ userId, deviceId, appName, hostname, moduleCode, totalNotification, totalNotificationImportant, }: {
8
+ userId: number;
9
+ deviceId: string;
10
+ hostname: string;
11
+ appName: string;
12
+ moduleCode: string;
13
+ totalNotification: number;
14
+ totalNotificationImportant: number;
15
+ }): Promise<void>;
16
+ }
@@ -0,0 +1,77 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
12
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
13
+ return new (P || (P = Promise))(function (resolve, reject) {
14
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
15
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
16
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
17
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
18
+ });
19
+ };
20
+ var PHXStatisticalNotificationByModuleService_1;
21
+ Object.defineProperty(exports, "__esModule", { value: true });
22
+ exports.PHXStatisticalNotificationByModuleService = void 0;
23
+ const common_1 = require("@nestjs/common");
24
+ const query_1 = require("../../query/notification/query");
25
+ const grpc_client_system_service_1 = require("../grpc-client/grpc-client-system.service");
26
+ let PHXStatisticalNotificationByModuleService = PHXStatisticalNotificationByModuleService_1 = class PHXStatisticalNotificationByModuleService {
27
+ constructor(grpcClientSystemService) {
28
+ this.grpcClientSystemService = grpcClientSystemService;
29
+ this.logger = new common_1.Logger(PHXStatisticalNotificationByModuleService_1.name);
30
+ }
31
+ updateStatisticalNotificationByModule(_a) {
32
+ return __awaiter(this, arguments, void 0, function* ({ userId, deviceId, appName, hostname, moduleCode, totalNotification, totalNotificationImportant, }) {
33
+ yield this.grpcClientSystemService
34
+ .mutationDataCenter({
35
+ query: query_1.MUTATION_UPDATE_NOTIFICATION_UNREAD,
36
+ variables: {
37
+ user_id: userId,
38
+ device_id: deviceId,
39
+ hostname,
40
+ app: appName,
41
+ module_code: moduleCode,
42
+ total_notification: totalNotification,
43
+ total_notification_important: totalNotificationImportant,
44
+ },
45
+ })
46
+ .then((response) => __awaiter(this, void 0, void 0, function* () {
47
+ const isUpdateCountNotificationSuccess = response.update_feature_mobile_push_count_notification_unread
48
+ .returning.length > 0;
49
+ if (isUpdateCountNotificationSuccess) {
50
+ this.logger.log('Update row statistical notification successfully');
51
+ return;
52
+ }
53
+ if (totalNotification === 0)
54
+ return;
55
+ yield this.grpcClientSystemService.mutationDataCenter({
56
+ query: query_1.MUTATION_INSERT_NOTIFICATION,
57
+ variables: {
58
+ user_id: userId,
59
+ device_id: deviceId,
60
+ hostname,
61
+ app: appName,
62
+ module_code: moduleCode,
63
+ total_notification: totalNotification,
64
+ total_notification_important: 0,
65
+ },
66
+ });
67
+ this.logger.log('Insert row statistical notification successfully');
68
+ }));
69
+ });
70
+ }
71
+ };
72
+ exports.PHXStatisticalNotificationByModuleService = PHXStatisticalNotificationByModuleService;
73
+ exports.PHXStatisticalNotificationByModuleService = PHXStatisticalNotificationByModuleService = PHXStatisticalNotificationByModuleService_1 = __decorate([
74
+ (0, common_1.Injectable)(),
75
+ __metadata("design:paramtypes", [grpc_client_system_service_1.PHXGrpcClientSystemService])
76
+ ], PHXStatisticalNotificationByModuleService);
77
+ //# sourceMappingURL=statistical-notification.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistical-notification.service.js","sourceRoot":"","sources":["../../../src/module/notification/statistical-notification.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,0DAGwC;AACxC,0FAAqF;AAG9E,IAAM,yCAAyC,iDAA/C,MAAM,yCAAyC;IAElD,YACqB,uBAAmD;QAAnD,4BAAuB,GAAvB,uBAAuB,CAA4B;QAFxE,WAAM,GAAG,IAAI,eAAM,CAAC,2CAAyC,CAAC,IAAI,CAAC,CAAC;IAGjE,CAAC;IAKS,qCAAqC;6DAAC,EAChD,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,0BAA0B,GAS5B;YACG,MAAM,IAAI,CAAC,uBAAuB;iBAC7B,kBAAkB,CAAC;gBAChB,KAAK,EAAE,2CAAmC;gBAC1C,SAAS,EAAE;oBACP,OAAO,EAAE,MAAM;oBACf,SAAS,EAAE,QAAQ;oBACnB,QAAQ;oBACR,GAAG,EAAE,OAAO;oBACZ,WAAW,EAAE,UAAU;oBACvB,kBAAkB,EAAE,iBAAiB;oBACrC,4BAA4B,EAAE,0BAA0B;iBAC3D;aACJ,CAAC;iBACD,IAAI,CAAC,CAAO,QAAQ,EAAE,EAAE;gBACrB,MAAM,gCAAgC,GAClC,QAAQ,CAAC,oDAAoD;qBACxD,SAAS,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC9B,IAAI,gCAAgC,EAAE,CAAC;oBACnC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;oBACpE,OAAO;gBACX,CAAC;gBAGD,IAAI,iBAAiB,KAAK,CAAC;oBAAE,OAAO;gBACpC,MAAM,IAAI,CAAC,uBAAuB,CAAC,kBAAkB,CAAC;oBAClD,KAAK,EAAE,oCAA4B;oBACnC,SAAS,EAAE;wBACP,OAAO,EAAE,MAAM;wBACf,SAAS,EAAE,QAAQ;wBACnB,QAAQ;wBACR,GAAG,EAAE,OAAO;wBACZ,WAAW,EAAE,UAAU;wBACvB,kBAAkB,EAAE,iBAAiB;wBACrC,4BAA4B,EAAE,CAAC;qBAClC;iBACJ,CAAC,CAAC;gBAEH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kDAAkD,CAAC,CAAC;YACxE,CAAC,CAAA,CAAC,CAAC;QACX,CAAC;KAAA;CACJ,CAAA;AAlEY,8FAAyC;oDAAzC,yCAAyC;IADrD,IAAA,mBAAU,GAAE;qCAIqC,uDAA0B;GAH/D,yCAAyC,CAkErD"}
@@ -32,11 +32,13 @@ import { PHXContextStorageService } from "./module/helpers-service/context-stora
32
32
  import { PHXSettingFormulaPromotion } from "./module/helpers-service/tuition-helper-service/tuititon-formular-setting.service";
33
33
  import { PHXSchoolMonthSystemService } from "./module/school-month/school-month-system.service";
34
34
  import { PHXSchoolMonthClientService } from "./module/school-month/school-month-client.service";
35
+ import { PHXNotificationByModuleService } from "./module/notification/notification.service";
36
+ import { PHXStatisticalNotificationByModuleService } from "./module/notification/statistical-notification.service";
35
37
  import { ApiService } from "./module/api/api.service";
36
38
  export declare class PHXNestModule {
37
39
  static register(): {
38
40
  module: typeof PHXNestModule;
39
- providers: (typeof PHXGrpcClientService | typeof PHXSchoolMonthClientService | typeof PHXGrpcClientSystemService | typeof PHXSchoolMonthSystemService | typeof PHXSettingFormulaPromotion | typeof PHXContextStorageService | typeof GetSchoolYearServiceSystemV3 | typeof GetListNextSchoolYearServiceSystemV3 | typeof GetListActiveSchoolYearServiceSystemV3 | typeof GetListActiveSchoolYearAndNextYearServiceSystemV3 | typeof GetActiveSchoolYearAndNextYearServiceSystemV3 | typeof PHXStudentInfoServiceSystemV3 | typeof PHXHostnameService | typeof PHXEnvPublicService | typeof PHXGraphqlV2Service | typeof PHXCloneCronjob | typeof PHXCronjobManagerService | typeof PHXDevToolDataService | typeof PHXDateHelpers | typeof PHXGraphqlService | typeof PHXStudentInfoService | typeof ApiService | typeof GetSchoolYearService | typeof GetListActiveSchoolYearService | typeof GetActiveSchoolYearAndNextYearService | typeof GetListActiveSchoolYearAndNextYearService | typeof GetListNextSchoolYearService | typeof PHXStudentInfoServiceV3 | typeof GetActiveSchoolYearAndNextYearServiceV3 | typeof GetListActiveSchoolYearAndNextYearServiceV3 | typeof GetListActiveSchoolYearServiceV3 | typeof GetListNextSchoolYearServiceV3 | typeof GetSchoolYearServiceV3)[];
41
+ providers: (typeof PHXGrpcClientService | typeof PHXSchoolMonthClientService | typeof PHXGrpcClientSystemService | typeof PHXSchoolMonthSystemService | typeof PHXSettingFormulaPromotion | typeof PHXContextStorageService | typeof GetSchoolYearServiceSystemV3 | typeof GetListNextSchoolYearServiceSystemV3 | typeof GetListActiveSchoolYearServiceSystemV3 | typeof GetListActiveSchoolYearAndNextYearServiceSystemV3 | typeof GetActiveSchoolYearAndNextYearServiceSystemV3 | typeof PHXStudentInfoServiceSystemV3 | typeof PHXHostnameService | typeof PHXEnvPublicService | typeof PHXGraphqlV2Service | typeof PHXCloneCronjob | typeof PHXCronjobManagerService | typeof PHXDevToolDataService | typeof PHXDateHelpers | typeof PHXGraphqlService | typeof PHXStudentInfoService | typeof ApiService | typeof GetSchoolYearService | typeof GetListActiveSchoolYearService | typeof GetActiveSchoolYearAndNextYearService | typeof GetListActiveSchoolYearAndNextYearService | typeof GetListNextSchoolYearService | typeof PHXStudentInfoServiceV3 | typeof GetActiveSchoolYearAndNextYearServiceV3 | typeof GetListActiveSchoolYearAndNextYearServiceV3 | typeof GetListActiveSchoolYearServiceV3 | typeof GetListNextSchoolYearServiceV3 | typeof GetSchoolYearServiceV3 | typeof PHXStatisticalNotificationByModuleService | typeof PHXNotificationByModuleService)[];
40
42
  };
41
43
  static forRoot(graphQlConfig?: GraphQlEnv): DynamicModule;
42
44
  static forRootV2(graphQlConfig?: GraphQlV2Env): DynamicModule;
@@ -46,6 +46,8 @@ const context_storage_service_1 = require("./module/helpers-service/context-stor
46
46
  const tuititon_formular_setting_service_1 = require("./module/helpers-service/tuition-helper-service/tuititon-formular-setting.service");
47
47
  const school_month_system_service_1 = require("./module/school-month/school-month-system.service");
48
48
  const school_month_client_service_1 = require("./module/school-month/school-month-client.service");
49
+ const notification_service_1 = require("./module/notification/notification.service");
50
+ const statistical_notification_service_1 = require("./module/notification/statistical-notification.service");
49
51
  const api_service_1 = require("./module/api/api.service");
50
52
  let PHXNestModule = PHXNestModule_1 = class PHXNestModule {
51
53
  static register() {
@@ -85,6 +87,8 @@ let PHXNestModule = PHXNestModule_1 = class PHXNestModule {
85
87
  school_month_system_service_1.PHXSchoolMonthSystemService,
86
88
  school_month_client_service_1.PHXSchoolMonthClientService,
87
89
  api_service_1.ApiService,
90
+ notification_service_1.PHXNotificationByModuleService,
91
+ statistical_notification_service_1.PHXStatisticalNotificationByModuleService
88
92
  ],
89
93
  };
90
94
  }
@@ -172,6 +176,8 @@ exports.PHXNestModule = PHXNestModule = PHXNestModule_1 = __decorate([
172
176
  school_month_system_service_1.PHXSchoolMonthSystemService,
173
177
  school_month_client_service_1.PHXSchoolMonthClientService,
174
178
  api_service_1.ApiService,
179
+ notification_service_1.PHXNotificationByModuleService,
180
+ statistical_notification_service_1.PHXStatisticalNotificationByModuleService
175
181
  ],
176
182
  exports: [
177
183
  graphql_service_1.PHXGraphqlService,
@@ -206,6 +212,8 @@ exports.PHXNestModule = PHXNestModule = PHXNestModule_1 = __decorate([
206
212
  tuititon_formular_setting_service_1.PHXSettingFormulaPromotion,
207
213
  school_month_system_service_1.PHXSchoolMonthSystemService,
208
214
  school_month_client_service_1.PHXSchoolMonthClientService,
215
+ notification_service_1.PHXNotificationByModuleService,
216
+ statistical_notification_service_1.PHXStatisticalNotificationByModuleService,
209
217
  api_service_1.ApiService,
210
218
  ],
211
219
  })
@@ -1 +1 @@
1
- {"version":3,"file":"phx.module.js","sourceRoot":"","sources":["../src/phx.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,gFAA+E;AAC/E,+DAA8D;AAC9D,kGAAkG;AAClG,kHAAiH;AACjH,0HAAyH;AACzH,gGAA+F;AAE/F,6CAA6D;AAC7D,wDAAoD;AACpD,qFAAmF;AACnF,8EAA0E;AAC1E,kFAAgF;AAChF,yCAA2C;AAC3C,2FAAwF;AACxF,yHAAwH;AACxH,iIAAgI;AAChI,yGAAyG;AACzG,uGAAsG;AACtG,uFAAsF;AACtF,gGAA6F;AAC7F,wFAAqF;AACrF,8FAA4F;AAC5F,0FAAiF;AACjF,qEAAmE;AACnE,+CAAkD;AAClD,gDAAoD;AACpD,yEAAwE;AACxE,yGAAqG;AACrG,4HAAmI;AACnI,oIAA2I;AAC3I,4GAAoH;AACpH,0GAAiH;AACjH,0FAAiG;AACjG,6EAA2E;AAC3E,8FAA4F;AAC5F,yIAA+H;AAC/H,mGAAgG;AAChG,mGAAgG;AAChG,0DAAsD;AAkF/C,IAAM,aAAa,qBAAnB,MAAM,aAAa;IACxB,MAAM,CAAC,QAAQ;QACb,OAAO;YACL,MAAM,EAAE,eAAa;YACrB,SAAS,EAAE;gBACT,mCAAiB;gBACjB,wCAAmB;gBACnB,0CAAoB;gBACpB,uDAA0B;gBAC1B,yCAAoB;gBACpB,4DAA8B;gBAC9B,2EAAqC;gBACrC,mFAAyC;gBACzC,yDAA4B;gBAC5B,gCAAc;gBACd,4CAAqB;gBACrB,iDAAuB;gBACvB,8DAA6B;gBAC7B,+EAAuC;gBACvC,mFAA6C;gBAC7C,uFAA2C;gBAC3C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AC,OAAO,EAAE;SACvB;QACD,WAAW,EAAE,EAAE;QACf,SAAS,EAAE;YACT,mCAAiB;YACjB,wCAAmB;YACnB,0CAAoB;YACpB,uDAA0B;YAC1B,yCAAoB;YACpB,4DAA8B;YAC9B,2EAAqC;YACrC,mFAAyC;YACzC,yDAA4B;YAC5B,4CAAqB;YACrB,iDAAuB;YACvB,8DAA6B;YAC7B,gCAAc;YACd,+EAAuC;YACvC,mFAA6C;YAC7C,oEAAsC;YACtC,uFAA2C;YAC3C,2FAAiD;YACjD,iEAAoC;YACpC,iDAA4B;YAC5B,gEAAgC;YAChC,6DAA8B;YAC9B,6CAAsB;YACtB,6CAAqB;YACrB,kDAAwB;YACxB,uCAAe;YACf,qCAAkB;YAClB,wCAAmB;YACnB,kDAAwB;YACxB,8DAA0B;YAC1B,yDAA2B;YAC3B,yDAA2B;YAC3B,wBAAU;SACX;QACD,OAAO,EAAE;YACP,mCAAiB;YACjB,wCAAmB;YACnB,0CAAoB;YACpB,uDAA0B;YAC1B,yCAAoB;YACpB,4DAA8B;YAC9B,2EAAqC;YACrC,mFAAyC;YACzC,yDAA4B;YAC5B,gCAAc;YACd,4CAAqB;YACrB,iDAAuB;YACvB,8DAA6B;YAC7B,+EAAuC;YACvC,mFAA6C;YAC7C,oEAAsC;YACtC,uFAA2C;YAC3C,2FAAiD;YACjD,iEAAoC;YACpC,iDAA4B;YAC5B,gEAAgC;YAChC,6DAA8B;YAC9B,6CAAsB;YACtB,6CAAqB;YACrB,kDAAwB;YACxB,uCAAe;YACf,qCAAkB;YAClB,wCAAmB;YACnB,kDAAwB;YACxB,8DAA0B;YAC1B,yDAA2B;YAC3B,yDAA2B;YAC3B,wBAAU;SACX;KACF,CAAC;GACW,aAAa,CAoFzB"}
1
+ {"version":3,"file":"phx.module.js","sourceRoot":"","sources":["../src/phx.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,gFAA+E;AAC/E,+DAA8D;AAC9D,kGAAkG;AAClG,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YAC7C,oEAAsC;YACtC,uFAA2C;YAC3C,2FAAiD;YACjD,iEAAoC;YACpC,iDAA4B;YAC5B,gEAAgC;YAChC,6DAA8B;YAC9B,6CAAsB;YACtB,6CAAqB;YACrB,kDAAwB;YACxB,uCAAe;YACf,qCAAkB;YAClB,wCAAmB;YACnB,kDAAwB;YACxB,8DAA0B;YAC1B,yDAA2B;YAC3B,yDAA2B;YAC3B,wBAAU;YACV,qDAA8B;YAC9B,4EAAyC;SAC1C;QACD,OAAO,EAAE;YACP,mCAAiB;YACjB,wCAAmB;YACnB,0CAAoB;YACpB,uDAA0B;YAC1B,yCAAoB;YACpB,4DAA8B;YAC9B,2EAAqC;YACrC,mFAAyC;YACzC,yDAA4B;YAC5B,gCAAc;YACd,4CAAqB;YACrB,iDAAuB;YACvB,8DAA6B;YAC7B,+EAAuC;YACvC,mFAA6C;YAC7C,oEAAsC;YACtC,uFAA2C;YAC3C,2FAAiD;YACjD,iEAAoC;YACpC,iDAA4B;YAC5B,gEAAgC;YAChC,6DAA8B;YAC9B,6CAAsB;YACtB,6CAAqB;YACrB,kDAAwB;YACxB,uCAAe;YACf,qCAAkB;YAClB,wCAAmB;YACnB,kDAAwB;YACxB,8DAA0B;YAC1B,yDAA2B;YAC3B,yDAA2B;YAC3B,qDAA8B;YAC9B,4EAAyC;YACzC,wBAAU;SACX;KACF,CAAC;GACW,aAAa,CAsFzB"}
@@ -0,0 +1,5 @@
1
+ export declare const QUERY_GET_LIST_NOTIFICATION_BY_MODULE: string;
2
+ export declare const QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE: string;
3
+ export declare const MUTATION_UPDATE_NOTIFICATION_UNREAD = "\n mutation MyMutation($hostname: String!, $app: String!, $device_id: String!, $module_code: String!, $user_id: Int!, $total_notification: Int!, $total_notification_important: Int!) {\n update_feature_mobile_push_count_notification_unread(where: {deleted_at: {_is_null: true}, hostname: {_eq: $hostname}, module_code: {_eq: $module_code}, app: {_eq: $app}, device_id: {_eq: $device_id}, user_id: {_eq: $user_id}}, _set: {total_notification: $total_notification, total_notification_important: $total_notification_important, updated_at: \"now\"}) {\n returning {\n total_notification\n total_notification_important\n module_code\n }\n }\n }\n";
4
+ export declare const MUTATION_UPDATE_READ_NOTIFICATION: string;
5
+ export declare const MUTATION_INSERT_NOTIFICATION = "\n mutation MyMutation($total_notification: Int!, $total_notification_important: Int!, $user_id: Int!, $hostname: String!, $app: String!, $device_id: String!, $module_code: String!) {\n insert_feature_mobile_push_count_notification_unread(objects: {app: $app, created_at: \"now\", hostname: $hostname, module_code: $module_code, total_notification: $total_notification, total_notification_important: $total_notification_important, user_id: $user_id, device_id: $device_id}) {\n returning {\n total_notification_important\n total_notification\n module_code\n }\n }\n }\n";
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MUTATION_INSERT_NOTIFICATION = exports.MUTATION_UPDATE_READ_NOTIFICATION = exports.MUTATION_UPDATE_NOTIFICATION_UNREAD = exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = exports.QUERY_GET_LIST_NOTIFICATION_BY_MODULE = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ exports.QUERY_GET_LIST_NOTIFICATION_BY_MODULE = (0, graphql_request_1.gql) `
6
+ query MyQuery(
7
+ $app: String!
8
+ $device_id: String!
9
+ $user_id: Int!
10
+ $offset: Int!
11
+ $limit: Int!
12
+ $hostname: String!
13
+ $module_code: String!
14
+ ) {
15
+ feature_mobile_push(
16
+ where: {
17
+ deleted_at: { _is_null: true }
18
+ app: { _eq: $app }
19
+ is_seen: { _eq: false }
20
+ device_id: { _eq: $device_id }
21
+ user_id: { _eq: $user_id }
22
+ hostname: { _eq: $hostname }
23
+ module_code: { _eq: $module_code }
24
+ }
25
+ limit: $limit
26
+ offset: $offset
27
+ order_by: { created_at: desc }
28
+ ) {
29
+ id
30
+ title
31
+ content
32
+ created_at
33
+ payload
34
+ action
35
+ module_code
36
+ }
37
+ }
38
+ `;
39
+ exports.QUERY_GET_STATISTICAL_NOTIFICATION_UNREAD_BY_MODULE = (0, graphql_request_1.gql) `
40
+ query MyQuery(
41
+ $hostname: String!
42
+ $app: String!
43
+ $device_id: String!
44
+ $user_id: Int!
45
+ $module_code: String!
46
+ ) {
47
+ feature_mobile_push_count_notification_unread(
48
+ where: {
49
+ deleted_at: { _is_null: true }
50
+ hostname: { _eq: $hostname }
51
+ app: { _eq: $app }
52
+ device_id: { _eq: $device_id }
53
+ user_id: { _eq: $user_id }
54
+ module_code: { _eq: $module_code }
55
+ }
56
+ ) {
57
+ total_notification
58
+ total_notification_important
59
+ }
60
+ }
61
+ `;
62
+ exports.MUTATION_UPDATE_NOTIFICATION_UNREAD = `
63
+ mutation MyMutation($hostname: String!, $app: String!, $device_id: String!, $module_code: String!, $user_id: Int!, $total_notification: Int!, $total_notification_important: Int!) {
64
+ update_feature_mobile_push_count_notification_unread(where: {deleted_at: {_is_null: true}, hostname: {_eq: $hostname}, module_code: {_eq: $module_code}, app: {_eq: $app}, device_id: {_eq: $device_id}, user_id: {_eq: $user_id}}, _set: {total_notification: $total_notification, total_notification_important: $total_notification_important, updated_at: "now"}) {
65
+ returning {
66
+ total_notification
67
+ total_notification_important
68
+ module_code
69
+ }
70
+ }
71
+ }
72
+ `;
73
+ exports.MUTATION_UPDATE_READ_NOTIFICATION = (0, graphql_request_1.gql) `
74
+ mutation MyMutation($id: Int!) {
75
+ update_feature_mobile_push(
76
+ where: { id: { _eq: $id }, is_seen: { _eq: false } }
77
+ _set: { is_seen: true, updated_at: "now" }
78
+ ) {
79
+ returning {
80
+ type
81
+ module_code
82
+ }
83
+ }
84
+ }
85
+ `;
86
+ exports.MUTATION_INSERT_NOTIFICATION = `
87
+ mutation MyMutation($total_notification: Int!, $total_notification_important: Int!, $user_id: Int!, $hostname: String!, $app: String!, $device_id: String!, $module_code: String!) {
88
+ insert_feature_mobile_push_count_notification_unread(objects: {app: $app, created_at: "now", hostname: $hostname, module_code: $module_code, total_notification: $total_notification, total_notification_important: $total_notification_important, user_id: $user_id, device_id: $device_id}) {
89
+ returning {
90
+ total_notification_important
91
+ total_notification
92
+ module_code
93
+ }
94
+ }
95
+ }
96
+ `;
97
+ //# sourceMappingURL=query.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/query/notification/query.ts"],"names":[],"mappings":";;;AAAA,qDAAoC;AAEvB,QAAA,qCAAqC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCvD,CAAC;AAEW,QAAA,mDAAmD,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;CAsBrE,CAAC;AAEW,QAAA,mCAAmC,GAAG;;;;;;;;;;CAUlD,CAAC;AAEW,QAAA,iCAAiC,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;CAYnD,CAAC;AAEW,QAAA,4BAA4B,GAAG;;;;;;;;;;CAU3C,CAAC"}