@experts_hub/shared 1.0.299 → 1.0.300

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