@experts_hub/shared 1.0.299 → 1.0.301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -16,6 +16,7 @@ declare const AUTHENTICATION_PATTERN: {
16
16
 
17
17
  declare enum ScopeEnum$3 {
18
18
  ADMIN = "ADMIN",
19
+ SUB_ADMIN = "SUB_ADMIN",
19
20
  CLIENT = "CLIENT",
20
21
  FREELANCER = "FREELANCER"
21
22
  }
@@ -443,6 +444,7 @@ declare enum EmploymentType {
443
444
  BOTH = "BOTH"
444
445
  }
445
446
  declare class JobBasicInformationDto {
447
+ isDraft?: boolean;
446
448
  jobRole: string;
447
449
  note?: string;
448
450
  skills: number[];
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ declare const AUTHENTICATION_PATTERN: {
16
16
 
17
17
  declare enum ScopeEnum$3 {
18
18
  ADMIN = "ADMIN",
19
+ SUB_ADMIN = "SUB_ADMIN",
19
20
  CLIENT = "CLIENT",
20
21
  FREELANCER = "FREELANCER"
21
22
  }
@@ -443,6 +444,7 @@ declare enum EmploymentType {
443
444
  BOTH = "BOTH"
444
445
  }
445
446
  declare class JobBasicInformationDto {
447
+ isDraft?: boolean;
446
448
  jobRole: string;
447
449
  note?: string;
448
450
  skills: number[];
package/dist/index.js CHANGED
@@ -256,6 +256,7 @@ var AUTHENTICATION_PATTERN = {
256
256
  var import_class_validator = require("class-validator");
257
257
  var ScopeEnum = /* @__PURE__ */ ((ScopeEnum5) => {
258
258
  ScopeEnum5["ADMIN"] = "ADMIN";
259
+ ScopeEnum5["SUB_ADMIN"] = "SUB_ADMIN";
259
260
  ScopeEnum5["CLIENT"] = "CLIENT";
260
261
  ScopeEnum5["FREELANCER"] = "FREELANCER";
261
262
  return ScopeEnum5;
@@ -1082,7 +1083,14 @@ var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
1082
1083
  return EmploymentType2;
1083
1084
  })(EmploymentType || {});
1084
1085
  var JobBasicInformationDto = class {
1086
+ constructor() {
1087
+ this.isDraft = false;
1088
+ }
1085
1089
  };
1090
+ __decorateClass([
1091
+ (0, import_class_validator31.IsOptional)(),
1092
+ (0, import_class_transformer.Type)(() => Boolean)
1093
+ ], JobBasicInformationDto.prototype, "isDraft", 2);
1086
1094
  __decorateClass([
1087
1095
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter job role" }),
1088
1096
  (0, import_class_validator31.IsString)({ message: "Job role must be a string" })
@@ -1092,17 +1100,20 @@ __decorateClass([
1092
1100
  (0, import_class_validator31.IsString)({ message: "Note must be a string" })
1093
1101
  ], JobBasicInformationDto.prototype, "note", 2);
1094
1102
  __decorateClass([
1103
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1095
1104
  (0, import_class_validator31.IsArray)({ message: "Skills must be an array" }),
1096
1105
  (0, import_class_validator31.ArrayNotEmpty)({ message: "Please select at least one skill" }),
1097
1106
  (0, import_class_validator31.IsNumber)({}, { each: true, message: "Each skill must be a number" }),
1098
1107
  (0, import_class_transformer.Type)(() => Number)
1099
1108
  ], JobBasicInformationDto.prototype, "skills", 2);
1100
1109
  __decorateClass([
1110
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1101
1111
  (0, import_class_validator31.IsNumber)({}, { message: "Openings must be a number" }),
1102
1112
  (0, import_class_validator31.Min)(1, { message: "There must be at least 1 opening" }),
1103
1113
  (0, import_class_transformer.Type)(() => Number)
1104
1114
  ], JobBasicInformationDto.prototype, "openings", 2);
1105
1115
  __decorateClass([
1116
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1106
1117
  (0, import_class_validator31.IsEnum)(JobLocation, {
1107
1118
  message: `Location must be one of: ${Object.values(JobLocation).join(
1108
1119
  ", "
@@ -1110,18 +1121,22 @@ __decorateClass([
1110
1121
  })
1111
1122
  ], JobBasicInformationDto.prototype, "location", 2);
1112
1123
  __decorateClass([
1124
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1113
1125
  (0, import_class_validator31.IsNumber)({}, { message: "Country id must be a number" }),
1114
1126
  (0, import_class_transformer.Type)(() => Number)
1115
1127
  ], JobBasicInformationDto.prototype, "countryId", 2);
1116
1128
  __decorateClass([
1129
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1117
1130
  (0, import_class_validator31.IsNumber)({}, { message: "State id must be a number" }),
1118
1131
  (0, import_class_transformer.Type)(() => Number)
1119
1132
  ], JobBasicInformationDto.prototype, "stateId", 2);
1120
1133
  __decorateClass([
1134
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1121
1135
  (0, import_class_validator31.IsNumber)({}, { message: "City id must be a number" }),
1122
1136
  (0, import_class_transformer.Type)(() => Number)
1123
1137
  ], JobBasicInformationDto.prototype, "cityId", 2);
1124
1138
  __decorateClass([
1139
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1125
1140
  (0, import_class_validator31.IsEnum)(EmploymentType, {
1126
1141
  message: `Type of employment must be one of: ${Object.values(
1127
1142
  EmploymentType
@@ -1129,43 +1144,53 @@ __decorateClass([
1129
1144
  })
1130
1145
  ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
1131
1146
  __decorateClass([
1147
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1132
1148
  (0, import_class_validator31.IsString)({ message: "Currency must be a string" })
1133
1149
  ], JobBasicInformationDto.prototype, "currency", 2);
1134
1150
  __decorateClass([
1151
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1135
1152
  (0, import_class_validator31.IsNumber)({}, { message: "Expected salary (from) must be a number" }),
1136
1153
  (0, import_class_validator31.Min)(0, { message: "Expected salary (from) cannot be negative" }),
1137
1154
  (0, import_class_transformer.Type)(() => Number)
1138
1155
  ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
1139
1156
  __decorateClass([
1157
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1140
1158
  (0, import_class_validator31.IsNumber)({}, { message: "Expected salary (to) must be a number" }),
1141
1159
  (0, import_class_validator31.Min)(0, { message: "Expected salary (to) cannot be negative" }),
1142
1160
  (0, import_class_transformer.Type)(() => Number)
1143
1161
  ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
1144
1162
  __decorateClass([
1163
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1145
1164
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter start date" }),
1146
1165
  (0, import_class_validator31.IsString)({ message: "Start date must be valid" })
1147
1166
  ], JobBasicInformationDto.prototype, "tentativeStartDate", 2);
1148
1167
  __decorateClass([
1168
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1149
1169
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter end date" }),
1150
1170
  (0, import_class_validator31.IsString)({ message: "End date must be valid" })
1151
1171
  ], JobBasicInformationDto.prototype, "tentativeEndDate", 2);
1152
1172
  __decorateClass([
1173
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1153
1174
  (0, import_class_validator31.IsString)({ message: "Onboarding TAT must be a string" }),
1154
1175
  (0, import_class_validator31.IsOptional)()
1155
1176
  ], JobBasicInformationDto.prototype, "onboardingTat", 2);
1156
1177
  __decorateClass([
1178
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1157
1179
  (0, import_class_validator31.IsString)({ message: "Candidate communication skills must be a string" }),
1158
1180
  (0, import_class_validator31.IsOptional)()
1159
1181
  ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
1160
1182
  __decorateClass([
1183
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1161
1184
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter the academic qualification" }),
1162
1185
  (0, import_class_validator31.IsString)({ message: "Academic qualification must be a string" })
1163
1186
  ], JobBasicInformationDto.prototype, "academicQualification", 2);
1164
1187
  __decorateClass([
1188
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1165
1189
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter the years of experience" }),
1166
1190
  (0, import_class_validator31.IsString)({ message: "Years of experience must be a string" })
1167
1191
  ], JobBasicInformationDto.prototype, "yearsOfExperience", 2);
1168
1192
  __decorateClass([
1193
+ (0, import_class_validator31.ValidateIf)((o) => !o.isDraft),
1169
1194
  (0, import_class_validator31.IsNotEmpty)({ message: "Please enter the business industry" }),
1170
1195
  (0, import_class_validator31.IsString)({ message: "Business industry must be a string" })
1171
1196
  ], JobBasicInformationDto.prototype, "businessIndustry", 2);
package/dist/index.mjs CHANGED
@@ -28,6 +28,7 @@ var AUTHENTICATION_PATTERN = {
28
28
  import { IsEnum, IsNotEmpty } from "class-validator";
29
29
  var ScopeEnum = /* @__PURE__ */ ((ScopeEnum5) => {
30
30
  ScopeEnum5["ADMIN"] = "ADMIN";
31
+ ScopeEnum5["SUB_ADMIN"] = "SUB_ADMIN";
31
32
  ScopeEnum5["CLIENT"] = "CLIENT";
32
33
  ScopeEnum5["FREELANCER"] = "FREELANCER";
33
34
  return ScopeEnum5;
@@ -922,7 +923,8 @@ import {
922
923
  IsNumber,
923
924
  IsOptional as IsOptional5,
924
925
  IsEnum as IsEnum8,
925
- Min
926
+ Min,
927
+ ValidateIf as ValidateIf2
926
928
  } from "class-validator";
927
929
  import { Type } from "class-transformer";
928
930
  var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
@@ -938,7 +940,14 @@ var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
938
940
  return EmploymentType2;
939
941
  })(EmploymentType || {});
940
942
  var JobBasicInformationDto = class {
943
+ constructor() {
944
+ this.isDraft = false;
945
+ }
941
946
  };
947
+ __decorateClass([
948
+ IsOptional5(),
949
+ Type(() => Boolean)
950
+ ], JobBasicInformationDto.prototype, "isDraft", 2);
942
951
  __decorateClass([
943
952
  IsNotEmpty27({ message: "Please enter job role" }),
944
953
  IsString11({ message: "Job role must be a string" })
@@ -948,17 +957,20 @@ __decorateClass([
948
957
  IsString11({ message: "Note must be a string" })
949
958
  ], JobBasicInformationDto.prototype, "note", 2);
950
959
  __decorateClass([
960
+ ValidateIf2((o) => !o.isDraft),
951
961
  IsArray({ message: "Skills must be an array" }),
952
962
  ArrayNotEmpty({ message: "Please select at least one skill" }),
953
963
  IsNumber({}, { each: true, message: "Each skill must be a number" }),
954
964
  Type(() => Number)
955
965
  ], JobBasicInformationDto.prototype, "skills", 2);
956
966
  __decorateClass([
967
+ ValidateIf2((o) => !o.isDraft),
957
968
  IsNumber({}, { message: "Openings must be a number" }),
958
969
  Min(1, { message: "There must be at least 1 opening" }),
959
970
  Type(() => Number)
960
971
  ], JobBasicInformationDto.prototype, "openings", 2);
961
972
  __decorateClass([
973
+ ValidateIf2((o) => !o.isDraft),
962
974
  IsEnum8(JobLocation, {
963
975
  message: `Location must be one of: ${Object.values(JobLocation).join(
964
976
  ", "
@@ -966,18 +978,22 @@ __decorateClass([
966
978
  })
967
979
  ], JobBasicInformationDto.prototype, "location", 2);
968
980
  __decorateClass([
981
+ ValidateIf2((o) => !o.isDraft),
969
982
  IsNumber({}, { message: "Country id must be a number" }),
970
983
  Type(() => Number)
971
984
  ], JobBasicInformationDto.prototype, "countryId", 2);
972
985
  __decorateClass([
986
+ ValidateIf2((o) => !o.isDraft),
973
987
  IsNumber({}, { message: "State id must be a number" }),
974
988
  Type(() => Number)
975
989
  ], JobBasicInformationDto.prototype, "stateId", 2);
976
990
  __decorateClass([
991
+ ValidateIf2((o) => !o.isDraft),
977
992
  IsNumber({}, { message: "City id must be a number" }),
978
993
  Type(() => Number)
979
994
  ], JobBasicInformationDto.prototype, "cityId", 2);
980
995
  __decorateClass([
996
+ ValidateIf2((o) => !o.isDraft),
981
997
  IsEnum8(EmploymentType, {
982
998
  message: `Type of employment must be one of: ${Object.values(
983
999
  EmploymentType
@@ -985,43 +1001,53 @@ __decorateClass([
985
1001
  })
986
1002
  ], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
987
1003
  __decorateClass([
1004
+ ValidateIf2((o) => !o.isDraft),
988
1005
  IsString11({ message: "Currency must be a string" })
989
1006
  ], JobBasicInformationDto.prototype, "currency", 2);
990
1007
  __decorateClass([
1008
+ ValidateIf2((o) => !o.isDraft),
991
1009
  IsNumber({}, { message: "Expected salary (from) must be a number" }),
992
1010
  Min(0, { message: "Expected salary (from) cannot be negative" }),
993
1011
  Type(() => Number)
994
1012
  ], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
995
1013
  __decorateClass([
1014
+ ValidateIf2((o) => !o.isDraft),
996
1015
  IsNumber({}, { message: "Expected salary (to) must be a number" }),
997
1016
  Min(0, { message: "Expected salary (to) cannot be negative" }),
998
1017
  Type(() => Number)
999
1018
  ], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
1000
1019
  __decorateClass([
1020
+ ValidateIf2((o) => !o.isDraft),
1001
1021
  IsNotEmpty27({ message: "Please enter start date" }),
1002
1022
  IsString11({ message: "Start date must be valid" })
1003
1023
  ], JobBasicInformationDto.prototype, "tentativeStartDate", 2);
1004
1024
  __decorateClass([
1025
+ ValidateIf2((o) => !o.isDraft),
1005
1026
  IsNotEmpty27({ message: "Please enter end date" }),
1006
1027
  IsString11({ message: "End date must be valid" })
1007
1028
  ], JobBasicInformationDto.prototype, "tentativeEndDate", 2);
1008
1029
  __decorateClass([
1030
+ ValidateIf2((o) => !o.isDraft),
1009
1031
  IsString11({ message: "Onboarding TAT must be a string" }),
1010
1032
  IsOptional5()
1011
1033
  ], JobBasicInformationDto.prototype, "onboardingTat", 2);
1012
1034
  __decorateClass([
1035
+ ValidateIf2((o) => !o.isDraft),
1013
1036
  IsString11({ message: "Candidate communication skills must be a string" }),
1014
1037
  IsOptional5()
1015
1038
  ], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
1016
1039
  __decorateClass([
1040
+ ValidateIf2((o) => !o.isDraft),
1017
1041
  IsNotEmpty27({ message: "Please enter the academic qualification" }),
1018
1042
  IsString11({ message: "Academic qualification must be a string" })
1019
1043
  ], JobBasicInformationDto.prototype, "academicQualification", 2);
1020
1044
  __decorateClass([
1045
+ ValidateIf2((o) => !o.isDraft),
1021
1046
  IsNotEmpty27({ message: "Please enter the years of experience" }),
1022
1047
  IsString11({ message: "Years of experience must be a string" })
1023
1048
  ], JobBasicInformationDto.prototype, "yearsOfExperience", 2);
1024
1049
  __decorateClass([
1050
+ ValidateIf2((o) => !o.isDraft),
1025
1051
  IsNotEmpty27({ message: "Please enter the business industry" }),
1026
1052
  IsString11({ message: "Business industry must be a string" })
1027
1053
  ], JobBasicInformationDto.prototype, "businessIndustry", 2);
@@ -1235,7 +1261,7 @@ import {
1235
1261
  IsEnum as IsEnum11,
1236
1262
  IsNotEmpty as IsNotEmpty32,
1237
1263
  IsOptional as IsOptional8,
1238
- ValidateIf as ValidateIf2
1264
+ ValidateIf as ValidateIf3
1239
1265
  } from "class-validator";
1240
1266
  var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
1241
1267
  BankAccountScope2["DOMESTIC"] = "DOMESTIC";
@@ -1266,19 +1292,19 @@ __decorateClass([
1266
1292
  IsNotEmpty32({ message: "Please enter Branch Name." })
1267
1293
  ], FreelancerBankDetailsDto.prototype, "branchName", 2);
1268
1294
  __decorateClass([
1269
- ValidateIf2((dto) => dto.accountScope === "DOMESTIC"),
1295
+ ValidateIf3((dto) => dto.accountScope === "DOMESTIC"),
1270
1296
  IsNotEmpty32({ message: "IFSC Code is required for DOMESTIC accounts." })
1271
1297
  ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
1272
1298
  __decorateClass([
1273
- ValidateIf2((dto) => dto.accountScope === "INTERNATIONAL"),
1299
+ ValidateIf3((dto) => dto.accountScope === "INTERNATIONAL"),
1274
1300
  IsNotEmpty32({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
1275
1301
  ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
1276
1302
  __decorateClass([
1277
- ValidateIf2((dto) => dto.accountScope === "INTERNATIONAL"),
1303
+ ValidateIf3((dto) => dto.accountScope === "INTERNATIONAL"),
1278
1304
  IsNotEmpty32({ message: "ABA Number is required for INTERNATIONAL accounts." })
1279
1305
  ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
1280
1306
  __decorateClass([
1281
- ValidateIf2((dto) => dto.accountScope === "INTERNATIONAL"),
1307
+ ValidateIf3((dto) => dto.accountScope === "INTERNATIONAL"),
1282
1308
  IsNotEmpty32({ message: "IBAN is required for INTERNATIONAL accounts." })
1283
1309
  ], FreelancerBankDetailsDto.prototype, "iban", 2);
1284
1310
  __decorateClass([
@@ -4094,7 +4120,7 @@ import {
4094
4120
  IsNotEmpty as IsNotEmpty42,
4095
4121
  MinLength as MinLength11,
4096
4122
  Matches as Matches8,
4097
- ValidateIf as ValidateIf3
4123
+ ValidateIf as ValidateIf4
4098
4124
  } from "class-validator";
4099
4125
  import { Type as Type6 } from "class-transformer";
4100
4126
  var NatureOfWorkEnum = /* @__PURE__ */ ((NatureOfWorkEnum3) => {
@@ -4164,7 +4190,7 @@ __decorateClass([
4164
4190
  Type6(() => Boolean)
4165
4191
  ], CreateFreelancerDto.prototype, "isImmediateJoiner", 2);
4166
4192
  __decorateClass([
4167
- ValidateIf3((o) => o.isImmediateJoiner === false),
4193
+ ValidateIf4((o) => o.isImmediateJoiner === false),
4168
4194
  IsNotEmpty42({ message: "Please enter availability to join." })
4169
4195
  ], CreateFreelancerDto.prototype, "availabilityToJoin", 2);
4170
4196
  __decorateClass([
@@ -4202,7 +4228,7 @@ import {
4202
4228
  MinLength as MinLength12,
4203
4229
  Matches as Matches9,
4204
4230
  IsNotEmpty as IsNotEmpty43,
4205
- ValidateIf as ValidateIf4
4231
+ ValidateIf as ValidateIf5
4206
4232
  } from "class-validator";
4207
4233
  import { Type as Type7 } from "class-transformer";
4208
4234
  var NatureOfWorkEnum2 = /* @__PURE__ */ ((NatureOfWorkEnum3) => {
@@ -4277,7 +4303,7 @@ __decorateClass([
4277
4303
  Type7(() => Boolean)
4278
4304
  ], UpdateFreelancerDto.prototype, "isImmediateJoiner", 2);
4279
4305
  __decorateClass([
4280
- ValidateIf4((o) => o.isImmediateJoiner === false),
4306
+ ValidateIf5((o) => o.isImmediateJoiner === false),
4281
4307
  IsNotEmpty43({ message: "Please enter availability to join." })
4282
4308
  ], UpdateFreelancerDto.prototype, "availabilityToJoin", 2);
4283
4309
  __decorateClass([
@@ -1,5 +1,6 @@
1
1
  export declare enum ScopeEnum {
2
2
  ADMIN = "ADMIN",
3
+ SUB_ADMIN = "SUB_ADMIN",
3
4
  CLIENT = "CLIENT",
4
5
  FREELANCER = "FREELANCER"
5
6
  }
@@ -9,6 +9,7 @@ export declare enum EmploymentType {
9
9
  BOTH = "BOTH"
10
10
  }
11
11
  export declare class JobBasicInformationDto {
12
+ isDraft?: boolean;
12
13
  jobRole: string;
13
14
  note?: string;
14
15
  skills: number[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.299",
3
+ "version": "1.0.301",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",