plac-micro-common 1.3.118 → 1.3.120

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.
Files changed (41) hide show
  1. package/CLAUDE.md +90 -0
  2. package/README.md +31 -0
  3. package/dist/models/application/application.entity.d.ts +4 -0
  4. package/dist/models/application/application.entity.js +29 -3
  5. package/dist/models/core/product/promotion_org.entity.js +9 -3
  6. package/dist/models/core/product/promotion_product.entity.js +1 -1
  7. package/dist/models/customer/customer_loan_person.entity.js +8 -2
  8. package/dist/models/index.d.ts +2 -0
  9. package/dist/models/index.js +2 -0
  10. package/dist/models/ingenium/index.d.ts +9 -0
  11. package/dist/models/ingenium/index.js +26 -0
  12. package/dist/models/ingenium/tcli.entity.d.ts +41 -0
  13. package/dist/models/ingenium/tcli.entity.js +175 -0
  14. package/dist/models/ingenium/tcvg.entity.d.ts +40 -0
  15. package/dist/models/ingenium/tcvg.entity.js +172 -0
  16. package/dist/models/ingenium/tcvgc.entity.d.ts +14 -0
  17. package/dist/models/ingenium/tcvgc.entity.js +73 -0
  18. package/dist/models/ingenium/tedit.entity.d.ts +12 -0
  19. package/dist/models/ingenium/tedit.entity.js +63 -0
  20. package/dist/models/ingenium/tpol.entity.d.ts +54 -0
  21. package/dist/models/ingenium/tpol.entity.js +230 -0
  22. package/dist/models/ingenium/tpolc.entity.d.ts +15 -0
  23. package/dist/models/ingenium/tpolc.entity.js +78 -0
  24. package/dist/models/ingenium/treqt.entity.d.ts +24 -0
  25. package/dist/models/ingenium/treqt.entity.js +114 -0
  26. package/dist/models/underwriting/index.d.ts +4 -0
  27. package/dist/models/underwriting/index.js +8 -0
  28. package/dist/models/underwriting/uw_case.entity.d.ts +21 -0
  29. package/dist/models/underwriting/uw_case.entity.js +102 -0
  30. package/dist/models/underwriting/uw_case_event.entity.d.ts +16 -0
  31. package/dist/models/underwriting/uw_case_event.entity.js +78 -0
  32. package/dist/types/application.type.d.ts +3 -1
  33. package/dist/types/application.type.js +2 -0
  34. package/dist/types/permission.type.d.ts +1 -0
  35. package/dist/types/permission.type.js +1 -0
  36. package/dist/types/underwriting.type.d.ts +9 -0
  37. package/dist/types/underwriting.type.js +15 -1
  38. package/dist/utils/frontend/data.util.d.ts +28 -2
  39. package/dist/utils/frontend/data.util.js +364 -0
  40. package/package.json +3 -2
  41. package/scripts/wait-for-pg.sh +18 -0
@@ -0,0 +1,78 @@
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.TPolcEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ let TPolcEntity = class TPolcEntity extends _base_entity_1._BaseEntity {
16
+ };
17
+ exports.TPolcEntity = TPolcEntity;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
20
+ __metadata("design:type", String)
21
+ ], TPolcEntity.prototype, "id", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: "varchar", length: 5 }),
24
+ __metadata("design:type", String)
25
+ ], TPolcEntity.prototype, "CO_ID", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Index)(),
28
+ (0, typeorm_1.Column)({ type: "varchar", length: 20 }),
29
+ __metadata("design:type", String)
30
+ ], TPolcEntity.prototype, "POL_ID", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Index)(),
33
+ (0, typeorm_1.Column)({ type: "varchar", length: 20 }),
34
+ __metadata("design:type", String)
35
+ ], TPolcEntity.prototype, "CLI_ID", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Index)(),
38
+ (0, typeorm_1.Column)({ type: "varchar", length: 5 }),
39
+ __metadata("design:type", String)
40
+ ], TPolcEntity.prototype, "POL_CLI_REL_TYP_CD", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "varchar", length: 5, nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], TPolcEntity.prototype, "POL_CLI_REL_SUB_CD", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "varchar", length: 5, nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], TPolcEntity.prototype, "POL_CLI_INSRD_CD", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "varchar", length: 5, nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], TPolcEntity.prototype, "CLI_ADDR_TYP_CD", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], TPolcEntity.prototype, "POL_CLI_ASIGN_DT", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], TPolcEntity.prototype, "PREV_UPDT_USER_ID", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], TPolcEntity.prototype, "PREV_UPDT_DT", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], TPolcEntity.prototype, "synced_at", void 0);
69
+ exports.TPolcEntity = TPolcEntity = __decorate([
70
+ (0, typeorm_1.Entity)({ schema: "ingenium", name: "TPOLC" }),
71
+ (0, typeorm_1.Unique)("uq_tpolc_co_pol_rel_insrd_cli", [
72
+ "CO_ID",
73
+ "POL_ID",
74
+ "POL_CLI_REL_TYP_CD",
75
+ "POL_CLI_INSRD_CD",
76
+ "CLI_ID",
77
+ ])
78
+ ], TPolcEntity);
@@ -0,0 +1,24 @@
1
+ import { _BaseEntity } from "../_base_entity";
2
+ export declare class TReqtEntity extends _BaseEntity {
3
+ id: string;
4
+ CO_ID: string;
5
+ CPREQ_POL_CLI_CD: string;
6
+ POL_CLI_ID: string;
7
+ REQIR_ID: string;
8
+ CPREQ_SEQ_NUM: string;
9
+ CPREQ_STAT_CD?: string | null;
10
+ CPREQ_CREAT_DT?: string | null;
11
+ CPREQ_EFF_DT?: string | null;
12
+ CPREQ_VALID_DT?: string | null;
13
+ CPREQ_FOLWUP_NUM?: string | null;
14
+ CPREQ_FOLWUP_DT?: string | null;
15
+ CPREQ_TST_DT?: string | null;
16
+ CPREQ_TST_RSLT_CD?: string | null;
17
+ CPREQ_NEW_RSLT_IND?: string | null;
18
+ CPREQ_DESGNT_ID?: string | null;
19
+ CPREQ_PD_IND?: string | null;
20
+ USER_ID?: string | null;
21
+ PREV_UPDT_USER_ID?: string | null;
22
+ PREV_UPDT_DT?: string | null;
23
+ synced_at?: Date | null;
24
+ }
@@ -0,0 +1,114 @@
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.TReqtEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ let TReqtEntity = class TReqtEntity extends _base_entity_1._BaseEntity {
16
+ };
17
+ exports.TReqtEntity = TReqtEntity;
18
+ __decorate([
19
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
20
+ __metadata("design:type", String)
21
+ ], TReqtEntity.prototype, "id", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: "varchar", length: 5 }),
24
+ __metadata("design:type", String)
25
+ ], TReqtEntity.prototype, "CO_ID", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: "varchar", length: 1 }),
28
+ __metadata("design:type", String)
29
+ ], TReqtEntity.prototype, "CPREQ_POL_CLI_CD", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Index)(),
32
+ (0, typeorm_1.Column)({ type: "varchar", length: 20 }),
33
+ __metadata("design:type", String)
34
+ ], TReqtEntity.prototype, "POL_CLI_ID", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Index)(),
37
+ (0, typeorm_1.Column)({ type: "varchar", length: 10 }),
38
+ __metadata("design:type", String)
39
+ ], TReqtEntity.prototype, "REQIR_ID", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "varchar", length: 5 }),
42
+ __metadata("design:type", String)
43
+ ], TReqtEntity.prototype, "CPREQ_SEQ_NUM", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Index)(),
46
+ (0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], TReqtEntity.prototype, "CPREQ_STAT_CD", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], TReqtEntity.prototype, "CPREQ_CREAT_DT", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], TReqtEntity.prototype, "CPREQ_EFF_DT", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], TReqtEntity.prototype, "CPREQ_VALID_DT", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "varchar", length: 5, nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], TReqtEntity.prototype, "CPREQ_FOLWUP_NUM", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
67
+ __metadata("design:type", Object)
68
+ ], TReqtEntity.prototype, "CPREQ_FOLWUP_DT", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], TReqtEntity.prototype, "CPREQ_TST_DT", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({ type: "varchar", length: 5, nullable: true }),
75
+ __metadata("design:type", Object)
76
+ ], TReqtEntity.prototype, "CPREQ_TST_RSLT_CD", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.Column)({ type: "varchar", length: 1, nullable: true }),
79
+ __metadata("design:type", Object)
80
+ ], TReqtEntity.prototype, "CPREQ_NEW_RSLT_IND", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
83
+ __metadata("design:type", Object)
84
+ ], TReqtEntity.prototype, "CPREQ_DESGNT_ID", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.Column)({ type: "varchar", length: 1, nullable: true }),
87
+ __metadata("design:type", Object)
88
+ ], TReqtEntity.prototype, "CPREQ_PD_IND", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
91
+ __metadata("design:type", Object)
92
+ ], TReqtEntity.prototype, "USER_ID", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
95
+ __metadata("design:type", Object)
96
+ ], TReqtEntity.prototype, "PREV_UPDT_USER_ID", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.Column)({ type: "date", nullable: true }),
99
+ __metadata("design:type", Object)
100
+ ], TReqtEntity.prototype, "PREV_UPDT_DT", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
103
+ __metadata("design:type", Object)
104
+ ], TReqtEntity.prototype, "synced_at", void 0);
105
+ exports.TReqtEntity = TReqtEntity = __decorate([
106
+ (0, typeorm_1.Entity)({ schema: "ingenium", name: "TREQT" }),
107
+ (0, typeorm_1.Unique)("uq_treqt_co_typ_id_reqir_seq", [
108
+ "CO_ID",
109
+ "CPREQ_POL_CLI_CD",
110
+ "POL_CLI_ID",
111
+ "REQIR_ID",
112
+ "CPREQ_SEQ_NUM",
113
+ ])
114
+ ], TReqtEntity);
@@ -0,0 +1,4 @@
1
+ import { UwCaseEntity } from "./uw_case.entity";
2
+ import { UwCaseEventEntity } from "./uw_case_event.entity";
3
+ export declare const UNDERWRITING_ENTITIES: readonly [typeof UwCaseEntity, typeof UwCaseEventEntity];
4
+ export { UwCaseEntity, UwCaseEventEntity };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UwCaseEventEntity = exports.UwCaseEntity = exports.UNDERWRITING_ENTITIES = void 0;
4
+ const uw_case_entity_1 = require("./uw_case.entity");
5
+ Object.defineProperty(exports, "UwCaseEntity", { enumerable: true, get: function () { return uw_case_entity_1.UwCaseEntity; } });
6
+ const uw_case_event_entity_1 = require("./uw_case_event.entity");
7
+ Object.defineProperty(exports, "UwCaseEventEntity", { enumerable: true, get: function () { return uw_case_event_entity_1.UwCaseEventEntity; } });
8
+ exports.UNDERWRITING_ENTITIES = [uw_case_entity_1.UwCaseEntity, uw_case_event_entity_1.UwCaseEventEntity];
@@ -0,0 +1,21 @@
1
+ import { _BaseEntity } from "../_base_entity";
2
+ import { OrganizationStaffEntity } from "../core";
3
+ import { ApplicationEntity } from "../application";
4
+ export declare class UwCaseEntity extends _BaseEntity {
5
+ id: string;
6
+ policy_no: string;
7
+ policy_id?: string | null;
8
+ application_no?: string | null;
9
+ application_id?: string | null;
10
+ org_id?: string | null;
11
+ agent_org_staff_id?: string | null;
12
+ agent_user_id?: string | null;
13
+ assigned_uw_user_id?: string | null;
14
+ assigned_uw_org_staff_id?: string | null;
15
+ taken_at?: Date | null;
16
+ released_at?: Date | null;
17
+ remark?: string | null;
18
+ agent_org_staff?: OrganizationStaffEntity | null;
19
+ assigned_uw_org_staff?: OrganizationStaffEntity | null;
20
+ application?: ApplicationEntity | null;
21
+ }
@@ -0,0 +1,102 @@
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.UwCaseEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ const core_1 = require("../core");
16
+ const application_1 = require("../application");
17
+ let UwCaseEntity = class UwCaseEntity extends _base_entity_1._BaseEntity {
18
+ };
19
+ exports.UwCaseEntity = UwCaseEntity;
20
+ __decorate([
21
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
22
+ __metadata("design:type", String)
23
+ ], UwCaseEntity.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: "varchar", length: 20 }),
26
+ __metadata("design:type", String)
27
+ ], UwCaseEntity.prototype, "policy_no", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
30
+ __metadata("design:type", Object)
31
+ ], UwCaseEntity.prototype, "policy_id", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
34
+ __metadata("design:type", Object)
35
+ ], UwCaseEntity.prototype, "application_no", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
38
+ __metadata("design:type", Object)
39
+ ], UwCaseEntity.prototype, "application_id", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
42
+ __metadata("design:type", Object)
43
+ ], UwCaseEntity.prototype, "org_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], UwCaseEntity.prototype, "agent_org_staff_id", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
50
+ __metadata("design:type", Object)
51
+ ], UwCaseEntity.prototype, "agent_user_id", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], UwCaseEntity.prototype, "assigned_uw_user_id", void 0);
56
+ __decorate([
57
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
58
+ __metadata("design:type", Object)
59
+ ], UwCaseEntity.prototype, "assigned_uw_org_staff_id", void 0);
60
+ __decorate([
61
+ (0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
62
+ __metadata("design:type", Object)
63
+ ], UwCaseEntity.prototype, "taken_at", void 0);
64
+ __decorate([
65
+ (0, typeorm_1.Column)({ type: "timestamptz", nullable: true }),
66
+ __metadata("design:type", Object)
67
+ ], UwCaseEntity.prototype, "released_at", void 0);
68
+ __decorate([
69
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
70
+ __metadata("design:type", Object)
71
+ ], UwCaseEntity.prototype, "remark", void 0);
72
+ __decorate([
73
+ (0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
74
+ (0, typeorm_1.JoinColumn)({
75
+ name: "agent_org_staff_id",
76
+ foreignKeyConstraintName: "FK_uw_cases_agent_org_staff",
77
+ }),
78
+ __metadata("design:type", Object)
79
+ ], UwCaseEntity.prototype, "agent_org_staff", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.ManyToOne)(() => core_1.OrganizationStaffEntity, { onDelete: "RESTRICT" }),
82
+ (0, typeorm_1.JoinColumn)({
83
+ name: "assigned_uw_org_staff_id",
84
+ foreignKeyConstraintName: "FK_uw_cases_assigned_uw_org_staff",
85
+ }),
86
+ __metadata("design:type", Object)
87
+ ], UwCaseEntity.prototype, "assigned_uw_org_staff", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.ManyToOne)(() => application_1.ApplicationEntity, { onDelete: "RESTRICT" }),
90
+ (0, typeorm_1.JoinColumn)({
91
+ name: "application_id",
92
+ foreignKeyConstraintName: "FK_uw_cases_application",
93
+ }),
94
+ __metadata("design:type", Object)
95
+ ], UwCaseEntity.prototype, "application", void 0);
96
+ exports.UwCaseEntity = UwCaseEntity = __decorate([
97
+ (0, typeorm_1.Entity)({ schema: "underwriting", name: "uw_cases" }),
98
+ (0, typeorm_1.Unique)("uq_uw_cases_policy_no", ["policy_no"]),
99
+ (0, typeorm_1.Index)("ix_uw_cases_assigned_uw_user_id", ["assigned_uw_user_id"]),
100
+ (0, typeorm_1.Index)("ix_uw_cases_assigned_uw_org_staff_id", ["assigned_uw_org_staff_id"]),
101
+ (0, typeorm_1.Index)("ix_uw_cases_agent_org_staff_id", ["agent_org_staff_id"])
102
+ ], UwCaseEntity);
@@ -0,0 +1,16 @@
1
+ import { _BaseEntity } from "../_base_entity";
2
+ import { UwCaseAction } from "../../types";
3
+ import { UwCaseEntity } from "./uw_case.entity";
4
+ export declare class UwCaseEventEntity extends _BaseEntity {
5
+ id: string;
6
+ uw_case_id: string;
7
+ action: UwCaseAction;
8
+ actor_user_id?: string | null;
9
+ actor_org_staff_id?: string | null;
10
+ from_user_id?: string | null;
11
+ to_user_id?: string | null;
12
+ remark?: string | null;
13
+ meta?: Record<string, any> | null;
14
+ occurred_at: Date;
15
+ uw_case?: UwCaseEntity;
16
+ }
@@ -0,0 +1,78 @@
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.UwCaseEventEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ const utils_1 = require("../../utils");
16
+ const types_1 = require("../../types");
17
+ const uw_case_entity_1 = require("./uw_case.entity");
18
+ let UwCaseEventEntity = class UwCaseEventEntity extends _base_entity_1._BaseEntity {
19
+ };
20
+ exports.UwCaseEventEntity = UwCaseEventEntity;
21
+ __decorate([
22
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
23
+ __metadata("design:type", String)
24
+ ], UwCaseEventEntity.prototype, "id", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: "uuid" }),
27
+ __metadata("design:type", String)
28
+ ], UwCaseEventEntity.prototype, "uw_case_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({
31
+ type: "varchar",
32
+ length: 30,
33
+ comment: (0, utils_1.enumToCommentString)(types_1.UwCaseAction),
34
+ }),
35
+ __metadata("design:type", String)
36
+ ], UwCaseEventEntity.prototype, "action", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], UwCaseEventEntity.prototype, "actor_user_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], UwCaseEventEntity.prototype, "actor_org_staff_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], UwCaseEventEntity.prototype, "from_user_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], UwCaseEventEntity.prototype, "to_user_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
55
+ __metadata("design:type", Object)
56
+ ], UwCaseEventEntity.prototype, "remark", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: "jsonb", nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], UwCaseEventEntity.prototype, "meta", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "timestamptz" }),
63
+ __metadata("design:type", Date)
64
+ ], UwCaseEventEntity.prototype, "occurred_at", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.ManyToOne)(() => uw_case_entity_1.UwCaseEntity, { onDelete: "CASCADE" }),
67
+ (0, typeorm_1.JoinColumn)({
68
+ name: "uw_case_id",
69
+ foreignKeyConstraintName: "FK_uw_case_events_uw_case",
70
+ }),
71
+ __metadata("design:type", uw_case_entity_1.UwCaseEntity)
72
+ ], UwCaseEventEntity.prototype, "uw_case", void 0);
73
+ exports.UwCaseEventEntity = UwCaseEventEntity = __decorate([
74
+ (0, typeorm_1.Entity)({ schema: "underwriting", name: "uw_case_events" }),
75
+ (0, typeorm_1.Index)("ix_uw_case_events_uw_case_id", ["uw_case_id"]),
76
+ (0, typeorm_1.Index)("ix_uw_case_events_action", ["action"]),
77
+ (0, typeorm_1.Index)("ix_uw_case_events_occurred_at", ["occurred_at"])
78
+ ], UwCaseEventEntity);
@@ -44,7 +44,9 @@ export declare enum ApplicationActionType {
44
44
  NoteAdded = "note_added",
45
45
  DocumentUploaded = "document_uploaded",
46
46
  DocumentRemoved = "document_removed",
47
- DataUpdated = "data_updated"
47
+ DataUpdated = "data_updated",
48
+ MarkedUrgent = "marked_urgent",
49
+ UnmarkedUrgent = "unmarked_urgent"
48
50
  }
49
51
  export declare enum AppPersonRole {
50
52
  PolicyHolder = "policy_holder",
@@ -53,6 +53,8 @@ var ApplicationActionType;
53
53
  ApplicationActionType["DocumentUploaded"] = "document_uploaded";
54
54
  ApplicationActionType["DocumentRemoved"] = "document_removed";
55
55
  ApplicationActionType["DataUpdated"] = "data_updated";
56
+ ApplicationActionType["MarkedUrgent"] = "marked_urgent";
57
+ ApplicationActionType["UnmarkedUrgent"] = "unmarked_urgent";
56
58
  })(ApplicationActionType || (exports.ApplicationActionType = ApplicationActionType = {}));
57
59
  var AppPersonRole;
58
60
  (function (AppPersonRole) {
@@ -46,6 +46,7 @@ export declare const PermissionResource: {
46
46
  readonly Role: "role";
47
47
  readonly Referral: "referral";
48
48
  readonly Staff: "staff";
49
+ readonly Underwriting: "underwriting";
49
50
  readonly User: "user";
50
51
  };
51
52
  export type PermissionResource = (typeof PermissionResource)[keyof typeof PermissionResource];
@@ -52,6 +52,7 @@ exports.PermissionResource = {
52
52
  Role: "role",
53
53
  Referral: "referral",
54
54
  Staff: "staff",
55
+ Underwriting: "underwriting",
55
56
  User: "user",
56
57
  };
57
58
  var PermissionModule;
@@ -89,3 +89,12 @@ export interface UWDecisionMetadata {
89
89
  declined_benefits?: DeclinedBenefitType[];
90
90
  witness_full_name?: string | null;
91
91
  }
92
+ export declare enum UwCaseStatus {
93
+ Assigned = "assigned",
94
+ Released = "released"
95
+ }
96
+ export declare enum UwCaseAction {
97
+ Take = "take",
98
+ Reassign = "reassign",
99
+ Release = "release"
100
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DeclinedBenefitType = exports.UWDecisionType = exports.UnderwritingQuestionComponents = exports.UnderwritingBaseQuestionCode = exports.UnderwritingQuestionGroupCode = exports.UnderwritingSIOQuestionCode = void 0;
3
+ exports.UwCaseAction = exports.UwCaseStatus = exports.DeclinedBenefitType = exports.UWDecisionType = exports.UnderwritingQuestionComponents = exports.UnderwritingBaseQuestionCode = exports.UnderwritingQuestionGroupCode = exports.UnderwritingSIOQuestionCode = void 0;
4
4
  var UnderwritingSIOQuestionCode;
5
5
  (function (UnderwritingSIOQuestionCode) {
6
6
  UnderwritingSIOQuestionCode["Q_USA"] = "Q-SIO-USA";
@@ -86,3 +86,17 @@ var DeclinedBenefitType;
86
86
  DeclinedBenefitType["TOTAL_PERMANENT_DISABILITY"] = "tpd";
87
87
  DeclinedBenefitType["CRITICAL_ILLNESS"] = "ci";
88
88
  })(DeclinedBenefitType || (exports.DeclinedBenefitType = DeclinedBenefitType = {}));
89
+ // =========================
90
+ // UW case assignment (pool queue "Take Case")
91
+ // =========================
92
+ var UwCaseStatus;
93
+ (function (UwCaseStatus) {
94
+ UwCaseStatus["Assigned"] = "assigned";
95
+ UwCaseStatus["Released"] = "released";
96
+ })(UwCaseStatus || (exports.UwCaseStatus = UwCaseStatus = {}));
97
+ var UwCaseAction;
98
+ (function (UwCaseAction) {
99
+ UwCaseAction["Take"] = "take";
100
+ UwCaseAction["Reassign"] = "reassign";
101
+ UwCaseAction["Release"] = "release";
102
+ })(UwCaseAction || (exports.UwCaseAction = UwCaseAction = {}));
@@ -1,4 +1,4 @@
1
- import { AddressType, AppDocumentType, ApplicationActionType, AppPhLaRelation, AppSourceType, ChannelType, ContactType, Gender, IdentifierType, OrgType, StaffStatus, StaffType } from "../../types";
1
+ import { AddressType, AppCoverageType, AppDocumentType, AppFormType, ApplicationActionType, ApplicationStatus, AppPaymentStatus, AppPaymentType, AppPersonRole, AppPhLaRelation, AppSourceType, AppVisibilityScope, BorrowerType, ChannelType, ContactType, CurrencyType, CustomerStatus, CustomerType, DeclinedBenefitType, DiscountType, DocumentType, ExchangeRateSourceType, ExchangeRateSyncStatus, FileStorageProvider, Gender, IdentifierType, MaritalStatus, OccupationLevel, OrgType, PartnerType, QuotationStatus, ReportingLineType, ResetScope, StaffStatus, StaffType, UwAnswerValueType, UWDecisionType, YesNo } from "../../types";
2
2
  export declare function getGenderDesc(val: Gender): "Male" | "Female";
3
3
  export declare function getAppSourceTypeDesc(val: AppSourceType): "Banca" | "Personal Sales" | "Agency";
4
4
  export declare function getAppPhLaRelationDesc(val: AppPhLaRelation): "PH = LA" | "PH != LA";
@@ -6,8 +6,34 @@ export declare function getIdentifierTypeDesc(val: IdentifierType): "Other" | "N
6
6
  export declare function getContactTypeDesc(val: ContactType): "Other" | "Phone Number" | "Email" | "Website" | "Social Media";
7
7
  export declare function getAddressTypeDesc(val: AddressType): "Other" | AddressType.PlaceOfBirth | "Home" | "Work" | "Billing";
8
8
  export declare function getAppDocumentTypeDesc(val: AppDocumentType): "Other" | "National ID" | "Passport" | "Application Form" | "Quotation Form" | "Claim Form";
9
- 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
+ export declare function getAppActionTypeDesc(val: ApplicationActionType): ApplicationActionType.Created | ApplicationActionType.DraftSaved | ApplicationActionType.Completed | ApplicationActionType.EditCompleted | ApplicationActionType.TakenForReview | ApplicationActionType.Assigned | ApplicationActionType.Unassigned | ApplicationActionType.DocumentRemoved | ApplicationActionType.DataUpdated | ApplicationActionType.MarkedUrgent | ApplicationActionType.UnmarkedUrgent | "Submit" | "Re-Submit" | "Approve" | "Reject" | "Request Edit" | "Request More Documents" | "Cancel" | "Transfer" | "Add Note" | "Upload Document";
10
10
  export declare function getOrgTypeDesc(val: OrgType): "Agency" | "Internal" | "Bank" | "Micro Finance" | "Broker";
11
11
  export declare function getChannelTypeDesc(val: ChannelType): "Other" | "Agency" | "Bank" | "Broker" | "Direct" | "Online" | "Partner" | "Telesales";
12
12
  export declare function getStaffTypeDesc(val: StaffType): "Other" | "Employee" | "Contractor" | "Intern";
13
13
  export declare function getStaffStatusDesc(val: StaffStatus): "Active" | "Suspended" | "Resigned" | "Terminated";
14
+ export declare function getAppFormTypeDesc(val: AppFormType): "Standard Form" | "Simplified Form (SIO)";
15
+ export declare function getAppVisibilityScopeDesc(val: AppVisibilityScope): "My Own" | "My Team" | "Organization";
16
+ export declare function getApplicationStatusDesc(val: ApplicationStatus): "New" | "Completed" | "Submitted" | "In Review" | "Edit Required" | "More Documents Required" | "Resubmitted" | "Rejected" | "Accepted" | "Transferred" | "Cancelled";
17
+ export declare function getAppPersonRoleDesc(val: AppPersonRole): "Policy Holder" | "Life Assured";
18
+ export declare function getAppCoverageTypeDesc(val: AppCoverageType): "Base Plan" | "Rider";
19
+ export declare function getUwAnswerValueTypeDesc(val: UwAnswerValueType): "Date" | "Boolean" | "Dropdown" | "Number" | "Text" | "Text Area" | "Yes/No";
20
+ export declare function getAppPaymentTypeDesc(val: AppPaymentType): "Premium" | "Deposit" | "Refund";
21
+ export declare function getAppPaymentStatusDesc(val: AppPaymentStatus): "Cancelled" | "Success" | "Failed" | "Pending" | "Voided";
22
+ export declare function getDocumentTypeDesc(val: DocumentType): "Application" | "Claim" | "Cover Note" | "Official Receipt" | "Policy" | "Quotation";
23
+ export declare function getMaritalStatusDesc(val: MaritalStatus): "Single" | "Married" | "Widowed" | "Divorced";
24
+ export declare function getResetScopeDesc(val: ResetScope): "Monthly" | "Never Resets" | "Yearly" | "Daily";
25
+ export declare function getYesNoDesc(val: YesNo): "Yes" | "No";
26
+ export declare function getFileStorageProviderDesc(val: FileStorageProvider): "Local Storage" | "S3" | "Legacy";
27
+ export declare function getOccupationLevelDesc(val: OccupationLevel): "Chapter" | "Division" | "Group" | "Class" | "Sub Class";
28
+ export declare function getReportingLineTypeDesc(val: ReportingLineType): "Solid Line" | "Dotted Line";
29
+ export declare function getCurrencyTypeDesc(val: CurrencyType): "US Dollar" | "Khmer Riel";
30
+ export declare function getExchangeRateSourceTypeDesc(val: ExchangeRateSourceType): "Manual" | "API" | "National Bank" | "System";
31
+ export declare function getExchangeRateSyncStatusDesc(val: ExchangeRateSyncStatus): "Success" | "Failed";
32
+ export declare function getCustomerTypeDesc(val: CustomerType): "Individual" | "Corporate";
33
+ export declare function getCustomerStatusDesc(val: CustomerStatus): "Active" | "Inactive" | "Blacklisted";
34
+ export declare function getDiscountTypeDesc(val: DiscountType): "Percentage" | "Fixed Amount";
35
+ export declare function getQuotationStatusDesc(val: QuotationStatus): "Cancelled" | "Draft" | "Quoted" | "Expired" | "Converted";
36
+ export declare function getBorrowerTypeDesc(val: BorrowerType): "Main Borrower" | "Co-Borrower";
37
+ export declare function getUWDecisionTypeDesc(val: UWDecisionType): "Rejected" | "Counter Offer" | "Declined Coverage";
38
+ export declare function getDeclinedBenefitTypeDesc(val: DeclinedBenefitType): "Accidental Death Benefit" | "Total & Permanent Disability" | "Critical Illness";
39
+ export declare function getPartnerTypeDesc(val: PartnerType): "Broker" | "Bancassurance";