@experts_hub/shared 1.0.478 → 1.0.480

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
@@ -563,7 +563,7 @@ declare class UpdateFreelancerProfileDto {
563
563
  mobile: string;
564
564
  countryId: number;
565
565
  expectedHourlyCompensation: string;
566
- numberOfHours: string;
566
+ numberOfHours?: number;
567
567
  natureOfWork: NatureOfWorkDto;
568
568
  modeOfWork: ModeOfWorkDto;
569
569
  portfolioLink?: string;
package/dist/index.d.ts CHANGED
@@ -563,7 +563,7 @@ declare class UpdateFreelancerProfileDto {
563
563
  mobile: string;
564
564
  countryId: number;
565
565
  expectedHourlyCompensation: string;
566
- numberOfHours: string;
566
+ numberOfHours?: number;
567
567
  natureOfWork: NatureOfWorkDto;
568
568
  modeOfWork: ModeOfWorkDto;
569
569
  portfolioLink?: string;
package/dist/index.js CHANGED
@@ -1479,8 +1479,9 @@ __decorateClass([
1479
1479
  (0, import_class_validator39.IsNotEmpty)({ message: "Please enter expected hourly compensation." })
1480
1480
  ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
1481
1481
  __decorateClass([
1482
- (0, import_class_validator39.IsOptional)(),
1483
- (0, import_class_validator39.IsString)()
1482
+ (0, import_class_validator39.ValidateIf)((dto) => dto.NatureOfWorkDto === "FREELANCE" /* FREELANCE */),
1483
+ (0, import_class_validator39.IsInt)({ message: "Please enter valid weekly availability hours (integer)." }),
1484
+ (0, import_class_validator39.IsNotEmpty)({ message: "Please enter weekly availability hours" })
1484
1485
  ], UpdateFreelancerProfileDto.prototype, "numberOfHours", 2);
1485
1486
  __decorateClass([
1486
1487
  (0, import_class_validator39.IsNotEmpty)({ message: "Please select engagement type." }),
package/dist/index.mjs CHANGED
@@ -1223,7 +1223,9 @@ import {
1223
1223
  IsEmail as IsEmail5,
1224
1224
  IsNumber as IsNumber2,
1225
1225
  IsEnum as IsEnum12,
1226
- IsNotEmpty as IsNotEmpty33
1226
+ IsNotEmpty as IsNotEmpty33,
1227
+ ValidateIf as ValidateIf4,
1228
+ IsInt
1227
1229
  } from "class-validator";
1228
1230
  var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
1229
1231
  NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
@@ -1276,8 +1278,9 @@ __decorateClass([
1276
1278
  IsNotEmpty33({ message: "Please enter expected hourly compensation." })
1277
1279
  ], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
1278
1280
  __decorateClass([
1279
- IsOptional15(),
1280
- IsString16()
1281
+ ValidateIf4((dto) => dto.NatureOfWorkDto === "FREELANCE" /* FREELANCE */),
1282
+ IsInt({ message: "Please enter valid weekly availability hours (integer)." }),
1283
+ IsNotEmpty33({ message: "Please enter weekly availability hours" })
1281
1284
  ], UpdateFreelancerProfileDto.prototype, "numberOfHours", 2);
1282
1285
  __decorateClass([
1283
1286
  IsNotEmpty33({ message: "Please select engagement type." }),
@@ -1341,7 +1344,7 @@ import {
1341
1344
  IsNotEmpty as IsNotEmpty34,
1342
1345
  IsOptional as IsOptional16,
1343
1346
  IsString as IsString17,
1344
- ValidateIf as ValidateIf4
1347
+ ValidateIf as ValidateIf5
1345
1348
  } from "class-validator";
1346
1349
  var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
1347
1350
  BankAccountScope2["DOMESTIC"] = "DOMESTIC";
@@ -1376,19 +1379,19 @@ __decorateClass([
1376
1379
  IsString17()
1377
1380
  ], FreelancerBankDetailsDto.prototype, "branchName", 2);
1378
1381
  __decorateClass([
1379
- ValidateIf4((dto) => dto.accountScope === "DOMESTIC"),
1382
+ ValidateIf5((dto) => dto.accountScope === "DOMESTIC"),
1380
1383
  IsNotEmpty34({ message: "IFSC Code is required for DOMESTIC accounts." })
1381
1384
  ], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
1382
1385
  __decorateClass([
1383
- ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
1386
+ ValidateIf5((dto) => dto.accountScope === "INTERNATIONAL"),
1384
1387
  IsNotEmpty34({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
1385
1388
  ], FreelancerBankDetailsDto.prototype, "routingNo", 2);
1386
1389
  __decorateClass([
1387
- ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
1390
+ ValidateIf5((dto) => dto.accountScope === "INTERNATIONAL"),
1388
1391
  IsNotEmpty34({ message: "ABA Number is required for INTERNATIONAL accounts." })
1389
1392
  ], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
1390
1393
  __decorateClass([
1391
- ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
1394
+ ValidateIf5((dto) => dto.accountScope === "INTERNATIONAL"),
1392
1395
  IsNotEmpty34({ message: "IBAN is required for INTERNATIONAL accounts." })
1393
1396
  ], FreelancerBankDetailsDto.prototype, "iban", 2);
1394
1397
  __decorateClass([
@@ -1452,7 +1455,7 @@ var RATING_PATTERN = {
1452
1455
  // src/modules/rating/dto/add.rating.dto.ts
1453
1456
  import {
1454
1457
  IsEnum as IsEnum15,
1455
- IsInt,
1458
+ IsInt as IsInt2,
1456
1459
  IsNotEmpty as IsNotEmpty35,
1457
1460
  IsOptional as IsOptional17,
1458
1461
  IsString as IsString18,
@@ -5536,7 +5539,7 @@ Rating = __decorateClass([
5536
5539
  var CreateRatingDto = class {
5537
5540
  };
5538
5541
  __decorateClass([
5539
- IsInt({ message: "Reviewee ID must be a valid integer" }),
5542
+ IsInt2({ message: "Reviewee ID must be a valid integer" }),
5540
5543
  IsNotEmpty35({ message: "Reviewee ID is required" })
5541
5544
  ], CreateRatingDto.prototype, "revieweeId", 2);
5542
5545
  __decorateClass([
@@ -5545,7 +5548,7 @@ __decorateClass([
5545
5548
  })
5546
5549
  ], CreateRatingDto.prototype, "ratingType", 2);
5547
5550
  __decorateClass([
5548
- IsInt({ message: "Rating must be an integer value" }),
5551
+ IsInt2({ message: "Rating must be an integer value" }),
5549
5552
  Min2(1, { message: "Rating must be at least 1" }),
5550
5553
  Max2(5, { message: "Rating must be at most 5" })
5551
5554
  ], CreateRatingDto.prototype, "rating", 2);
@@ -5567,7 +5570,7 @@ var COMPANY_ROLES_PATTERNS = {
5567
5570
  };
5568
5571
 
5569
5572
  // src/modules/company-role/dto/create-company-role.dto.ts
5570
- import { ArrayNotEmpty as ArrayNotEmpty2, IsArray as IsArray2, IsBoolean as IsBoolean4, IsInt as IsInt2, IsNotEmpty as IsNotEmpty36, IsOptional as IsOptional18 } from "class-validator";
5573
+ import { ArrayNotEmpty as ArrayNotEmpty2, IsArray as IsArray2, IsBoolean as IsBoolean4, IsInt as IsInt3, IsNotEmpty as IsNotEmpty36, IsOptional as IsOptional18 } from "class-validator";
5571
5574
  var CreateCompanyRoleDto = class {
5572
5575
  };
5573
5576
  __decorateClass([
@@ -5582,7 +5585,7 @@ __decorateClass([
5582
5585
  __decorateClass([
5583
5586
  IsArray2({ message: "Permission IDs must be an array." }),
5584
5587
  ArrayNotEmpty2({ message: "Please select at least one permission." }),
5585
- IsInt2({ each: true, message: "Each permission ID must be an integer." })
5588
+ IsInt3({ each: true, message: "Each permission ID must be an integer." })
5586
5589
  ], CreateCompanyRoleDto.prototype, "permissionIds", 2);
5587
5590
  __decorateClass([
5588
5591
  IsOptional18(),
@@ -5590,7 +5593,7 @@ __decorateClass([
5590
5593
  ], CreateCompanyRoleDto.prototype, "isActive", 2);
5591
5594
 
5592
5595
  // src/modules/company-role/dto/update-company-role.dto.ts
5593
- import { ArrayNotEmpty as ArrayNotEmpty3, IsArray as IsArray3, IsBoolean as IsBoolean5, IsInt as IsInt3, IsNotEmpty as IsNotEmpty37, IsOptional as IsOptional19 } from "class-validator";
5596
+ import { ArrayNotEmpty as ArrayNotEmpty3, IsArray as IsArray3, IsBoolean as IsBoolean5, IsInt as IsInt4, IsNotEmpty as IsNotEmpty37, IsOptional as IsOptional19 } from "class-validator";
5594
5597
  var UpdateCompanyRoleDto = class {
5595
5598
  };
5596
5599
  __decorateClass([
@@ -5605,7 +5608,7 @@ __decorateClass([
5605
5608
  __decorateClass([
5606
5609
  IsArray3({ message: "Permission IDs must be an array." }),
5607
5610
  ArrayNotEmpty3({ message: "Please select at least one permission." }),
5608
- IsInt3({ each: true, message: "Each permission ID must be an integer." })
5611
+ IsInt4({ each: true, message: "Each permission ID must be an integer." })
5609
5612
  ], UpdateCompanyRoleDto.prototype, "permissionIds", 2);
5610
5613
  __decorateClass([
5611
5614
  IsOptional19(),
@@ -5679,7 +5682,7 @@ var COMPANY_MEMBERS_PATTERNS = {
5679
5682
  };
5680
5683
 
5681
5684
  // src/modules/company-member/dto/create-company-member.dto.ts
5682
- import { ArrayNotEmpty as ArrayNotEmpty4, IsArray as IsArray4, IsInt as IsInt4, IsNotEmpty as IsNotEmpty39 } from "class-validator";
5685
+ import { ArrayNotEmpty as ArrayNotEmpty4, IsArray as IsArray4, IsInt as IsInt5, IsNotEmpty as IsNotEmpty39 } from "class-validator";
5683
5686
  var CreateCompanyMemberDto = class {
5684
5687
  };
5685
5688
  __decorateClass([
@@ -5691,11 +5694,11 @@ __decorateClass([
5691
5694
  __decorateClass([
5692
5695
  IsArray4({ message: "Role IDs must be an array." }),
5693
5696
  ArrayNotEmpty4({ message: "Please select at least one role." }),
5694
- IsInt4({ each: true, message: "Each role ID must be an integer." })
5697
+ IsInt5({ each: true, message: "Each role ID must be an integer." })
5695
5698
  ], CreateCompanyMemberDto.prototype, "roleIds", 2);
5696
5699
 
5697
5700
  // src/modules/company-member/dto/update-company-member.dto.ts
5698
- import { ArrayNotEmpty as ArrayNotEmpty5, IsArray as IsArray5, IsInt as IsInt5, IsNotEmpty as IsNotEmpty40 } from "class-validator";
5701
+ import { ArrayNotEmpty as ArrayNotEmpty5, IsArray as IsArray5, IsInt as IsInt6, IsNotEmpty as IsNotEmpty40 } from "class-validator";
5699
5702
  var UpdateCompanyMemberDto = class {
5700
5703
  };
5701
5704
  __decorateClass([
@@ -5707,7 +5710,7 @@ __decorateClass([
5707
5710
  __decorateClass([
5708
5711
  IsArray5({ message: "Role IDs must be an array." }),
5709
5712
  ArrayNotEmpty5({ message: "Please select at least one role." }),
5710
- IsInt5({ each: true, message: "Each role ID must be an integer." })
5713
+ IsInt6({ each: true, message: "Each role ID must be an integer." })
5711
5714
  ], UpdateCompanyMemberDto.prototype, "roleIds", 2);
5712
5715
 
5713
5716
  // src/modules/company-member/dto/toggle-company-member-visibility.dto.ts
@@ -5890,7 +5893,7 @@ import {
5890
5893
  IsNotEmpty as IsNotEmpty44,
5891
5894
  MinLength as MinLength12,
5892
5895
  Matches as Matches9,
5893
- ValidateIf as ValidateIf5
5896
+ ValidateIf as ValidateIf6
5894
5897
  } from "class-validator";
5895
5898
  import { Type as Type7 } from "class-transformer";
5896
5899
  var NatureOfWorkEnum = /* @__PURE__ */ ((NatureOfWorkEnum3) => {
@@ -5960,7 +5963,7 @@ __decorateClass([
5960
5963
  Type7(() => Boolean)
5961
5964
  ], CreateFreelancerDto.prototype, "isImmediateJoiner", 2);
5962
5965
  __decorateClass([
5963
- ValidateIf5((o) => o.isImmediateJoiner === false),
5966
+ ValidateIf6((o) => o.isImmediateJoiner === false),
5964
5967
  IsNotEmpty44({ message: "Please enter availability to join." })
5965
5968
  ], CreateFreelancerDto.prototype, "availabilityToJoin", 2);
5966
5969
  __decorateClass([
@@ -5998,7 +6001,7 @@ import {
5998
6001
  MinLength as MinLength13,
5999
6002
  Matches as Matches10,
6000
6003
  IsNotEmpty as IsNotEmpty45,
6001
- ValidateIf as ValidateIf6
6004
+ ValidateIf as ValidateIf7
6002
6005
  } from "class-validator";
6003
6006
  import { Transform as Transform2, Type as Type8 } from "class-transformer";
6004
6007
  var NatureOfWorkEnum2 = /* @__PURE__ */ ((NatureOfWorkEnum3) => {
@@ -6074,7 +6077,7 @@ __decorateClass([
6074
6077
  Type8(() => Boolean)
6075
6078
  ], UpdateFreelancerDto.prototype, "isImmediateJoiner", 2);
6076
6079
  __decorateClass([
6077
- ValidateIf6((o) => o.isImmediateJoiner === false),
6080
+ ValidateIf7((o) => o.isImmediateJoiner === false),
6078
6081
  IsNotEmpty45({ message: "Please enter availability to join." })
6079
6082
  ], UpdateFreelancerDto.prototype, "availabilityToJoin", 2);
6080
6083
  __decorateClass([
@@ -6378,7 +6381,7 @@ import { Type as Type9 } from "class-transformer";
6378
6381
  import {
6379
6382
  IsString as IsString33,
6380
6383
  IsEnum as IsEnum21,
6381
- IsInt as IsInt6,
6384
+ IsInt as IsInt7,
6382
6385
  IsOptional as IsOptional33,
6383
6386
  IsArray as IsArray11,
6384
6387
  IsDateString as IsDateString4,
@@ -6415,7 +6418,7 @@ __decorateClass([
6415
6418
  IsString33({ each: true, message: "Each skill must be a valid string." })
6416
6419
  ], AdminCreateJobInformationDto.prototype, "skills", 2);
6417
6420
  __decorateClass([
6418
- IsInt6({ message: "Openings must be a valid integer." }),
6421
+ IsInt7({ message: "Openings must be a valid integer." }),
6419
6422
  Min5(1, { message: "There must be at least one opening." })
6420
6423
  ], AdminCreateJobInformationDto.prototype, "openings", 2);
6421
6424
  __decorateClass([
@@ -6469,16 +6472,16 @@ __decorateClass([
6469
6472
  IsString33({ message: "Additional comment must be a string." })
6470
6473
  ], AdminCreateJobInformationDto.prototype, "additionalComment", 2);
6471
6474
  __decorateClass([
6472
- IsInt6({ message: "Country ID must be a valid integer." })
6475
+ IsInt7({ message: "Country ID must be a valid integer." })
6473
6476
  ], AdminCreateJobInformationDto.prototype, "countryId", 2);
6474
6477
  __decorateClass([
6475
- IsInt6({ message: "State ID must be a valid integer." })
6478
+ IsInt7({ message: "State ID must be a valid integer." })
6476
6479
  ], AdminCreateJobInformationDto.prototype, "stateId", 2);
6477
6480
  __decorateClass([
6478
- IsInt6({ message: "City ID must be a valid integer." })
6481
+ IsInt7({ message: "City ID must be a valid integer." })
6479
6482
  ], AdminCreateJobInformationDto.prototype, "cityId", 2);
6480
6483
  __decorateClass([
6481
- IsInt6({ message: "Client ID must be a valid integer." })
6484
+ IsInt7({ message: "Client ID must be a valid integer." })
6482
6485
  ], AdminCreateJobInformationDto.prototype, "clientId", 2);
6483
6486
 
6484
6487
  // src/modules/job-admin/dto/admin-update-job-information.dto.ts
@@ -6486,7 +6489,7 @@ import { Type as Type10 } from "class-transformer";
6486
6489
  import {
6487
6490
  IsString as IsString34,
6488
6491
  IsEnum as IsEnum22,
6489
- IsInt as IsInt7,
6492
+ IsInt as IsInt8,
6490
6493
  IsOptional as IsOptional34,
6491
6494
  IsArray as IsArray12,
6492
6495
  IsDateString as IsDateString5,
@@ -6523,7 +6526,7 @@ __decorateClass([
6523
6526
  IsString34({ each: true, message: "Each skill must be a valid string." })
6524
6527
  ], AdminUpdateJobInformationDto.prototype, "skills", 2);
6525
6528
  __decorateClass([
6526
- IsInt7({ message: "Openings must be a valid integer." }),
6529
+ IsInt8({ message: "Openings must be a valid integer." }),
6527
6530
  Min6(1, { message: "There must be at least one opening." })
6528
6531
  ], AdminUpdateJobInformationDto.prototype, "openings", 2);
6529
6532
  __decorateClass([
@@ -6577,16 +6580,16 @@ __decorateClass([
6577
6580
  IsString34({ message: "Additional comment must be a string." })
6578
6581
  ], AdminUpdateJobInformationDto.prototype, "additionalComment", 2);
6579
6582
  __decorateClass([
6580
- IsInt7({ message: "Country ID must be a valid integer." })
6583
+ IsInt8({ message: "Country ID must be a valid integer." })
6581
6584
  ], AdminUpdateJobInformationDto.prototype, "countryId", 2);
6582
6585
  __decorateClass([
6583
- IsInt7({ message: "State ID must be a valid integer." })
6586
+ IsInt8({ message: "State ID must be a valid integer." })
6584
6587
  ], AdminUpdateJobInformationDto.prototype, "stateId", 2);
6585
6588
  __decorateClass([
6586
- IsInt7({ message: "City ID must be a valid integer." })
6589
+ IsInt8({ message: "City ID must be a valid integer." })
6587
6590
  ], AdminUpdateJobInformationDto.prototype, "cityId", 2);
6588
6591
  __decorateClass([
6589
- IsInt7({ message: "Client ID must be a valid integer." })
6592
+ IsInt8({ message: "Client ID must be a valid integer." })
6590
6593
  ], AdminUpdateJobInformationDto.prototype, "clientId", 2);
6591
6594
 
6592
6595
  // src/modules/lead/pattern/pattern.ts
@@ -6714,7 +6717,7 @@ import {
6714
6717
  IsEmail as IsEmail15,
6715
6718
  IsUUID as IsUUID12,
6716
6719
  IsEnum as IsEnum24,
6717
- ValidateIf as ValidateIf7,
6720
+ ValidateIf as ValidateIf8,
6718
6721
  ValidateNested as ValidateNested5
6719
6722
  } from "class-validator";
6720
6723
  import { Type as Type11 } from "class-transformer";
@@ -6752,14 +6755,14 @@ __decorateClass([
6752
6755
  var CandidatesDto = class {
6753
6756
  };
6754
6757
  __decorateClass([
6755
- ValidateIf7((o) => o.exixtingCandidates?.length > 0),
6758
+ ValidateIf8((o) => o.exixtingCandidates?.length > 0),
6756
6759
  IsArray13({ message: "Existing candidates should be an array." }),
6757
6760
  ArrayNotEmpty8({ message: "Please select at least one candidate." }),
6758
6761
  ValidateNested5({ each: true }),
6759
6762
  Type11(() => ExistingCandidateDto)
6760
6763
  ], CandidatesDto.prototype, "exixtingCandidates", 2);
6761
6764
  __decorateClass([
6762
- ValidateIf7((o) => o.newCandidates?.length > 0),
6765
+ ValidateIf8((o) => o.newCandidates?.length > 0),
6763
6766
  IsArray13({ message: "New candidates should be an array." }),
6764
6767
  ArrayNotEmpty8({ message: "Please add at least one candidate." }),
6765
6768
  ValidateNested5({ each: true }),
@@ -6947,7 +6950,7 @@ var TIMESHEET_CLIENT_PATTERN = {
6947
6950
  // src/modules/timesheet/dto/create-freelancer-timesheet.dto.ts
6948
6951
  import {
6949
6952
  IsDateString as IsDateString6,
6950
- IsInt as IsInt8,
6953
+ IsInt as IsInt9,
6951
6954
  IsNotEmpty as IsNotEmpty64,
6952
6955
  IsOptional as IsOptional40,
6953
6956
  IsString as IsString43,
@@ -6982,7 +6985,7 @@ __decorateClass([
6982
6985
  ], CreateFreelancerTimesheetDto.prototype, "endTime", 2);
6983
6986
  __decorateClass([
6984
6987
  IsOptional40(),
6985
- IsInt8()
6988
+ IsInt9()
6986
6989
  ], CreateFreelancerTimesheetDto.prototype, "taskId", 2);
6987
6990
  __decorateClass([
6988
6991
  IsOptional40(),
@@ -7003,7 +7006,7 @@ __decorateClass([
7003
7006
  // src/modules/timesheet/dto/update-freelancer-timesheet.dto.ts
7004
7007
  import {
7005
7008
  IsDateString as IsDateString7,
7006
- IsInt as IsInt9,
7009
+ IsInt as IsInt10,
7007
7010
  IsNotEmpty as IsNotEmpty65,
7008
7011
  IsOptional as IsOptional41,
7009
7012
  IsString as IsString44,
@@ -7038,7 +7041,7 @@ __decorateClass([
7038
7041
  ], UpdateFreelancerTimesheetDto.prototype, "endTime", 2);
7039
7042
  __decorateClass([
7040
7043
  IsOptional41(),
7041
- IsInt9()
7044
+ IsInt10()
7042
7045
  ], UpdateFreelancerTimesheetDto.prototype, "taskId", 2);
7043
7046
  __decorateClass([
7044
7047
  IsOptional41(),
@@ -18,7 +18,7 @@ export declare class UpdateFreelancerProfileDto {
18
18
  mobile: string;
19
19
  countryId: number;
20
20
  expectedHourlyCompensation: string;
21
- numberOfHours: string;
21
+ numberOfHours?: number;
22
22
  natureOfWork: NatureOfWorkDto;
23
23
  modeOfWork: ModeOfWorkDto;
24
24
  portfolioLink?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@experts_hub/shared",
3
- "version": "1.0.478",
3
+ "version": "1.0.480",
4
4
  "description": "Shared DTOs, interfaces, and utilities for experts hub applications",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",