law-common 1.0.18 → 1.0.20

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.
@@ -0,0 +1,10 @@
1
+ export declare enum CountryEnum {
2
+ India = "India",
3
+ USA = "USA",
4
+ UK = "UK"
5
+ }
6
+ export declare namespace CountryEnum {
7
+ function values(): string[];
8
+ function keys(): string[];
9
+ function getCountryTimezone(country: CountryEnum): string;
10
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CountryEnum = void 0;
4
+ var CountryEnum;
5
+ (function (CountryEnum) {
6
+ CountryEnum["India"] = "India";
7
+ CountryEnum["USA"] = "USA";
8
+ CountryEnum["UK"] = "UK";
9
+ })(CountryEnum || (exports.CountryEnum = CountryEnum = {}));
10
+ (function (CountryEnum) {
11
+ function values() {
12
+ return Object.keys(CountryEnum).filter((type) => isNaN(type) && type !== 'values');
13
+ }
14
+ CountryEnum.values = values;
15
+ function keys() {
16
+ return Object.keys(CountryEnum).filter((type) => isNaN(type) && type !== 'values');
17
+ }
18
+ CountryEnum.keys = keys;
19
+ function getCountryTimezone(country) {
20
+ switch (country) {
21
+ case CountryEnum.India:
22
+ return 'Asia/Kolkata';
23
+ case CountryEnum.USA:
24
+ return 'America/New_York';
25
+ case CountryEnum.UK:
26
+ return 'Europe/London';
27
+ default:
28
+ return 'UTC';
29
+ }
30
+ }
31
+ CountryEnum.getCountryTimezone = getCountryTimezone;
32
+ })(CountryEnum || (exports.CountryEnum = CountryEnum = {}));
@@ -0,0 +1,4 @@
1
+ export declare enum OrganizationStatusEnum {
2
+ active = "active",
3
+ deactive = "deactive"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrganizationStatusEnum = void 0;
4
+ var OrganizationStatusEnum;
5
+ (function (OrganizationStatusEnum) {
6
+ OrganizationStatusEnum["active"] = "active";
7
+ OrganizationStatusEnum["deactive"] = "deactive";
8
+ })(OrganizationStatusEnum || (exports.OrganizationStatusEnum = OrganizationStatusEnum = {}));
@@ -0,0 +1,11 @@
1
+ export declare enum UserStatusEnum {
2
+ active = "active",
3
+ deactive = "deactive",
4
+ suspended = "suspended"
5
+ }
6
+ export declare enum UserRoleEnum {
7
+ admin = "admin",
8
+ employee = "employee",
9
+ partner = "partner",
10
+ accountant = "accountant"
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserRoleEnum = exports.UserStatusEnum = void 0;
4
+ var UserStatusEnum;
5
+ (function (UserStatusEnum) {
6
+ UserStatusEnum["active"] = "active";
7
+ UserStatusEnum["deactive"] = "deactive";
8
+ UserStatusEnum["suspended"] = "suspended";
9
+ })(UserStatusEnum || (exports.UserStatusEnum = UserStatusEnum = {}));
10
+ var UserRoleEnum;
11
+ (function (UserRoleEnum) {
12
+ UserRoleEnum["admin"] = "admin";
13
+ UserRoleEnum["employee"] = "employee";
14
+ UserRoleEnum["partner"] = "partner";
15
+ UserRoleEnum["accountant"] = "accountant";
16
+ })(UserRoleEnum || (exports.UserRoleEnum = UserRoleEnum = {}));
@@ -1,5 +1,10 @@
1
1
  export * from "./enums/task.entity.enum";
2
+ export * from "./enums/user.entity.enum";
3
+ export * from "./enums/country.entity.enum";
4
+ export * from "./enums/organization.entity.enum";
2
5
  export * from "./func/convert-to-common-entity.func";
3
6
  export * from "./interface/audit-column.entity.interface";
4
7
  export * from "./interface/entity.utils.interface";
5
8
  export * from "./interface/task.entity.interface";
9
+ export * from "./interface/user.entity.interface";
10
+ export * from "./interface/organization.entity.interface";
@@ -15,7 +15,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums/task.entity.enum"), exports);
18
+ __exportStar(require("./enums/user.entity.enum"), exports);
19
+ __exportStar(require("./enums/country.entity.enum"), exports);
20
+ __exportStar(require("./enums/organization.entity.enum"), exports);
18
21
  __exportStar(require("./func/convert-to-common-entity.func"), exports);
19
22
  __exportStar(require("./interface/audit-column.entity.interface"), exports);
20
23
  __exportStar(require("./interface/entity.utils.interface"), exports);
21
24
  __exportStar(require("./interface/task.entity.interface"), exports);
25
+ __exportStar(require("./interface/user.entity.interface"), exports);
26
+ __exportStar(require("./interface/organization.entity.interface"), exports);
@@ -0,0 +1,8 @@
1
+ import { OrganizationStatusEnum } from "../enums/organization.entity.enum";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ export interface IOrganizationEntity extends IAuditColumnEntity {
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ status: OrganizationStatusEnum;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,25 @@
1
+ import { CountryEnum } from "../enums/country.entity.enum";
2
+ import { UserRoleEnum, UserStatusEnum } from "../enums/user.entity.enum";
3
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
4
+ export interface IUserEntity extends IAuditColumnEntity {
5
+ id: number;
6
+ name: string;
7
+ email: string;
8
+ contactNo: string;
9
+ secondaryContactNo: string;
10
+ password: string;
11
+ userCode: string;
12
+ joiningDate: Date;
13
+ endDate: Date;
14
+ address: string;
15
+ zipCode: number;
16
+ country: CountryEnum;
17
+ designation: string;
18
+ panNo: string;
19
+ panDocumentUrl: string;
20
+ aadharNo: string;
21
+ aadharDocumentUrl: string;
22
+ role: UserRoleEnum;
23
+ status: UserStatusEnum;
24
+ organizationId: number;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [