plac-micro-common 1.2.36 → 1.2.38

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.
@@ -4,6 +4,7 @@ import { GeoCommuneEntity } from "./geo_commune.entity";
4
4
  import { GeoVillageEntity } from "./geo_village.entity";
5
5
  import { MaritalStatusEntity } from "./marital_status.entity";
6
6
  import { NationalityEntity } from "./nationality.entity";
7
+ import { NumberSeriesEntity } from "./number_series.entity";
7
8
  import { OrganizationEntity } from "./organization.entity";
8
9
  import { OrganizationBranchEntity } from "./org_branch.entity";
9
10
  import { OrganizationChannelEntity } from "./org_channel.entity";
@@ -12,6 +13,7 @@ import { OrganizationPositionEntity } from "./org_position.entity";
12
13
  import { OrganizationStaffEntity } from "./org_staff.entity";
13
14
  import { OrganizationStaffBranchEntity } from "./org_staff_branches.entity";
14
15
  import { OrganizationStaffReportingLineEntity } from "./org_staff_reporting_lines.entity";
16
+ import { RelationshipEntity } from "./relationship.entity";
15
17
  import { StaffEntity } from "./staffs.entity";
16
- export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof StaffEntity];
17
- export { GeoProvinceEntity, GeoDistrictEntity, GeoCommuneEntity, GeoVillageEntity, MaritalStatusEntity, NationalityEntity, OrganizationEntity, OrganizationBranchEntity, OrganizationChannelEntity, OrganizationDepartmentEntity, OrganizationPositionEntity, OrganizationStaffEntity, OrganizationStaffBranchEntity, OrganizationStaffReportingLineEntity, StaffEntity, };
18
+ export declare const CORE_ENTITIES: readonly [typeof GeoProvinceEntity, typeof GeoDistrictEntity, typeof GeoCommuneEntity, typeof GeoVillageEntity, typeof MaritalStatusEntity, typeof NationalityEntity, typeof NumberSeriesEntity, typeof OrganizationEntity, typeof OrganizationBranchEntity, typeof OrganizationChannelEntity, typeof OrganizationDepartmentEntity, typeof OrganizationPositionEntity, typeof OrganizationStaffEntity, typeof OrganizationStaffBranchEntity, typeof OrganizationStaffReportingLineEntity, typeof RelationshipEntity, typeof StaffEntity];
19
+ export { GeoProvinceEntity, GeoDistrictEntity, GeoCommuneEntity, GeoVillageEntity, MaritalStatusEntity, NationalityEntity, OrganizationEntity, OrganizationBranchEntity, OrganizationChannelEntity, OrganizationDepartmentEntity, OrganizationPositionEntity, OrganizationStaffEntity, OrganizationStaffBranchEntity, OrganizationStaffReportingLineEntity, RelationshipEntity, StaffEntity, };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StaffEntity = exports.OrganizationStaffReportingLineEntity = exports.OrganizationStaffBranchEntity = exports.OrganizationStaffEntity = exports.OrganizationPositionEntity = exports.OrganizationDepartmentEntity = exports.OrganizationChannelEntity = exports.OrganizationBranchEntity = exports.OrganizationEntity = exports.NationalityEntity = exports.MaritalStatusEntity = exports.GeoVillageEntity = exports.GeoCommuneEntity = exports.GeoDistrictEntity = exports.GeoProvinceEntity = exports.CORE_ENTITIES = void 0;
3
+ exports.StaffEntity = exports.RelationshipEntity = exports.OrganizationStaffReportingLineEntity = exports.OrganizationStaffBranchEntity = exports.OrganizationStaffEntity = exports.OrganizationPositionEntity = exports.OrganizationDepartmentEntity = exports.OrganizationChannelEntity = exports.OrganizationBranchEntity = exports.OrganizationEntity = exports.NationalityEntity = exports.MaritalStatusEntity = exports.GeoVillageEntity = exports.GeoCommuneEntity = exports.GeoDistrictEntity = exports.GeoProvinceEntity = exports.CORE_ENTITIES = void 0;
4
4
  const geo_province_entity_1 = require("./geo_province.entity");
5
5
  Object.defineProperty(exports, "GeoProvinceEntity", { enumerable: true, get: function () { return geo_province_entity_1.GeoProvinceEntity; } });
6
6
  const geo_district_entity_1 = require("./geo_district.entity");
@@ -13,6 +13,7 @@ const marital_status_entity_1 = require("./marital_status.entity");
13
13
  Object.defineProperty(exports, "MaritalStatusEntity", { enumerable: true, get: function () { return marital_status_entity_1.MaritalStatusEntity; } });
14
14
  const nationality_entity_1 = require("./nationality.entity");
15
15
  Object.defineProperty(exports, "NationalityEntity", { enumerable: true, get: function () { return nationality_entity_1.NationalityEntity; } });
16
+ const number_series_entity_1 = require("./number_series.entity");
16
17
  const organization_entity_1 = require("./organization.entity");
17
18
  Object.defineProperty(exports, "OrganizationEntity", { enumerable: true, get: function () { return organization_entity_1.OrganizationEntity; } });
18
19
  const org_branch_entity_1 = require("./org_branch.entity");
@@ -29,6 +30,8 @@ const org_staff_branches_entity_1 = require("./org_staff_branches.entity");
29
30
  Object.defineProperty(exports, "OrganizationStaffBranchEntity", { enumerable: true, get: function () { return org_staff_branches_entity_1.OrganizationStaffBranchEntity; } });
30
31
  const org_staff_reporting_lines_entity_1 = require("./org_staff_reporting_lines.entity");
31
32
  Object.defineProperty(exports, "OrganizationStaffReportingLineEntity", { enumerable: true, get: function () { return org_staff_reporting_lines_entity_1.OrganizationStaffReportingLineEntity; } });
33
+ const relationship_entity_1 = require("./relationship.entity");
34
+ Object.defineProperty(exports, "RelationshipEntity", { enumerable: true, get: function () { return relationship_entity_1.RelationshipEntity; } });
32
35
  const staffs_entity_1 = require("./staffs.entity");
33
36
  Object.defineProperty(exports, "StaffEntity", { enumerable: true, get: function () { return staffs_entity_1.StaffEntity; } });
34
37
  exports.CORE_ENTITIES = [
@@ -39,6 +42,7 @@ exports.CORE_ENTITIES = [
39
42
  //
40
43
  marital_status_entity_1.MaritalStatusEntity,
41
44
  nationality_entity_1.NationalityEntity,
45
+ number_series_entity_1.NumberSeriesEntity,
42
46
  //
43
47
  organization_entity_1.OrganizationEntity,
44
48
  org_branch_entity_1.OrganizationBranchEntity,
@@ -48,5 +52,8 @@ exports.CORE_ENTITIES = [
48
52
  org_staff_entity_1.OrganizationStaffEntity,
49
53
  org_staff_branches_entity_1.OrganizationStaffBranchEntity,
50
54
  org_staff_reporting_lines_entity_1.OrganizationStaffReportingLineEntity,
55
+ //
56
+ relationship_entity_1.RelationshipEntity,
57
+ //
51
58
  staffs_entity_1.StaffEntity,
52
59
  ];
@@ -0,0 +1,16 @@
1
+ import { _BaseEntity } from "../_base_entity";
2
+ import { DocumentType, ResetScope } from "../../types";
3
+ export declare class NumberSeriesEntity extends _BaseEntity {
4
+ id: string;
5
+ org_id: string | null;
6
+ doc_type: DocumentType;
7
+ prefix: string | null;
8
+ suffix: string | null;
9
+ padding: number;
10
+ next_no: string;
11
+ reset_scope: ResetScope;
12
+ reset_key: string | null;
13
+ min_no: string;
14
+ max_no: string | null;
15
+ is_active: boolean;
16
+ }
@@ -0,0 +1,70 @@
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.NumberSeriesEntity = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const _base_entity_1 = require("../_base_entity");
15
+ const types_1 = require("../../types");
16
+ let NumberSeriesEntity = class NumberSeriesEntity extends _base_entity_1._BaseEntity {
17
+ };
18
+ exports.NumberSeriesEntity = NumberSeriesEntity;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
21
+ __metadata("design:type", String)
22
+ ], NumberSeriesEntity.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
25
+ __metadata("design:type", Object)
26
+ ], NumberSeriesEntity.prototype, "org_id", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.Column)({ type: "varchar", length: 30 }),
29
+ __metadata("design:type", String)
30
+ ], NumberSeriesEntity.prototype, "doc_type", void 0);
31
+ __decorate([
32
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
33
+ __metadata("design:type", Object)
34
+ ], NumberSeriesEntity.prototype, "prefix", void 0);
35
+ __decorate([
36
+ (0, typeorm_1.Column)({ type: "varchar", length: 50, nullable: true }),
37
+ __metadata("design:type", Object)
38
+ ], NumberSeriesEntity.prototype, "suffix", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: "smallint", default: 6 }),
41
+ __metadata("design:type", Number)
42
+ ], NumberSeriesEntity.prototype, "padding", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: "bigint", default: 1 }),
45
+ __metadata("design:type", String)
46
+ ], NumberSeriesEntity.prototype, "next_no", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: "varchar", length: 10, default: types_1.ResetScope.None }),
49
+ __metadata("design:type", String)
50
+ ], NumberSeriesEntity.prototype, "reset_scope", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
53
+ __metadata("design:type", Object)
54
+ ], NumberSeriesEntity.prototype, "reset_key", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: "bigint", default: 1 }),
57
+ __metadata("design:type", String)
58
+ ], NumberSeriesEntity.prototype, "min_no", void 0);
59
+ __decorate([
60
+ (0, typeorm_1.Column)({ type: "bigint", nullable: true }),
61
+ __metadata("design:type", Object)
62
+ ], NumberSeriesEntity.prototype, "max_no", void 0);
63
+ __decorate([
64
+ (0, typeorm_1.Column)({ type: "boolean", default: true }),
65
+ __metadata("design:type", Boolean)
66
+ ], NumberSeriesEntity.prototype, "is_active", void 0);
67
+ exports.NumberSeriesEntity = NumberSeriesEntity = __decorate([
68
+ (0, typeorm_1.Entity)({ schema: "core", name: "number_series" }),
69
+ (0, typeorm_1.Index)(["org_id", "doc_type"], { unique: true })
70
+ ], NumberSeriesEntity);
@@ -0,0 +1,3 @@
1
+ import { _BaseGeneralEntity } from "../_base_general_entity";
2
+ export declare class RelationshipEntity extends _BaseGeneralEntity {
3
+ }
@@ -0,0 +1,17 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RelationshipEntity = void 0;
10
+ const typeorm_1 = require("typeorm");
11
+ const _base_general_entity_1 = require("../_base_general_entity");
12
+ let RelationshipEntity = class RelationshipEntity extends _base_general_entity_1._BaseGeneralEntity {
13
+ };
14
+ exports.RelationshipEntity = RelationshipEntity;
15
+ exports.RelationshipEntity = RelationshipEntity = __decorate([
16
+ (0, typeorm_1.Entity)({ schema: "core", name: "relationships" })
17
+ ], RelationshipEntity);
@@ -15,3 +15,9 @@ export declare enum ChannelType {
15
15
  Telesales = "telesales",
16
16
  Other = "other"
17
17
  }
18
+ export declare enum DocumentType {
19
+ Application = "application",
20
+ Policy = "policy",
21
+ Claim = "claim",
22
+ Quotation = "quotation"
23
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChannelType = exports.OrgType = void 0;
3
+ exports.DocumentType = exports.ChannelType = exports.OrgType = void 0;
4
4
  var OrgType;
5
5
  (function (OrgType) {
6
6
  OrgType["Internal"] = "internal";
@@ -20,3 +20,10 @@ var ChannelType;
20
20
  ChannelType["Telesales"] = "telesales";
21
21
  ChannelType["Other"] = "other";
22
22
  })(ChannelType || (exports.ChannelType = ChannelType = {}));
23
+ var DocumentType;
24
+ (function (DocumentType) {
25
+ DocumentType["Application"] = "application";
26
+ DocumentType["Policy"] = "policy";
27
+ DocumentType["Claim"] = "claim";
28
+ DocumentType["Quotation"] = "quotation";
29
+ })(DocumentType || (exports.DocumentType = DocumentType = {}));
@@ -28,3 +28,9 @@ export declare enum IdentifierType {
28
28
  CompanyRegistration = "comp_reg",
29
29
  Other = "other"
30
30
  }
31
+ export declare enum ResetScope {
32
+ None = "none",
33
+ Year = "year",
34
+ Month = "month",
35
+ Day = "day"
36
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IdentifierType = exports.AddressType = exports.ContactType = exports.MaritalStatus = exports.Gender = void 0;
3
+ exports.ResetScope = exports.IdentifierType = exports.AddressType = exports.ContactType = exports.MaritalStatus = exports.Gender = void 0;
4
4
  var Gender;
5
5
  (function (Gender) {
6
6
  Gender["Male"] = "M";
@@ -36,3 +36,10 @@ var IdentifierType;
36
36
  IdentifierType["CompanyRegistration"] = "comp_reg";
37
37
  IdentifierType["Other"] = "other";
38
38
  })(IdentifierType || (exports.IdentifierType = IdentifierType = {}));
39
+ var ResetScope;
40
+ (function (ResetScope) {
41
+ ResetScope["None"] = "none";
42
+ ResetScope["Year"] = "year";
43
+ ResetScope["Month"] = "month";
44
+ ResetScope["Day"] = "day";
45
+ })(ResetScope || (exports.ResetScope = ResetScope = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.2.36",
3
+ "version": "1.2.38",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {