plac-micro-common 1.3.69 → 1.3.71
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/constants/redis.constant.d.ts +7 -0
- package/dist/constants/redis.constant.js +11 -4
- package/dist/models/application/application.entity.js +1 -1
- package/dist/models/application/underwriting_question.entity.d.ts +2 -1
- package/dist/models/application/underwriting_question.entity.js +9 -0
- package/dist/models/core/product/product.entity.d.ts +2 -1
- package/dist/models/core/product/product.entity.js +9 -0
- package/dist/types/application.type.d.ts +1 -1
- package/dist/types/application.type.js +1 -1
- package/dist/types/general.type.d.ts +1 -0
- package/dist/types/general.type.js +1 -0
- package/dist/types/notification.type.d.ts +47 -0
- package/dist/types/notification.type.js +58 -0
- package/dist/utils/frontend/data.util.d.ts +1 -1
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ export declare const REDIS_CACHE_KEYS: {
|
|
|
3
3
|
readonly Info: (appId: string) => string;
|
|
4
4
|
};
|
|
5
5
|
readonly AppClient: {
|
|
6
|
+
readonly Info: (id: string) => string;
|
|
6
7
|
readonly ClientIdInfo: (clientId: string) => string;
|
|
7
8
|
};
|
|
8
9
|
readonly General: {
|
|
@@ -14,6 +15,8 @@ export declare const REDIS_CACHE_KEYS: {
|
|
|
14
15
|
};
|
|
15
16
|
readonly User: {
|
|
16
17
|
readonly Info: (userId: string) => string;
|
|
18
|
+
readonly RoleMenu: (userId: string, appId: string) => string;
|
|
19
|
+
readonly RolePermission: (userId: string, appId: string) => string;
|
|
17
20
|
};
|
|
18
21
|
};
|
|
19
22
|
export declare const REDIS_CACHE_TTL: {
|
|
@@ -25,4 +28,8 @@ export declare const REDIS_CACHE_TTL: {
|
|
|
25
28
|
};
|
|
26
29
|
Dropdown: number;
|
|
27
30
|
UserInfo: number;
|
|
31
|
+
User: {
|
|
32
|
+
RoleMenu: number;
|
|
33
|
+
RolePermission: number;
|
|
34
|
+
};
|
|
28
35
|
};
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.REDIS_CACHE_TTL = exports.REDIS_CACHE_KEYS = void 0;
|
|
4
4
|
exports.REDIS_CACHE_KEYS = {
|
|
5
5
|
App: {
|
|
6
|
-
Info: (appId) => `app:${appId}
|
|
6
|
+
Info: (appId) => `app:${appId}`,
|
|
7
7
|
},
|
|
8
8
|
AppClient: {
|
|
9
|
-
|
|
9
|
+
Info: (id) => `app-client:${id}`,
|
|
10
|
+
ClientIdInfo: (clientId) => `app-client-clientId:${clientId}`,
|
|
10
11
|
},
|
|
11
12
|
General: {
|
|
12
13
|
MaritalStatus: "v1:general:dropdown:marital-status",
|
|
@@ -16,7 +17,9 @@ exports.REDIS_CACHE_KEYS = {
|
|
|
16
17
|
Occupation: "v1:general:dropdown:occupation",
|
|
17
18
|
},
|
|
18
19
|
User: {
|
|
19
|
-
Info: (userId) => `
|
|
20
|
+
Info: (userId) => `user:${userId}`,
|
|
21
|
+
RoleMenu: (userId, appId) => `user-role-menu:${userId}:${appId}`,
|
|
22
|
+
RolePermission: (userId, appId) => `user-role-permission:${userId}:${appId}`,
|
|
20
23
|
},
|
|
21
24
|
};
|
|
22
25
|
exports.REDIS_CACHE_TTL = {
|
|
@@ -26,6 +29,10 @@ exports.REDIS_CACHE_TTL = {
|
|
|
26
29
|
AppClientInfo: {
|
|
27
30
|
Default: 60 * 60 * 12, // 12 hour
|
|
28
31
|
},
|
|
29
|
-
Dropdown: 60 * 60 * 6, //
|
|
32
|
+
Dropdown: 60 * 60 * 6, // 12 hours
|
|
30
33
|
UserInfo: 60 * 15, // 15 minutes
|
|
34
|
+
User: {
|
|
35
|
+
RoleMenu: 60 * 15, // 15 minutes
|
|
36
|
+
RolePermission: 60 * 15, // 15 minutes
|
|
37
|
+
},
|
|
31
38
|
};
|
|
@@ -34,7 +34,7 @@ __decorate([
|
|
|
34
34
|
type: "varchar",
|
|
35
35
|
length: 10,
|
|
36
36
|
comment: (0, utils_1.enumToCommentString)(types_1.AppFormType),
|
|
37
|
-
default: types_1.AppFormType.
|
|
37
|
+
default: types_1.AppFormType.Base,
|
|
38
38
|
}),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], ApplicationEntity.prototype, "form_type", void 0);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { _BaseEntity } from "../_base_entity";
|
|
2
|
-
import { UwAnswerValueType } from "../../types";
|
|
2
|
+
import { AppFormType, UwAnswerValueType } from "../../types";
|
|
3
3
|
export declare class UnderwritingQuestionEntity extends _BaseEntity {
|
|
4
4
|
id: string;
|
|
5
|
+
question_app_form_type: AppFormType;
|
|
5
6
|
question_code: string;
|
|
6
7
|
question_text: string;
|
|
7
8
|
question_text_kh?: string;
|
|
@@ -21,6 +21,15 @@ __decorate([
|
|
|
21
21
|
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
22
22
|
__metadata("design:type", String)
|
|
23
23
|
], UnderwritingQuestionEntity.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({
|
|
26
|
+
type: "varchar",
|
|
27
|
+
length: 10,
|
|
28
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AppFormType),
|
|
29
|
+
default: types_1.AppFormType.Base,
|
|
30
|
+
}),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], UnderwritingQuestionEntity.prototype, "question_app_form_type", void 0);
|
|
24
33
|
__decorate([
|
|
25
34
|
(0, typeorm_1.Index)(),
|
|
26
35
|
(0, typeorm_1.Column)({ type: "varchar", length: 50, unique: true }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _BaseEntity } from "../../_base_entity";
|
|
2
|
-
import { ProductCode } from "../../../types";
|
|
2
|
+
import { AppFormType, ProductCode } from "../../../types";
|
|
3
3
|
import { ProductTypeEntity } from "./product_type.entity";
|
|
4
4
|
import { ProductTermEntity } from "./product_term.entity";
|
|
5
5
|
import { ProductPaymentModeEntity } from "./product_payment_mode.entity";
|
|
@@ -9,6 +9,7 @@ export declare class ProductEntity extends _BaseEntity {
|
|
|
9
9
|
id: string;
|
|
10
10
|
product_type_id: string;
|
|
11
11
|
product_code: ProductCode;
|
|
12
|
+
product_app_form_type: AppFormType;
|
|
12
13
|
name: string;
|
|
13
14
|
name_kh: string | null;
|
|
14
15
|
is_active: boolean;
|
|
@@ -39,6 +39,15 @@ __decorate([
|
|
|
39
39
|
}),
|
|
40
40
|
__metadata("design:type", String)
|
|
41
41
|
], ProductEntity.prototype, "product_code", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({
|
|
44
|
+
type: "varchar",
|
|
45
|
+
length: 10,
|
|
46
|
+
comment: (0, utils_1.enumToCommentString)(types_1.AppFormType),
|
|
47
|
+
default: types_1.AppFormType.Base,
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], ProductEntity.prototype, "product_app_form_type", void 0);
|
|
42
51
|
__decorate([
|
|
43
52
|
(0, typeorm_1.Column)({ type: "varchar", length: 255 }),
|
|
44
53
|
__metadata("design:type", String)
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.AppPaymentStatus = exports.AppPaymentType = exports.AppDocumentType = exports.UwAnswerValueType = exports.AppCoverageType = exports.AppPhLaRelation = exports.AppPersonRole = exports.ApplicationActionType = exports.ApplicationStatus = exports.AppFormType = void 0;
|
|
4
4
|
var AppFormType;
|
|
5
5
|
(function (AppFormType) {
|
|
6
|
-
AppFormType["
|
|
6
|
+
AppFormType["Base"] = "base";
|
|
7
7
|
AppFormType["Simplified"] = "sio";
|
|
8
8
|
})(AppFormType || (exports.AppFormType = AppFormType = {}));
|
|
9
9
|
var ApplicationStatus;
|
|
@@ -26,6 +26,7 @@ var AddressType;
|
|
|
26
26
|
AddressType["Home"] = "home";
|
|
27
27
|
AddressType["Work"] = "work";
|
|
28
28
|
AddressType["Billing"] = "billing";
|
|
29
|
+
AddressType["PlaceOfBirth"] = "pob";
|
|
29
30
|
AddressType["Other"] = "other";
|
|
30
31
|
})(AddressType || (exports.AddressType = AddressType = {}));
|
|
31
32
|
var IdentifierType;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare enum ETargetType {
|
|
2
|
+
USER = "user",
|
|
3
|
+
ROLE = "role"
|
|
4
|
+
}
|
|
5
|
+
export declare enum EEventRouteKeyType {
|
|
6
|
+
APP_SUBMIT = "app.submit",
|
|
7
|
+
APP_ACCEPT = "app.accept",
|
|
8
|
+
APP_RESUBMIT = "app.resubmit",
|
|
9
|
+
APP_EDIT_REQUIRED = "app.edit_required",
|
|
10
|
+
APP_MORE_DOC_REQUIRED = "app.more_doc_required",
|
|
11
|
+
APP_TAKE_ACTION = "app.take_action",
|
|
12
|
+
APP_REJECT = "app.reject"
|
|
13
|
+
}
|
|
14
|
+
export declare enum EEventType {
|
|
15
|
+
USER_ACTION = "user_action",
|
|
16
|
+
SYSTEM_EVENT = "system_event",
|
|
17
|
+
SCHEDULED_JOB = "scheduled_job",
|
|
18
|
+
EXTERNAL_B2B_EVENT = "external_b2b_event"
|
|
19
|
+
}
|
|
20
|
+
export declare enum ESourceServiceType {
|
|
21
|
+
APPLICATION_SERVICE = "application_service",
|
|
22
|
+
AUTH_SERVICE = "auth_service",
|
|
23
|
+
QUOTATION_SERVICE = "quotation_service",
|
|
24
|
+
RABBITMQ = "rabbitmq"
|
|
25
|
+
}
|
|
26
|
+
export declare enum EDeliveryStatusType {
|
|
27
|
+
PENDING = "pending",
|
|
28
|
+
SENT = "sent",
|
|
29
|
+
FAILED = "failed"
|
|
30
|
+
}
|
|
31
|
+
export declare enum ERecipientType {
|
|
32
|
+
USER = "user",
|
|
33
|
+
CUSTOMER = "customer"
|
|
34
|
+
}
|
|
35
|
+
export declare enum EPriorityType {
|
|
36
|
+
LOW = "low",
|
|
37
|
+
MEDIUM = "medium",
|
|
38
|
+
HIGH = "high"
|
|
39
|
+
}
|
|
40
|
+
export declare enum EChannelType {
|
|
41
|
+
EMAIL = "email",
|
|
42
|
+
SMS = "sms",
|
|
43
|
+
WEB = "web",
|
|
44
|
+
TELEGRAM = "telegram",
|
|
45
|
+
DEVICE = "device",
|
|
46
|
+
IN_APP = "in_app"
|
|
47
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EChannelType = exports.EPriorityType = exports.ERecipientType = exports.EDeliveryStatusType = exports.ESourceServiceType = exports.EEventType = exports.EEventRouteKeyType = exports.ETargetType = void 0;
|
|
4
|
+
var ETargetType;
|
|
5
|
+
(function (ETargetType) {
|
|
6
|
+
ETargetType["USER"] = "user";
|
|
7
|
+
ETargetType["ROLE"] = "role";
|
|
8
|
+
})(ETargetType || (exports.ETargetType = ETargetType = {}));
|
|
9
|
+
var EEventRouteKeyType;
|
|
10
|
+
(function (EEventRouteKeyType) {
|
|
11
|
+
EEventRouteKeyType["APP_SUBMIT"] = "app.submit";
|
|
12
|
+
EEventRouteKeyType["APP_ACCEPT"] = "app.accept";
|
|
13
|
+
EEventRouteKeyType["APP_RESUBMIT"] = "app.resubmit";
|
|
14
|
+
EEventRouteKeyType["APP_EDIT_REQUIRED"] = "app.edit_required";
|
|
15
|
+
EEventRouteKeyType["APP_MORE_DOC_REQUIRED"] = "app.more_doc_required";
|
|
16
|
+
EEventRouteKeyType["APP_TAKE_ACTION"] = "app.take_action";
|
|
17
|
+
EEventRouteKeyType["APP_REJECT"] = "app.reject";
|
|
18
|
+
})(EEventRouteKeyType || (exports.EEventRouteKeyType = EEventRouteKeyType = {}));
|
|
19
|
+
var EEventType;
|
|
20
|
+
(function (EEventType) {
|
|
21
|
+
EEventType["USER_ACTION"] = "user_action";
|
|
22
|
+
EEventType["SYSTEM_EVENT"] = "system_event";
|
|
23
|
+
EEventType["SCHEDULED_JOB"] = "scheduled_job";
|
|
24
|
+
EEventType["EXTERNAL_B2B_EVENT"] = "external_b2b_event";
|
|
25
|
+
})(EEventType || (exports.EEventType = EEventType = {}));
|
|
26
|
+
var ESourceServiceType;
|
|
27
|
+
(function (ESourceServiceType) {
|
|
28
|
+
ESourceServiceType["APPLICATION_SERVICE"] = "application_service";
|
|
29
|
+
ESourceServiceType["AUTH_SERVICE"] = "auth_service";
|
|
30
|
+
ESourceServiceType["QUOTATION_SERVICE"] = "quotation_service";
|
|
31
|
+
ESourceServiceType["RABBITMQ"] = "rabbitmq";
|
|
32
|
+
})(ESourceServiceType || (exports.ESourceServiceType = ESourceServiceType = {}));
|
|
33
|
+
var EDeliveryStatusType;
|
|
34
|
+
(function (EDeliveryStatusType) {
|
|
35
|
+
EDeliveryStatusType["PENDING"] = "pending";
|
|
36
|
+
EDeliveryStatusType["SENT"] = "sent";
|
|
37
|
+
EDeliveryStatusType["FAILED"] = "failed";
|
|
38
|
+
})(EDeliveryStatusType || (exports.EDeliveryStatusType = EDeliveryStatusType = {}));
|
|
39
|
+
var ERecipientType;
|
|
40
|
+
(function (ERecipientType) {
|
|
41
|
+
ERecipientType["USER"] = "user";
|
|
42
|
+
ERecipientType["CUSTOMER"] = "customer";
|
|
43
|
+
})(ERecipientType || (exports.ERecipientType = ERecipientType = {}));
|
|
44
|
+
var EPriorityType;
|
|
45
|
+
(function (EPriorityType) {
|
|
46
|
+
EPriorityType["LOW"] = "low";
|
|
47
|
+
EPriorityType["MEDIUM"] = "medium";
|
|
48
|
+
EPriorityType["HIGH"] = "high";
|
|
49
|
+
})(EPriorityType || (exports.EPriorityType = EPriorityType = {}));
|
|
50
|
+
var EChannelType;
|
|
51
|
+
(function (EChannelType) {
|
|
52
|
+
EChannelType["EMAIL"] = "email";
|
|
53
|
+
EChannelType["SMS"] = "sms";
|
|
54
|
+
EChannelType["WEB"] = "web";
|
|
55
|
+
EChannelType["TELEGRAM"] = "telegram";
|
|
56
|
+
EChannelType["DEVICE"] = "device";
|
|
57
|
+
EChannelType["IN_APP"] = "in_app";
|
|
58
|
+
})(EChannelType || (exports.EChannelType = EChannelType = {}));
|
|
@@ -3,7 +3,7 @@ export declare function getGenderDesc(val: Gender): "Male" | "Female";
|
|
|
3
3
|
export declare function getAppPhLaRelationDesc(val: AppPhLaRelation): "PH = LA" | "PH != LA";
|
|
4
4
|
export declare function getIdentifierTypeDesc(val: IdentifierType): "Other" | "National ID" | "Passport" | "Birth Certificate" | "Tax ID" | "Company Registration";
|
|
5
5
|
export declare function getContactTypeDesc(val: ContactType): "Other" | "Phone Number" | "Email" | "Website" | "Social Media";
|
|
6
|
-
export declare function getAddressTypeDesc(val: AddressType): "Other" | "Home" | "Work" | "Billing";
|
|
6
|
+
export declare function getAddressTypeDesc(val: AddressType): "Other" | AddressType.PlaceOfBirth | "Home" | "Work" | "Billing";
|
|
7
7
|
export declare function getAppDocumentTypeDesc(val: AppDocumentType): "Other" | "National ID" | "Passport" | "Application Form" | "Quotation Form" | "Claim Form";
|
|
8
8
|
export declare function getAppActionTypeDesc(val: ApplicationActionType): ApplicationActionType.Created | ApplicationActionType.DraftSaved | ApplicationActionType.Completed | ApplicationActionType.EditCompleted | ApplicationActionType.TakenForReview | ApplicationActionType.Assigned | ApplicationActionType.Unassigned | ApplicationActionType.DocumentRemoved | ApplicationActionType.DataUpdated | "Submit" | "Re-Submit" | "Approve" | "Reject" | "Request Edit" | "Request More Documents" | "Cancel" | "Transfer" | "Add Note" | "Upload Document";
|
|
9
9
|
export declare function getOrgTypeDesc(val: OrgType): "Internal" | "Bank" | "Micro Finance" | "Agency" | "Broker";
|