@experts_hub/shared
Version:
Shared DTOs, interfaces, and utilities for experts hub applications
1,420 lines (1,362 loc) • 237 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i = decorators.length - 1, decorator; i >= 0; i--)
if (decorator = decorators[i])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result) __defProp(target, key, result);
return result;
};
// src/modules/authentication/pattern/pattern.ts
var AUTHENTICATION_PATTERN = {
handleValidateToken: "handle.validate.token",
handleLogin: "handle.login",
handleLoginViaOtp: "handle.login.via.otp",
handleRefreshToken: "handle.refresh.token",
handleLogout: "handle.logout",
handleLogoutAll: "handle.logout.all",
fetchSessions: "fetch.sessions",
revokeSession: "revoke.session",
handleForgotPassword: "handle.forgot.password",
handleResetPassword: "handle.reset.password",
handleValidateResetPasswordToken: "handle.validate.reset.password.token",
handleSetPassword: "handle.set.password"
};
// src/modules/authentication/dto/login.dto.ts
import { IsEnum, IsNotEmpty } from "class-validator";
var ScopeEnum = /* @__PURE__ */ ((ScopeEnum5) => {
ScopeEnum5["ADMIN"] = "ADMIN";
ScopeEnum5["SUB_ADMIN"] = "SUB_ADMIN";
ScopeEnum5["CLIENT"] = "CLIENT";
ScopeEnum5["FREELANCER"] = "FREELANCER";
return ScopeEnum5;
})(ScopeEnum || {});
var LoginDto = class {
};
__decorateClass([
IsNotEmpty({ message: "Please enter email." })
], LoginDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty({ message: "Please enter password." })
], LoginDto.prototype, "password", 2);
__decorateClass([
IsEnum(ScopeEnum, {
message: `Scope must be one of: ${Object.values(ScopeEnum).join(", ")}`
})
], LoginDto.prototype, "scope", 2);
// src/modules/authentication/dto/login-via-otp.dto.ts
import { IsEnum as IsEnum2, IsNotEmpty as IsNotEmpty2 } from "class-validator";
var LoginViaOtpScopeEnum = /* @__PURE__ */ ((LoginViaOtpScopeEnum2) => {
LoginViaOtpScopeEnum2["ADMIN"] = "ADMIN";
LoginViaOtpScopeEnum2["SUB_ADMIN"] = "SUB_ADMIN";
LoginViaOtpScopeEnum2["CLIENT"] = "CLIENT";
LoginViaOtpScopeEnum2["FREELANCER"] = "FREELANCER";
return LoginViaOtpScopeEnum2;
})(LoginViaOtpScopeEnum || {});
var LoginViaOtpDto = class {
};
__decorateClass([
IsNotEmpty2({ message: "Please enter email." })
], LoginViaOtpDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty2({ message: "Please enter otp." })
], LoginViaOtpDto.prototype, "otp", 2);
__decorateClass([
IsEnum2(LoginViaOtpScopeEnum, {
message: `Scope must be one of: ${Object.values(LoginViaOtpScopeEnum).join(", ")}`
})
], LoginViaOtpDto.prototype, "scope", 2);
// src/modules/authentication/dto/refresh.dto.ts
import {
IsNotEmpty as IsNotEmpty3
} from "class-validator";
var RefreshDto = class {
};
__decorateClass([
IsNotEmpty3({ message: "Please provide refresh token." })
], RefreshDto.prototype, "refreshToken", 2);
// src/modules/authentication/dto/logout.dto.ts
import {
IsNotEmpty as IsNotEmpty4
} from "class-validator";
var LogoutDto = class {
};
__decorateClass([
IsNotEmpty4({ message: "Please provide refresh token." })
], LogoutDto.prototype, "refreshToken", 2);
// src/modules/authentication/dto/forgot-password.dto.ts
import { IsEmail, IsEnum as IsEnum3, IsNotEmpty as IsNotEmpty5 } from "class-validator";
var ScopeEnum2 = /* @__PURE__ */ ((ScopeEnum5) => {
ScopeEnum5["ADMIN"] = "ADMIN";
ScopeEnum5["CLIENT"] = "CLIENT";
ScopeEnum5["FREELANCER"] = "FREELANCER";
return ScopeEnum5;
})(ScopeEnum2 || {});
var ForgotPasswordDto = class {
};
__decorateClass([
IsNotEmpty5({ message: "Please enter email." }),
IsEmail({}, { message: "Please enter a valid email." })
], ForgotPasswordDto.prototype, "email", 2);
__decorateClass([
IsEnum3(ScopeEnum2, {
message: `Scope must be one of: ${Object.values(ScopeEnum2).join(", ")}`
})
], ForgotPasswordDto.prototype, "scope", 2);
// src/modules/authentication/dto/reset-password.dto.ts
import {
IsEnum as IsEnum4,
IsNotEmpty as IsNotEmpty6,
Matches,
MaxLength,
MinLength
} from "class-validator";
var ScopeEnum3 = /* @__PURE__ */ ((ScopeEnum5) => {
ScopeEnum5["ADMIN"] = "ADMIN";
ScopeEnum5["CLIENT"] = "CLIENT";
ScopeEnum5["FREELANCER"] = "FREELANCER";
return ScopeEnum5;
})(ScopeEnum3 || {});
var ResetPasswordDto = class {
};
__decorateClass([
IsNotEmpty6({ message: "Please enter token." })
], ResetPasswordDto.prototype, "token", 2);
__decorateClass([
IsNotEmpty6({ message: "Please enter password." }),
MinLength(6),
MaxLength(32),
Matches(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
message: "Password must include letters, numbers and symbols."
})
], ResetPasswordDto.prototype, "password", 2);
__decorateClass([
IsEnum4(ScopeEnum3, {
message: `Scope must be one of: ${Object.values(ScopeEnum3).join(", ")}`
})
], ResetPasswordDto.prototype, "scope", 2);
// src/modules/authentication/dto/set-password.dto.ts
import {
IsNotEmpty as IsNotEmpty7,
Matches as Matches2,
MaxLength as MaxLength2,
MinLength as MinLength2
} from "class-validator";
var SetPasswordDto = class {
};
__decorateClass([
IsNotEmpty7({ message: "Please enter token." })
], SetPasswordDto.prototype, "token", 2);
__decorateClass([
IsNotEmpty7({ message: "Please enter password." }),
MinLength2(6),
MaxLength2(32),
Matches2(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
message: "Password must include letters, numbers and symbols."
})
], SetPasswordDto.prototype, "password", 2);
// src/modules/authentication/dto/reset-password-token-validation.dto.ts
import {
IsEnum as IsEnum6,
IsNotEmpty as IsNotEmpty8
} from "class-validator";
var ScopeEnum4 = /* @__PURE__ */ ((ScopeEnum5) => {
ScopeEnum5["ADMIN"] = "ADMIN";
ScopeEnum5["CLIENT"] = "CLIENT";
ScopeEnum5["FREELANCER"] = "FREELANCER";
return ScopeEnum5;
})(ScopeEnum4 || {});
var ResetPasswordTokenValidationDto = class {
};
__decorateClass([
IsNotEmpty8({ message: "Please enter token." })
], ResetPasswordTokenValidationDto.prototype, "token", 2);
__decorateClass([
IsEnum6(ScopeEnum4, {
message: `Scope must be one of: ${Object.values(ScopeEnum4).join(", ")}`
})
], ResetPasswordTokenValidationDto.prototype, "scope", 2);
// src/modules/otp/pattern/pattern.ts
var OTP_PATTERN = {
handleSendGuestOtp: "handle.send.guest.otp",
handleSendOtp: "handle.send.otp",
handleSendOtpForLogin: "handle.send.otp.for.login",
handleVerifyGuestOtp: "handle.verify.guest.otp",
handleVerifyOtp: "handle.verify.otp"
};
// src/modules/otp/dto/send-guest-otp.dto.ts
import { IsEnum as IsEnum7, IsNotEmpty as IsNotEmpty9, IsOptional, IsString } from "class-validator";
var SendGuestOtpPurposeEnum = /* @__PURE__ */ ((SendGuestOtpPurposeEnum2) => {
SendGuestOtpPurposeEnum2["ACCOUNT_VERIFICATION"] = "ACCOUNT_VERIFICATION";
return SendGuestOtpPurposeEnum2;
})(SendGuestOtpPurposeEnum || {});
var SendGuestOtpScopeEnum = /* @__PURE__ */ ((SendGuestOtpScopeEnum2) => {
SendGuestOtpScopeEnum2["CLIENT"] = "CLIENT";
SendGuestOtpScopeEnum2["FREELANCER"] = "FREELANCER";
return SendGuestOtpScopeEnum2;
})(SendGuestOtpScopeEnum || {});
var SendGuestOtpDto = class {
};
__decorateClass([
IsNotEmpty9({ message: "Please enter full name." }),
IsString({ message: "Please enter valid full name." })
], SendGuestOtpDto.prototype, "fullName", 2);
__decorateClass([
IsNotEmpty9({ message: "Please enter target." }),
IsString({ message: "Please enter valid target." })
], SendGuestOtpDto.prototype, "target", 2);
__decorateClass([
IsOptional(),
IsString({ message: "Please enter valid fallback target." })
], SendGuestOtpDto.prototype, "fallbackTarget", 2);
__decorateClass([
IsNotEmpty9({ message: "Please enter OTP purpose." }),
IsEnum7(SendGuestOtpPurposeEnum, { message: "Purpose must be a valid OTP purpose" })
], SendGuestOtpDto.prototype, "purpose", 2);
__decorateClass([
IsNotEmpty9({ message: "Please enter scope." }),
IsEnum7(SendGuestOtpScopeEnum, { message: "scope must be a valid" })
], SendGuestOtpDto.prototype, "scope", 2);
// src/modules/otp/dto/send-login-otp.dto.ts
import { IsEnum as IsEnum8, IsNotEmpty as IsNotEmpty10, IsString as IsString2 } from "class-validator";
var SendLoginOtpPurposeEnum = /* @__PURE__ */ ((SendLoginOtpPurposeEnum2) => {
SendLoginOtpPurposeEnum2["ACCOUNT_VERIFICATION"] = "ACCOUNT_VERIFICATION";
return SendLoginOtpPurposeEnum2;
})(SendLoginOtpPurposeEnum || {});
var SendLoginOtpScopeEnum = /* @__PURE__ */ ((SendLoginOtpScopeEnum2) => {
SendLoginOtpScopeEnum2["CLIENT"] = "CLIENT";
SendLoginOtpScopeEnum2["FREELANCER"] = "FREELANCER";
return SendLoginOtpScopeEnum2;
})(SendLoginOtpScopeEnum || {});
var SendLoginOtpDto = class {
};
__decorateClass([
IsNotEmpty10({ message: "Please enter target." }),
IsString2({ message: "Please enter valid target." })
], SendLoginOtpDto.prototype, "target", 2);
__decorateClass([
IsNotEmpty10({ message: "Please enter OTP purpose." }),
IsEnum8(SendLoginOtpPurposeEnum, { message: "Purpose must be a valid OTP purpose" })
], SendLoginOtpDto.prototype, "purpose", 2);
__decorateClass([
IsNotEmpty10({ message: "Please enter scope." }),
IsEnum8(SendLoginOtpScopeEnum, { message: "scope must be a valid" })
], SendLoginOtpDto.prototype, "scope", 2);
// src/modules/otp/dto/verify-guest-otp.dto.ts
import { IsEnum as IsEnum9, IsNotEmpty as IsNotEmpty11, IsString as IsString3, Length } from "class-validator";
var VerifyGuestOtpPurposeEnum = /* @__PURE__ */ ((VerifyGuestOtpPurposeEnum2) => {
VerifyGuestOtpPurposeEnum2["ACCOUNT_VERIFICATION"] = "ACCOUNT_VERIFICATION";
return VerifyGuestOtpPurposeEnum2;
})(VerifyGuestOtpPurposeEnum || {});
var VerifyGuestOtpDto = class {
};
__decorateClass([
IsNotEmpty11({ message: "Please enter target." }),
IsString3({ message: "Please enter valid target." })
], VerifyGuestOtpDto.prototype, "target", 2);
__decorateClass([
IsNotEmpty11({ message: "Please enter otp." }),
IsString3({ message: "Please enter valid otp." }),
Length(4, 6, { message: "OTP must be between 4 and 6 characters" })
], VerifyGuestOtpDto.prototype, "otp", 2);
__decorateClass([
IsNotEmpty11({ message: "Please enter OTP purpose." }),
IsEnum9(VerifyGuestOtpPurposeEnum, {
message: "Purpose must be a valid OTP purpose"
})
], VerifyGuestOtpDto.prototype, "purpose", 2);
// src/modules/onboarding/pattern/pattern.ts
var ONBOARDING_PATTERN = {
handleFreelancerAccountCreation: "handle.freelancer.account.creation",
handleFreelancerResumeUpload: "handle.freelancer.resume.upload",
handleFreelancerDeveloperPreference: "handle.freelancer.developer.preference",
handleFreelancerProfileQuestion: "handle.freelancer.profile.question",
handleFreelancerWorkShowcase: "handle.freelancer.work.showcase",
handleClientAccountCreation: "handle.client.account.creation",
handleClientProfileQuestion: "handle.client.profile.question",
changeFreelancerPassword: "change.freelancer.password"
};
// src/modules/onboarding/dto/freelancer-create-account.dto.ts
import {
IsNotEmpty as IsNotEmpty12,
IsEmail as IsEmail2,
Matches as Matches3,
IsString as IsString4,
IsOptional as IsOptional3
} from "class-validator";
// src/decorators/match.decorator.ts
import {
registerDecorator,
ValidatorConstraint
} from "class-validator";
function Match(property, validationOptions) {
return function(object, propertyName) {
registerDecorator({
name: "Match",
target: object.constructor,
propertyName,
options: validationOptions,
constraints: [property],
validator: {
validate(value, args) {
const [relatedPropertyName] = args.constraints;
const relatedValue = args.object[relatedPropertyName];
return value === relatedValue;
},
defaultMessage(args) {
const [relatedPropertyName] = args.constraints;
return `${propertyName} must match ${relatedPropertyName}`;
}
}
});
};
}
var IfscOrOtherFieldsConstraint = class {
validate(value, args) {
const [relatedFields] = args.constraints;
const dto = args.object;
if (!value) {
return relatedFields.some((field) => !!dto[field]);
}
return true;
}
defaultMessage(args) {
const [relatedFields] = args.constraints;
const fieldNames = relatedFields.join(", ");
return `IFSC Code is required .`;
}
};
IfscOrOtherFieldsConstraint = __decorateClass([
ValidatorConstraint({ async: false })
], IfscOrOtherFieldsConstraint);
// src/decorators/is-valid-mobile-number.decorator.ts
import {
ValidatorConstraint as ValidatorConstraint2,
registerDecorator as registerDecorator2
} from "class-validator";
import { parsePhoneNumberFromString } from "libphonenumber-js";
var IsValidMobileNumberConstraint = class {
validate(mobile, args) {
const object = args.object;
const mobileCode = object.mobileCode;
if (!mobileCode || !mobile) return false;
try {
const phoneNumber = parsePhoneNumberFromString(mobileCode + mobile);
return phoneNumber?.isValid() ?? false;
} catch {
return false;
}
}
defaultMessage(args) {
return "Please enter a valid mobile number for the selected country code.";
}
};
IsValidMobileNumberConstraint = __decorateClass([
ValidatorConstraint2({ name: "isValidMobileNumber", async: false })
], IsValidMobileNumberConstraint);
function IsValidMobileNumber(validationOptions) {
return function(object, propertyName) {
registerDecorator2({
name: "isValidMobileNumber",
target: object.constructor,
propertyName,
options: validationOptions,
validator: IsValidMobileNumberConstraint
});
};
}
// src/decorators/is-business-email.decorator.ts
import {
registerDecorator as registerDecorator3,
ValidatorConstraint as ValidatorConstraint3
} from "class-validator";
var IsBusinessEmailConstraint = class {
constructor() {
this.blockedDomains = [
"aol.com",
"att.net",
"comcast.net",
"facebook.com",
"gmail.com",
"gmx.com",
"gmx.net",
"gmx.de",
"googlemail.com",
"google.com",
"hotmail.com",
"hotmail.co.uk",
"icloud.com",
"live.com",
"live.in",
"live.co.uk",
"mail.com",
"msn.com",
"outlook.com",
"protonmail.com",
"protonmail.ch",
"proton.me",
"tutanota.com",
"tutanota.de",
"tutanota.org",
"tuta.io",
"yahoo.com",
"yahoo.co.uk",
"yahoo.co.in",
"yahoo.co.jp",
"yahoo.co.kr",
"yahoo.co.id",
"yahoo.com.sg",
"yahoo.com.ph",
"zoho.com",
"yandex.com",
"mail.ru",
"fastmail.fm",
"hushmail.com",
"qq.com",
"163.com",
"126.com",
"rediffmail.com",
"naver.com",
"daum.net",
"seznam.cz",
"web.de",
"libero.it",
"mailfence.com",
"yopmail.com"
];
}
validate(value) {
if (typeof value !== "string") return false;
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
if (!emailRegex.test(value)) return false;
const domain = value.split("@")[1].toLowerCase();
return !this.blockedDomains.includes(domain);
}
defaultMessage(args) {
return "Please enter a valid business email address. Personal email domains are not allowed.";
}
};
IsBusinessEmailConstraint = __decorateClass([
ValidatorConstraint3({ async: false })
], IsBusinessEmailConstraint);
function IsBusinessEmail(validationOptions) {
return function(object, propertyName) {
registerDecorator3({
target: object.constructor,
propertyName,
options: validationOptions,
constraints: [],
validator: IsBusinessEmailConstraint
});
};
}
// src/modules/onboarding/dto/freelancer-create-account.dto.ts
var FreelancerCreateAccountDto = class {
};
__decorateClass([
IsNotEmpty12({ message: "Please enter full name." }),
IsString4({ message: "Please enter valid full name." })
], FreelancerCreateAccountDto.prototype, "fullName", 2);
__decorateClass([
IsNotEmpty12({ message: "Please enter email." }),
IsEmail2()
], FreelancerCreateAccountDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty12({ message: "Please enter mobile code." }),
Matches3(/^\+\d{1,4}$/, {
message: "Please enter a valid country mobile code (e.g., +91, +1, +44)."
})
], FreelancerCreateAccountDto.prototype, "mobileCode", 2);
__decorateClass([
IsNotEmpty12({ message: "Please enter mobile number." }),
IsValidMobileNumber({ message: "Mobile number is not valid for the selected country code." })
], FreelancerCreateAccountDto.prototype, "mobile", 2);
__decorateClass([
IsOptional3()
], FreelancerCreateAccountDto.prototype, "onBoardedBy", 2);
// src/modules/onboarding/dto/freelancer-upload-resume.dto.ts
import { IsUUID, IsNotEmpty as IsNotEmpty13 } from "class-validator";
var FreelancerUploadResumeDto = class {
};
__decorateClass([
IsNotEmpty13({ message: "Please enter uuid." }),
IsUUID()
], FreelancerUploadResumeDto.prototype, "uuid", 2);
// src/modules/onboarding/dto/freelancer-parse-resume.dto.ts
import { IsUUID as IsUUID2, IsNotEmpty as IsNotEmpty14 } from "class-validator";
var FreelancerParseResumeDto = class {
};
__decorateClass([
IsNotEmpty14({ message: "Please enter uuid." }),
IsUUID2()
], FreelancerParseResumeDto.prototype, "uuid", 2);
// src/modules/onboarding/dto/freelancer-initiate-mcq-assessment.dto.ts
import { IsUUID as IsUUID3, IsNotEmpty as IsNotEmpty15 } from "class-validator";
var FreelancerInitiateMcqAssessmentDto = class {
};
__decorateClass([
IsNotEmpty15({ message: "Please enter uuid." }),
IsUUID3()
], FreelancerInitiateMcqAssessmentDto.prototype, "uuid", 2);
// src/modules/onboarding/dto/freelancer-skip-ai-assessment.dto.ts
import { IsUUID as IsUUID4, IsNotEmpty as IsNotEmpty16 } from "class-validator";
var FreelancerSkipAiAssessmentDto = class {
};
__decorateClass([
IsNotEmpty16({ message: "Please enter uuid." }),
IsUUID4()
], FreelancerSkipAiAssessmentDto.prototype, "uuid", 2);
// src/modules/onboarding/dto/freelancer-initiate-ai-assessment.dto.ts
import { IsUUID as IsUUID5, IsNotEmpty as IsNotEmpty17 } from "class-validator";
var FreelancerInitiateAiAssessmentDto = class {
};
__decorateClass([
IsNotEmpty17({ message: "Please enter uuid." }),
IsUUID5()
], FreelancerInitiateAiAssessmentDto.prototype, "uuid", 2);
// src/modules/onboarding/dto/freelancer-capture-ai-assessment-status.dto.ts
import { IsUUID as IsUUID6, IsNotEmpty as IsNotEmpty18, IsOptional as IsOptional4 } from "class-validator";
var FreelancerCaptureAiAssessmentStatusDto = class {
};
__decorateClass([
IsNotEmpty18({ message: "Please enter uuid." }),
IsUUID6()
], FreelancerCaptureAiAssessmentStatusDto.prototype, "uuid", 2);
__decorateClass([
IsNotEmpty18({ message: "Please enter assessment id." })
], FreelancerCaptureAiAssessmentStatusDto.prototype, "assessmentId", 2);
__decorateClass([
IsNotEmpty18({ message: "Please enter assessment status." })
], FreelancerCaptureAiAssessmentStatusDto.prototype, "assessmentStatus", 2);
__decorateClass([
IsOptional4()
], FreelancerCaptureAiAssessmentStatusDto.prototype, "iframeEventData", 2);
// src/modules/onboarding/dto/freelancer-development-preference.dto.ts
import { IsUUID as IsUUID7, IsNotEmpty as IsNotEmpty19, IsBoolean } from "class-validator";
var FreelancerDevelopmentPreferenceDto = class {
};
__decorateClass([
IsNotEmpty19({ message: "Please enter uuid." }),
IsUUID7()
], FreelancerDevelopmentPreferenceDto.prototype, "uuid", 2);
__decorateClass([
IsNotEmpty19({ message: "Please select development flag." }),
IsBoolean()
], FreelancerDevelopmentPreferenceDto.prototype, "developer", 2);
// src/modules/onboarding/dto/freelancer-profile-question.dto.ts
import {
IsUUID as IsUUID8,
IsString as IsString5,
IsNotEmpty as IsNotEmpty20,
IsIn,
IsOptional as IsOptional5
} from "class-validator";
var FreelancerProfileQuestionDto = class {
};
__decorateClass([
IsNotEmpty20({ message: "Please enter uuid." }),
IsUUID8()
], FreelancerProfileQuestionDto.prototype, "uuid", 2);
__decorateClass([
IsNotEmpty20({ message: "Please enter question slug." }),
IsString5(),
IsIn([
"natureOfWork",
"expectedHourlyCompensation",
"modeOfWork",
"availabilityToJoin",
"isImmediateJoiner"
])
], FreelancerProfileQuestionDto.prototype, "question_slug", 2);
__decorateClass([
IsNotEmpty20({ message: "Please enter answer." })
], FreelancerProfileQuestionDto.prototype, "answer", 2);
__decorateClass([
IsOptional5()
], FreelancerProfileQuestionDto.prototype, "currency", 2);
// src/modules/onboarding/dto/freelancer-work-showcase.dto.ts
import {
IsNotEmpty as IsNotEmpty21,
IsOptional as IsOptional6,
IsUrl,
IsString as IsString6,
IsUUID as IsUUID9
} from "class-validator";
var FreelancerWorkShowcaseDto = class {
};
__decorateClass([
IsNotEmpty21({ message: "Please enter uuid." }),
IsUUID9()
], FreelancerWorkShowcaseDto.prototype, "uuid", 2);
__decorateClass([
IsNotEmpty21({ message: "Please enter likedin profile url." }),
IsString6(),
IsUrl(
{ require_protocol: false },
{
message: "linkedinProfileLink must be a valid URL with protocol (e.g. https://)"
}
)
], FreelancerWorkShowcaseDto.prototype, "linkedinProfileLink", 2);
__decorateClass([
IsOptional6(),
IsUrl(
{ require_protocol: false },
{
message: "kaggleProfileLink must be a valid URL with protocol (e.g. https://)"
}
)
], FreelancerWorkShowcaseDto.prototype, "kaggleProfileLink", 2);
__decorateClass([
IsOptional6(),
IsUrl(
{ require_protocol: false },
{
message: "githubProfileLink must be a valid URL with protocol (e.g. https://)"
}
)
], FreelancerWorkShowcaseDto.prototype, "githubProfileLink", 2);
__decorateClass([
IsOptional6(),
IsUrl(
{ require_protocol: false },
{
message: "stackOverflowProfileLink must be a valid URL with protocol (e.g. https://)"
}
)
], FreelancerWorkShowcaseDto.prototype, "stackOverflowProfileLink", 2);
__decorateClass([
IsOptional6(),
IsUrl(
{ require_protocol: false },
{
message: "portfolioLink must be a valid URL with protocol (e.g. https://)"
}
)
], FreelancerWorkShowcaseDto.prototype, "portfolioLink", 2);
// src/modules/onboarding/dto/client-profile-question.dto.ts
import {
IsUUID as IsUUID10,
IsString as IsString7,
IsNotEmpty as IsNotEmpty22,
IsIn as IsIn2,
ValidateIf
} from "class-validator";
var ClientProfileQuestionDto = class {
};
__decorateClass([
IsNotEmpty22({ message: "Please enter uuid." }),
IsUUID10()
], ClientProfileQuestionDto.prototype, "uuid", 2);
__decorateClass([
IsNotEmpty22({ message: "Please enter question slug." }),
IsString7(),
IsIn2([
"skills",
"requiredFreelancer",
"kindOfHiring",
"modeOfHire",
"foundUsOn"
])
], ClientProfileQuestionDto.prototype, "question_slug", 2);
__decorateClass([
IsNotEmpty22({ message: "Please enter answer." })
], ClientProfileQuestionDto.prototype, "answer", 2);
__decorateClass([
ValidateIf((o) => o.questionSlug === "foundUsOn" && o.answer === "OTHER"),
IsNotEmpty22({ message: "Please enter foundUsOnDetail if answer is OTHER." }),
IsString7()
], ClientProfileQuestionDto.prototype, "foundUsOnDetail", 2);
// src/modules/onboarding/dto/client-create-account.dto.ts
import {
IsNotEmpty as IsNotEmpty23,
IsEmail as IsEmail3,
IsString as IsString8,
IsOptional as IsOptional7
} from "class-validator";
var ClientCreateAccountDto = class {
};
__decorateClass([
IsNotEmpty23({ message: "Please enter full name." }),
IsString8({ message: "Please enter valid full name." })
], ClientCreateAccountDto.prototype, "fullName", 2);
__decorateClass([
IsNotEmpty23({ message: "Please enter email." }),
IsEmail3(),
IsBusinessEmail()
], ClientCreateAccountDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty23({ message: "Please enter company name." }),
IsString8({ message: "Please enter valid company name." })
], ClientCreateAccountDto.prototype, "companyName", 2);
__decorateClass([
IsOptional7()
], ClientCreateAccountDto.prototype, "onBoardedBy", 2);
// src/modules/resume-parser/pattern/pattern.ts
var RESUME_PARSER_PATTERN = {
handleResumeParsing: "handle.resume.parsing"
};
// src/modules/user/subadmin/pattern/pattern.ts
var SUBADMIN_PATTERN = {
fetchSubAdmins: "fetch.subadmins",
fetchDeletedSubAdmins: "fetch.deleted.subadmins",
fetchSubAdminDropdown: "fetch.subadmin.dropdown",
findSubAdminById: "fetch.subadmin.by.id",
createSubAdmin: "create.subadmin",
updateSubAdminAccountStatus: "update.subadmin.account.status",
updateSubAdmin: "update.subadmin",
deleteSubAdmin: "delete.subadmin"
};
// src/modules/user/subadmin/dto/create-subadmin.dto.ts
import {
IsNotEmpty as IsNotEmpty24
} from "class-validator";
var CreateSubAdminDto = class {
};
__decorateClass([
IsNotEmpty24({ message: "Please enter username." })
], CreateSubAdminDto.prototype, "userName", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter first name." })
], CreateSubAdminDto.prototype, "firstName", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter last name." })
], CreateSubAdminDto.prototype, "lastName", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter email." })
], CreateSubAdminDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter mobile Code." })
], CreateSubAdminDto.prototype, "mobileCode", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter mobile number." })
], CreateSubAdminDto.prototype, "mobile", 2);
__decorateClass([
IsNotEmpty24({ message: "Please enter the password." })
], CreateSubAdminDto.prototype, "password", 2);
__decorateClass([
IsNotEmpty24({ message: "Please Select Roles." })
], CreateSubAdminDto.prototype, "roleIds", 2);
// src/modules/user/subadmin/dto/update-subadmin-status.dto.ts
import { IsString as IsString9 } from "class-validator";
var UpdateSubAdminAccountStatusDto = class {
};
__decorateClass([
IsString9()
], UpdateSubAdminAccountStatusDto.prototype, "accountStatus", 2);
// src/modules/user/subadmin/dto/update-subadmin.dto.ts
import { Transform } from "class-transformer";
import { IsNotEmpty as IsNotEmpty25, IsOptional as IsOptional8, Matches as Matches5, MaxLength as MaxLength5, MinLength as MinLength5 } from "class-validator";
var UpdateSubAdminDto = class {
};
__decorateClass([
IsNotEmpty25({ message: "Please enter username." })
], UpdateSubAdminDto.prototype, "userName", 2);
__decorateClass([
IsNotEmpty25({ message: "Please enter first name." })
], UpdateSubAdminDto.prototype, "firstName", 2);
__decorateClass([
IsNotEmpty25({ message: "Please enter last name." })
], UpdateSubAdminDto.prototype, "lastName", 2);
__decorateClass([
IsNotEmpty25({ message: "Please enter email." })
], UpdateSubAdminDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty25({ message: "Please enter mobile Code." })
], UpdateSubAdminDto.prototype, "mobileCode", 2);
__decorateClass([
IsNotEmpty25({ message: "Please enter mobile number." })
], UpdateSubAdminDto.prototype, "mobile", 2);
__decorateClass([
IsOptional8(),
Transform(({ value }) => value === null || value === "" ? void 0 : value),
MinLength5(6, { message: "Password must be at least 6 characters." }),
MaxLength5(32, { message: "Password must not exceed 32 characters." }),
Matches5(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
message: "Password must include letters, numbers and symbols."
})
], UpdateSubAdminDto.prototype, "password", 2);
__decorateClass([
IsNotEmpty25({ message: "Please Select Roles." })
], UpdateSubAdminDto.prototype, "roleIds", 2);
// src/modules/user/client-profile/pattern/pattern.ts
var CLIENT_PROFILE_PATTERN = {
fetchClientProfile: "fetch.client.profile",
fetchClientPublicProfile: "fetch.client.public.profile",
updateClientProfile: "update.client.profile",
updateClientLogo: "update.client.logo",
changeClientPassword: "change.client.password",
uploadClientServiceAgreement: "upload.client.service.agreement"
};
// src/modules/user/client-profile/dto/update-client-profile.dto.ts
import {
IsString as IsString10,
IsNotEmpty as IsNotEmpty26,
IsEmail as IsEmail4,
Length as Length2,
IsUrl as IsUrl2,
IsOptional as IsOptional9,
ValidateIf as ValidateIf2
} from "class-validator";
var UpdateCompanyProfileDto = class {
};
__decorateClass([
IsNotEmpty26({ message: "Please enter company name." }),
IsString10({ message: "Company name must be a string." }),
Length2(2, 255, {
message: "Company name must be between 2 and 255 characters"
})
], UpdateCompanyProfileDto.prototype, "companyName", 2);
__decorateClass([
IsOptional9(),
ValidateIf2((o) => o.webSite !== ""),
IsUrl2({}, { message: "Invalid website URL format" })
], UpdateCompanyProfileDto.prototype, "webSite", 2);
__decorateClass([
IsNotEmpty26({ message: "Please enter company address." }),
IsString10({ message: "Company address must be a string" }),
Length2(5, 1e3, { message: "Address must be between 5 and 1000 characters" })
], UpdateCompanyProfileDto.prototype, "companyAddress", 2);
__decorateClass([
IsNotEmpty26({ message: "Please enter mobile code." }),
IsString10({ message: "Mobile Code must be a string" })
], UpdateCompanyProfileDto.prototype, "mobileCode", 2);
// @Matches(/^(\+1\s?)?(\(?\d{3}\)?[\s.-]?)?\d{3}[\s.-]?\d{4}$/, {
// message: "Please enter a valid US phone number",
// })
__decorateClass([
IsNotEmpty26({ message: "Please enter phone number." }),
IsString10({ message: "Please enter valid phone number." })
], UpdateCompanyProfileDto.prototype, "phoneNumber", 2);
__decorateClass([
IsNotEmpty26({ message: "Please enter email." }),
IsEmail4()
], UpdateCompanyProfileDto.prototype, "email", 2);
__decorateClass([
IsOptional9(),
IsString10({ message: "About company must be a string." })
], UpdateCompanyProfileDto.prototype, "aboutCompany", 2);
// src/modules/user/client-profile/dto/client-change-password.dto.ts
import {
IsString as IsString11,
MinLength as MinLength6,
Matches as Matches7,
IsNotEmpty as IsNotEmpty27
} from "class-validator";
var ClientChangePasswordDto = class {
};
__decorateClass([
IsString11(),
MinLength6(8, { message: "Password must be at least 8 characters long." }),
Matches7(/^(?=.*[A-Z])(?=.*\d).+$/, {
message: "Password must contain at least one uppercase letter and one number."
})
], ClientChangePasswordDto.prototype, "newPassword", 2);
__decorateClass([
IsNotEmpty27({ message: "Please enter confirm password." }),
Match("newPassword", { message: "Passwords do not match" })
], ClientChangePasswordDto.prototype, "confirmPassword", 2);
// src/modules/question/pattern/pattern.ts
var ONBOARDING_QUESTION_PATTERN = {
fetchOnboardingQuestions: "fetch.onboarding.questions"
};
var ASSESSMENT_QUESTION_PATTERN = {
fetchAssessmentQuestions: "fetch.assessment.questions"
};
// src/modules/question/dto/create-question.dto.ts
import {
IsNotEmpty as IsNotEmpty28,
IsOptional as IsOptional10,
IsBoolean as IsBoolean2
} from "class-validator";
var CreateQuestionDto = class {
};
__decorateClass([
IsNotEmpty28({ message: "Please enter unique id." })
], CreateQuestionDto.prototype, "questionId", 2);
__decorateClass([
IsNotEmpty28({ message: "Please enter question." })
], CreateQuestionDto.prototype, "question", 2);
__decorateClass([
IsNotEmpty28({ message: "Please enter for whom the question is." })
], CreateQuestionDto.prototype, "questionFor", 2);
__decorateClass([
IsNotEmpty28({ message: "Please enter options." })
], CreateQuestionDto.prototype, "options", 2);
__decorateClass([
IsOptional10(),
IsBoolean2({ message: "Whether the question status active" })
], CreateQuestionDto.prototype, "isActive", 2);
// src/modules/job/pattern/pattern.ts
var JOB_ROLE_PATTERN = {
fetchJobRolesForDropdown: "fetch.job.roles.for.dropdown"
};
var JOB_PATTERN = {
fetchJobs: "fetch.jobs",
fetchJobsPublic: "fetch.jobs.public",
fetchRecentJobs: "fetch.recent.jobs",
fetchJobCountAsPerStatus: "fetch.job.count.as.per.status",
fetchJobCountPublic: "fetch.job.count.public",
fetchJobsDropdown: "fetch.jobs.dropdown",
fetchJobDetail: "fetch.job.details",
fetchJobDetailPublic: "fetch.job.details.public",
handleJdUpload: "handle.jd.upload",
fetchJobBasicInformation: "fetch.job.basic.information",
createJobBasicInformation: "create.job.basic.information",
updateJobBasicInformation: "update.job.basic.information",
fetchJobAdditionalComments: "fetch.job.additional.comments",
updateJobAdditionalComments: "update.job.additional.comments",
fetchJobDescription: "fetch.job.description",
updateJobDescription: "update.job.description",
updateJobStatus: "update.job.status",
searchJobsByRoleAndSkills: "search.jobs.by.role.and.skills"
};
// src/modules/job/dto/job-basic-information.dto.ts
import {
IsString as IsString12,
IsNotEmpty as IsNotEmpty29,
IsArray,
ArrayNotEmpty,
IsNumber,
IsOptional as IsOptional11,
IsEnum as IsEnum10,
Min,
ValidateIf as ValidateIf3
} from "class-validator";
import { Type } from "class-transformer";
var JobLocation = /* @__PURE__ */ ((JobLocation2) => {
JobLocation2["ONSITE"] = "ONSITE";
JobLocation2["REMOTE"] = "REMOTE";
JobLocation2["BOTH"] = "BOTH";
return JobLocation2;
})(JobLocation || {});
var EmploymentType = /* @__PURE__ */ ((EmploymentType2) => {
EmploymentType2["FULLTIME"] = "FULLTIME";
EmploymentType2["PARTTIME"] = "PARTTIME";
EmploymentType2["BOTH"] = "BOTH";
return EmploymentType2;
})(EmploymentType || {});
var JobBasicInformationDto = class {
constructor() {
this.isDraft = false;
}
};
__decorateClass([
IsOptional11(),
Type(() => Boolean)
], JobBasicInformationDto.prototype, "isDraft", 2);
__decorateClass([
IsNotEmpty29({ message: "Please enter job role" }),
IsString12({ message: "Job role must be a string" })
], JobBasicInformationDto.prototype, "jobRole", 2);
__decorateClass([
IsOptional11(),
IsString12({ message: "Note must be a string" })
], JobBasicInformationDto.prototype, "note", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsArray({ message: "Skills must be an array" }),
ArrayNotEmpty({ message: "Please select at least one skill" }),
IsString12({ each: true, message: "Each skill must be a string" }),
Type(() => String)
], JobBasicInformationDto.prototype, "skills", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "Openings must be a number" }),
Min(1, { message: "There must be at least 1 opening" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "openings", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsEnum10(JobLocation, {
message: `Location must be one of: ${Object.values(JobLocation).join(
", "
)}`
})
], JobBasicInformationDto.prototype, "location", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "Country id must be a number" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "countryId", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "State id must be a number" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "stateId", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "City id must be a number" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "cityId", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsEnum10(EmploymentType, {
message: `Type of employment must be one of: ${Object.values(
EmploymentType
).join(", ")}`
})
], JobBasicInformationDto.prototype, "typeOfEmployment", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsString12({ message: "Currency must be a string" })
], JobBasicInformationDto.prototype, "currency", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "Expected salary (from) must be a number" }),
Min(0, { message: "Expected salary (from) cannot be negative" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "expectedSalaryFrom", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNumber({}, { message: "Expected salary (to) must be a number" }),
Min(0, { message: "Expected salary (to) cannot be negative" }),
Type(() => Number)
], JobBasicInformationDto.prototype, "expectedSalaryTo", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNotEmpty29({ message: "Please enter start date" }),
IsString12({ message: "Start date must be valid" })
], JobBasicInformationDto.prototype, "tentativeStartDate", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNotEmpty29({ message: "Please enter end date" }),
IsString12({ message: "End date must be valid" })
], JobBasicInformationDto.prototype, "tentativeEndDate", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsString12({ message: "Onboarding TAT must be a string" }),
IsOptional11()
], JobBasicInformationDto.prototype, "onboardingTat", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsString12({ message: "Candidate communication skills must be a string" }),
IsOptional11()
], JobBasicInformationDto.prototype, "candidateCommunicationSkills", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNotEmpty29({ message: "Please enter the academic qualification" }),
IsString12({ message: "Academic qualification must be a string" })
], JobBasicInformationDto.prototype, "academicQualification", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNotEmpty29({ message: "Please enter the years of experience" }),
IsString12({ message: "Years of experience must be a string" })
], JobBasicInformationDto.prototype, "yearsOfExperience", 2);
__decorateClass([
ValidateIf3((o) => !o.isDraft),
IsNotEmpty29({ message: "Please enter the business industry" }),
IsString12({ message: "Business industry must be a string" })
], JobBasicInformationDto.prototype, "businessIndustry", 2);
// src/modules/job/dto/job-additional-comment.dto.ts
import { IsOptional as IsOptional12, IsString as IsString13, MaxLength as MaxLength6 } from "class-validator";
var JobAdditionalCommentDto = class {
};
__decorateClass([
IsOptional12(),
IsString13({ message: "Additional comment must be a string" }),
MaxLength6(500, { message: "Additional comment must not exceed 500 characters" })
], JobAdditionalCommentDto.prototype, "additionalComment", 2);
// src/modules/job/dto/job-description.dto.ts
import { IsString as IsString14, IsNotEmpty as IsNotEmpty30, MaxLength as MaxLength7 } from "class-validator";
var JobDescriptionDto = class {
};
__decorateClass([
IsNotEmpty30({ message: "Please enter job description" }),
IsString14({ message: "Description must be a string" }),
MaxLength7(5e3, { message: "Description must not exceed 5000 characters" })
], JobDescriptionDto.prototype, "description", 2);
// src/modules/job/dto/job-status.dto.ts
import { IsEnum as IsEnum11, IsNotEmpty as IsNotEmpty31 } from "class-validator";
var JobStatus = /* @__PURE__ */ ((JobStatus2) => {
JobStatus2["ACTIVE"] = "ACTIVE";
JobStatus2["OPEN"] = "OPEN";
JobStatus2["DRAFT"] = "DRAFT";
JobStatus2["ONHOLD"] = "ONHOLD";
JobStatus2["CLOSED"] = "CLOSED";
return JobStatus2;
})(JobStatus || {});
var JobStatusDto = class {
};
__decorateClass([
IsNotEmpty31({ message: "Please provide a job status" }),
IsEnum11(JobStatus, {
message: `Status must be one of: ${Object.values(JobStatus).join(", ")}`
})
], JobStatusDto.prototype, "status", 2);
// src/modules/job/dto/job-id-param.dto.ts
import { IsUUID as IsUUID11 } from "class-validator";
var JobIdParamDto = class {
};
__decorateClass([
IsUUID11("4", {
message: "Invalid job ID. It must be a valid UUID version 4."
})
], JobIdParamDto.prototype, "id", 2);
// src/modules/user/freelancer-profile/pattern/pattern.ts
var PROFILE_PATTERN = {
fetchFreelancerProfile: "fetch.freelancer.profile",
fetchFreelancerPublicProfile: "fetch.freelancer.public.profile",
fetchFreelancerScreeningResult: "fetch.freelancer.screening.result",
fetchFreelancerScreeningResultPublic: "fetch.freelancer.screening.result.public",
changeFreelancerPassword: "change.freelancer.password",
uploadFreelancerProfilePic: "upload.freelancer.profilepic",
updateFreelancerProfile: "update.freelancer.profile",
uploadFreelancerServiceAgreement: "upload.freelancer.service.agreement"
};
// src/modules/user/freelancer-profile/dto/freelancer-change-password.dto.ts
import {
IsString as IsString15,
IsNotEmpty as IsNotEmpty32,
MaxLength as MaxLength8,
MinLength as MinLength7,
Matches as Matches8
} from "class-validator";
var FreelancerChangePasswordDto = class {
};
__decorateClass([
IsNotEmpty32({ message: "Please enter Old Password." }),
IsString15()
], FreelancerChangePasswordDto.prototype, "oldPassword", 2);
__decorateClass([
IsNotEmpty32({ message: "Please enter New Password." }),
IsString15(),
MinLength7(6),
MaxLength8(32),
Matches8(/^(?=.*[A-Za-z])(?=.*\d)(?=.*[@$!%*?&])/, {
message: "New Password must include letters, numbers and symbols."
})
], FreelancerChangePasswordDto.prototype, "newPassword", 2);
// src/modules/user/freelancer-profile/dto/update-freelancer-profile.dto.ts
import {
IsOptional as IsOptional13,
IsString as IsString16,
IsEmail as IsEmail5,
IsNumber as IsNumber2,
IsEnum as IsEnum12,
IsNotEmpty as IsNotEmpty33
} from "class-validator";
var NatureOfWorkDto = /* @__PURE__ */ ((NatureOfWorkDto2) => {
NatureOfWorkDto2["FULLTIME"] = "FULLTIME";
NatureOfWorkDto2["PARTTIME"] = "PARTTIME";
NatureOfWorkDto2["BOTH"] = "BOTH";
return NatureOfWorkDto2;
})(NatureOfWorkDto || {});
var ModeOfWorkDto = /* @__PURE__ */ ((ModeOfWorkDto2) => {
ModeOfWorkDto2["ONSITE"] = "ONSITE";
ModeOfWorkDto2["REMOTE"] = "REMOTE";
ModeOfWorkDto2["BOTH"] = "BOTH";
return ModeOfWorkDto2;
})(ModeOfWorkDto || {});
var UpdateFreelancerProfileDto = class {
};
__decorateClass([
IsNotEmpty33({ message: "Please enter first name." }),
IsString16({ message: "Please enter valid first name." })
], UpdateFreelancerProfileDto.prototype, "firstName", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter last name." }),
IsString16({ message: "Please enter valid last name." })
], UpdateFreelancerProfileDto.prototype, "lastName", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter designation." }),
IsString16({ message: "Please enter valid designation." })
], UpdateFreelancerProfileDto.prototype, "designation", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter experience." }),
IsString16({ message: "Please enter valid experience." })
], UpdateFreelancerProfileDto.prototype, "experience", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter email id." }),
IsEmail5()
], UpdateFreelancerProfileDto.prototype, "email", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter mobile code." }),
IsString16({ message: "Please enter valid mobile code." })
], UpdateFreelancerProfileDto.prototype, "mobileCode", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter mobile number." }),
IsString16({ message: "Please enter valid mobile number." })
], UpdateFreelancerProfileDto.prototype, "mobile", 2);
__decorateClass([
IsOptional13(),
IsNumber2()
], UpdateFreelancerProfileDto.prototype, "countryId", 2);
__decorateClass([
IsNotEmpty33({ message: "Please select currency." }),
IsString16({ message: "Please enter valid currency." })
], UpdateFreelancerProfileDto.prototype, "currency", 2);
__decorateClass([
IsNotEmpty33({ message: "Please enter expected hourly compensation." }),
IsString16({ message: "Please enter valid expected hourly compensation." })
], UpdateFreelancerProfileDto.prototype, "expectedHourlyCompensation", 2);
__decorateClass([
IsNotEmpty33({ message: "Please select engagement type." }),
IsEnum12(NatureOfWorkDto, {
message: `Engagement Type must be one of: ${Object.values(
NatureOfWorkDto
).join(", ")}`
})
], UpdateFreelancerProfileDto.prototype, "natureOfWork", 2);
__decorateClass([
IsNotEmpty33({ message: "Please select mode of work." }),
IsEnum12(ModeOfWorkDto, {
message: `Mode of work must be one of: ${Object.values(ModeOfWorkDto).join(
", "
)}`
})
], UpdateFreelancerProfileDto.prototype, "modeOfWork", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "portfolioLink", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "address", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "about", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "linkedinProfileLink", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "kaggleProfileLink", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "githubProfileLink", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "stackOverflowProfileLink", 2);
__decorateClass([
IsOptional13(),
IsString16()
], UpdateFreelancerProfileDto.prototype, "resumeUrl", 2);
// src/modules/bank/pattern/pattern.ts
var BANK_PATTERN = {
addFreelancerBankDetails: "add.freelancer.bankdetails",
fetchFreelancerBankDetails: "fetch.freelancer.bank.details",
updateFreelancerBankDetails: "update.freelancer.bank.details"
};
// src/modules/bank/dto/freelancer-bank-details.dto.ts
import {
IsEnum as IsEnum13,
IsNotEmpty as IsNotEmpty34,
IsOptional as IsOptional14,
ValidateIf as ValidateIf4
} from "class-validator";
var BankAccountScope = /* @__PURE__ */ ((BankAccountScope2) => {
BankAccountScope2["DOMESTIC"] = "DOMESTIC";
BankAccountScope2["INTERNATIONAL"] = "INTERNATIONAL";
return BankAccountScope2;
})(BankAccountScope || {});
var FreelancerBankDetailsDto = class {
};
__decorateClass([
IsNotEmpty34({ message: "Please enter Account Holder Name." })
], FreelancerBankDetailsDto.prototype, "name", 2);
__decorateClass([
IsNotEmpty34({ message: "Please enter Mobile Number." })
], FreelancerBankDetailsDto.prototype, "mobile", 2);
__decorateClass([
IsNotEmpty34({ message: "Please enter Email." })
], FreelancerBankDetailsDto.prototype, "email", 2);
__decorateClass([
IsOptional14()
], FreelancerBankDetailsDto.prototype, "address", 2);
__decorateClass([
IsNotEmpty34({ message: "Please enter Account Number." })
], FreelancerBankDetailsDto.prototype, "accountNumber", 2);
__decorateClass([
IsNotEmpty34({ message: "Please enter Bank Name." })
], FreelancerBankDetailsDto.prototype, "bankName", 2);
__decorateClass([
IsNotEmpty34({ message: "Please enter Branch Name." })
], FreelancerBankDetailsDto.prototype, "branchName", 2);
__decorateClass([
ValidateIf4((dto) => dto.accountScope === "DOMESTIC"),
IsNotEmpty34({ message: "IFSC Code is required for DOMESTIC accounts." })
], FreelancerBankDetailsDto.prototype, "ifscCode", 2);
__decorateClass([
ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
IsNotEmpty34({ message: "Routing Number/Sort Code is required for INTERNATIONAL accounts." })
], FreelancerBankDetailsDto.prototype, "routingNo", 2);
__decorateClass([
ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
IsNotEmpty34({ message: "ABA Number is required for INTERNATIONAL accounts." })
], FreelancerBankDetailsDto.prototype, "abaNumber", 2);
__decorateClass([
ValidateIf4((dto) => dto.accountScope === "INTERNATIONAL"),
IsNotEmpty34({ message: "IBAN is required for INTERNATIONAL accounts." })
], FreelancerBankDetailsDto.prototype, "iban", 2);
__decorateClass([
IsOptional14()
], FreelancerBankDetailsDto.prototype, "accountType", 2);
__decorateClass([
IsEnum13(BankAccountScope, {
message: `Type of Account Scope must be one of: ${Object.values(
BankAccountScope
).join(", ")}`
})
], FreelancerBankDetailsDto.prototype, "accountScope", 2);
// src/modules/plan/pattern/pattern.ts
var PLAN_PATTERN = {
fetchPlans: "fetch.plans"
};
// src/modules/system-preference/pattern/pattern.ts
var SYSTEM_PREFERENCES_PATTERN = {
fetchSystemPreference: "fetch.system.preferences",
updateSystemPreference: "update.system.preferences",
createSystemPreference: "create.system.preferences"
};
// src/modules/system-preference/dto/system-preference.dto.ts
import {
IsBoolean as IsBoolean3,
IsEnum as IsEnum14
} from "class-validator";
var SystemPreferenceKey = /* @__PURE__ */ ((SystemPreferenceKey2) => {
SystemPreferenceKey2["EMAIL_NOTIFICATION"] = "EMAIL_NOTIFICATION";
SystemPreferenceKey2["DARK_MODE"] = "DARK_MODE";
return SystemPreferenceKey2;
})(SystemPreferenceKey || {});
var SystemPreferenceDto = class {
};
__decorateClass([
IsBoolean3()
], SystemPreferenceDto.prototype, "value", 2);
__decorateClass([
IsEnum14(SystemPreferenceKey, {
message: `key must be one of: ${Object.values(
SystemPreferenceKey
).join(", ")}`
})
], SystemPreferenceDto.prototype, "key", 2);
// src/modules/notification/pattern/pattern.ts
var NOTIFICATION_PATTERN = {
handleAccountVerificationNotification: "handle.account.verification.notification",
handleResetLinkNotification: "handle.reset.link.notification"
};
// src/modules/rating/pattern/pattern.ts
var RATING_PATTERN = {
addRating: "add.rating",
fetchRating: "fetch.rating"
};
// src/modules/rating/dto/add.rating.dto.ts
import {
IsEnum as IsEnum15,
IsInt,
IsNotEmpty as IsNotEmpty35,
IsOptional as IsOptional15,
IsString as IsString17,
Max,
Min as Min2
} from "class-validator";
// src/entities/rating.entity.ts
import { Entity as Entity49, Column as Column50, ManyToOne as ManyToOne43, JoinColumn as JoinColumn44, Index as Index