@thejob/schema 2.0.8 → 2.0.10

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.js CHANGED
@@ -1900,63 +1900,8 @@ var PostSchema = object17({
1900
1900
  status: string14().oneOf(SupportedPostStatuses).default("draft" /* Draft */).required().label("Status")
1901
1901
  }).concat(DbDefaultSchema).noUnknown().label("Post");
1902
1902
 
1903
- // src/pagination/pagination.schema.ts
1904
- import { number as number7, object as object18, string as string15 } from "yup";
1905
- var PaginationSchema = object18().shape({
1906
- page: number7().required().min(1).label("Page").default(1),
1907
- limit: number7().required().min(1).max(100).label("Limit").default(10),
1908
- sortBy: string15().notOneOf([""]).optional().label("SortBy"),
1909
- nextPage: string15().optional().label("Next Page Token"),
1910
- prevPage: string15().optional().label("Previous Page Token"),
1911
- sortDirection: string15().oneOf(["asc", "desc"]).optional().label("Sort Direction")
1912
- });
1913
-
1914
- // src/pagination/pagination.constant.ts
1915
- var DefaultPaginatedResponse = {
1916
- results: [],
1917
- total: 0,
1918
- page: 1,
1919
- limit: 10
1920
- };
1921
- var DefaultPaginationOptions = {
1922
- page: 1,
1923
- limit: 10
1924
- };
1925
-
1926
- // src/report/report.schema.ts
1927
- import { mixed as mixed4, object as object19, string as string16 } from "yup";
1928
-
1929
- // src/report/report.constant.ts
1930
- var ResourceType = /* @__PURE__ */ ((ResourceType3) => {
1931
- ResourceType3["Job"] = "job";
1932
- ResourceType3["User"] = "user";
1933
- ResourceType3["Resume"] = "resume";
1934
- ResourceType3["Company"] = "company";
1935
- return ResourceType3;
1936
- })(ResourceType || {});
1937
- var SupportedResourceTypes = Object.values(ResourceType);
1938
- var ReportReason = /* @__PURE__ */ ((ReportReason3) => {
1939
- ReportReason3["OffensiveOrHarassing"] = "offensive_or_harassing";
1940
- ReportReason3["JobExpired"] = "job_expired";
1941
- ReportReason3["AskingMoney"] = "asking_money";
1942
- ReportReason3["FakeJob"] = "fake_job";
1943
- ReportReason3["IncorrectJobDetails"] = "incorrect_job_details";
1944
- ReportReason3["SellingSomething"] = "selling_something";
1945
- ReportReason3["Other"] = "other";
1946
- return ReportReason3;
1947
- })(ReportReason || {});
1948
- var SupportedReportReasons = Object.values(ReportReason);
1949
-
1950
- // src/report/report.schema.ts
1951
- var ReportSchema = object19({
1952
- type: mixed4().oneOf(SupportedResourceTypes).required().label("Type"),
1953
- resourceId: string16().required().label("Resource ID"),
1954
- reason: mixed4().oneOf(SupportedReportReasons).required("Please choose a reason").label("Reason"),
1955
- comment: string16().max(1e3).optional().label("Comment")
1956
- }).label("Report Schema");
1957
-
1958
- // src/user/user.schema.ts
1959
- import { array as array13, number as number9, object as object31, string as string29 } from "yup";
1903
+ // src/marketing/marketing.schema.ts
1904
+ import { array as array10, boolean as boolean11, number as number7, object as object18, string as string15 } from "yup";
1960
1905
 
1961
1906
  // src/user/user.constant.ts
1962
1907
  var UserRole = /* @__PURE__ */ ((UserRole2) => {
@@ -2053,52 +1998,201 @@ var PRIVATE_PROFILE_FIELDS = [
2053
1998
  "additionalInfo"
2054
1999
  ];
2055
2000
 
2001
+ // src/marketing/marketing.schema.ts
2002
+ var tokens = (label) => array10().of(string15().trim().required()).optional().default([]).label(label);
2003
+ var enumFacet = (values, label) => array10().of(string15().oneOf(values).required()).optional().default([]).label(label);
2004
+ var ListFilterSchema = object18({
2005
+ // ── Enum facets (closed vocabularies, chip pickers) ─────────────────────────
2006
+ countries: array10().of(string15().required()).optional().default([]).label("Countries"),
2007
+ roles: enumFacet(SupportedUserRoles, "Roles"),
2008
+ // The user's own current seniority (UserSchema.experienceLevel).
2009
+ experienceLevels: enumFacet(SupportedExperienceLevels, "Experience Levels"),
2010
+ // Levels the user is *targeting* (distinct from their current experienceLevel).
2011
+ targetExperienceLevels: enumFacet(
2012
+ SupportedExperienceLevels,
2013
+ "Target Experience Levels"
2014
+ ),
2015
+ jobSearchUrgencies: enumFacet(SupportedJobSearchUrgencies, "Job Search Urgency"),
2016
+ referralSources: enumFacet(SupportedReferralSources, "Referral Source"),
2017
+ statuses: enumFacet(SupportedUserStatuses, "Account Status"),
2018
+ profileVisibilities: enumFacet(
2019
+ SupportedUserProfileVisibilities,
2020
+ "Profile Visibility"
2021
+ ),
2022
+ // Proficiency held on any skill entry (skills[].proficiencyLevel).
2023
+ skillProficiencyLevels: enumFacet(
2024
+ SupportedProficiencyLevels,
2025
+ "Skill Proficiency"
2026
+ ),
2027
+ // Proficiency held on any language entry (languages[].proficiencyLevel).
2028
+ languageProficiencyLevels: enumFacet(
2029
+ SupportedProficiencyLevels,
2030
+ "Language Proficiency"
2031
+ ),
2032
+ // Mode of any education entry (educations[].studyType).
2033
+ studyTypes: enumFacet(SupportedStudyTypes, "Study Type"),
2034
+ // Platforms the user linked a social account for (socialAccounts[].type).
2035
+ socialAccountTypes: enumFacet(SupportedSocialAccounts, "Social Accounts"),
2036
+ // Currency of the user's salary floor (minSalaryCurrency).
2037
+ salaryCurrencies: enumFacet(SupportedSalaryCurrencies, "Salary Currency"),
2038
+ // ── Free-text token facets (nested profile arrays) ──────────────────────────
2039
+ skills: tokens("Skills"),
2040
+ languages: tokens("Languages"),
2041
+ interests: tokens("Interests"),
2042
+ companies: tokens("Companies"),
2043
+ designations: tokens("Job Titles / Designations"),
2044
+ institutes: tokens("Institutes"),
2045
+ courses: tokens("Courses"),
2046
+ fieldsOfStudy: tokens("Fields of Study"),
2047
+ certifications: tokens("Certifications"),
2048
+ certificationAuthorities: tokens("Certification Authorities"),
2049
+ projects: tokens("Projects"),
2050
+ jobRoles: tokens("Target Roles"),
2051
+ jobLocations: tokens("Preferred Job Locations"),
2052
+ // Companies a recruiter is hiring for (recruiterProfile.hiringFor[].page.name).
2053
+ hiringForCompanies: tokens("Hiring For (Companies)"),
2054
+ // Institutes a coordinator works at (coordinatorProfile.coordinatesAt[].page.name).
2055
+ coordinatesAtInstitutes: tokens("Coordinates At (Institutes)"),
2056
+ // Case-insensitive keyword match against headline + aboutMe.
2057
+ keywords: tokens("Profile Keywords"),
2058
+ // ── Range / boolean facets ──────────────────────────────────────────────────
2059
+ minSalaryFloor: number7().integer().min(0).optional().label("Min Salary \u2265"),
2060
+ minSalaryCeil: number7().integer().min(0).optional().label("Min Salary \u2264"),
2061
+ openToWorkOnly: boolean11().optional().default(false).label("Open to Work Only"),
2062
+ remoteExperienceOnly: boolean11().optional().default(false).label("Has Remote Experience"),
2063
+ hasResumeOnly: boolean11().optional().default(false).label("Has Resume"),
2064
+ onboardingCompletedOnly: boolean11().optional().default(false).label("Onboarding Completed"),
2065
+ emailVerifiedOnly: boolean11().optional().default(false).label("Email Verified Only"),
2066
+ mobileVerifiedOnly: boolean11().optional().default(false).label("Mobile Verified Only")
2067
+ }).label("Audience Filter");
2068
+ var MailingListSchema = object18({
2069
+ name: string15().required().min(1).max(120).label("Name"),
2070
+ description: string15().optional().max(500).label("Description"),
2071
+ filter: ListFilterSchema.default(() => ListFilterSchema.getDefault())
2072
+ }).label("Mailing List");
2073
+ var CampaignSchema = object18({
2074
+ name: string15().required().min(1).max(200).label("Campaign Name"),
2075
+ subject: string15().required().min(1).max(255).label("Subject"),
2076
+ // HTML body; may contain a {{unsubscribe_url}} placeholder.
2077
+ html: string15().required().min(1).label("HTML Body"),
2078
+ text: string15().optional().label("Plain-text Body"),
2079
+ listId: string15().required().label("Mailing List")
2080
+ }).label("Campaign");
2081
+
2082
+ // src/marketing/marketing.constant.ts
2083
+ var CampaignStatus = /* @__PURE__ */ ((CampaignStatus2) => {
2084
+ CampaignStatus2["Draft"] = "draft";
2085
+ CampaignStatus2["Sending"] = "sending";
2086
+ CampaignStatus2["Sent"] = "sent";
2087
+ CampaignStatus2["Failed"] = "failed";
2088
+ return CampaignStatus2;
2089
+ })(CampaignStatus || {});
2090
+ var SupportedCampaignStatuses = Object.values(CampaignStatus);
2091
+
2092
+ // src/pagination/pagination.schema.ts
2093
+ import { number as number8, object as object19, string as string16 } from "yup";
2094
+ var PaginationSchema = object19().shape({
2095
+ page: number8().required().min(1).label("Page").default(1),
2096
+ limit: number8().required().min(1).max(100).label("Limit").default(10),
2097
+ sortBy: string16().notOneOf([""]).optional().label("SortBy"),
2098
+ nextPage: string16().optional().label("Next Page Token"),
2099
+ prevPage: string16().optional().label("Previous Page Token"),
2100
+ sortDirection: string16().oneOf(["asc", "desc"]).optional().label("Sort Direction")
2101
+ });
2102
+
2103
+ // src/pagination/pagination.constant.ts
2104
+ var DefaultPaginatedResponse = {
2105
+ results: [],
2106
+ total: 0,
2107
+ page: 1,
2108
+ limit: 10
2109
+ };
2110
+ var DefaultPaginationOptions = {
2111
+ page: 1,
2112
+ limit: 10
2113
+ };
2114
+
2115
+ // src/report/report.schema.ts
2116
+ import { mixed as mixed4, object as object20, string as string17 } from "yup";
2117
+
2118
+ // src/report/report.constant.ts
2119
+ var ResourceType = /* @__PURE__ */ ((ResourceType3) => {
2120
+ ResourceType3["Job"] = "job";
2121
+ ResourceType3["User"] = "user";
2122
+ ResourceType3["Resume"] = "resume";
2123
+ ResourceType3["Company"] = "company";
2124
+ return ResourceType3;
2125
+ })(ResourceType || {});
2126
+ var SupportedResourceTypes = Object.values(ResourceType);
2127
+ var ReportReason = /* @__PURE__ */ ((ReportReason3) => {
2128
+ ReportReason3["OffensiveOrHarassing"] = "offensive_or_harassing";
2129
+ ReportReason3["JobExpired"] = "job_expired";
2130
+ ReportReason3["AskingMoney"] = "asking_money";
2131
+ ReportReason3["FakeJob"] = "fake_job";
2132
+ ReportReason3["IncorrectJobDetails"] = "incorrect_job_details";
2133
+ ReportReason3["SellingSomething"] = "selling_something";
2134
+ ReportReason3["Other"] = "other";
2135
+ return ReportReason3;
2136
+ })(ReportReason || {});
2137
+ var SupportedReportReasons = Object.values(ReportReason);
2138
+
2139
+ // src/report/report.schema.ts
2140
+ var ReportSchema = object20({
2141
+ type: mixed4().oneOf(SupportedResourceTypes).required().label("Type"),
2142
+ resourceId: string17().required().label("Resource ID"),
2143
+ reason: mixed4().oneOf(SupportedReportReasons).required("Please choose a reason").label("Reason"),
2144
+ comment: string17().max(1e3).optional().label("Comment")
2145
+ }).label("Report Schema");
2146
+
2147
+ // src/user/user.schema.ts
2148
+ import { array as array14, number as number10, object as object32, string as string30 } from "yup";
2149
+
2056
2150
  // src/user/work-experience.schema.ts
2057
- import { boolean as boolean11, object as object20, string as string17 } from "yup";
2058
- var WorkExperienceSchema = object20().shape({
2151
+ import { boolean as boolean12, object as object21, string as string18 } from "yup";
2152
+ var WorkExperienceSchema = object21().shape({
2059
2153
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
2060
- designation: string17().trim().required().label("Designation"),
2154
+ designation: string18().trim().required().label("Designation"),
2061
2155
  duration: DurationSchema({
2062
2156
  format: "YYYY-MM",
2063
2157
  startLabel: "Start Date",
2064
2158
  endLabel: "End Date"
2065
2159
  }).required().label("Duration"),
2066
- description: string17().trim().max(3e3).optional().label("Description"),
2160
+ description: string18().trim().max(3e3).optional().label("Description"),
2067
2161
  location: LocationSchema.required().label("Location"),
2068
- isRemote: boolean11().oneOf([true, false]).default(false).label("Is Remote")
2162
+ isRemote: boolean12().oneOf([true, false]).default(false).label("Is Remote")
2069
2163
  }).noUnknown().strict().label("Work Experience");
2070
2164
 
2071
2165
  // src/user/education.schema.ts
2072
- import { boolean as boolean12, object as object21, string as string18 } from "yup";
2073
- var EducationSchema = object21({
2166
+ import { boolean as boolean13, object as object22, string as string19 } from "yup";
2167
+ var EducationSchema = object22({
2074
2168
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
2075
- course: string18().trim().required().label("Course"),
2076
- fieldOfStudy: string18().trim().required().label("Field of Study"),
2169
+ course: string19().trim().required().label("Course"),
2170
+ fieldOfStudy: string19().trim().required().label("Field of Study"),
2077
2171
  duration: DurationSchema({
2078
2172
  format: "YYYY-MM",
2079
2173
  startLabel: "Start Date",
2080
2174
  endLabel: "End Date"
2081
2175
  }).required().label("Duration"),
2082
- description: string18().trim().max(3e3).optional().label("Description"),
2083
- isDistanceLearning: boolean12().default(false).label("Is Distance Learning"),
2176
+ description: string19().trim().max(3e3).optional().label("Description"),
2177
+ isDistanceLearning: boolean13().default(false).label("Is Distance Learning"),
2084
2178
  location: LocationSchema.required().label("Location"),
2085
- studyType: string18().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2179
+ studyType: string19().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2086
2180
  }).noUnknown().strict().label("Education");
2087
2181
 
2088
2182
  // src/user/user-skill.schema.ts
2089
- import { object as object22, string as string19 } from "yup";
2090
- var UserSkillSchema = object22({
2091
- name: string19().required().label("Name"),
2092
- proficiencyLevel: string19().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
2183
+ import { object as object23, string as string20 } from "yup";
2184
+ var UserSkillSchema = object23({
2185
+ name: string20().required().label("Name"),
2186
+ proficiencyLevel: string20().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
2093
2187
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
2094
2188
  }).noUnknown().strict().label("Skill");
2095
2189
 
2096
2190
  // src/user/project.schema.ts
2097
- import { object as object23, string as string20 } from "yup";
2098
- var UserProjectSchema = object23({
2099
- name: string20().trim().max(50).required().label("Name"),
2100
- url: string20().optional().label("URL"),
2101
- description: string20().trim().min(100).max(3e3).required().label("Description"),
2191
+ import { object as object24, string as string21 } from "yup";
2192
+ var UserProjectSchema = object24({
2193
+ name: string21().trim().max(50).required().label("Name"),
2194
+ url: string21().optional().label("URL"),
2195
+ description: string21().trim().min(100).max(3e3).required().label("Description"),
2102
2196
  duration: DurationSchema({
2103
2197
  format: "YYYY-MM",
2104
2198
  startLabel: "Start Date",
@@ -2107,83 +2201,83 @@ var UserProjectSchema = object23({
2107
2201
  }).noUnknown().strict().label("Project");
2108
2202
 
2109
2203
  // src/user/user-certification.schema.ts
2110
- import { object as object24, string as string21 } from "yup";
2111
- var UserCertificationSchema = object24({
2112
- name: string21().trim().max(100).required().label("Name"),
2204
+ import { object as object25, string as string22 } from "yup";
2205
+ var UserCertificationSchema = object25({
2206
+ name: string22().trim().max(100).required().label("Name"),
2113
2207
  // TODO: Add validation for authority
2114
- authority: string21().trim().max(100).required().label("Authority"),
2115
- licenseNumber: string21().trim().max(50).optional().label("License Number"),
2208
+ authority: string22().trim().max(100).required().label("Authority"),
2209
+ licenseNumber: string22().trim().max(50).optional().label("License Number"),
2116
2210
  duration: DurationSchema({
2117
2211
  format: "YYYY-MM",
2118
2212
  startLabel: "Start Date",
2119
2213
  endLabel: "End Date"
2120
2214
  }).optional().nullable().label("Duration"),
2121
- url: string21().optional().label("URL")
2215
+ url: string22().optional().label("URL")
2122
2216
  }).noUnknown().strict().label("Certification");
2123
2217
 
2124
2218
  // src/user/user-interest.schema.ts
2125
- import { string as string22 } from "yup";
2126
- var UserInterestSchema = string22().trim().required().label("Interest");
2219
+ import { string as string23 } from "yup";
2220
+ var UserInterestSchema = string23().trim().required().label("Interest");
2127
2221
 
2128
2222
  // src/user/user-language.schema.ts
2129
- import { object as object25, string as string23 } from "yup";
2130
- var UserLanguageSchema = object25({
2131
- name: string23().trim().required().label("Name"),
2132
- proficiencyLevel: string23().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
2223
+ import { object as object26, string as string24 } from "yup";
2224
+ var UserLanguageSchema = object26({
2225
+ name: string24().trim().required().label("Name"),
2226
+ proficiencyLevel: string24().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
2133
2227
  }).noUnknown().strict().label("Language");
2134
2228
 
2135
2229
  // src/user/user-additional-info.schema.ts
2136
- import { object as object26, string as string24 } from "yup";
2137
- var UserAdditionalInfoSchema = object26({
2138
- title: string24().trim().max(60).required().label("Title"),
2139
- description: string24().trim().max(1e3).required().label("Description")
2230
+ import { object as object27, string as string25 } from "yup";
2231
+ var UserAdditionalInfoSchema = object27({
2232
+ title: string25().trim().max(60).required().label("Title"),
2233
+ description: string25().trim().max(1e3).required().label("Description")
2140
2234
  }).noUnknown().strict().label("User Additional Info");
2141
2235
 
2142
2236
  // src/user/general-detail.schema.ts
2143
- import { object as object27, string as string25 } from "yup";
2144
- var UserGeneralDetailSchema = object27({
2145
- id: string25().optional().label("ID"),
2146
- name: object27().shape({
2147
- first: string25().trim().max(50).required().label("First Name"),
2148
- last: string25().trim().max(50).optional().label("Last Name")
2237
+ import { object as object28, string as string26 } from "yup";
2238
+ var UserGeneralDetailSchema = object28({
2239
+ id: string26().optional().label("ID"),
2240
+ name: object28().shape({
2241
+ first: string26().trim().max(50).required().label("First Name"),
2242
+ last: string26().trim().max(50).optional().label("Last Name")
2149
2243
  }).required().label("Name"),
2150
- headline: string25().trim().max(200).optional().label("Headline"),
2151
- image: string25().optional().label("Image"),
2152
- aboutMe: string25().trim().max(3e3).optional().label("About Me"),
2153
- email: string25().required().label("Email"),
2154
- mobile: string25().nullable().optional().label("Mobile"),
2155
- emailVerified: string25().nullable().optional().label("Email Verified"),
2156
- mobileVerified: string25().nullable().optional().label("Mobile Verified"),
2157
- experienceLevel: string25().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2244
+ headline: string26().trim().max(200).optional().label("Headline"),
2245
+ image: string26().optional().label("Image"),
2246
+ aboutMe: string26().trim().max(3e3).optional().label("About Me"),
2247
+ email: string26().required().label("Email"),
2248
+ mobile: string26().nullable().optional().label("Mobile"),
2249
+ emailVerified: string26().nullable().optional().label("Email Verified"),
2250
+ mobileVerified: string26().nullable().optional().label("Mobile Verified"),
2251
+ experienceLevel: string26().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2158
2252
  location: LocationSchema.required().label("Location"),
2159
- region: object27().shape({
2160
- country: string25().trim().required().label("Region Country"),
2161
- lang: string25().trim().required().label("Region Language")
2253
+ region: object28().shape({
2254
+ country: string26().trim().required().label("Region Country"),
2255
+ lang: string26().trim().required().label("Region Language")
2162
2256
  }).optional().default(void 0).label("Region"),
2163
- profileVisibility: string25().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2257
+ profileVisibility: string26().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2164
2258
  }).noUnknown().strict().label("General Detail");
2165
2259
 
2166
2260
  // src/user/user-job-preferences.schema.ts
2167
- import { array as array10, boolean as boolean13, date as date2, number as number8, object as object28, string as string26 } from "yup";
2168
- var UserJobPreferencesSchema = object28({
2261
+ import { array as array11, boolean as boolean14, date as date2, number as number9, object as object29, string as string27 } from "yup";
2262
+ var UserJobPreferencesSchema = object29({
2169
2263
  /**
2170
2264
  * Whether the job seeker is openly signalling availability. Surfaces the
2171
2265
  * "Open to work" badge on the public profile and boosts visibility in
2172
2266
  * recruiter search. Defaults to `false` - users must opt in.
2173
2267
  */
2174
- openToWork: boolean13().default(false).label("Open to Work"),
2268
+ openToWork: boolean14().default(false).label("Open to Work"),
2175
2269
  /**
2176
2270
  * How urgently the user is looking for their next job. Drives match scoring
2177
2271
  * and can downgrade the visibility of expired or low-relevance postings for
2178
2272
  * users in `passively_browsing` mode.
2179
2273
  */
2180
- jobSearchUrgency: string26().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2274
+ jobSearchUrgency: string27().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2181
2275
  /**
2182
2276
  * Locations the user wants to work in. Stores the full `LocationSchema`
2183
2277
  * shape (country, city, state, geo, etc.) as returned by the locations
2184
2278
  * autocomplete API.
2185
2279
  */
2186
- jobLocations: array10().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
2280
+ jobLocations: array11().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
2187
2281
  /**
2188
2282
  * Seniority levels the user wants jobs to be matched against. Multi-select
2189
2283
  * (up to 2) for borderline candidates.
@@ -2194,7 +2288,7 @@ var UserJobPreferencesSchema = object28({
2194
2288
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
2195
2289
  * so search/match logic doesn't have to translate between two vocabularies.
2196
2290
  */
2197
- targetExperienceLevels: array10().of(string26().oneOf(SupportedExperienceLevels).required()).min(1, "Pick at least one experience level.").max(2, "You can select at most 2 experience levels.").required().label("Target Experience Levels"),
2291
+ targetExperienceLevels: array11().of(string27().oneOf(SupportedExperienceLevels).required()).min(1, "Pick at least one experience level.").max(2, "You can select at most 2 experience levels.").required().label("Target Experience Levels"),
2198
2292
  /**
2199
2293
  * Specializations the user is searching for - free-form titles.
2200
2294
  *
@@ -2203,19 +2297,19 @@ var UserJobPreferencesSchema = object28({
2203
2297
  * surfaces a curated "Popular Roles" picker for discovery, but the user
2204
2298
  * can ultimately add any title; matching/normalization happens downstream.
2205
2299
  */
2206
- jobRoles: array10().of(string26().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2300
+ jobRoles: array11().of(string27().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2207
2301
  /**
2208
2302
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
2209
2303
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
2210
2304
  * Defaults to 0 ("any salary") rather than being optional - every job-seeker
2211
2305
  * has a floor, even if it's zero.
2212
2306
  */
2213
- minSalary: number8().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2214
- minSalaryCurrency: string26().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2307
+ minSalary: number9().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2308
+ minSalaryCurrency: string27().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2215
2309
  /**
2216
2310
  * Marketing-attribution capture from the final onboarding step.
2217
2311
  */
2218
- referralSource: string26().oneOf(SupportedReferralSources).required().label("Referral Source"),
2312
+ referralSource: string27().oneOf(SupportedReferralSources).required().label("Referral Source"),
2219
2313
  /**
2220
2314
  * Resumes the user has uploaded. Embedded directly on the user document
2221
2315
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -2229,18 +2323,18 @@ var UserJobPreferencesSchema = object28({
2229
2323
  * AI resume-builder flow - onboarding uploads land here, AI-built resumes
2230
2324
  * live in their own collection.
2231
2325
  */
2232
- resumes: array10().of(
2233
- object28({
2326
+ resumes: array11().of(
2327
+ object29({
2234
2328
  // Stable id assigned on upload - used to address a specific entry
2235
2329
  // for delete / set-primary operations without exposing the GCS URL
2236
2330
  // as a route key.
2237
- id: string26().required().label("ID"),
2238
- url: string26().required().label("Resume URL"),
2239
- filename: string26().trim().max(255).optional().label("Filename"),
2240
- sizeBytes: number8().integer().min(0).optional().label("Size (bytes)"),
2241
- mimeType: string26().trim().max(120).optional().label("MIME Type"),
2331
+ id: string27().required().label("ID"),
2332
+ url: string27().required().label("Resume URL"),
2333
+ filename: string27().trim().max(255).optional().label("Filename"),
2334
+ sizeBytes: number9().integer().min(0).optional().label("Size (bytes)"),
2335
+ mimeType: string27().trim().max(120).optional().label("MIME Type"),
2242
2336
  uploadedAt: date2().required().label("Uploaded At"),
2243
- isPrimary: boolean13().default(false).label("Is Primary")
2337
+ isPrimary: boolean14().default(false).label("Is Primary")
2244
2338
  }).noUnknown().strict().label("Resume")
2245
2339
  ).max(5, "You can keep at most 5 resumes on file.").default([]).label("Resumes"),
2246
2340
  /**
@@ -2267,106 +2361,106 @@ var UserJobPreferencesSchema = object28({
2267
2361
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
2268
2362
  * because the user has not confirmed it yet.
2269
2363
  */
2270
- pendingPrefill: object28({
2271
- headline: string26().trim().optional().label("Pending Headline"),
2272
- aboutMe: string26().trim().optional().label("Pending About Me"),
2273
- mobile: string26().trim().optional().label("Pending Mobile"),
2364
+ pendingPrefill: object29({
2365
+ headline: string27().trim().optional().label("Pending Headline"),
2366
+ aboutMe: string27().trim().optional().label("Pending About Me"),
2367
+ mobile: string27().trim().optional().label("Pending Mobile"),
2274
2368
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
2275
- experienceLevel: string26().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2276
- socialAccounts: array10().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2277
- workExperiences: array10().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2278
- educations: array10().of(EducationSchema.required()).optional().label("Pending Educations")
2369
+ experienceLevel: string27().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2370
+ socialAccounts: array11().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2371
+ workExperiences: array11().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2372
+ educations: array11().of(EducationSchema.required()).optional().label("Pending Educations")
2279
2373
  }).nullable().optional().default(void 0).label("Pending Prefill")
2280
2374
  }).noUnknown().strict().label("User Job Preferences Schema");
2281
2375
 
2282
2376
  // src/user/user-recruiter-profile.schema.ts
2283
- import { array as array11, object as object29, string as string27 } from "yup";
2284
- var RecruiterPageLinkSchema = object29({
2377
+ import { array as array12, object as object30, string as string28 } from "yup";
2378
+ var RecruiterPageLinkSchema = object30({
2285
2379
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
2286
- jobTitle: string27().trim().max(100).optional().label("Job Title")
2380
+ jobTitle: string28().trim().max(100).optional().label("Job Title")
2287
2381
  }).noUnknown().strict().label("Recruiter Page Link");
2288
- var UserRecruiterProfileSchema = object29({
2289
- recruiterProfile: object29({
2290
- hiringFor: array11().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2382
+ var UserRecruiterProfileSchema = object30({
2383
+ recruiterProfile: object30({
2384
+ hiringFor: array12().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2291
2385
  }).optional().default(void 0).label("Recruiter Profile")
2292
2386
  }).noUnknown().strict().label("User Recruiter Profile");
2293
2387
 
2294
2388
  // src/user/user-coordinator-profile.schema.ts
2295
- import { array as array12, object as object30, string as string28 } from "yup";
2296
- var CoordinatorPageLinkSchema = object30({
2389
+ import { array as array13, object as object31, string as string29 } from "yup";
2390
+ var CoordinatorPageLinkSchema = object31({
2297
2391
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
2298
- jobTitle: string28().trim().max(100).optional().label("Job Title")
2392
+ jobTitle: string29().trim().max(100).optional().label("Job Title")
2299
2393
  }).noUnknown().strict().label("Coordinator Page Link");
2300
- var UserCoordinatorProfileSchema = object30({
2301
- coordinatorProfile: object30({
2302
- coordinatesAt: array12().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2394
+ var UserCoordinatorProfileSchema = object31({
2395
+ coordinatorProfile: object31({
2396
+ coordinatesAt: array13().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2303
2397
  }).optional().default(void 0).label("Coordinator Profile")
2304
2398
  }).noUnknown().strict().label("User Coordinator Profile");
2305
2399
 
2306
2400
  // src/user/user.schema.ts
2307
- var UserSchema = object31({
2401
+ var UserSchema = object32({
2308
2402
  /**
2309
2403
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
2310
2404
  */
2311
- authAccountId: string29().required().label("Auth Account ID"),
2405
+ authAccountId: string30().required().label("Auth Account ID"),
2312
2406
  /**
2313
2407
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
2314
2408
  */
2315
- socialAccounts: array13().of(SocialAccountSchema).default([]).label("Social Accounts"),
2409
+ socialAccounts: array14().of(SocialAccountSchema).default([]).label("Social Accounts"),
2316
2410
  /**
2317
2411
  * Work experience information about the user
2318
2412
  */
2319
- workExperiences: array13().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
2413
+ workExperiences: array14().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
2320
2414
  /**
2321
2415
  * Education information about the user
2322
2416
  */
2323
- educations: array13().of(EducationSchema).required().default([]).label("Educations"),
2417
+ educations: array14().of(EducationSchema).required().default([]).label("Educations"),
2324
2418
  /**
2325
2419
  * Skills information about the user
2326
2420
  */
2327
- skills: array13().of(UserSkillSchema).required().default([]).label("Skills"),
2421
+ skills: array14().of(UserSkillSchema).required().default([]).label("Skills"),
2328
2422
  /**
2329
2423
  * Projects information about the user
2330
2424
  */
2331
- projects: array13().of(UserProjectSchema).default([]).label("Projects"),
2425
+ projects: array14().of(UserProjectSchema).default([]).label("Projects"),
2332
2426
  /**
2333
2427
  * Certifications information about the user
2334
2428
  */
2335
- certifications: array13().of(UserCertificationSchema).default([]).label("Certifications"),
2429
+ certifications: array14().of(UserCertificationSchema).default([]).label("Certifications"),
2336
2430
  /**
2337
2431
  * Interests information about the user.
2338
2432
  */
2339
- interests: array13().of(UserInterestSchema).optional().default([]).label("Interests"),
2433
+ interests: array14().of(UserInterestSchema).optional().default([]).label("Interests"),
2340
2434
  /**
2341
2435
  * Languages information about the user
2342
2436
  */
2343
- languages: array13().of(UserLanguageSchema).required().default([]).label("Languages"),
2437
+ languages: array14().of(UserLanguageSchema).required().default([]).label("Languages"),
2344
2438
  /**
2345
2439
  * Additional information about the user
2346
2440
  */
2347
- additionalInfo: array13().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2441
+ additionalInfo: array14().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2348
2442
  /**
2349
2443
  * Status of the user account
2350
2444
  */
2351
- status: string29().oneOf(SupportedUserStatuses).required().label("Status"),
2445
+ status: string30().oneOf(SupportedUserStatuses).required().label("Status"),
2352
2446
  /**
2353
2447
  * Roles assigned to the user
2354
2448
  */
2355
- roles: array13().of(string29().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2449
+ roles: array14().of(string30().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2356
2450
  /**
2357
2451
  * Vector embedding of the user's profile for semantic/hybrid search.
2358
2452
  * Generated from a structured summary of skills, experience, education, etc.
2359
2453
  * Only generated for public profiles with sufficient completeness (≥60%).
2360
2454
  */
2361
- embedding: object31({
2362
- vector: array13(number9().required()).optional().label("Embedding vector"),
2363
- model: string29().optional().label("Embedding model")
2455
+ embedding: object32({
2456
+ vector: array14(number10().required()).optional().label("Embedding vector"),
2457
+ model: string30().optional().label("Embedding model")
2364
2458
  }).nullable().optional().label("Embedding")
2365
2459
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
2366
2460
 
2367
2461
  // src/user/user-completeness.schema.ts
2368
- import { object as object32 } from "yup";
2369
- var UserCompletenessSchema = object32({
2462
+ import { object as object33 } from "yup";
2463
+ var UserCompletenessSchema = object33({
2370
2464
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
2371
2465
  // Optional
2372
2466
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -2390,6 +2484,8 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2390
2484
  export {
2391
2485
  AnswerChoiceType,
2392
2486
  ApplicationReceivePreference,
2487
+ CampaignSchema,
2488
+ CampaignStatus,
2393
2489
  ChoiceQuestionSchema,
2394
2490
  Common,
2395
2491
  CompensationType,
@@ -2426,9 +2522,11 @@ export {
2426
2522
  JobSearchUrgency,
2427
2523
  JobStatus,
2428
2524
  JobSubCategory,
2525
+ ListFilterSchema,
2429
2526
  LocationSchema,
2430
2527
  MIN_SALARY_LOWER_BOUND,
2431
2528
  MIN_SALARY_UPPER_BOUND,
2529
+ MailingListSchema,
2432
2530
  PREFILL_MIRRORED_KEYS,
2433
2531
  PRIVATE_PROFILE_FIELDS,
2434
2532
  PageSchema,
@@ -2455,6 +2553,7 @@ export {
2455
2553
  StudyType,
2456
2554
  SupportedAnswerChoiceTypes,
2457
2555
  SupportedApplicationReceivePreferences,
2556
+ SupportedCampaignStatuses,
2458
2557
  SupportedCompensationTypes,
2459
2558
  SupportedContactTypes,
2460
2559
  SupportedEducationLevels,