@experts_hub/shared 1.0.68 → 1.0.69

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.
@@ -7,3 +7,4 @@ export * from './otp.entity';
7
7
  export * from './freelancer-profile.entity';
8
8
  export * from './company-profile.entity';
9
9
  export * from './job-role.entity';
10
+ export * from './job-entity';
@@ -0,0 +1,32 @@
1
+ import { BaseEntity } from "./base.entity";
2
+ import { User } from "./user.entity";
3
+ export declare enum JobLocation {
4
+ ONSITE = "ONSITE",
5
+ REMOTE = "REMOTE",
6
+ BOTH = "BOTH"
7
+ }
8
+ export declare enum TypeOfEmployment {
9
+ FULLTIME = "FULLTIME",
10
+ PARTTIME = "PARTTIME",
11
+ BOTH = "BOTH"
12
+ }
13
+ export declare enum JobStatus {
14
+ ACTIVE = "ACTIVE",
15
+ OPEN = "OPEN",
16
+ DRAFT = "DRAFT",
17
+ ONHOLD = "ONHOLD",
18
+ CLOSED = "CLOSED"
19
+ }
20
+ export declare class Job extends BaseEntity {
21
+ jobId: string;
22
+ userId: number;
23
+ user: User;
24
+ jobRole: string;
25
+ note: string;
26
+ openings: number;
27
+ location: JobLocation;
28
+ typeOfEmployment: TypeOfEmployment;
29
+ additionalComment: string;
30
+ description: string;
31
+ status: JobStatus;
32
+ }
@@ -1,7 +1,7 @@
1
1
  import { User } from './user.entity';
2
2
  export declare class RefreshToken {
3
3
  id: string;
4
- userId: string;
4
+ userId: number;
5
5
  tokenId: string;
6
6
  deviceInfo: any;
7
7
  isRevoked: boolean;
@@ -4,6 +4,7 @@ import { ResumeParserLog } from "./resume-parser-log.entity";
4
4
  import { Otp } from "./otp.entity";
5
5
  import { FreelancerProfile } from "./freelancer-profile.entity";
6
6
  import { CompanyProfile } from "./company-profile.entity";
7
+ import { Job } from "./job-entity";
7
8
  export declare enum AccountType {
8
9
  ADMIN = "ADMIN",
9
10
  SUB_ADMIN = "SUB_ADMIN",
@@ -39,4 +40,5 @@ export declare class User extends BaseEntity {
39
40
  resumeParserLogs: ResumeParserLog[];
40
41
  freelancerProfile: FreelancerProfile;
41
42
  companyProfile: CompanyProfile;
43
+ jobs: Job[];
42
44
  }
package/dist/index.d.mts CHANGED
@@ -258,7 +258,7 @@ declare abstract class BaseEntity {
258
258
 
259
259
  declare class RefreshToken {
260
260
  id: string;
261
- userId: string;
261
+ userId: number;
262
262
  tokenId: string;
263
263
  deviceInfo: any;
264
264
  isRevoked: boolean;
@@ -349,6 +349,37 @@ declare class CompanyProfile extends BaseEntity {
349
349
  foundUsOn: FromUsOn;
350
350
  }
351
351
 
352
+ declare enum JobLocation {
353
+ ONSITE = "ONSITE",
354
+ REMOTE = "REMOTE",
355
+ BOTH = "BOTH"
356
+ }
357
+ declare enum TypeOfEmployment {
358
+ FULLTIME = "FULLTIME",
359
+ PARTTIME = "PARTTIME",
360
+ BOTH = "BOTH"
361
+ }
362
+ declare enum JobStatus {
363
+ ACTIVE = "ACTIVE",
364
+ OPEN = "OPEN",
365
+ DRAFT = "DRAFT",
366
+ ONHOLD = "ONHOLD",
367
+ CLOSED = "CLOSED"
368
+ }
369
+ declare class Job extends BaseEntity {
370
+ jobId: string;
371
+ userId: number;
372
+ user: User;
373
+ jobRole: string;
374
+ note: string;
375
+ openings: number;
376
+ location: JobLocation;
377
+ typeOfEmployment: TypeOfEmployment;
378
+ additionalComment: string;
379
+ description: string;
380
+ status: JobStatus;
381
+ }
382
+
352
383
  declare enum AccountType {
353
384
  ADMIN = "ADMIN",
354
385
  SUB_ADMIN = "SUB_ADMIN",
@@ -384,6 +415,7 @@ declare class User extends BaseEntity {
384
415
  resumeParserLogs: ResumeParserLog[];
385
416
  freelancerProfile: FreelancerProfile;
386
417
  companyProfile: CompanyProfile;
418
+ jobs: Job[];
387
419
  }
388
420
 
389
421
  declare enum QuestionFor {
@@ -410,4 +442,4 @@ declare class JobRoles extends BaseEntity {
410
442
  isActive: boolean;
411
443
  }
412
444
 
413
- export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_ROLE_PATTERN, JobRMQAdapter, JobRoles, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, Otp, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
445
+ export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_ROLE_PATTERN, Job, JobLocation, JobRMQAdapter, JobRoles, JobStatus, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, Otp, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, TypeOfEmployment, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
package/dist/index.d.ts CHANGED
@@ -258,7 +258,7 @@ declare abstract class BaseEntity {
258
258
 
259
259
  declare class RefreshToken {
260
260
  id: string;
261
- userId: string;
261
+ userId: number;
262
262
  tokenId: string;
263
263
  deviceInfo: any;
264
264
  isRevoked: boolean;
@@ -349,6 +349,37 @@ declare class CompanyProfile extends BaseEntity {
349
349
  foundUsOn: FromUsOn;
350
350
  }
351
351
 
352
+ declare enum JobLocation {
353
+ ONSITE = "ONSITE",
354
+ REMOTE = "REMOTE",
355
+ BOTH = "BOTH"
356
+ }
357
+ declare enum TypeOfEmployment {
358
+ FULLTIME = "FULLTIME",
359
+ PARTTIME = "PARTTIME",
360
+ BOTH = "BOTH"
361
+ }
362
+ declare enum JobStatus {
363
+ ACTIVE = "ACTIVE",
364
+ OPEN = "OPEN",
365
+ DRAFT = "DRAFT",
366
+ ONHOLD = "ONHOLD",
367
+ CLOSED = "CLOSED"
368
+ }
369
+ declare class Job extends BaseEntity {
370
+ jobId: string;
371
+ userId: number;
372
+ user: User;
373
+ jobRole: string;
374
+ note: string;
375
+ openings: number;
376
+ location: JobLocation;
377
+ typeOfEmployment: TypeOfEmployment;
378
+ additionalComment: string;
379
+ description: string;
380
+ status: JobStatus;
381
+ }
382
+
352
383
  declare enum AccountType {
353
384
  ADMIN = "ADMIN",
354
385
  SUB_ADMIN = "SUB_ADMIN",
@@ -384,6 +415,7 @@ declare class User extends BaseEntity {
384
415
  resumeParserLogs: ResumeParserLog[];
385
416
  freelancerProfile: FreelancerProfile;
386
417
  companyProfile: CompanyProfile;
418
+ jobs: Job[];
387
419
  }
388
420
 
389
421
  declare enum QuestionFor {
@@ -410,4 +442,4 @@ declare class JobRoles extends BaseEntity {
410
442
  isActive: boolean;
411
443
  }
412
444
 
413
- export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_ROLE_PATTERN, JobRMQAdapter, JobRoles, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, Otp, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
445
+ export { AUTHENTICATION_PATTERN, AccountStatus, AccountType, BaseEntity, ClientCreateAccountDto, ClientProfileQuestionDto, CompanyProfile, CreateQuestionDto, CreateSubAdminDto, FreelancerCreateAccountDto, FreelancerDevelopmentPreferenceDto, FreelancerProfile, FreelancerProfileQuestionDto, FreelancerUploadResumeDto, FreelancerWorkShowcaseDto, FromUsOn, type IAttachPermissionsToSubAdminResponse, type ICreateSubAdminPayload, type ICreateSubAdminResponse, type IDeleteSubAdminResponse, type IFetchQuestionQuery, type IFetchQuestionResponse, type IFetchSubAdminByIdQuery, type IFetchSubAdminByIdResponse, type IFetchSubAdminQuery, type IFetchSubAdminResponse, type IUpdateSubAdminAccountStatusPayload, type IUpdateSubAdminAccountStatusResponse, type IUpdateSubAdminPayload, type IUpdateSubAdminResponse, JOB_ROLE_PATTERN, Job, JobLocation, JobRMQAdapter, JobRoles, JobStatus, JobTCPAdapter, KindOfHire, LoginDto, LogoutDto, ModeOfHire, ModeOfWork, NatureOfWork, ONBOARDING_PATTERN, OTP_PATTERN, Otp, QUESTION_PATTERN, Question, QuestionFor, RESUME_PARSER_PATTERN, RefreshDto, RefreshToken, ResumeParserLog, SUBADMIN_PATTERN, TypeOfEmployment, UpdateSubAdminAccountStatusDto, UpdateSubAdminDto, User, UserRMQAdapter, UserTCPAdapter };
package/dist/index.js CHANGED
@@ -44,8 +44,11 @@ __export(index_exports, {
44
44
  FreelancerWorkShowcaseDto: () => FreelancerWorkShowcaseDto,
45
45
  FromUsOn: () => FromUsOn,
46
46
  JOB_ROLE_PATTERN: () => JOB_ROLE_PATTERN,
47
+ Job: () => Job,
48
+ JobLocation: () => JobLocation,
47
49
  JobRMQAdapter: () => JobRMQAdapter,
48
50
  JobRoles: () => JobRoles,
51
+ JobStatus: () => JobStatus,
49
52
  JobTCPAdapter: () => JobTCPAdapter,
50
53
  KindOfHire: () => KindOfHire,
51
54
  LoginDto: () => LoginDto,
@@ -64,6 +67,7 @@ __export(index_exports, {
64
67
  RefreshToken: () => RefreshToken,
65
68
  ResumeParserLog: () => ResumeParserLog,
66
69
  SUBADMIN_PATTERN: () => SUBADMIN_PATTERN,
70
+ TypeOfEmployment: () => TypeOfEmployment,
67
71
  UpdateSubAdminAccountStatusDto: () => UpdateSubAdminAccountStatusDto,
68
72
  UpdateSubAdminDto: () => UpdateSubAdminDto,
69
73
  User: () => User,
@@ -616,7 +620,7 @@ __decorateClass([
616
620
  ], BaseEntity.prototype, "deletedAt", 2);
617
621
 
618
622
  // src/entities/user.entity.ts
619
- var import_typeorm7 = require("typeorm");
623
+ var import_typeorm8 = require("typeorm");
620
624
 
621
625
  // src/entities/refresh-token.entity.ts
622
626
  var import_typeorm2 = require("typeorm");
@@ -893,6 +897,85 @@ CompanyProfile = __decorateClass([
893
897
  (0, import_typeorm6.Entity)("company_profiles")
894
898
  ], CompanyProfile);
895
899
 
900
+ // src/entities/job-entity.ts
901
+ var import_typeorm7 = require("typeorm");
902
+ var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
903
+ JobLocation2["ONSITE"] = "ONSITE";
904
+ JobLocation2["REMOTE"] = "REMOTE";
905
+ JobLocation2["BOTH"] = "BOTH";
906
+ return JobLocation2;
907
+ })(JobLocation || {});
908
+ var TypeOfEmployment = /* @__PURE__ */ ((TypeOfEmployment2) => {
909
+ TypeOfEmployment2["FULLTIME"] = "FULLTIME";
910
+ TypeOfEmployment2["PARTTIME"] = "PARTTIME";
911
+ TypeOfEmployment2["BOTH"] = "BOTH";
912
+ return TypeOfEmployment2;
913
+ })(TypeOfEmployment || {});
914
+ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
915
+ JobStatus2["ACTIVE"] = "ACTIVE";
916
+ JobStatus2["OPEN"] = "OPEN";
917
+ JobStatus2["DRAFT"] = "DRAFT";
918
+ JobStatus2["ONHOLD"] = "ONHOLD";
919
+ JobStatus2["CLOSED"] = "CLOSED";
920
+ return JobStatus2;
921
+ })(JobStatus || {});
922
+ var Job = class extends BaseEntity {
923
+ };
924
+ __decorateClass([
925
+ (0, import_typeorm7.Column)({ name: "job_id", type: "varchar", unique: true, nullable: true })
926
+ ], Job.prototype, "jobId", 2);
927
+ // individual index to find jobs by user
928
+ __decorateClass([
929
+ (0, import_typeorm7.Column)({ name: "user_id", type: "integer", nullable: true }),
930
+ (0, import_typeorm7.Index)()
931
+ ], Job.prototype, "userId", 2);
932
+ __decorateClass([
933
+ (0, import_typeorm7.ManyToOne)(() => User, (user) => user.jobs),
934
+ (0, import_typeorm7.JoinColumn)({ name: "user_id" })
935
+ ], Job.prototype, "user", 2);
936
+ __decorateClass([
937
+ (0, import_typeorm7.Column)({ name: "job_role", type: "varchar", nullable: true })
938
+ ], Job.prototype, "jobRole", 2);
939
+ __decorateClass([
940
+ (0, import_typeorm7.Column)({ name: "note", type: "varchar", nullable: true })
941
+ ], Job.prototype, "note", 2);
942
+ __decorateClass([
943
+ (0, import_typeorm7.Column)({ name: "openings", type: "integer", default: 0 })
944
+ ], Job.prototype, "openings", 2);
945
+ __decorateClass([
946
+ (0, import_typeorm7.Column)({
947
+ name: "location",
948
+ type: "enum",
949
+ enum: JobLocation,
950
+ nullable: true
951
+ })
952
+ ], Job.prototype, "location", 2);
953
+ __decorateClass([
954
+ (0, import_typeorm7.Column)({
955
+ name: "type_of_employment",
956
+ type: "enum",
957
+ enum: TypeOfEmployment,
958
+ nullable: true
959
+ })
960
+ ], Job.prototype, "typeOfEmployment", 2);
961
+ __decorateClass([
962
+ (0, import_typeorm7.Column)({ name: "additional_comment", type: "varchar", nullable: true })
963
+ ], Job.prototype, "additionalComment", 2);
964
+ __decorateClass([
965
+ (0, import_typeorm7.Column)({ name: "description", type: "varchar", nullable: true })
966
+ ], Job.prototype, "description", 2);
967
+ __decorateClass([
968
+ (0, import_typeorm7.Column)({
969
+ name: "status",
970
+ type: "enum",
971
+ enum: JobStatus,
972
+ default: "DRAFT" /* DRAFT */
973
+ })
974
+ ], Job.prototype, "status", 2);
975
+ Job = __decorateClass([
976
+ (0, import_typeorm7.Entity)("jobs")
977
+ ], Job);
978
+
896
979
  // src/entities/user.entity.ts
897
980
  var AccountType = /* @__PURE__ */ ((AccountType2) => {
898
981
  AccountType2["ADMIN"] = "ADMIN";
@@ -911,40 +994,40 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
911
994
  var User = class extends BaseEntity {
912
995
  };
913
996
  __decorateClass([
914
- (0, import_typeorm7.Column)({ name: "unique_id", type: "varchar", unique: true })
997
+ (0, import_typeorm8.Column)({ name: "unique_id", type: "varchar", unique: true })
915
998
  ], User.prototype, "uniqueId", 2);
916
999
  __decorateClass([
917
- (0, import_typeorm7.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
1000
+ (0, import_typeorm8.Column)({ name: "username", type: "varchar", unique: true, nullable: true })
918
1001
  ], User.prototype, "username", 2);
919
1002
  __decorateClass([
920
- (0, import_typeorm7.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
1003
+ (0, import_typeorm8.Column)({ name: "first_name", type: "varchar", length: 100, nullable: true })
921
1004
  ], User.prototype, "firstName", 2);
922
1005
  __decorateClass([
923
- (0, import_typeorm7.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
1006
+ (0, import_typeorm8.Column)({ name: "last_name", type: "varchar", length: 100, nullable: true })
924
1007
  ], User.prototype, "lastName", 2);
925
1008
  __decorateClass([
926
- (0, import_typeorm7.Column)({ name: "date_of_birth", type: "date", nullable: true })
1009
+ (0, import_typeorm8.Column)({ name: "date_of_birth", type: "date", nullable: true })
927
1010
  ], User.prototype, "dateOfBirth", 2);
928
1011
  __decorateClass([
929
- (0, import_typeorm7.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
1012
+ (0, import_typeorm8.Column)({ name: "gender", type: "varchar", length: 10, nullable: true })
930
1013
  ], User.prototype, "gender", 2);
931
1014
  __decorateClass([
932
- (0, import_typeorm7.Column)({ name: "profile_picture_url", type: "text", nullable: true })
1015
+ (0, import_typeorm8.Column)({ name: "profile_picture_url", type: "text", nullable: true })
933
1016
  ], User.prototype, "profilePictureUrl", 2);
934
1017
  __decorateClass([
935
- (0, import_typeorm7.Column)({ name: "email", type: "varchar", unique: true })
1018
+ (0, import_typeorm8.Column)({ name: "email", type: "varchar", unique: true })
936
1019
  ], User.prototype, "email", 2);
937
1020
  __decorateClass([
938
- (0, import_typeorm7.Column)({ name: "mobile_code", type: "varchar", nullable: true })
1021
+ (0, import_typeorm8.Column)({ name: "mobile_code", type: "varchar", nullable: true })
939
1022
  ], User.prototype, "mobileCode", 2);
940
1023
  __decorateClass([
941
- (0, import_typeorm7.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
1024
+ (0, import_typeorm8.Column)({ name: "mobile", type: "varchar", unique: true, nullable: true })
942
1025
  ], User.prototype, "mobile", 2);
943
1026
  __decorateClass([
944
- (0, import_typeorm7.Column)({ name: "password", type: "varchar" })
1027
+ (0, import_typeorm8.Column)({ name: "password", type: "varchar" })
945
1028
  ], User.prototype, "password", 2);
946
1029
  __decorateClass([
947
- (0, import_typeorm7.Column)({
1030
+ (0, import_typeorm8.Column)({
948
1031
  name: "account_type",
949
1032
  type: "enum",
950
1033
  enum: AccountType,
@@ -952,7 +1035,7 @@ __decorateClass([
952
1035
  })
953
1036
  ], User.prototype, "accountType", 2);
954
1037
  __decorateClass([
955
- (0, import_typeorm7.Column)({
1038
+ (0, import_typeorm8.Column)({
956
1039
  name: "account_status",
957
1040
  type: "enum",
958
1041
  enum: AccountStatus,
@@ -960,48 +1043,48 @@ __decorateClass([
960
1043
  })
961
1044
  ], User.prototype, "accountStatus", 2);
962
1045
  __decorateClass([
963
- (0, import_typeorm7.Column)({ name: "is_email_verified", type: "boolean", default: false })
1046
+ (0, import_typeorm8.Column)({ name: "is_email_verified", type: "boolean", default: false })
964
1047
  ], User.prototype, "isEmailVerified", 2);
965
1048
  __decorateClass([
966
- (0, import_typeorm7.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
1049
+ (0, import_typeorm8.Column)({ name: "is_mobile_verified", type: "boolean", default: false })
967
1050
  ], User.prototype, "isMobileVerified", 2);
968
1051
  __decorateClass([
969
- (0, import_typeorm7.Column)({
1052
+ (0, import_typeorm8.Column)({
970
1053
  name: "last_login_at",
971
1054
  type: "timestamp with time zone",
972
1055
  nullable: true
973
1056
  })
974
1057
  ], User.prototype, "lastLoginAt", 2);
975
1058
  __decorateClass([
976
- (0, import_typeorm7.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
1059
+ (0, import_typeorm8.Column)({ name: "last_login_ip", type: "varchar", nullable: true })
977
1060
  ], User.prototype, "lastLoginIp", 2);
978
1061
  __decorateClass([
979
- (0, import_typeorm7.OneToMany)(() => RefreshToken, (token) => token.user)
1062
+ (0, import_typeorm8.OneToMany)(() => RefreshToken, (token) => token.user)
980
1063
  ], User.prototype, "refreshTokens", 2);
981
1064
  __decorateClass([
982
- (0, import_typeorm7.OneToMany)(() => Otp, (otp) => otp.user)
1065
+ (0, import_typeorm8.OneToMany)(() => Otp, (otp) => otp.user)
983
1066
  ], User.prototype, "otps", 2);
984
1067
  __decorateClass([
985
- (0, import_typeorm7.OneToMany)(() => ResumeParserLog, (resumeParser) => resumeParser.user)
1068
+ (0, import_typeorm8.OneToMany)(() => ResumeParserLog, (resumeParser) => resumeParser.user)
986
1069
  ], User.prototype, "resumeParserLogs", 2);
987
1070
  __decorateClass([
988
- (0, import_typeorm7.OneToOne)(
1071
+ (0, import_typeorm8.OneToOne)(
989
1072
  () => FreelancerProfile,
990
1073
  (freelancerProfile) => freelancerProfile.user
991
1074
  )
992
1075
  ], User.prototype, "freelancerProfile", 2);
993
1076
  __decorateClass([
994
- (0, import_typeorm7.OneToOne)(
995
- () => CompanyProfile,
996
- (companyProfile) => companyProfile.user
997
- )
1077
+ (0, import_typeorm8.OneToOne)(() => CompanyProfile, (companyProfile) => companyProfile.user)
998
1078
  ], User.prototype, "companyProfile", 2);
1079
+ __decorateClass([
1080
+ (0, import_typeorm8.OneToMany)(() => Job, (job) => job.user)
1081
+ ], User.prototype, "jobs", 2);
999
1082
  User = __decorateClass([
1000
- (0, import_typeorm7.Entity)("users")
1083
+ (0, import_typeorm8.Entity)("users")
1001
1084
  ], User);
1002
1085
 
1003
1086
  // src/entities/question.entity.ts
1004
- var import_typeorm8 = require("typeorm");
1087
+ var import_typeorm9 = require("typeorm");
1005
1088
  var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1006
1089
  QuestionFor2["CLIENT"] = "CLIENT";
1007
1090
  QuestionFor2["FREELANCER"] = "FREELANCER";
@@ -1010,16 +1093,16 @@ var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1010
1093
  var Question = class extends BaseEntity {
1011
1094
  };
1012
1095
  __decorateClass([
1013
- (0, import_typeorm8.Column)({ name: "question", type: "varchar" })
1096
+ (0, import_typeorm9.Column)({ name: "question", type: "varchar" })
1014
1097
  ], Question.prototype, "question", 2);
1015
1098
  __decorateClass([
1016
- (0, import_typeorm8.Column)({ name: "hint", type: "varchar", nullable: true })
1099
+ (0, import_typeorm9.Column)({ name: "hint", type: "varchar", nullable: true })
1017
1100
  ], Question.prototype, "hint", 2);
1018
1101
  __decorateClass([
1019
- (0, import_typeorm8.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1102
+ (0, import_typeorm9.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1020
1103
  ], Question.prototype, "slug", 2);
1021
1104
  __decorateClass([
1022
- (0, import_typeorm8.Column)({
1105
+ (0, import_typeorm9.Column)({
1023
1106
  name: "question_for",
1024
1107
  type: "enum",
1025
1108
  enum: QuestionFor,
@@ -1027,33 +1110,33 @@ __decorateClass([
1027
1110
  })
1028
1111
  ], Question.prototype, "questionFor", 2);
1029
1112
  __decorateClass([
1030
- (0, import_typeorm8.Column)({ name: "type", type: "varchar", nullable: true })
1113
+ (0, import_typeorm9.Column)({ name: "type", type: "varchar", nullable: true })
1031
1114
  ], Question.prototype, "type", 2);
1032
1115
  __decorateClass([
1033
- (0, import_typeorm8.Column)({ name: "options", type: "jsonb", nullable: true })
1116
+ (0, import_typeorm9.Column)({ name: "options", type: "jsonb", nullable: true })
1034
1117
  ], Question.prototype, "options", 2);
1035
1118
  __decorateClass([
1036
- (0, import_typeorm8.Column)({ name: "is_active", type: "boolean", default: false })
1119
+ (0, import_typeorm9.Column)({ name: "is_active", type: "boolean", default: false })
1037
1120
  ], Question.prototype, "isActive", 2);
1038
1121
  Question = __decorateClass([
1039
- (0, import_typeorm8.Entity)("questions")
1122
+ (0, import_typeorm9.Entity)("questions")
1040
1123
  ], Question);
1041
1124
 
1042
1125
  // src/entities/job-role.entity.ts
1043
- var import_typeorm9 = require("typeorm");
1126
+ var import_typeorm10 = require("typeorm");
1044
1127
  var JobRoles = class extends BaseEntity {
1045
1128
  };
1046
1129
  __decorateClass([
1047
- (0, import_typeorm9.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1130
+ (0, import_typeorm10.Column)({ name: "slug", type: "varchar", nullable: true, unique: true })
1048
1131
  ], JobRoles.prototype, "slug", 2);
1049
1132
  __decorateClass([
1050
- (0, import_typeorm9.Column)({ name: "name", type: "varchar", nullable: true })
1133
+ (0, import_typeorm10.Column)({ name: "name", type: "varchar", nullable: true })
1051
1134
  ], JobRoles.prototype, "name", 2);
1052
1135
  __decorateClass([
1053
- (0, import_typeorm9.Column)({ name: "is_active", type: "boolean", default: true })
1136
+ (0, import_typeorm10.Column)({ name: "is_active", type: "boolean", default: true })
1054
1137
  ], JobRoles.prototype, "isActive", 2);
1055
1138
  JobRoles = __decorateClass([
1056
- (0, import_typeorm9.Entity)("job_roles")
1139
+ (0, import_typeorm10.Entity)("job_roles")
1057
1140
  ], JobRoles);
1058
1141
  // Annotate the CommonJS export names for ESM import in node:
1059
1142
  0 && (module.exports = {
@@ -1074,8 +1157,11 @@ JobRoles = __decorateClass([
1074
1157
  FreelancerWorkShowcaseDto,
1075
1158
  FromUsOn,
1076
1159
  JOB_ROLE_PATTERN,
1160
+ Job,
1161
+ JobLocation,
1077
1162
  JobRMQAdapter,
1078
1163
  JobRoles,
1164
+ JobStatus,
1079
1165
  JobTCPAdapter,
1080
1166
  KindOfHire,
1081
1167
  LoginDto,
@@ -1094,6 +1180,7 @@ JobRoles = __decorateClass([
1094
1180
  RefreshToken,
1095
1181
  ResumeParserLog,
1096
1182
  SUBADMIN_PATTERN,
1183
+ TypeOfEmployment,
1097
1184
  UpdateSubAdminAccountStatusDto,
1098
1185
  UpdateSubAdminDto,
1099
1186
  User,
package/dist/index.mjs CHANGED
@@ -604,7 +604,7 @@ __decorateClass([
604
604
  ], BaseEntity.prototype, "deletedAt", 2);
605
605
 
606
606
  // src/entities/user.entity.ts
607
- import { Entity as Entity6, Column as Column7, OneToMany as OneToMany2, OneToOne } from "typeorm";
607
+ import { Entity as Entity7, Column as Column8, OneToMany as OneToMany2, OneToOne } from "typeorm";
608
608
 
609
609
  // src/entities/refresh-token.entity.ts
610
610
  import {
@@ -916,6 +916,85 @@ CompanyProfile = __decorateClass([
916
916
  Entity5("company_profiles")
917
917
  ], CompanyProfile);
918
918
 
919
+ // src/entities/job-entity.ts
920
+ import { Entity as Entity6, Column as Column7, Index as Index4, ManyToOne as ManyToOne6, JoinColumn as JoinColumn6 } from "typeorm";
921
+ var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
922
+ JobLocation2["ONSITE"] = "ONSITE";
923
+ JobLocation2["REMOTE"] = "REMOTE";
924
+ JobLocation2["BOTH"] = "BOTH";
925
+ return JobLocation2;
926
+ })(JobLocation || {});
927
+ var TypeOfEmployment = /* @__PURE__ */ ((TypeOfEmployment2) => {
928
+ TypeOfEmployment2["FULLTIME"] = "FULLTIME";
929
+ TypeOfEmployment2["PARTTIME"] = "PARTTIME";
930
+ TypeOfEmployment2["BOTH"] = "BOTH";
931
+ return TypeOfEmployment2;
932
+ })(TypeOfEmployment || {});
933
+ var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
934
+ JobStatus2["ACTIVE"] = "ACTIVE";
935
+ JobStatus2["OPEN"] = "OPEN";
936
+ JobStatus2["DRAFT"] = "DRAFT";
937
+ JobStatus2["ONHOLD"] = "ONHOLD";
938
+ JobStatus2["CLOSED"] = "CLOSED";
939
+ return JobStatus2;
940
+ })(JobStatus || {});
941
+ var Job = class extends BaseEntity {
942
+ };
943
+ __decorateClass([
944
+ Column7({ name: "job_id", type: "varchar", unique: true, nullable: true })
945
+ ], Job.prototype, "jobId", 2);
946
+ // individual index to find jobs by user
947
+ __decorateClass([
948
+ Column7({ name: "user_id", type: "integer", nullable: true }),
949
+ Index4()
950
+ ], Job.prototype, "userId", 2);
951
+ __decorateClass([
952
+ ManyToOne6(() => User, (user) => user.jobs),
953
+ JoinColumn6({ name: "user_id" })
954
+ ], Job.prototype, "user", 2);
955
+ __decorateClass([
956
+ Column7({ name: "job_role", type: "varchar", nullable: true })
957
+ ], Job.prototype, "jobRole", 2);
958
+ __decorateClass([
959
+ Column7({ name: "note", type: "varchar", nullable: true })
960
+ ], Job.prototype, "note", 2);
961
+ __decorateClass([
962
+ Column7({ name: "openings", type: "integer", default: 0 })
963
+ ], Job.prototype, "openings", 2);
964
+ __decorateClass([
965
+ Column7({
966
+ name: "location",
967
+ type: "enum",
968
+ enum: JobLocation,
969
+ nullable: true
970
+ })
971
+ ], Job.prototype, "location", 2);
972
+ __decorateClass([
973
+ Column7({
974
+ name: "type_of_employment",
975
+ type: "enum",
976
+ enum: TypeOfEmployment,
977
+ nullable: true
978
+ })
979
+ ], Job.prototype, "typeOfEmployment", 2);
980
+ __decorateClass([
981
+ Column7({ name: "additional_comment", type: "varchar", nullable: true })
982
+ ], Job.prototype, "additionalComment", 2);
983
+ __decorateClass([
984
+ Column7({ name: "description", type: "varchar", nullable: true })
985
+ ], Job.prototype, "description", 2);
986
+ __decorateClass([
987
+ Column7({
988
+ name: "status",
989
+ type: "enum",
990
+ enum: JobStatus,
991
+ default: "DRAFT" /* DRAFT */
992
+ })
993
+ ], Job.prototype, "status", 2);
994
+ Job = __decorateClass([
995
+ Entity6("jobs")
996
+ ], Job);
997
+
919
998
  // src/entities/user.entity.ts
920
999
  var AccountType = /* @__PURE__ */ ((AccountType2) => {
921
1000
  AccountType2["ADMIN"] = "ADMIN";
@@ -934,40 +1013,40 @@ var AccountStatus = /* @__PURE__ */ ((AccountStatus2) => {
934
1013
  var User = class extends BaseEntity {
935
1014
  };
936
1015
  __decorateClass([
937
- Column7({ name: "unique_id", type: "varchar", unique: true })
1016
+ Column8({ name: "unique_id", type: "varchar", unique: true })
938
1017
  ], User.prototype, "uniqueId", 2);
939
1018
  __decorateClass([
940
- Column7({ name: "username", type: "varchar", unique: true, nullable: true })
1019
+ Column8({ name: "username", type: "varchar", unique: true, nullable: true })
941
1020
  ], User.prototype, "username", 2);
942
1021
  __decorateClass([
943
- Column7({ name: "first_name", type: "varchar", length: 100, nullable: true })
1022
+ Column8({ name: "first_name", type: "varchar", length: 100, nullable: true })
944
1023
  ], User.prototype, "firstName", 2);
945
1024
  __decorateClass([
946
- Column7({ name: "last_name", type: "varchar", length: 100, nullable: true })
1025
+ Column8({ name: "last_name", type: "varchar", length: 100, nullable: true })
947
1026
  ], User.prototype, "lastName", 2);
948
1027
  __decorateClass([
949
- Column7({ name: "date_of_birth", type: "date", nullable: true })
1028
+ Column8({ name: "date_of_birth", type: "date", nullable: true })
950
1029
  ], User.prototype, "dateOfBirth", 2);
951
1030
  __decorateClass([
952
- Column7({ name: "gender", type: "varchar", length: 10, nullable: true })
1031
+ Column8({ name: "gender", type: "varchar", length: 10, nullable: true })
953
1032
  ], User.prototype, "gender", 2);
954
1033
  __decorateClass([
955
- Column7({ name: "profile_picture_url", type: "text", nullable: true })
1034
+ Column8({ name: "profile_picture_url", type: "text", nullable: true })
956
1035
  ], User.prototype, "profilePictureUrl", 2);
957
1036
  __decorateClass([
958
- Column7({ name: "email", type: "varchar", unique: true })
1037
+ Column8({ name: "email", type: "varchar", unique: true })
959
1038
  ], User.prototype, "email", 2);
960
1039
  __decorateClass([
961
- Column7({ name: "mobile_code", type: "varchar", nullable: true })
1040
+ Column8({ name: "mobile_code", type: "varchar", nullable: true })
962
1041
  ], User.prototype, "mobileCode", 2);
963
1042
  __decorateClass([
964
- Column7({ name: "mobile", type: "varchar", unique: true, nullable: true })
1043
+ Column8({ name: "mobile", type: "varchar", unique: true, nullable: true })
965
1044
  ], User.prototype, "mobile", 2);
966
1045
  __decorateClass([
967
- Column7({ name: "password", type: "varchar" })
1046
+ Column8({ name: "password", type: "varchar" })
968
1047
  ], User.prototype, "password", 2);
969
1048
  __decorateClass([
970
- Column7({
1049
+ Column8({
971
1050
  name: "account_type",
972
1051
  type: "enum",
973
1052
  enum: AccountType,
@@ -975,7 +1054,7 @@ __decorateClass([
975
1054
  })
976
1055
  ], User.prototype, "accountType", 2);
977
1056
  __decorateClass([
978
- Column7({
1057
+ Column8({
979
1058
  name: "account_status",
980
1059
  type: "enum",
981
1060
  enum: AccountStatus,
@@ -983,20 +1062,20 @@ __decorateClass([
983
1062
  })
984
1063
  ], User.prototype, "accountStatus", 2);
985
1064
  __decorateClass([
986
- Column7({ name: "is_email_verified", type: "boolean", default: false })
1065
+ Column8({ name: "is_email_verified", type: "boolean", default: false })
987
1066
  ], User.prototype, "isEmailVerified", 2);
988
1067
  __decorateClass([
989
- Column7({ name: "is_mobile_verified", type: "boolean", default: false })
1068
+ Column8({ name: "is_mobile_verified", type: "boolean", default: false })
990
1069
  ], User.prototype, "isMobileVerified", 2);
991
1070
  __decorateClass([
992
- Column7({
1071
+ Column8({
993
1072
  name: "last_login_at",
994
1073
  type: "timestamp with time zone",
995
1074
  nullable: true
996
1075
  })
997
1076
  ], User.prototype, "lastLoginAt", 2);
998
1077
  __decorateClass([
999
- Column7({ name: "last_login_ip", type: "varchar", nullable: true })
1078
+ Column8({ name: "last_login_ip", type: "varchar", nullable: true })
1000
1079
  ], User.prototype, "lastLoginIp", 2);
1001
1080
  __decorateClass([
1002
1081
  OneToMany2(() => RefreshToken, (token) => token.user)
@@ -1014,17 +1093,17 @@ __decorateClass([
1014
1093
  )
1015
1094
  ], User.prototype, "freelancerProfile", 2);
1016
1095
  __decorateClass([
1017
- OneToOne(
1018
- () => CompanyProfile,
1019
- (companyProfile) => companyProfile.user
1020
- )
1096
+ OneToOne(() => CompanyProfile, (companyProfile) => companyProfile.user)
1021
1097
  ], User.prototype, "companyProfile", 2);
1098
+ __decorateClass([
1099
+ OneToMany2(() => Job, (job) => job.user)
1100
+ ], User.prototype, "jobs", 2);
1022
1101
  User = __decorateClass([
1023
- Entity6("users")
1102
+ Entity7("users")
1024
1103
  ], User);
1025
1104
 
1026
1105
  // src/entities/question.entity.ts
1027
- import { Entity as Entity7, Column as Column8 } from "typeorm";
1106
+ import { Entity as Entity8, Column as Column9 } from "typeorm";
1028
1107
  var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1029
1108
  QuestionFor2["CLIENT"] = "CLIENT";
1030
1109
  QuestionFor2["FREELANCER"] = "FREELANCER";
@@ -1033,16 +1112,16 @@ var QuestionFor = /* @__PURE__ */ ((QuestionFor2) => {
1033
1112
  var Question = class extends BaseEntity {
1034
1113
  };
1035
1114
  __decorateClass([
1036
- Column8({ name: "question", type: "varchar" })
1115
+ Column9({ name: "question", type: "varchar" })
1037
1116
  ], Question.prototype, "question", 2);
1038
1117
  __decorateClass([
1039
- Column8({ name: "hint", type: "varchar", nullable: true })
1118
+ Column9({ name: "hint", type: "varchar", nullable: true })
1040
1119
  ], Question.prototype, "hint", 2);
1041
1120
  __decorateClass([
1042
- Column8({ name: "slug", type: "varchar", nullable: true, unique: true })
1121
+ Column9({ name: "slug", type: "varchar", nullable: true, unique: true })
1043
1122
  ], Question.prototype, "slug", 2);
1044
1123
  __decorateClass([
1045
- Column8({
1124
+ Column9({
1046
1125
  name: "question_for",
1047
1126
  type: "enum",
1048
1127
  enum: QuestionFor,
@@ -1050,33 +1129,33 @@ __decorateClass([
1050
1129
  })
1051
1130
  ], Question.prototype, "questionFor", 2);
1052
1131
  __decorateClass([
1053
- Column8({ name: "type", type: "varchar", nullable: true })
1132
+ Column9({ name: "type", type: "varchar", nullable: true })
1054
1133
  ], Question.prototype, "type", 2);
1055
1134
  __decorateClass([
1056
- Column8({ name: "options", type: "jsonb", nullable: true })
1135
+ Column9({ name: "options", type: "jsonb", nullable: true })
1057
1136
  ], Question.prototype, "options", 2);
1058
1137
  __decorateClass([
1059
- Column8({ name: "is_active", type: "boolean", default: false })
1138
+ Column9({ name: "is_active", type: "boolean", default: false })
1060
1139
  ], Question.prototype, "isActive", 2);
1061
1140
  Question = __decorateClass([
1062
- Entity7("questions")
1141
+ Entity8("questions")
1063
1142
  ], Question);
1064
1143
 
1065
1144
  // src/entities/job-role.entity.ts
1066
- import { Entity as Entity8, Column as Column9 } from "typeorm";
1145
+ import { Entity as Entity9, Column as Column10 } from "typeorm";
1067
1146
  var JobRoles = class extends BaseEntity {
1068
1147
  };
1069
1148
  __decorateClass([
1070
- Column9({ name: "slug", type: "varchar", nullable: true, unique: true })
1149
+ Column10({ name: "slug", type: "varchar", nullable: true, unique: true })
1071
1150
  ], JobRoles.prototype, "slug", 2);
1072
1151
  __decorateClass([
1073
- Column9({ name: "name", type: "varchar", nullable: true })
1152
+ Column10({ name: "name", type: "varchar", nullable: true })
1074
1153
  ], JobRoles.prototype, "name", 2);
1075
1154
  __decorateClass([
1076
- Column9({ name: "is_active", type: "boolean", default: true })
1155
+ Column10({ name: "is_active", type: "boolean", default: true })
1077
1156
  ], JobRoles.prototype, "isActive", 2);
1078
1157
  JobRoles = __decorateClass([
1079
- Entity8("job_roles")
1158
+ Entity9("job_roles")
1080
1159
  ], JobRoles);
1081
1160
  export {
1082
1161
  AUTHENTICATION_PATTERN,
@@ -1096,8 +1175,11 @@ export {
1096
1175
  FreelancerWorkShowcaseDto,
1097
1176
  FromUsOn,
1098
1177
  JOB_ROLE_PATTERN,
1178
+ Job,
1179
+ JobLocation,
1099
1180
  JobRMQAdapter,
1100
1181
  JobRoles,
1182
+ JobStatus,
1101
1183
  JobTCPAdapter,
1102
1184
  KindOfHire,
1103
1185
  LoginDto,
@@ -1116,6 +1198,7 @@ export {
1116
1198
  RefreshToken,
1117
1199
  ResumeParserLog,
1118
1200
  SUBADMIN_PATTERN,
1201
+ TypeOfEmployment,
1119
1202
  UpdateSubAdminAccountStatusDto,
1120
1203
  UpdateSubAdminDto,
1121
1204
  User,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.68",
3
+ "version": "1.0.69",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",