@thejob/schema 2.0.6 → 2.0.8
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.cjs +28 -0
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +26 -0
- package/package.json +1 -1
- package/src/page/page.schema.ts +16 -0
- package/src/user/user.constant.ts +30 -0
- package/pnpm-workspace.yaml +0 -2
package/dist/index.cjs
CHANGED
|
@@ -71,6 +71,8 @@ __export(index_exports, {
|
|
|
71
71
|
LocationSchema: () => LocationSchema,
|
|
72
72
|
MIN_SALARY_LOWER_BOUND: () => MIN_SALARY_LOWER_BOUND,
|
|
73
73
|
MIN_SALARY_UPPER_BOUND: () => MIN_SALARY_UPPER_BOUND,
|
|
74
|
+
PREFILL_MIRRORED_KEYS: () => PREFILL_MIRRORED_KEYS,
|
|
75
|
+
PRIVATE_PROFILE_FIELDS: () => PRIVATE_PROFILE_FIELDS,
|
|
74
76
|
PageSchema: () => PageSchema,
|
|
75
77
|
PageStatus: () => PageStatus,
|
|
76
78
|
PageType: () => PageType,
|
|
@@ -551,7 +553,15 @@ var PageSchema = (0, import_yup12.object)().shape({
|
|
|
551
553
|
dark: (0, import_yup12.string)().optional().nullable().label("Dark Logo"),
|
|
552
554
|
light: (0, import_yup12.string)().required().label("Light Logo")
|
|
553
555
|
}).optional().nullable().default(null).label("Logo"),
|
|
556
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
557
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
558
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
559
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
560
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
561
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
554
562
|
categories: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).required().min(1).label("Categories"),
|
|
563
|
+
industries: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).optional().default([]).label("Industries"),
|
|
564
|
+
subCategories: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).optional().default([]).label("Sub Categories"),
|
|
555
565
|
socialAccounts: (0, import_yup12.array)().of(SocialAccountSchema).optional().label("Social Accounts"),
|
|
556
566
|
isOwner: (0, import_yup12.boolean)().optional().label("Is Owner"),
|
|
557
567
|
isFeatured: (0, import_yup12.boolean)().optional().default(false).label("Is Featured"),
|
|
@@ -2183,6 +2193,22 @@ var SupportedReferralSources = Object.values(ReferralSource);
|
|
|
2183
2193
|
var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
2184
2194
|
var MIN_SALARY_LOWER_BOUND = 0;
|
|
2185
2195
|
var MIN_SALARY_UPPER_BOUND = 1e6;
|
|
2196
|
+
var PREFILL_MIRRORED_KEYS = [
|
|
2197
|
+
"headline",
|
|
2198
|
+
"aboutMe",
|
|
2199
|
+
"mobile",
|
|
2200
|
+
"location",
|
|
2201
|
+
"experienceLevel",
|
|
2202
|
+
"socialAccounts",
|
|
2203
|
+
"workExperiences",
|
|
2204
|
+
"educations"
|
|
2205
|
+
];
|
|
2206
|
+
var PRIVATE_PROFILE_FIELDS = [
|
|
2207
|
+
"email",
|
|
2208
|
+
"emailVerified",
|
|
2209
|
+
"mobile",
|
|
2210
|
+
"additionalInfo"
|
|
2211
|
+
];
|
|
2186
2212
|
|
|
2187
2213
|
// src/user/work-experience.schema.ts
|
|
2188
2214
|
var import_yup22 = require("yup");
|
|
@@ -2561,6 +2587,8 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
|
|
|
2561
2587
|
LocationSchema,
|
|
2562
2588
|
MIN_SALARY_LOWER_BOUND,
|
|
2563
2589
|
MIN_SALARY_UPPER_BOUND,
|
|
2590
|
+
PREFILL_MIRRORED_KEYS,
|
|
2591
|
+
PRIVATE_PROFILE_FIELDS,
|
|
2564
2592
|
PageSchema,
|
|
2565
2593
|
PageStatus,
|
|
2566
2594
|
PageType,
|
package/dist/index.d.cts
CHANGED
|
@@ -615,6 +615,8 @@ declare const JobSchema: ObjectSchema<{
|
|
|
615
615
|
verified: undefined;
|
|
616
616
|
logo: null;
|
|
617
617
|
categories: "";
|
|
618
|
+
industries: never[];
|
|
619
|
+
subCategories: never[];
|
|
618
620
|
socialAccounts: "";
|
|
619
621
|
isOwner: undefined;
|
|
620
622
|
isFeatured: false;
|
|
@@ -1197,6 +1199,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1197
1199
|
light: string;
|
|
1198
1200
|
} | null;
|
|
1199
1201
|
categories: string[];
|
|
1202
|
+
industries: string[];
|
|
1203
|
+
subCategories: string[];
|
|
1200
1204
|
socialAccounts: {
|
|
1201
1205
|
type: NonNullable<SocialAccount | undefined>;
|
|
1202
1206
|
isNew: boolean;
|
|
@@ -1235,6 +1239,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1235
1239
|
verified: undefined;
|
|
1236
1240
|
logo: null;
|
|
1237
1241
|
categories: "";
|
|
1242
|
+
industries: never[];
|
|
1243
|
+
subCategories: never[];
|
|
1238
1244
|
socialAccounts: "";
|
|
1239
1245
|
isOwner: undefined;
|
|
1240
1246
|
isFeatured: false;
|
|
@@ -1456,6 +1462,20 @@ type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
|
|
|
1456
1462
|
/** Bounds enforced server-side on the minimum-salary slider. */
|
|
1457
1463
|
declare const MIN_SALARY_LOWER_BOUND = 0;
|
|
1458
1464
|
declare const MIN_SALARY_UPPER_BOUND = 1000000;
|
|
1465
|
+
/**
|
|
1466
|
+
* Profile fields whose confirmed write should drain the resume-parser's
|
|
1467
|
+
* suggestion. When the user accepts/edits one of these, the matching
|
|
1468
|
+
* `pendingPrefill.<key>` is unset in the same write so the "Suggestion"
|
|
1469
|
+
* affordance disappears on the next load ("confirmed beats prefill").
|
|
1470
|
+
*/
|
|
1471
|
+
declare const PREFILL_MIRRORED_KEYS: readonly ["headline", "aboutMe", "mobile", "location", "experienceLevel", "socialAccounts", "workExperiences", "educations"];
|
|
1472
|
+
type PrefillMirroredKey = (typeof PREFILL_MIRRORED_KEYS)[number];
|
|
1473
|
+
/**
|
|
1474
|
+
* Fields stripped from a public (non-owner) profile read. A public profile must
|
|
1475
|
+
* never expose these regardless of the caller's requested `fields`.
|
|
1476
|
+
*/
|
|
1477
|
+
declare const PRIVATE_PROFILE_FIELDS: readonly ["email", "emailVerified", "mobile", "additionalInfo"];
|
|
1478
|
+
type PrivateProfileField = (typeof PRIVATE_PROFILE_FIELDS)[number];
|
|
1459
1479
|
|
|
1460
1480
|
declare const UserSchema: yup.ObjectSchema<{
|
|
1461
1481
|
authAccountId: string;
|
|
@@ -1935,6 +1955,8 @@ declare const WorkExperienceSchema: ObjectSchema<{
|
|
|
1935
1955
|
verified: undefined;
|
|
1936
1956
|
logo: null;
|
|
1937
1957
|
categories: "";
|
|
1958
|
+
industries: never[];
|
|
1959
|
+
subCategories: never[];
|
|
1938
1960
|
socialAccounts: "";
|
|
1939
1961
|
isOwner: undefined;
|
|
1940
1962
|
isFeatured: false;
|
|
@@ -2020,6 +2042,8 @@ declare const EducationSchema: ObjectSchema<{
|
|
|
2020
2042
|
verified: undefined;
|
|
2021
2043
|
logo: null;
|
|
2022
2044
|
categories: "";
|
|
2045
|
+
industries: never[];
|
|
2046
|
+
subCategories: never[];
|
|
2023
2047
|
socialAccounts: "";
|
|
2024
2048
|
isOwner: undefined;
|
|
2025
2049
|
isFeatured: false;
|
|
@@ -2285,6 +2309,8 @@ declare const RecruiterPageLinkSchema: yup.ObjectSchema<{
|
|
|
2285
2309
|
verified: undefined;
|
|
2286
2310
|
logo: null;
|
|
2287
2311
|
categories: "";
|
|
2312
|
+
industries: never[];
|
|
2313
|
+
subCategories: never[];
|
|
2288
2314
|
socialAccounts: "";
|
|
2289
2315
|
isOwner: undefined;
|
|
2290
2316
|
isFeatured: false;
|
|
@@ -2363,6 +2389,8 @@ declare const CoordinatorPageLinkSchema: yup.ObjectSchema<{
|
|
|
2363
2389
|
verified: undefined;
|
|
2364
2390
|
logo: null;
|
|
2365
2391
|
categories: "";
|
|
2392
|
+
industries: never[];
|
|
2393
|
+
subCategories: never[];
|
|
2366
2394
|
socialAccounts: "";
|
|
2367
2395
|
isOwner: undefined;
|
|
2368
2396
|
isFeatured: false;
|
|
@@ -2640,4 +2668,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
|
|
|
2640
2668
|
};
|
|
2641
2669
|
}, "">;
|
|
2642
2670
|
|
|
2643
|
-
export { AnswerChoiceType, ApplicationReceivePreference, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
|
2671
|
+
export { AnswerChoiceType, ApplicationReceivePreference, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
package/dist/index.d.ts
CHANGED
|
@@ -615,6 +615,8 @@ declare const JobSchema: ObjectSchema<{
|
|
|
615
615
|
verified: undefined;
|
|
616
616
|
logo: null;
|
|
617
617
|
categories: "";
|
|
618
|
+
industries: never[];
|
|
619
|
+
subCategories: never[];
|
|
618
620
|
socialAccounts: "";
|
|
619
621
|
isOwner: undefined;
|
|
620
622
|
isFeatured: false;
|
|
@@ -1197,6 +1199,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1197
1199
|
light: string;
|
|
1198
1200
|
} | null;
|
|
1199
1201
|
categories: string[];
|
|
1202
|
+
industries: string[];
|
|
1203
|
+
subCategories: string[];
|
|
1200
1204
|
socialAccounts: {
|
|
1201
1205
|
type: NonNullable<SocialAccount | undefined>;
|
|
1202
1206
|
isNew: boolean;
|
|
@@ -1235,6 +1239,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1235
1239
|
verified: undefined;
|
|
1236
1240
|
logo: null;
|
|
1237
1241
|
categories: "";
|
|
1242
|
+
industries: never[];
|
|
1243
|
+
subCategories: never[];
|
|
1238
1244
|
socialAccounts: "";
|
|
1239
1245
|
isOwner: undefined;
|
|
1240
1246
|
isFeatured: false;
|
|
@@ -1456,6 +1462,20 @@ type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
|
|
|
1456
1462
|
/** Bounds enforced server-side on the minimum-salary slider. */
|
|
1457
1463
|
declare const MIN_SALARY_LOWER_BOUND = 0;
|
|
1458
1464
|
declare const MIN_SALARY_UPPER_BOUND = 1000000;
|
|
1465
|
+
/**
|
|
1466
|
+
* Profile fields whose confirmed write should drain the resume-parser's
|
|
1467
|
+
* suggestion. When the user accepts/edits one of these, the matching
|
|
1468
|
+
* `pendingPrefill.<key>` is unset in the same write so the "Suggestion"
|
|
1469
|
+
* affordance disappears on the next load ("confirmed beats prefill").
|
|
1470
|
+
*/
|
|
1471
|
+
declare const PREFILL_MIRRORED_KEYS: readonly ["headline", "aboutMe", "mobile", "location", "experienceLevel", "socialAccounts", "workExperiences", "educations"];
|
|
1472
|
+
type PrefillMirroredKey = (typeof PREFILL_MIRRORED_KEYS)[number];
|
|
1473
|
+
/**
|
|
1474
|
+
* Fields stripped from a public (non-owner) profile read. A public profile must
|
|
1475
|
+
* never expose these regardless of the caller's requested `fields`.
|
|
1476
|
+
*/
|
|
1477
|
+
declare const PRIVATE_PROFILE_FIELDS: readonly ["email", "emailVerified", "mobile", "additionalInfo"];
|
|
1478
|
+
type PrivateProfileField = (typeof PRIVATE_PROFILE_FIELDS)[number];
|
|
1459
1479
|
|
|
1460
1480
|
declare const UserSchema: yup.ObjectSchema<{
|
|
1461
1481
|
authAccountId: string;
|
|
@@ -1935,6 +1955,8 @@ declare const WorkExperienceSchema: ObjectSchema<{
|
|
|
1935
1955
|
verified: undefined;
|
|
1936
1956
|
logo: null;
|
|
1937
1957
|
categories: "";
|
|
1958
|
+
industries: never[];
|
|
1959
|
+
subCategories: never[];
|
|
1938
1960
|
socialAccounts: "";
|
|
1939
1961
|
isOwner: undefined;
|
|
1940
1962
|
isFeatured: false;
|
|
@@ -2020,6 +2042,8 @@ declare const EducationSchema: ObjectSchema<{
|
|
|
2020
2042
|
verified: undefined;
|
|
2021
2043
|
logo: null;
|
|
2022
2044
|
categories: "";
|
|
2045
|
+
industries: never[];
|
|
2046
|
+
subCategories: never[];
|
|
2023
2047
|
socialAccounts: "";
|
|
2024
2048
|
isOwner: undefined;
|
|
2025
2049
|
isFeatured: false;
|
|
@@ -2285,6 +2309,8 @@ declare const RecruiterPageLinkSchema: yup.ObjectSchema<{
|
|
|
2285
2309
|
verified: undefined;
|
|
2286
2310
|
logo: null;
|
|
2287
2311
|
categories: "";
|
|
2312
|
+
industries: never[];
|
|
2313
|
+
subCategories: never[];
|
|
2288
2314
|
socialAccounts: "";
|
|
2289
2315
|
isOwner: undefined;
|
|
2290
2316
|
isFeatured: false;
|
|
@@ -2363,6 +2389,8 @@ declare const CoordinatorPageLinkSchema: yup.ObjectSchema<{
|
|
|
2363
2389
|
verified: undefined;
|
|
2364
2390
|
logo: null;
|
|
2365
2391
|
categories: "";
|
|
2392
|
+
industries: never[];
|
|
2393
|
+
subCategories: never[];
|
|
2366
2394
|
socialAccounts: "";
|
|
2367
2395
|
isOwner: undefined;
|
|
2368
2396
|
isFeatured: false;
|
|
@@ -2640,4 +2668,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
|
|
|
2640
2668
|
};
|
|
2641
2669
|
}, "">;
|
|
2642
2670
|
|
|
2643
|
-
export { AnswerChoiceType, ApplicationReceivePreference, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
|
2671
|
+
export { AnswerChoiceType, ApplicationReceivePreference, ChoiceQuestionSchema, Common, CompensationType, CompletenessScoreSchema, ContactTypes, CoordinatorPageLinkSchema, DISPLAY_DATE_FORMAT, DISPLAY_DATE_FORMAT_SHORT, DateStringSchema, DbDefaultSchema, DefaultPaginatedResponse, DefaultPaginationOptions, DefaultUserRoles, DurationSchema, EMPTY_STRING, EducationLevel, EducationSchema, EmployeeCount, EmploymentType, ExperienceLevel, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, PREFILL_MIRRORED_KEYS, PRIVATE_PROFILE_FIELDS, PageSchema, PageStatus, PageType, type PaginatedResponse, PaginationSchema, PostSchema, PostStatus, type PrefillMirroredKey, type PrivateProfileField, ProficiencyLevel, QuestionSchema, QuestionType, ReadAndAcknowledgeQuestionSchema, RecruiterPageLinkSchema, ReferralSource, ReportReason, ReportSchema, ResourceType, SITEMAP_FORMAT, SYSTEM_DATE_FORMAT, SkillSchema, SocialAccount, SocialAccountSchema, StudentCompletenessSchema, StudyType, SupportedAnswerChoiceTypes, SupportedApplicationReceivePreferences, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedJobCategories, SupportedJobIndustries, SupportedJobSearchUrgencies, SupportedJobStatuses, SupportedJobSubCategories, SupportedPageStatuses, SupportedPageTypes, SupportedPostStatuses, SupportedProficiencyLevels, SupportedQuestionTypes, SupportedReferralSources, SupportedReportReasons, SupportedResourceTypes, SupportedSalaryCurrencies, type SupportedSalaryCurrency, SupportedSocialAccounts, SupportedStudyTypes, SupportedUserProfileVisibilities, SupportedUserRoles, SupportedUserStatuses, SupportedWorkModes, TAXONOMY_LABELS, type TChoiceQuestionSchema, type TDurationSchema, type TInputQuestionSchema, type TJobSchema, type TPostSchema, type TQuestionSchema, type TReadAndAcknowledgeQuestionSchema, type TUserIdAndCreatedAtSchema, TermsAcceptedSchema, UserAdditionalInfoSchema, UserCertificationSchema, UserCompletenessSchema, UserCoordinatorProfileSchema, UserDetailType, UserGeneralDetailSchema, UserIdAndCreatedAtSchema, UserInterestSchema, UserJobPreferencesSchema, UserLanguageSchema, type UserProfileOverview, UserProfileVisibility, UserProjectSchema, UserRecruiterProfileSchema, UserRole, UserSchema, UserSkillSchema, UserStatus, WorkExperienceSchema, WorkMode, categoryOfIndustry, categoryOfSubCategory, dateString, deriveIndustry, getSchemaByQuestion, industriesOfCategory, industryOfSubCategory, subCategoriesOfIndustry };
|
package/dist/index.js
CHANGED
|
@@ -396,7 +396,15 @@ var PageSchema = object10().shape({
|
|
|
396
396
|
dark: string7().optional().nullable().label("Dark Logo"),
|
|
397
397
|
light: string7().required().label("Light Logo")
|
|
398
398
|
}).optional().nullable().default(null).label("Logo"),
|
|
399
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
400
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
401
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
402
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
403
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
404
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
399
405
|
categories: array5().of(string7().trim().required()).required().min(1).label("Categories"),
|
|
406
|
+
industries: array5().of(string7().trim().required()).optional().default([]).label("Industries"),
|
|
407
|
+
subCategories: array5().of(string7().trim().required()).optional().default([]).label("Sub Categories"),
|
|
400
408
|
socialAccounts: array5().of(SocialAccountSchema).optional().label("Social Accounts"),
|
|
401
409
|
isOwner: boolean7().optional().label("Is Owner"),
|
|
402
410
|
isFeatured: boolean7().optional().default(false).label("Is Featured"),
|
|
@@ -2028,6 +2036,22 @@ var SupportedReferralSources = Object.values(ReferralSource);
|
|
|
2028
2036
|
var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
|
|
2029
2037
|
var MIN_SALARY_LOWER_BOUND = 0;
|
|
2030
2038
|
var MIN_SALARY_UPPER_BOUND = 1e6;
|
|
2039
|
+
var PREFILL_MIRRORED_KEYS = [
|
|
2040
|
+
"headline",
|
|
2041
|
+
"aboutMe",
|
|
2042
|
+
"mobile",
|
|
2043
|
+
"location",
|
|
2044
|
+
"experienceLevel",
|
|
2045
|
+
"socialAccounts",
|
|
2046
|
+
"workExperiences",
|
|
2047
|
+
"educations"
|
|
2048
|
+
];
|
|
2049
|
+
var PRIVATE_PROFILE_FIELDS = [
|
|
2050
|
+
"email",
|
|
2051
|
+
"emailVerified",
|
|
2052
|
+
"mobile",
|
|
2053
|
+
"additionalInfo"
|
|
2054
|
+
];
|
|
2031
2055
|
|
|
2032
2056
|
// src/user/work-experience.schema.ts
|
|
2033
2057
|
import { boolean as boolean11, object as object20, string as string17 } from "yup";
|
|
@@ -2405,6 +2429,8 @@ export {
|
|
|
2405
2429
|
LocationSchema,
|
|
2406
2430
|
MIN_SALARY_LOWER_BOUND,
|
|
2407
2431
|
MIN_SALARY_UPPER_BOUND,
|
|
2432
|
+
PREFILL_MIRRORED_KEYS,
|
|
2433
|
+
PRIVATE_PROFILE_FIELDS,
|
|
2408
2434
|
PageSchema,
|
|
2409
2435
|
PageStatus,
|
|
2410
2436
|
PageType,
|
package/package.json
CHANGED
package/src/page/page.schema.ts
CHANGED
|
@@ -53,11 +53,27 @@ export const PageSchema = object()
|
|
|
53
53
|
.nullable()
|
|
54
54
|
.default(null)
|
|
55
55
|
.label("Logo"),
|
|
56
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
57
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
58
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
59
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
60
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
61
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
56
62
|
categories: array()
|
|
57
63
|
.of(string().trim().required())
|
|
58
64
|
.required()
|
|
59
65
|
.min(1)
|
|
60
66
|
.label("Categories"),
|
|
67
|
+
industries: array()
|
|
68
|
+
.of(string().trim().required())
|
|
69
|
+
.optional()
|
|
70
|
+
.default([])
|
|
71
|
+
.label("Industries"),
|
|
72
|
+
subCategories: array()
|
|
73
|
+
.of(string().trim().required())
|
|
74
|
+
.optional()
|
|
75
|
+
.default([])
|
|
76
|
+
.label("Sub Categories"),
|
|
61
77
|
socialAccounts: array()
|
|
62
78
|
.of(SocialAccountSchema)
|
|
63
79
|
.optional()
|
|
@@ -91,3 +91,33 @@ export type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number]
|
|
|
91
91
|
/** Bounds enforced server-side on the minimum-salary slider. */
|
|
92
92
|
export const MIN_SALARY_LOWER_BOUND = 0;
|
|
93
93
|
export const MIN_SALARY_UPPER_BOUND = 1_000_000;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Profile fields whose confirmed write should drain the resume-parser's
|
|
97
|
+
* suggestion. When the user accepts/edits one of these, the matching
|
|
98
|
+
* `pendingPrefill.<key>` is unset in the same write so the "Suggestion"
|
|
99
|
+
* affordance disappears on the next load ("confirmed beats prefill").
|
|
100
|
+
*/
|
|
101
|
+
export const PREFILL_MIRRORED_KEYS = [
|
|
102
|
+
"headline",
|
|
103
|
+
"aboutMe",
|
|
104
|
+
"mobile",
|
|
105
|
+
"location",
|
|
106
|
+
"experienceLevel",
|
|
107
|
+
"socialAccounts",
|
|
108
|
+
"workExperiences",
|
|
109
|
+
"educations",
|
|
110
|
+
] as const;
|
|
111
|
+
export type PrefillMirroredKey = (typeof PREFILL_MIRRORED_KEYS)[number];
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Fields stripped from a public (non-owner) profile read. A public profile must
|
|
115
|
+
* never expose these regardless of the caller's requested `fields`.
|
|
116
|
+
*/
|
|
117
|
+
export const PRIVATE_PROFILE_FIELDS = [
|
|
118
|
+
"email",
|
|
119
|
+
"emailVerified",
|
|
120
|
+
"mobile",
|
|
121
|
+
"additionalInfo",
|
|
122
|
+
] as const;
|
|
123
|
+
export type PrivateProfileField = (typeof PRIVATE_PROFILE_FIELDS)[number];
|
package/pnpm-workspace.yaml
DELETED