plac-micro-common 1.2.69 → 1.2.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/models/application/app_activity_log.entity.d.ts +17 -0
- package/dist/models/application/app_activity_log.entity.js +90 -0
- package/dist/models/application/index.d.ts +4 -3
- package/dist/models/application/index.js +6 -3
- package/dist/types/application.type.d.ts +20 -0
- package/dist/types/application.type.js +22 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { _BaseEntity } from "../_base_entity";
|
|
2
|
+
import { ApplicationActionType, ApplicationStatus } from "../../types";
|
|
3
|
+
import { ApplicationEntity } from "./application.entity";
|
|
4
|
+
export declare class AppActivityLogEntity extends _BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
application_id: string;
|
|
7
|
+
actor_user_id?: string | null;
|
|
8
|
+
action_type: ApplicationActionType;
|
|
9
|
+
from_value?: string | null;
|
|
10
|
+
to_value?: string | null;
|
|
11
|
+
from_status?: ApplicationStatus | null;
|
|
12
|
+
to_status?: ApplicationStatus | null;
|
|
13
|
+
remark?: string | null;
|
|
14
|
+
metadata?: Record<string, any> | null;
|
|
15
|
+
correlation_id?: string | null;
|
|
16
|
+
application?: ApplicationEntity;
|
|
17
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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.AppActivityLogEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const utils_1 = require("../../utils");
|
|
15
|
+
const _base_entity_1 = require("../_base_entity");
|
|
16
|
+
const types_1 = require("../../types");
|
|
17
|
+
const application_entity_1 = require("./application.entity");
|
|
18
|
+
let AppActivityLogEntity = class AppActivityLogEntity extends _base_entity_1._BaseEntity {
|
|
19
|
+
};
|
|
20
|
+
exports.AppActivityLogEntity = AppActivityLogEntity;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], AppActivityLogEntity.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: "uuid" }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], AppActivityLogEntity.prototype, "application_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: "uuid", nullable: true }),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], AppActivityLogEntity.prototype, "actor_user_id", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({
|
|
35
|
+
type: "varchar",
|
|
36
|
+
length: 100,
|
|
37
|
+
comment: (0, utils_1.enumToCommentString)(types_1.ApplicationActionType),
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AppActivityLogEntity.prototype, "action_type", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
43
|
+
__metadata("design:type", Object)
|
|
44
|
+
], AppActivityLogEntity.prototype, "from_value", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
47
|
+
__metadata("design:type", Object)
|
|
48
|
+
], AppActivityLogEntity.prototype, "to_value", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({
|
|
51
|
+
type: "varchar",
|
|
52
|
+
length: 100,
|
|
53
|
+
comment: (0, utils_1.enumToCommentString)(types_1.ApplicationStatus),
|
|
54
|
+
nullable: true,
|
|
55
|
+
}),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], AppActivityLogEntity.prototype, "from_status", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({
|
|
60
|
+
type: "varchar",
|
|
61
|
+
length: 100,
|
|
62
|
+
comment: (0, utils_1.enumToCommentString)(types_1.ApplicationStatus),
|
|
63
|
+
nullable: true,
|
|
64
|
+
}),
|
|
65
|
+
__metadata("design:type", Object)
|
|
66
|
+
], AppActivityLogEntity.prototype, "to_status", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ type: "text", nullable: true }),
|
|
69
|
+
__metadata("design:type", Object)
|
|
70
|
+
], AppActivityLogEntity.prototype, "remark", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
|
|
73
|
+
__metadata("design:type", Object)
|
|
74
|
+
], AppActivityLogEntity.prototype, "metadata", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], AppActivityLogEntity.prototype, "correlation_id", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.ManyToOne)(() => application_entity_1.ApplicationEntity, { onDelete: "CASCADE" }),
|
|
81
|
+
(0, typeorm_1.JoinColumn)({ name: "application_id" }),
|
|
82
|
+
__metadata("design:type", application_entity_1.ApplicationEntity)
|
|
83
|
+
], AppActivityLogEntity.prototype, "application", void 0);
|
|
84
|
+
exports.AppActivityLogEntity = AppActivityLogEntity = __decorate([
|
|
85
|
+
(0, typeorm_1.Entity)({ schema: "application", name: "app_activity_logs" }),
|
|
86
|
+
(0, typeorm_1.Index)("idx_app_activity_logs_application_id", ["application_id"]),
|
|
87
|
+
(0, typeorm_1.Index)("idx_app_activity_logs_action_type", ["action_type"]),
|
|
88
|
+
(0, typeorm_1.Index)("idx_app_activity_logs_created_at", ["created_at"]),
|
|
89
|
+
(0, typeorm_1.Index)("idx_app_activity_logs_app_created_at", ["application_id", "created_at"])
|
|
90
|
+
], AppActivityLogEntity);
|
|
@@ -3,7 +3,8 @@ import { AppBeneficiaryEntity } from "./app_beneficiary.entity";
|
|
|
3
3
|
import { AppCoverageEntity } from "./app_coverage.entity";
|
|
4
4
|
import { AppPersonEntity } from "./app_person.entity";
|
|
5
5
|
import { AppUnderwritingAnswerEntity } from "./app_underwriting_answer.entity";
|
|
6
|
-
import { UnderwritingQuestionEntity } from "./underwriting_question.entity";
|
|
7
6
|
import { AppUnderwritingInfoEntity } from "./app_underwriting_info.entity";
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
import { AppActivityLogEntity } from "./app_activity_log.entity";
|
|
8
|
+
import { UnderwritingQuestionEntity } from "./underwriting_question.entity";
|
|
9
|
+
export declare const APPLICATION_ENTITIES: readonly [typeof ApplicationEntity, typeof AppBeneficiaryEntity, typeof AppCoverageEntity, typeof AppPersonEntity, typeof AppUnderwritingAnswerEntity, typeof AppUnderwritingInfoEntity, typeof AppActivityLogEntity, typeof UnderwritingQuestionEntity];
|
|
10
|
+
export { ApplicationEntity, AppBeneficiaryEntity, AppCoverageEntity, AppPersonEntity, AppUnderwritingAnswerEntity, AppUnderwritingInfoEntity, AppActivityLogEntity, UnderwritingQuestionEntity, };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UnderwritingQuestionEntity = exports.AppUnderwritingInfoEntity = exports.AppUnderwritingAnswerEntity = exports.AppPersonEntity = exports.AppCoverageEntity = exports.AppBeneficiaryEntity = exports.ApplicationEntity = exports.APPLICATION_ENTITIES = void 0;
|
|
3
|
+
exports.UnderwritingQuestionEntity = exports.AppActivityLogEntity = exports.AppUnderwritingInfoEntity = exports.AppUnderwritingAnswerEntity = exports.AppPersonEntity = exports.AppCoverageEntity = exports.AppBeneficiaryEntity = exports.ApplicationEntity = exports.APPLICATION_ENTITIES = void 0;
|
|
4
4
|
const application_entity_1 = require("./application.entity");
|
|
5
5
|
Object.defineProperty(exports, "ApplicationEntity", { enumerable: true, get: function () { return application_entity_1.ApplicationEntity; } });
|
|
6
6
|
const app_beneficiary_entity_1 = require("./app_beneficiary.entity");
|
|
@@ -11,10 +11,12 @@ const app_person_entity_1 = require("./app_person.entity");
|
|
|
11
11
|
Object.defineProperty(exports, "AppPersonEntity", { enumerable: true, get: function () { return app_person_entity_1.AppPersonEntity; } });
|
|
12
12
|
const app_underwriting_answer_entity_1 = require("./app_underwriting_answer.entity");
|
|
13
13
|
Object.defineProperty(exports, "AppUnderwritingAnswerEntity", { enumerable: true, get: function () { return app_underwriting_answer_entity_1.AppUnderwritingAnswerEntity; } });
|
|
14
|
-
const underwriting_question_entity_1 = require("./underwriting_question.entity");
|
|
15
|
-
Object.defineProperty(exports, "UnderwritingQuestionEntity", { enumerable: true, get: function () { return underwriting_question_entity_1.UnderwritingQuestionEntity; } });
|
|
16
14
|
const app_underwriting_info_entity_1 = require("./app_underwriting_info.entity");
|
|
17
15
|
Object.defineProperty(exports, "AppUnderwritingInfoEntity", { enumerable: true, get: function () { return app_underwriting_info_entity_1.AppUnderwritingInfoEntity; } });
|
|
16
|
+
const app_activity_log_entity_1 = require("./app_activity_log.entity");
|
|
17
|
+
Object.defineProperty(exports, "AppActivityLogEntity", { enumerable: true, get: function () { return app_activity_log_entity_1.AppActivityLogEntity; } });
|
|
18
|
+
const underwriting_question_entity_1 = require("./underwriting_question.entity");
|
|
19
|
+
Object.defineProperty(exports, "UnderwritingQuestionEntity", { enumerable: true, get: function () { return underwriting_question_entity_1.UnderwritingQuestionEntity; } });
|
|
18
20
|
exports.APPLICATION_ENTITIES = [
|
|
19
21
|
application_entity_1.ApplicationEntity,
|
|
20
22
|
app_beneficiary_entity_1.AppBeneficiaryEntity,
|
|
@@ -22,5 +24,6 @@ exports.APPLICATION_ENTITIES = [
|
|
|
22
24
|
app_person_entity_1.AppPersonEntity,
|
|
23
25
|
app_underwriting_answer_entity_1.AppUnderwritingAnswerEntity,
|
|
24
26
|
app_underwriting_info_entity_1.AppUnderwritingInfoEntity,
|
|
27
|
+
app_activity_log_entity_1.AppActivityLogEntity,
|
|
25
28
|
underwriting_question_entity_1.UnderwritingQuestionEntity,
|
|
26
29
|
];
|
|
@@ -11,6 +11,26 @@ export declare enum ApplicationStatus {
|
|
|
11
11
|
Transferred = "transferred",// pushed to core successfully
|
|
12
12
|
Cancelled = "cancelled"
|
|
13
13
|
}
|
|
14
|
+
export declare enum ApplicationActionType {
|
|
15
|
+
Created = "created",
|
|
16
|
+
DraftSaved = "draft_saved",
|
|
17
|
+
Completed = "completed",
|
|
18
|
+
Submitted = "submitted",
|
|
19
|
+
TakenForReview = "taken_for_review",
|
|
20
|
+
Assigned = "assigned",
|
|
21
|
+
Unassigned = "unassigned",
|
|
22
|
+
EditRequested = "edit_requested",
|
|
23
|
+
MoreDocumentsRequested = "more_documents_requested",
|
|
24
|
+
Resubmitted = "resubmitted",
|
|
25
|
+
Approved = "approved",
|
|
26
|
+
Rejected = "rejected",
|
|
27
|
+
Cancelled = "cancelled",
|
|
28
|
+
Transferred = "transferred",
|
|
29
|
+
NoteAdded = "note_added",
|
|
30
|
+
DocumentUploaded = "document_uploaded",
|
|
31
|
+
DocumentRemoved = "document_removed",
|
|
32
|
+
DataUpdated = "data_updated"
|
|
33
|
+
}
|
|
14
34
|
export declare enum AppPersonRole {
|
|
15
35
|
PolicyHolder = "policy_holder",
|
|
16
36
|
LifeAssured = "life_assured"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UwAnswerValueType = exports.AppCoverageType = exports.AppPhLaRelation = exports.AppPersonRole = exports.ApplicationStatus = void 0;
|
|
3
|
+
exports.UwAnswerValueType = exports.AppCoverageType = exports.AppPhLaRelation = exports.AppPersonRole = exports.ApplicationActionType = exports.ApplicationStatus = void 0;
|
|
4
4
|
var ApplicationStatus;
|
|
5
5
|
(function (ApplicationStatus) {
|
|
6
6
|
ApplicationStatus["New"] = "new";
|
|
@@ -15,6 +15,27 @@ var ApplicationStatus;
|
|
|
15
15
|
ApplicationStatus["Transferred"] = "transferred";
|
|
16
16
|
ApplicationStatus["Cancelled"] = "cancelled";
|
|
17
17
|
})(ApplicationStatus || (exports.ApplicationStatus = ApplicationStatus = {}));
|
|
18
|
+
var ApplicationActionType;
|
|
19
|
+
(function (ApplicationActionType) {
|
|
20
|
+
ApplicationActionType["Created"] = "created";
|
|
21
|
+
ApplicationActionType["DraftSaved"] = "draft_saved";
|
|
22
|
+
ApplicationActionType["Completed"] = "completed";
|
|
23
|
+
ApplicationActionType["Submitted"] = "submitted";
|
|
24
|
+
ApplicationActionType["TakenForReview"] = "taken_for_review";
|
|
25
|
+
ApplicationActionType["Assigned"] = "assigned";
|
|
26
|
+
ApplicationActionType["Unassigned"] = "unassigned";
|
|
27
|
+
ApplicationActionType["EditRequested"] = "edit_requested";
|
|
28
|
+
ApplicationActionType["MoreDocumentsRequested"] = "more_documents_requested";
|
|
29
|
+
ApplicationActionType["Resubmitted"] = "resubmitted";
|
|
30
|
+
ApplicationActionType["Approved"] = "approved";
|
|
31
|
+
ApplicationActionType["Rejected"] = "rejected";
|
|
32
|
+
ApplicationActionType["Cancelled"] = "cancelled";
|
|
33
|
+
ApplicationActionType["Transferred"] = "transferred";
|
|
34
|
+
ApplicationActionType["NoteAdded"] = "note_added";
|
|
35
|
+
ApplicationActionType["DocumentUploaded"] = "document_uploaded";
|
|
36
|
+
ApplicationActionType["DocumentRemoved"] = "document_removed";
|
|
37
|
+
ApplicationActionType["DataUpdated"] = "data_updated";
|
|
38
|
+
})(ApplicationActionType || (exports.ApplicationActionType = ApplicationActionType = {}));
|
|
18
39
|
var AppPersonRole;
|
|
19
40
|
(function (AppPersonRole) {
|
|
20
41
|
AppPersonRole["PolicyHolder"] = "policy_holder";
|