@thejob/schema 2.1.0 → 2.1.2

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 CHANGED
@@ -54,6 +54,10 @@ __export(index_exports, {
54
54
  EmployeeCount: () => EmployeeCount,
55
55
  EmploymentType: () => EmploymentType,
56
56
  ExperienceLevel: () => ExperienceLevel,
57
+ FEEDBACK_MESSAGE_MAX: () => FEEDBACK_MESSAGE_MAX,
58
+ FeedbackSchema: () => FeedbackSchema,
59
+ FeedbackStatus: () => FeedbackStatus,
60
+ FeedbackType: () => FeedbackType,
57
61
  GeneraDetailFields: () => GeneraDetailFields,
58
62
  GroupManagedBy: () => GroupManagedBy,
59
63
  GroupMembershipSchema: () => GroupMembershipSchema,
@@ -64,6 +68,7 @@ __export(index_exports, {
64
68
  GroupVisibility: () => GroupVisibility,
65
69
  InputQuestionSchema: () => InputQuestionSchema,
66
70
  JOB_TAXONOMY: () => JOB_TAXONOMY,
71
+ JobAlertFrequency: () => JobAlertFrequency,
67
72
  JobCategory: () => JobCategory,
68
73
  JobIndustry: () => JobIndustry,
69
74
  JobSchema: () => JobSchema,
@@ -108,6 +113,9 @@ __export(index_exports, {
108
113
  SupportedEmployeeCounts: () => SupportedEmployeeCounts,
109
114
  SupportedEmploymentTypes: () => SupportedEmploymentTypes,
110
115
  SupportedExperienceLevels: () => SupportedExperienceLevels,
116
+ SupportedFeedbackStatuses: () => SupportedFeedbackStatuses,
117
+ SupportedFeedbackTypes: () => SupportedFeedbackTypes,
118
+ SupportedJobAlertFrequencies: () => SupportedJobAlertFrequencies,
111
119
  SupportedJobCategories: () => SupportedJobCategories,
112
120
  SupportedJobIndustries: () => SupportedJobIndustries,
113
121
  SupportedJobSearchUrgencies: () => SupportedJobSearchUrgencies,
@@ -2140,6 +2148,13 @@ var ReferralSource = /* @__PURE__ */ ((ReferralSource2) => {
2140
2148
  return ReferralSource2;
2141
2149
  })(ReferralSource || {});
2142
2150
  var SupportedReferralSources = Object.values(ReferralSource);
2151
+ var JobAlertFrequency = /* @__PURE__ */ ((JobAlertFrequency2) => {
2152
+ JobAlertFrequency2["Off"] = "off";
2153
+ JobAlertFrequency2["Daily"] = "daily";
2154
+ JobAlertFrequency2["Weekly"] = "weekly";
2155
+ return JobAlertFrequency2;
2156
+ })(JobAlertFrequency || {});
2157
+ var SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
2143
2158
  var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
2144
2159
  var MIN_SALARY_LOWER_BOUND = 0;
2145
2160
  var MIN_SALARY_UPPER_BOUND = 1e6;
@@ -2306,55 +2321,87 @@ var ReportSchema = (0, import_yup22.object)({
2306
2321
  comment: (0, import_yup22.string)().max(1e3).optional().label("Comment")
2307
2322
  }).label("Report Schema");
2308
2323
 
2324
+ // src/feedback/feedback.schema.ts
2325
+ var import_yup23 = require("yup");
2326
+
2327
+ // src/feedback/feedback.constant.ts
2328
+ var FeedbackType = /* @__PURE__ */ ((FeedbackType3) => {
2329
+ FeedbackType3["Bug"] = "bug";
2330
+ FeedbackType3["Feature"] = "feature";
2331
+ FeedbackType3["Suggestion"] = "suggestion";
2332
+ FeedbackType3["Report"] = "report";
2333
+ FeedbackType3["Other"] = "other";
2334
+ return FeedbackType3;
2335
+ })(FeedbackType || {});
2336
+ var SupportedFeedbackTypes = Object.values(FeedbackType);
2337
+ var FeedbackStatus = /* @__PURE__ */ ((FeedbackStatus3) => {
2338
+ FeedbackStatus3["New"] = "new";
2339
+ FeedbackStatus3["InReview"] = "in_review";
2340
+ FeedbackStatus3["Resolved"] = "resolved";
2341
+ FeedbackStatus3["Archived"] = "archived";
2342
+ return FeedbackStatus3;
2343
+ })(FeedbackStatus || {});
2344
+ var SupportedFeedbackStatuses = Object.values(FeedbackStatus);
2345
+ var FEEDBACK_MESSAGE_MAX = 4e3;
2346
+
2347
+ // src/feedback/feedback.schema.ts
2348
+ var FeedbackSchema = (0, import_yup23.object)({
2349
+ type: (0, import_yup23.mixed)().oneOf(SupportedFeedbackTypes).required().label("Type"),
2350
+ message: (0, import_yup23.string)().trim().required("Please enter a message").max(FEEDBACK_MESSAGE_MAX).label("Message"),
2351
+ email: (0, import_yup23.string)().email().optional().label("Email"),
2352
+ pageUrl: (0, import_yup23.string)().optional().label("Page URL"),
2353
+ status: (0, import_yup23.mixed)().oneOf(SupportedFeedbackStatuses).optional().label("Status")
2354
+ }).label("Feedback Schema");
2355
+
2309
2356
  // src/user/user.schema.ts
2310
- var import_yup35 = require("yup");
2357
+ var import_yup36 = require("yup");
2311
2358
 
2312
2359
  // src/user/work-experience.schema.ts
2313
- var import_yup23 = require("yup");
2314
- var WorkExperienceSchema = (0, import_yup23.object)().shape({
2360
+ var import_yup24 = require("yup");
2361
+ var WorkExperienceSchema = (0, import_yup24.object)().shape({
2315
2362
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
2316
- designation: (0, import_yup23.string)().trim().required().label("Designation"),
2363
+ designation: (0, import_yup24.string)().trim().required().label("Designation"),
2317
2364
  duration: DurationSchema({
2318
2365
  format: "YYYY-MM",
2319
2366
  startLabel: "Start Date",
2320
2367
  endLabel: "End Date"
2321
2368
  }).required().label("Duration"),
2322
- description: (0, import_yup23.string)().trim().max(3e3).optional().label("Description"),
2369
+ description: (0, import_yup24.string)().trim().max(3e3).optional().label("Description"),
2323
2370
  location: LocationSchema.required().label("Location"),
2324
- isRemote: (0, import_yup23.boolean)().oneOf([true, false]).default(false).label("Is Remote")
2371
+ isRemote: (0, import_yup24.boolean)().oneOf([true, false]).default(false).label("Is Remote")
2325
2372
  }).noUnknown().strict().label("Work Experience");
2326
2373
 
2327
2374
  // src/user/education.schema.ts
2328
- var import_yup24 = require("yup");
2329
- var EducationSchema = (0, import_yup24.object)({
2375
+ var import_yup25 = require("yup");
2376
+ var EducationSchema = (0, import_yup25.object)({
2330
2377
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
2331
- course: (0, import_yup24.string)().trim().required().label("Course"),
2332
- fieldOfStudy: (0, import_yup24.string)().trim().required().label("Field of Study"),
2378
+ course: (0, import_yup25.string)().trim().required().label("Course"),
2379
+ fieldOfStudy: (0, import_yup25.string)().trim().required().label("Field of Study"),
2333
2380
  duration: DurationSchema({
2334
2381
  format: "YYYY-MM",
2335
2382
  startLabel: "Start Date",
2336
2383
  endLabel: "End Date"
2337
2384
  }).required().label("Duration"),
2338
- description: (0, import_yup24.string)().trim().max(3e3).optional().label("Description"),
2339
- isDistanceLearning: (0, import_yup24.boolean)().default(false).label("Is Distance Learning"),
2385
+ description: (0, import_yup25.string)().trim().max(3e3).optional().label("Description"),
2386
+ isDistanceLearning: (0, import_yup25.boolean)().default(false).label("Is Distance Learning"),
2340
2387
  location: LocationSchema.required().label("Location"),
2341
- studyType: (0, import_yup24.string)().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2388
+ studyType: (0, import_yup25.string)().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2342
2389
  }).noUnknown().strict().label("Education");
2343
2390
 
2344
2391
  // src/user/user-skill.schema.ts
2345
- var import_yup25 = require("yup");
2346
- var UserSkillSchema = (0, import_yup25.object)({
2347
- name: (0, import_yup25.string)().required().label("Name"),
2348
- proficiencyLevel: (0, import_yup25.string)().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
2392
+ var import_yup26 = require("yup");
2393
+ var UserSkillSchema = (0, import_yup26.object)({
2394
+ name: (0, import_yup26.string)().required().label("Name"),
2395
+ proficiencyLevel: (0, import_yup26.string)().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
2349
2396
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
2350
2397
  }).noUnknown().strict().label("Skill");
2351
2398
 
2352
2399
  // src/user/project.schema.ts
2353
- var import_yup26 = require("yup");
2354
- var UserProjectSchema = (0, import_yup26.object)({
2355
- name: (0, import_yup26.string)().trim().max(50).required().label("Name"),
2356
- url: (0, import_yup26.string)().optional().label("URL"),
2357
- description: (0, import_yup26.string)().trim().min(100).max(3e3).required().label("Description"),
2400
+ var import_yup27 = require("yup");
2401
+ var UserProjectSchema = (0, import_yup27.object)({
2402
+ name: (0, import_yup27.string)().trim().max(50).required().label("Name"),
2403
+ url: (0, import_yup27.string)().optional().label("URL"),
2404
+ description: (0, import_yup27.string)().trim().min(100).max(3e3).required().label("Description"),
2358
2405
  duration: DurationSchema({
2359
2406
  format: "YYYY-MM",
2360
2407
  startLabel: "Start Date",
@@ -2363,83 +2410,83 @@ var UserProjectSchema = (0, import_yup26.object)({
2363
2410
  }).noUnknown().strict().label("Project");
2364
2411
 
2365
2412
  // src/user/user-certification.schema.ts
2366
- var import_yup27 = require("yup");
2367
- var UserCertificationSchema = (0, import_yup27.object)({
2368
- name: (0, import_yup27.string)().trim().max(100).required().label("Name"),
2413
+ var import_yup28 = require("yup");
2414
+ var UserCertificationSchema = (0, import_yup28.object)({
2415
+ name: (0, import_yup28.string)().trim().max(100).required().label("Name"),
2369
2416
  // TODO: Add validation for authority
2370
- authority: (0, import_yup27.string)().trim().max(100).required().label("Authority"),
2371
- licenseNumber: (0, import_yup27.string)().trim().max(50).optional().label("License Number"),
2417
+ authority: (0, import_yup28.string)().trim().max(100).required().label("Authority"),
2418
+ licenseNumber: (0, import_yup28.string)().trim().max(50).optional().label("License Number"),
2372
2419
  duration: DurationSchema({
2373
2420
  format: "YYYY-MM",
2374
2421
  startLabel: "Start Date",
2375
2422
  endLabel: "End Date"
2376
2423
  }).optional().nullable().label("Duration"),
2377
- url: (0, import_yup27.string)().optional().label("URL")
2424
+ url: (0, import_yup28.string)().optional().label("URL")
2378
2425
  }).noUnknown().strict().label("Certification");
2379
2426
 
2380
2427
  // src/user/user-interest.schema.ts
2381
- var import_yup28 = require("yup");
2382
- var UserInterestSchema = (0, import_yup28.string)().trim().required().label("Interest");
2428
+ var import_yup29 = require("yup");
2429
+ var UserInterestSchema = (0, import_yup29.string)().trim().required().label("Interest");
2383
2430
 
2384
2431
  // src/user/user-language.schema.ts
2385
- var import_yup29 = require("yup");
2386
- var UserLanguageSchema = (0, import_yup29.object)({
2387
- name: (0, import_yup29.string)().trim().required().label("Name"),
2388
- proficiencyLevel: (0, import_yup29.string)().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
2432
+ var import_yup30 = require("yup");
2433
+ var UserLanguageSchema = (0, import_yup30.object)({
2434
+ name: (0, import_yup30.string)().trim().required().label("Name"),
2435
+ proficiencyLevel: (0, import_yup30.string)().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
2389
2436
  }).noUnknown().strict().label("Language");
2390
2437
 
2391
2438
  // src/user/user-additional-info.schema.ts
2392
- var import_yup30 = require("yup");
2393
- var UserAdditionalInfoSchema = (0, import_yup30.object)({
2394
- title: (0, import_yup30.string)().trim().max(60).required().label("Title"),
2395
- description: (0, import_yup30.string)().trim().max(1e3).required().label("Description")
2439
+ var import_yup31 = require("yup");
2440
+ var UserAdditionalInfoSchema = (0, import_yup31.object)({
2441
+ title: (0, import_yup31.string)().trim().max(60).required().label("Title"),
2442
+ description: (0, import_yup31.string)().trim().max(1e3).required().label("Description")
2396
2443
  }).noUnknown().strict().label("User Additional Info");
2397
2444
 
2398
2445
  // src/user/general-detail.schema.ts
2399
- var import_yup31 = require("yup");
2400
- var UserGeneralDetailSchema = (0, import_yup31.object)({
2401
- id: (0, import_yup31.string)().optional().label("ID"),
2402
- name: (0, import_yup31.object)().shape({
2403
- first: (0, import_yup31.string)().trim().max(50).required().label("First Name"),
2404
- last: (0, import_yup31.string)().trim().max(50).optional().label("Last Name")
2446
+ var import_yup32 = require("yup");
2447
+ var UserGeneralDetailSchema = (0, import_yup32.object)({
2448
+ id: (0, import_yup32.string)().optional().label("ID"),
2449
+ name: (0, import_yup32.object)().shape({
2450
+ first: (0, import_yup32.string)().trim().max(50).required().label("First Name"),
2451
+ last: (0, import_yup32.string)().trim().max(50).optional().label("Last Name")
2405
2452
  }).required().label("Name"),
2406
- headline: (0, import_yup31.string)().trim().max(200).optional().label("Headline"),
2407
- image: (0, import_yup31.string)().optional().label("Image"),
2408
- aboutMe: (0, import_yup31.string)().trim().max(3e3).optional().label("About Me"),
2409
- email: (0, import_yup31.string)().required().label("Email"),
2410
- mobile: (0, import_yup31.string)().nullable().optional().label("Mobile"),
2411
- emailVerified: (0, import_yup31.string)().nullable().optional().label("Email Verified"),
2412
- mobileVerified: (0, import_yup31.string)().nullable().optional().label("Mobile Verified"),
2413
- experienceLevel: (0, import_yup31.string)().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2453
+ headline: (0, import_yup32.string)().trim().max(200).optional().label("Headline"),
2454
+ image: (0, import_yup32.string)().optional().label("Image"),
2455
+ aboutMe: (0, import_yup32.string)().trim().max(3e3).optional().label("About Me"),
2456
+ email: (0, import_yup32.string)().required().label("Email"),
2457
+ mobile: (0, import_yup32.string)().nullable().optional().label("Mobile"),
2458
+ emailVerified: (0, import_yup32.string)().nullable().optional().label("Email Verified"),
2459
+ mobileVerified: (0, import_yup32.string)().nullable().optional().label("Mobile Verified"),
2460
+ experienceLevel: (0, import_yup32.string)().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2414
2461
  location: LocationSchema.required().label("Location"),
2415
- region: (0, import_yup31.object)().shape({
2416
- country: (0, import_yup31.string)().trim().required().label("Region Country"),
2417
- lang: (0, import_yup31.string)().trim().required().label("Region Language")
2462
+ region: (0, import_yup32.object)().shape({
2463
+ country: (0, import_yup32.string)().trim().required().label("Region Country"),
2464
+ lang: (0, import_yup32.string)().trim().required().label("Region Language")
2418
2465
  }).optional().default(void 0).label("Region"),
2419
- profileVisibility: (0, import_yup31.string)().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2466
+ profileVisibility: (0, import_yup32.string)().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2420
2467
  }).noUnknown().strict().label("General Detail");
2421
2468
 
2422
2469
  // src/user/user-job-preferences.schema.ts
2423
- var import_yup32 = require("yup");
2424
- var UserJobPreferencesSchema = (0, import_yup32.object)({
2470
+ var import_yup33 = require("yup");
2471
+ var UserJobPreferencesSchema = (0, import_yup33.object)({
2425
2472
  /**
2426
2473
  * Whether the job seeker is openly signalling availability. Surfaces the
2427
2474
  * "Open to work" badge on the public profile and boosts visibility in
2428
2475
  * recruiter search. Defaults to `false` - users must opt in.
2429
2476
  */
2430
- openToWork: (0, import_yup32.boolean)().default(false).label("Open to Work"),
2477
+ openToWork: (0, import_yup33.boolean)().default(false).label("Open to Work"),
2431
2478
  /**
2432
2479
  * How urgently the user is looking for their next job. Drives match scoring
2433
2480
  * and can downgrade the visibility of expired or low-relevance postings for
2434
2481
  * users in `passively_browsing` mode.
2435
2482
  */
2436
- jobSearchUrgency: (0, import_yup32.string)().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2483
+ jobSearchUrgency: (0, import_yup33.string)().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2437
2484
  /**
2438
2485
  * Locations the user wants to work in. Stores the full `LocationSchema`
2439
2486
  * shape (country, city, state, geo, etc.) as returned by the locations
2440
2487
  * autocomplete API.
2441
2488
  */
2442
- jobLocations: (0, import_yup32.array)().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
2489
+ jobLocations: (0, import_yup33.array)().of(LocationSchema.required().label("Job Location")).min(1, "Pick at least one preferred location.").required().label("Job Locations"),
2443
2490
  /**
2444
2491
  * Seniority levels the user wants jobs to be matched against. Multi-select
2445
2492
  * (up to 2) for borderline candidates.
@@ -2450,7 +2497,7 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2450
2497
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
2451
2498
  * so search/match logic doesn't have to translate between two vocabularies.
2452
2499
  */
2453
- targetExperienceLevels: (0, import_yup32.array)().of((0, import_yup32.string)().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"),
2500
+ targetExperienceLevels: (0, import_yup33.array)().of((0, import_yup33.string)().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"),
2454
2501
  /**
2455
2502
  * Specializations the user is searching for - free-form titles.
2456
2503
  *
@@ -2459,19 +2506,19 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2459
2506
  * surfaces a curated "Popular Roles" picker for discovery, but the user
2460
2507
  * can ultimately add any title; matching/normalization happens downstream.
2461
2508
  */
2462
- jobRoles: (0, import_yup32.array)().of((0, import_yup32.string)().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2509
+ jobRoles: (0, import_yup33.array)().of((0, import_yup33.string)().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2463
2510
  /**
2464
2511
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
2465
2512
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
2466
2513
  * Defaults to 0 ("any salary") rather than being optional - every job-seeker
2467
2514
  * has a floor, even if it's zero.
2468
2515
  */
2469
- minSalary: (0, import_yup32.number)().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2470
- minSalaryCurrency: (0, import_yup32.string)().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2516
+ minSalary: (0, import_yup33.number)().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2517
+ minSalaryCurrency: (0, import_yup33.string)().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2471
2518
  /**
2472
2519
  * Marketing-attribution capture from the final onboarding step.
2473
2520
  */
2474
- referralSource: (0, import_yup32.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
2521
+ referralSource: (0, import_yup33.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
2475
2522
  /**
2476
2523
  * Resumes the user has uploaded. Embedded directly on the user document
2477
2524
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -2485,25 +2532,25 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2485
2532
  * AI resume-builder flow - onboarding uploads land here, AI-built resumes
2486
2533
  * live in their own collection.
2487
2534
  */
2488
- resumes: (0, import_yup32.array)().of(
2489
- (0, import_yup32.object)({
2535
+ resumes: (0, import_yup33.array)().of(
2536
+ (0, import_yup33.object)({
2490
2537
  // Stable id assigned on upload - used to address a specific entry
2491
2538
  // for delete / set-primary operations without exposing the GCS URL
2492
2539
  // as a route key.
2493
- id: (0, import_yup32.string)().required().label("ID"),
2494
- url: (0, import_yup32.string)().required().label("Resume URL"),
2495
- filename: (0, import_yup32.string)().trim().max(255).optional().label("Filename"),
2496
- sizeBytes: (0, import_yup32.number)().integer().min(0).optional().label("Size (bytes)"),
2497
- mimeType: (0, import_yup32.string)().trim().max(120).optional().label("MIME Type"),
2498
- uploadedAt: (0, import_yup32.date)().required().label("Uploaded At"),
2499
- isPrimary: (0, import_yup32.boolean)().default(false).label("Is Primary")
2540
+ id: (0, import_yup33.string)().required().label("ID"),
2541
+ url: (0, import_yup33.string)().required().label("Resume URL"),
2542
+ filename: (0, import_yup33.string)().trim().max(255).optional().label("Filename"),
2543
+ sizeBytes: (0, import_yup33.number)().integer().min(0).optional().label("Size (bytes)"),
2544
+ mimeType: (0, import_yup33.string)().trim().max(120).optional().label("MIME Type"),
2545
+ uploadedAt: (0, import_yup33.date)().required().label("Uploaded At"),
2546
+ isPrimary: (0, import_yup33.boolean)().default(false).label("Is Primary")
2500
2547
  }).noUnknown().strict().label("Resume")
2501
2548
  ).max(5, "You can keep at most 5 resumes on file.").default([]).label("Resumes"),
2502
2549
  /**
2503
2550
  * Set when the user finishes the wizard's last step. Acts as the gate the
2504
2551
  * onboarding hook checks to redirect users who haven't completed setup.
2505
2552
  */
2506
- onboardingCompletedAt: (0, import_yup32.date)().nullable().optional().label("Onboarding Completed At"),
2553
+ onboardingCompletedAt: (0, import_yup33.date)().nullable().optional().label("Onboarding Completed At"),
2507
2554
  /**
2508
2555
  * Parser-suggested values for wizard fields, written by the resume-upload
2509
2556
  * flow. Every parser-derived field lands here - including profile-shaped
@@ -2523,92 +2570,92 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2523
2570
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
2524
2571
  * because the user has not confirmed it yet.
2525
2572
  */
2526
- pendingPrefill: (0, import_yup32.object)({
2527
- headline: (0, import_yup32.string)().trim().optional().label("Pending Headline"),
2528
- aboutMe: (0, import_yup32.string)().trim().optional().label("Pending About Me"),
2529
- mobile: (0, import_yup32.string)().trim().optional().label("Pending Mobile"),
2573
+ pendingPrefill: (0, import_yup33.object)({
2574
+ headline: (0, import_yup33.string)().trim().optional().label("Pending Headline"),
2575
+ aboutMe: (0, import_yup33.string)().trim().optional().label("Pending About Me"),
2576
+ mobile: (0, import_yup33.string)().trim().optional().label("Pending Mobile"),
2530
2577
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
2531
- experienceLevel: (0, import_yup32.string)().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2532
- socialAccounts: (0, import_yup32.array)().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2533
- workExperiences: (0, import_yup32.array)().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2534
- educations: (0, import_yup32.array)().of(EducationSchema.required()).optional().label("Pending Educations")
2578
+ experienceLevel: (0, import_yup33.string)().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2579
+ socialAccounts: (0, import_yup33.array)().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2580
+ workExperiences: (0, import_yup33.array)().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2581
+ educations: (0, import_yup33.array)().of(EducationSchema.required()).optional().label("Pending Educations")
2535
2582
  }).nullable().optional().default(void 0).label("Pending Prefill")
2536
2583
  }).noUnknown().strict().label("User Job Preferences Schema");
2537
2584
 
2538
2585
  // src/user/user-recruiter-profile.schema.ts
2539
- var import_yup33 = require("yup");
2540
- var RecruiterPageLinkSchema = (0, import_yup33.object)({
2586
+ var import_yup34 = require("yup");
2587
+ var RecruiterPageLinkSchema = (0, import_yup34.object)({
2541
2588
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
2542
- jobTitle: (0, import_yup33.string)().trim().max(100).optional().label("Job Title")
2589
+ jobTitle: (0, import_yup34.string)().trim().max(100).optional().label("Job Title")
2543
2590
  }).noUnknown().strict().label("Recruiter Page Link");
2544
- var UserRecruiterProfileSchema = (0, import_yup33.object)({
2545
- recruiterProfile: (0, import_yup33.object)({
2546
- hiringFor: (0, import_yup33.array)().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2591
+ var UserRecruiterProfileSchema = (0, import_yup34.object)({
2592
+ recruiterProfile: (0, import_yup34.object)({
2593
+ hiringFor: (0, import_yup34.array)().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2547
2594
  }).optional().default(void 0).label("Recruiter Profile")
2548
2595
  }).noUnknown().strict().label("User Recruiter Profile");
2549
2596
 
2550
2597
  // src/user/user-coordinator-profile.schema.ts
2551
- var import_yup34 = require("yup");
2552
- var CoordinatorPageLinkSchema = (0, import_yup34.object)({
2598
+ var import_yup35 = require("yup");
2599
+ var CoordinatorPageLinkSchema = (0, import_yup35.object)({
2553
2600
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
2554
- jobTitle: (0, import_yup34.string)().trim().max(100).optional().label("Job Title")
2601
+ jobTitle: (0, import_yup35.string)().trim().max(100).optional().label("Job Title")
2555
2602
  }).noUnknown().strict().label("Coordinator Page Link");
2556
- var UserCoordinatorProfileSchema = (0, import_yup34.object)({
2557
- coordinatorProfile: (0, import_yup34.object)({
2558
- coordinatesAt: (0, import_yup34.array)().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2603
+ var UserCoordinatorProfileSchema = (0, import_yup35.object)({
2604
+ coordinatorProfile: (0, import_yup35.object)({
2605
+ coordinatesAt: (0, import_yup35.array)().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2559
2606
  }).optional().default(void 0).label("Coordinator Profile")
2560
2607
  }).noUnknown().strict().label("User Coordinator Profile");
2561
2608
 
2562
2609
  // src/user/user.schema.ts
2563
- var UserSchema = (0, import_yup35.object)({
2610
+ var UserSchema = (0, import_yup36.object)({
2564
2611
  /**
2565
2612
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
2566
2613
  */
2567
- authAccountId: (0, import_yup35.string)().required().label("Auth Account ID"),
2614
+ authAccountId: (0, import_yup36.string)().required().label("Auth Account ID"),
2568
2615
  /**
2569
2616
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
2570
2617
  */
2571
- socialAccounts: (0, import_yup35.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
2618
+ socialAccounts: (0, import_yup36.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
2572
2619
  /**
2573
2620
  * Work experience information about the user
2574
2621
  */
2575
- workExperiences: (0, import_yup35.array)().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
2622
+ workExperiences: (0, import_yup36.array)().of(WorkExperienceSchema).required().default([]).label("Work Experiences"),
2576
2623
  /**
2577
2624
  * Education information about the user
2578
2625
  */
2579
- educations: (0, import_yup35.array)().of(EducationSchema).required().default([]).label("Educations"),
2626
+ educations: (0, import_yup36.array)().of(EducationSchema).required().default([]).label("Educations"),
2580
2627
  /**
2581
2628
  * Skills information about the user
2582
2629
  */
2583
- skills: (0, import_yup35.array)().of(UserSkillSchema).required().default([]).label("Skills"),
2630
+ skills: (0, import_yup36.array)().of(UserSkillSchema).required().default([]).label("Skills"),
2584
2631
  /**
2585
2632
  * Projects information about the user
2586
2633
  */
2587
- projects: (0, import_yup35.array)().of(UserProjectSchema).default([]).label("Projects"),
2634
+ projects: (0, import_yup36.array)().of(UserProjectSchema).default([]).label("Projects"),
2588
2635
  /**
2589
2636
  * Certifications information about the user
2590
2637
  */
2591
- certifications: (0, import_yup35.array)().of(UserCertificationSchema).default([]).label("Certifications"),
2638
+ certifications: (0, import_yup36.array)().of(UserCertificationSchema).default([]).label("Certifications"),
2592
2639
  /**
2593
2640
  * Interests information about the user.
2594
2641
  */
2595
- interests: (0, import_yup35.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
2642
+ interests: (0, import_yup36.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
2596
2643
  /**
2597
2644
  * Languages information about the user
2598
2645
  */
2599
- languages: (0, import_yup35.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
2646
+ languages: (0, import_yup36.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
2600
2647
  /**
2601
2648
  * Additional information about the user
2602
2649
  */
2603
- additionalInfo: (0, import_yup35.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2650
+ additionalInfo: (0, import_yup36.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2604
2651
  /**
2605
2652
  * Status of the user account
2606
2653
  */
2607
- status: (0, import_yup35.string)().oneOf(SupportedUserStatuses).required().label("Status"),
2654
+ status: (0, import_yup36.string)().oneOf(SupportedUserStatuses).required().label("Status"),
2608
2655
  /**
2609
2656
  * Roles assigned to the user
2610
2657
  */
2611
- roles: (0, import_yup35.array)().of((0, import_yup35.string)().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2658
+ roles: (0, import_yup36.array)().of((0, import_yup36.string)().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2612
2659
  /**
2613
2660
  * Explicit consent to receive marketing email (newsletters, job alerts by
2614
2661
  * broadcast, product updates). Marketing sends are HARD-GATED on
@@ -2620,27 +2667,33 @@ var UserSchema = (0, import_yup35.object)({
2620
2667
  * unsubscribe sets `subscribed=false` so consent and the email-service
2621
2668
  * suppression list stay consistent. Defaults to NOT subscribed (opt-in).
2622
2669
  */
2623
- marketingConsent: (0, import_yup35.object)({
2624
- subscribed: (0, import_yup35.boolean)().default(false).label("Subscribed to marketing email"),
2670
+ marketingConsent: (0, import_yup36.object)({
2671
+ subscribed: (0, import_yup36.boolean)().default(false).label("Subscribed to marketing email"),
2625
2672
  /** Epoch ms of the last consent change (opt-in or opt-out). */
2626
- updatedAt: (0, import_yup35.number)().optional().label("Consent updated at"),
2673
+ updatedAt: (0, import_yup36.number)().optional().label("Consent updated at"),
2627
2674
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
2628
- source: (0, import_yup35.string)().optional().label("Consent source")
2675
+ source: (0, import_yup36.string)().optional().label("Consent source"),
2676
+ /**
2677
+ * How often the user receives job-alert emails. `off` disables job alerts
2678
+ * only; other marketing stays governed by `subscribed`. Unset means the
2679
+ * user has not chosen a cadence yet.
2680
+ */
2681
+ jobAlertFrequency: (0, import_yup36.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2629
2682
  }).default({ subscribed: false }).label("Marketing Consent"),
2630
2683
  /**
2631
2684
  * Vector embedding of the user's profile for semantic/hybrid search.
2632
2685
  * Generated from a structured summary of skills, experience, education, etc.
2633
2686
  * Only generated for public profiles with sufficient completeness (≥60%).
2634
2687
  */
2635
- embedding: (0, import_yup35.object)({
2636
- vector: (0, import_yup35.array)((0, import_yup35.number)().required()).optional().label("Embedding vector"),
2637
- model: (0, import_yup35.string)().optional().label("Embedding model")
2688
+ embedding: (0, import_yup36.object)({
2689
+ vector: (0, import_yup36.array)((0, import_yup36.number)().required()).optional().label("Embedding vector"),
2690
+ model: (0, import_yup36.string)().optional().label("Embedding model")
2638
2691
  }).nullable().optional().label("Embedding")
2639
2692
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
2640
2693
 
2641
2694
  // src/user/user-completeness.schema.ts
2642
- var import_yup36 = require("yup");
2643
- var UserCompletenessSchema = (0, import_yup36.object)({
2695
+ var import_yup37 = require("yup");
2696
+ var UserCompletenessSchema = (0, import_yup37.object)({
2644
2697
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
2645
2698
  // Optional
2646
2699
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -2687,6 +2740,10 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2687
2740
  EmployeeCount,
2688
2741
  EmploymentType,
2689
2742
  ExperienceLevel,
2743
+ FEEDBACK_MESSAGE_MAX,
2744
+ FeedbackSchema,
2745
+ FeedbackStatus,
2746
+ FeedbackType,
2690
2747
  GeneraDetailFields,
2691
2748
  GroupManagedBy,
2692
2749
  GroupMembershipSchema,
@@ -2697,6 +2754,7 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2697
2754
  GroupVisibility,
2698
2755
  InputQuestionSchema,
2699
2756
  JOB_TAXONOMY,
2757
+ JobAlertFrequency,
2700
2758
  JobCategory,
2701
2759
  JobIndustry,
2702
2760
  JobSchema,
@@ -2741,6 +2799,9 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2741
2799
  SupportedEmployeeCounts,
2742
2800
  SupportedEmploymentTypes,
2743
2801
  SupportedExperienceLevels,
2802
+ SupportedFeedbackStatuses,
2803
+ SupportedFeedbackTypes,
2804
+ SupportedJobAlertFrequencies,
2744
2805
  SupportedJobCategories,
2745
2806
  SupportedJobIndustries,
2746
2807
  SupportedJobSearchUrgencies,
package/dist/index.d.cts CHANGED
@@ -1504,6 +1504,44 @@ declare const ReportSchema: yup.ObjectSchema<{
1504
1504
  comment: undefined;
1505
1505
  }, "">;
1506
1506
 
1507
+ declare enum FeedbackType {
1508
+ Bug = "bug",
1509
+ Feature = "feature",
1510
+ Suggestion = "suggestion",
1511
+ Report = "report",
1512
+ Other = "other"
1513
+ }
1514
+ declare const SupportedFeedbackTypes: FeedbackType[];
1515
+ declare enum FeedbackStatus {
1516
+ New = "new",
1517
+ InReview = "in_review",
1518
+ Resolved = "resolved",
1519
+ Archived = "archived"
1520
+ }
1521
+ declare const SupportedFeedbackStatuses: FeedbackStatus[];
1522
+ /** Max length of a feedback message body (enforced client + server). */
1523
+ declare const FEEDBACK_MESSAGE_MAX = 4000;
1524
+
1525
+ /**
1526
+ * A user-submitted feedback / report record (bug, feature request, suggestion,
1527
+ * abuse report, …) captured by the app-wide feedback widget and stored by
1528
+ * common-service. `email` is an optional reply-to for signed-out submitters;
1529
+ * the rest of the identity/diagnostic fields are attached server-side.
1530
+ */
1531
+ declare const FeedbackSchema: yup.ObjectSchema<{
1532
+ type: NonNullable<FeedbackType | undefined>;
1533
+ message: string;
1534
+ email: string | undefined;
1535
+ pageUrl: string | undefined;
1536
+ status: FeedbackStatus | undefined;
1537
+ }, yup.AnyObject, {
1538
+ type: undefined;
1539
+ message: undefined;
1540
+ email: undefined;
1541
+ pageUrl: undefined;
1542
+ status: undefined;
1543
+ }, "">;
1544
+
1507
1545
  declare const SkillSchema: yup.ObjectSchema<{
1508
1546
  name: string;
1509
1547
  logo: {
@@ -1640,6 +1678,17 @@ declare enum ReferralSource {
1640
1678
  Other = "other"
1641
1679
  }
1642
1680
  declare const SupportedReferralSources: ReferralSource[];
1681
+ /**
1682
+ * How often a subscribed user receives job-alert emails. `Off` disables job
1683
+ * alerts specifically while leaving other marketing (newsletters, product
1684
+ * updates) governed by `marketingConsent.subscribed`.
1685
+ */
1686
+ declare enum JobAlertFrequency {
1687
+ Off = "off",
1688
+ Daily = "daily",
1689
+ Weekly = "weekly"
1690
+ }
1691
+ declare const SupportedJobAlertFrequencies: JobAlertFrequency[];
1643
1692
  /** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
1644
1693
  declare const SupportedSalaryCurrencies: readonly ["USD", "EUR", "GBP", "SEK", "INR"];
1645
1694
  type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
@@ -1771,6 +1820,7 @@ declare const UserSchema: yup.ObjectSchema<{
1771
1820
  marketingConsent: {
1772
1821
  updatedAt?: number | undefined;
1773
1822
  source?: string | undefined;
1823
+ jobAlertFrequency?: JobAlertFrequency | undefined;
1774
1824
  subscribed: boolean;
1775
1825
  };
1776
1826
  embedding: {
@@ -2860,4 +2910,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
2860
2910
  };
2861
2911
  }, "">;
2862
2912
 
2863
- export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, 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, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, 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, SupportedCampaignStatuses, 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 };
2913
+ export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, 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, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, 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, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, 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
@@ -1504,6 +1504,44 @@ declare const ReportSchema: yup.ObjectSchema<{
1504
1504
  comment: undefined;
1505
1505
  }, "">;
1506
1506
 
1507
+ declare enum FeedbackType {
1508
+ Bug = "bug",
1509
+ Feature = "feature",
1510
+ Suggestion = "suggestion",
1511
+ Report = "report",
1512
+ Other = "other"
1513
+ }
1514
+ declare const SupportedFeedbackTypes: FeedbackType[];
1515
+ declare enum FeedbackStatus {
1516
+ New = "new",
1517
+ InReview = "in_review",
1518
+ Resolved = "resolved",
1519
+ Archived = "archived"
1520
+ }
1521
+ declare const SupportedFeedbackStatuses: FeedbackStatus[];
1522
+ /** Max length of a feedback message body (enforced client + server). */
1523
+ declare const FEEDBACK_MESSAGE_MAX = 4000;
1524
+
1525
+ /**
1526
+ * A user-submitted feedback / report record (bug, feature request, suggestion,
1527
+ * abuse report, …) captured by the app-wide feedback widget and stored by
1528
+ * common-service. `email` is an optional reply-to for signed-out submitters;
1529
+ * the rest of the identity/diagnostic fields are attached server-side.
1530
+ */
1531
+ declare const FeedbackSchema: yup.ObjectSchema<{
1532
+ type: NonNullable<FeedbackType | undefined>;
1533
+ message: string;
1534
+ email: string | undefined;
1535
+ pageUrl: string | undefined;
1536
+ status: FeedbackStatus | undefined;
1537
+ }, yup.AnyObject, {
1538
+ type: undefined;
1539
+ message: undefined;
1540
+ email: undefined;
1541
+ pageUrl: undefined;
1542
+ status: undefined;
1543
+ }, "">;
1544
+
1507
1545
  declare const SkillSchema: yup.ObjectSchema<{
1508
1546
  name: string;
1509
1547
  logo: {
@@ -1640,6 +1678,17 @@ declare enum ReferralSource {
1640
1678
  Other = "other"
1641
1679
  }
1642
1680
  declare const SupportedReferralSources: ReferralSource[];
1681
+ /**
1682
+ * How often a subscribed user receives job-alert emails. `Off` disables job
1683
+ * alerts specifically while leaving other marketing (newsletters, product
1684
+ * updates) governed by `marketingConsent.subscribed`.
1685
+ */
1686
+ declare enum JobAlertFrequency {
1687
+ Off = "off",
1688
+ Daily = "daily",
1689
+ Weekly = "weekly"
1690
+ }
1691
+ declare const SupportedJobAlertFrequencies: JobAlertFrequency[];
1643
1692
  /** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
1644
1693
  declare const SupportedSalaryCurrencies: readonly ["USD", "EUR", "GBP", "SEK", "INR"];
1645
1694
  type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
@@ -1771,6 +1820,7 @@ declare const UserSchema: yup.ObjectSchema<{
1771
1820
  marketingConsent: {
1772
1821
  updatedAt?: number | undefined;
1773
1822
  source?: string | undefined;
1823
+ jobAlertFrequency?: JobAlertFrequency | undefined;
1774
1824
  subscribed: boolean;
1775
1825
  };
1776
1826
  embedding: {
@@ -2860,4 +2910,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
2860
2910
  };
2861
2911
  }, "">;
2862
2912
 
2863
- export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, 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, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, 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, SupportedCampaignStatuses, 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 };
2913
+ export { AnswerChoiceType, ApplicationReceivePreference, CampaignSchema, CampaignStatus, 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, FEEDBACK_MESSAGE_MAX, FeedbackSchema, FeedbackStatus, FeedbackType, GeneraDetailFields, GroupManagedBy, GroupMembershipSchema, GroupMembershipStatus, GroupSchema, GroupStatus, GroupTranslationSchema, GroupVisibility, InputQuestionSchema, JOB_TAXONOMY, JobAlertFrequency, JobCategory, JobIndustry, JobSchema, JobSearchUrgency, JobStatus, JobSubCategory, ListFilterSchema, LocationSchema, MIN_SALARY_LOWER_BOUND, MIN_SALARY_UPPER_BOUND, MailingListSchema, 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, SupportedCampaignStatuses, SupportedCompensationTypes, SupportedContactTypes, SupportedEducationLevels, SupportedEmployeeCounts, SupportedEmploymentTypes, SupportedExperienceLevels, SupportedFeedbackStatuses, SupportedFeedbackTypes, SupportedJobAlertFrequencies, 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
@@ -1978,6 +1978,13 @@ var ReferralSource = /* @__PURE__ */ ((ReferralSource2) => {
1978
1978
  return ReferralSource2;
1979
1979
  })(ReferralSource || {});
1980
1980
  var SupportedReferralSources = Object.values(ReferralSource);
1981
+ var JobAlertFrequency = /* @__PURE__ */ ((JobAlertFrequency2) => {
1982
+ JobAlertFrequency2["Off"] = "off";
1983
+ JobAlertFrequency2["Daily"] = "daily";
1984
+ JobAlertFrequency2["Weekly"] = "weekly";
1985
+ return JobAlertFrequency2;
1986
+ })(JobAlertFrequency || {});
1987
+ var SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
1981
1988
  var SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"];
1982
1989
  var MIN_SALARY_LOWER_BOUND = 0;
1983
1990
  var MIN_SALARY_UPPER_BOUND = 1e6;
@@ -2144,55 +2151,87 @@ var ReportSchema = object20({
2144
2151
  comment: string17().max(1e3).optional().label("Comment")
2145
2152
  }).label("Report Schema");
2146
2153
 
2154
+ // src/feedback/feedback.schema.ts
2155
+ import { mixed as mixed5, object as object21, string as string18 } from "yup";
2156
+
2157
+ // src/feedback/feedback.constant.ts
2158
+ var FeedbackType = /* @__PURE__ */ ((FeedbackType3) => {
2159
+ FeedbackType3["Bug"] = "bug";
2160
+ FeedbackType3["Feature"] = "feature";
2161
+ FeedbackType3["Suggestion"] = "suggestion";
2162
+ FeedbackType3["Report"] = "report";
2163
+ FeedbackType3["Other"] = "other";
2164
+ return FeedbackType3;
2165
+ })(FeedbackType || {});
2166
+ var SupportedFeedbackTypes = Object.values(FeedbackType);
2167
+ var FeedbackStatus = /* @__PURE__ */ ((FeedbackStatus3) => {
2168
+ FeedbackStatus3["New"] = "new";
2169
+ FeedbackStatus3["InReview"] = "in_review";
2170
+ FeedbackStatus3["Resolved"] = "resolved";
2171
+ FeedbackStatus3["Archived"] = "archived";
2172
+ return FeedbackStatus3;
2173
+ })(FeedbackStatus || {});
2174
+ var SupportedFeedbackStatuses = Object.values(FeedbackStatus);
2175
+ var FEEDBACK_MESSAGE_MAX = 4e3;
2176
+
2177
+ // src/feedback/feedback.schema.ts
2178
+ var FeedbackSchema = object21({
2179
+ type: mixed5().oneOf(SupportedFeedbackTypes).required().label("Type"),
2180
+ message: string18().trim().required("Please enter a message").max(FEEDBACK_MESSAGE_MAX).label("Message"),
2181
+ email: string18().email().optional().label("Email"),
2182
+ pageUrl: string18().optional().label("Page URL"),
2183
+ status: mixed5().oneOf(SupportedFeedbackStatuses).optional().label("Status")
2184
+ }).label("Feedback Schema");
2185
+
2147
2186
  // src/user/user.schema.ts
2148
- import { array as array14, boolean as boolean15, number as number10, object as object32, string as string30 } from "yup";
2187
+ import { array as array14, boolean as boolean15, number as number10, object as object33, string as string31 } from "yup";
2149
2188
 
2150
2189
  // src/user/work-experience.schema.ts
2151
- import { boolean as boolean12, object as object21, string as string18 } from "yup";
2152
- var WorkExperienceSchema = object21().shape({
2190
+ import { boolean as boolean12, object as object22, string as string19 } from "yup";
2191
+ var WorkExperienceSchema = object22().shape({
2153
2192
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
2154
- designation: string18().trim().required().label("Designation"),
2193
+ designation: string19().trim().required().label("Designation"),
2155
2194
  duration: DurationSchema({
2156
2195
  format: "YYYY-MM",
2157
2196
  startLabel: "Start Date",
2158
2197
  endLabel: "End Date"
2159
2198
  }).required().label("Duration"),
2160
- description: string18().trim().max(3e3).optional().label("Description"),
2199
+ description: string19().trim().max(3e3).optional().label("Description"),
2161
2200
  location: LocationSchema.required().label("Location"),
2162
2201
  isRemote: boolean12().oneOf([true, false]).default(false).label("Is Remote")
2163
2202
  }).noUnknown().strict().label("Work Experience");
2164
2203
 
2165
2204
  // src/user/education.schema.ts
2166
- import { boolean as boolean13, object as object22, string as string19 } from "yup";
2167
- var EducationSchema = object22({
2205
+ import { boolean as boolean13, object as object23, string as string20 } from "yup";
2206
+ var EducationSchema = object23({
2168
2207
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
2169
- course: string19().trim().required().label("Course"),
2170
- fieldOfStudy: string19().trim().required().label("Field of Study"),
2208
+ course: string20().trim().required().label("Course"),
2209
+ fieldOfStudy: string20().trim().required().label("Field of Study"),
2171
2210
  duration: DurationSchema({
2172
2211
  format: "YYYY-MM",
2173
2212
  startLabel: "Start Date",
2174
2213
  endLabel: "End Date"
2175
2214
  }).required().label("Duration"),
2176
- description: string19().trim().max(3e3).optional().label("Description"),
2215
+ description: string20().trim().max(3e3).optional().label("Description"),
2177
2216
  isDistanceLearning: boolean13().default(false).label("Is Distance Learning"),
2178
2217
  location: LocationSchema.required().label("Location"),
2179
- studyType: string19().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2218
+ studyType: string20().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2180
2219
  }).noUnknown().strict().label("Education");
2181
2220
 
2182
2221
  // src/user/user-skill.schema.ts
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"),
2222
+ import { object as object24, string as string21 } from "yup";
2223
+ var UserSkillSchema = object24({
2224
+ name: string21().required().label("Name"),
2225
+ proficiencyLevel: string21().oneOf(SupportedProficiencyLevels).required().label("Proficiency Level"),
2187
2226
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
2188
2227
  }).noUnknown().strict().label("Skill");
2189
2228
 
2190
2229
  // src/user/project.schema.ts
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"),
2230
+ import { object as object25, string as string22 } from "yup";
2231
+ var UserProjectSchema = object25({
2232
+ name: string22().trim().max(50).required().label("Name"),
2233
+ url: string22().optional().label("URL"),
2234
+ description: string22().trim().min(100).max(3e3).required().label("Description"),
2196
2235
  duration: DurationSchema({
2197
2236
  format: "YYYY-MM",
2198
2237
  startLabel: "Start Date",
@@ -2201,65 +2240,65 @@ var UserProjectSchema = object24({
2201
2240
  }).noUnknown().strict().label("Project");
2202
2241
 
2203
2242
  // src/user/user-certification.schema.ts
2204
- import { object as object25, string as string22 } from "yup";
2205
- var UserCertificationSchema = object25({
2206
- name: string22().trim().max(100).required().label("Name"),
2243
+ import { object as object26, string as string23 } from "yup";
2244
+ var UserCertificationSchema = object26({
2245
+ name: string23().trim().max(100).required().label("Name"),
2207
2246
  // TODO: Add validation for authority
2208
- authority: string22().trim().max(100).required().label("Authority"),
2209
- licenseNumber: string22().trim().max(50).optional().label("License Number"),
2247
+ authority: string23().trim().max(100).required().label("Authority"),
2248
+ licenseNumber: string23().trim().max(50).optional().label("License Number"),
2210
2249
  duration: DurationSchema({
2211
2250
  format: "YYYY-MM",
2212
2251
  startLabel: "Start Date",
2213
2252
  endLabel: "End Date"
2214
2253
  }).optional().nullable().label("Duration"),
2215
- url: string22().optional().label("URL")
2254
+ url: string23().optional().label("URL")
2216
2255
  }).noUnknown().strict().label("Certification");
2217
2256
 
2218
2257
  // src/user/user-interest.schema.ts
2219
- import { string as string23 } from "yup";
2220
- var UserInterestSchema = string23().trim().required().label("Interest");
2258
+ import { string as string24 } from "yup";
2259
+ var UserInterestSchema = string24().trim().required().label("Interest");
2221
2260
 
2222
2261
  // src/user/user-language.schema.ts
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")
2262
+ import { object as object27, string as string25 } from "yup";
2263
+ var UserLanguageSchema = object27({
2264
+ name: string25().trim().required().label("Name"),
2265
+ proficiencyLevel: string25().oneOf(SupportedProficiencyLevels).trim().max(50).required().label("Proficiency Level")
2227
2266
  }).noUnknown().strict().label("Language");
2228
2267
 
2229
2268
  // src/user/user-additional-info.schema.ts
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")
2269
+ import { object as object28, string as string26 } from "yup";
2270
+ var UserAdditionalInfoSchema = object28({
2271
+ title: string26().trim().max(60).required().label("Title"),
2272
+ description: string26().trim().max(1e3).required().label("Description")
2234
2273
  }).noUnknown().strict().label("User Additional Info");
2235
2274
 
2236
2275
  // src/user/general-detail.schema.ts
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")
2276
+ import { object as object29, string as string27 } from "yup";
2277
+ var UserGeneralDetailSchema = object29({
2278
+ id: string27().optional().label("ID"),
2279
+ name: object29().shape({
2280
+ first: string27().trim().max(50).required().label("First Name"),
2281
+ last: string27().trim().max(50).optional().label("Last Name")
2243
2282
  }).required().label("Name"),
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"),
2283
+ headline: string27().trim().max(200).optional().label("Headline"),
2284
+ image: string27().optional().label("Image"),
2285
+ aboutMe: string27().trim().max(3e3).optional().label("About Me"),
2286
+ email: string27().required().label("Email"),
2287
+ mobile: string27().nullable().optional().label("Mobile"),
2288
+ emailVerified: string27().nullable().optional().label("Email Verified"),
2289
+ mobileVerified: string27().nullable().optional().label("Mobile Verified"),
2290
+ experienceLevel: string27().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2252
2291
  location: LocationSchema.required().label("Location"),
2253
- region: object28().shape({
2254
- country: string26().trim().required().label("Region Country"),
2255
- lang: string26().trim().required().label("Region Language")
2292
+ region: object29().shape({
2293
+ country: string27().trim().required().label("Region Country"),
2294
+ lang: string27().trim().required().label("Region Language")
2256
2295
  }).optional().default(void 0).label("Region"),
2257
- profileVisibility: string26().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2296
+ profileVisibility: string27().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2258
2297
  }).noUnknown().strict().label("General Detail");
2259
2298
 
2260
2299
  // src/user/user-job-preferences.schema.ts
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({
2300
+ import { array as array11, boolean as boolean14, date as date2, number as number9, object as object30, string as string28 } from "yup";
2301
+ var UserJobPreferencesSchema = object30({
2263
2302
  /**
2264
2303
  * Whether the job seeker is openly signalling availability. Surfaces the
2265
2304
  * "Open to work" badge on the public profile and boosts visibility in
@@ -2271,7 +2310,7 @@ var UserJobPreferencesSchema = object29({
2271
2310
  * and can downgrade the visibility of expired or low-relevance postings for
2272
2311
  * users in `passively_browsing` mode.
2273
2312
  */
2274
- jobSearchUrgency: string27().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2313
+ jobSearchUrgency: string28().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2275
2314
  /**
2276
2315
  * Locations the user wants to work in. Stores the full `LocationSchema`
2277
2316
  * shape (country, city, state, geo, etc.) as returned by the locations
@@ -2288,7 +2327,7 @@ var UserJobPreferencesSchema = object29({
2288
2327
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
2289
2328
  * so search/match logic doesn't have to translate between two vocabularies.
2290
2329
  */
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"),
2330
+ targetExperienceLevels: array11().of(string28().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"),
2292
2331
  /**
2293
2332
  * Specializations the user is searching for - free-form titles.
2294
2333
  *
@@ -2297,7 +2336,7 @@ var UserJobPreferencesSchema = object29({
2297
2336
  * surfaces a curated "Popular Roles" picker for discovery, but the user
2298
2337
  * can ultimately add any title; matching/normalization happens downstream.
2299
2338
  */
2300
- jobRoles: array11().of(string27().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2339
+ jobRoles: array11().of(string28().trim().max(120).required()).min(1, "Pick at least one role.").required().label("Job Roles"),
2301
2340
  /**
2302
2341
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
2303
2342
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
@@ -2305,11 +2344,11 @@ var UserJobPreferencesSchema = object29({
2305
2344
  * has a floor, even if it's zero.
2306
2345
  */
2307
2346
  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"),
2347
+ minSalaryCurrency: string28().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2309
2348
  /**
2310
2349
  * Marketing-attribution capture from the final onboarding step.
2311
2350
  */
2312
- referralSource: string27().oneOf(SupportedReferralSources).required().label("Referral Source"),
2351
+ referralSource: string28().oneOf(SupportedReferralSources).required().label("Referral Source"),
2313
2352
  /**
2314
2353
  * Resumes the user has uploaded. Embedded directly on the user document
2315
2354
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -2324,15 +2363,15 @@ var UserJobPreferencesSchema = object29({
2324
2363
  * live in their own collection.
2325
2364
  */
2326
2365
  resumes: array11().of(
2327
- object29({
2366
+ object30({
2328
2367
  // Stable id assigned on upload - used to address a specific entry
2329
2368
  // for delete / set-primary operations without exposing the GCS URL
2330
2369
  // as a route key.
2331
- id: string27().required().label("ID"),
2332
- url: string27().required().label("Resume URL"),
2333
- filename: string27().trim().max(255).optional().label("Filename"),
2370
+ id: string28().required().label("ID"),
2371
+ url: string28().required().label("Resume URL"),
2372
+ filename: string28().trim().max(255).optional().label("Filename"),
2334
2373
  sizeBytes: number9().integer().min(0).optional().label("Size (bytes)"),
2335
- mimeType: string27().trim().max(120).optional().label("MIME Type"),
2374
+ mimeType: string28().trim().max(120).optional().label("MIME Type"),
2336
2375
  uploadedAt: date2().required().label("Uploaded At"),
2337
2376
  isPrimary: boolean14().default(false).label("Is Primary")
2338
2377
  }).noUnknown().strict().label("Resume")
@@ -2361,12 +2400,12 @@ var UserJobPreferencesSchema = object29({
2361
2400
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
2362
2401
  * because the user has not confirmed it yet.
2363
2402
  */
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"),
2403
+ pendingPrefill: object30({
2404
+ headline: string28().trim().optional().label("Pending Headline"),
2405
+ aboutMe: string28().trim().optional().label("Pending About Me"),
2406
+ mobile: string28().trim().optional().label("Pending Mobile"),
2368
2407
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
2369
- experienceLevel: string27().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2408
+ experienceLevel: string28().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2370
2409
  socialAccounts: array11().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2371
2410
  workExperiences: array11().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2372
2411
  educations: array11().of(EducationSchema.required()).optional().label("Pending Educations")
@@ -2374,35 +2413,35 @@ var UserJobPreferencesSchema = object29({
2374
2413
  }).noUnknown().strict().label("User Job Preferences Schema");
2375
2414
 
2376
2415
  // src/user/user-recruiter-profile.schema.ts
2377
- import { array as array12, object as object30, string as string28 } from "yup";
2378
- var RecruiterPageLinkSchema = object30({
2416
+ import { array as array12, object as object31, string as string29 } from "yup";
2417
+ var RecruiterPageLinkSchema = object31({
2379
2418
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
2380
- jobTitle: string28().trim().max(100).optional().label("Job Title")
2419
+ jobTitle: string29().trim().max(100).optional().label("Job Title")
2381
2420
  }).noUnknown().strict().label("Recruiter Page Link");
2382
- var UserRecruiterProfileSchema = object30({
2383
- recruiterProfile: object30({
2421
+ var UserRecruiterProfileSchema = object31({
2422
+ recruiterProfile: object31({
2384
2423
  hiringFor: array12().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2385
2424
  }).optional().default(void 0).label("Recruiter Profile")
2386
2425
  }).noUnknown().strict().label("User Recruiter Profile");
2387
2426
 
2388
2427
  // src/user/user-coordinator-profile.schema.ts
2389
- import { array as array13, object as object31, string as string29 } from "yup";
2390
- var CoordinatorPageLinkSchema = object31({
2428
+ import { array as array13, object as object32, string as string30 } from "yup";
2429
+ var CoordinatorPageLinkSchema = object32({
2391
2430
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
2392
- jobTitle: string29().trim().max(100).optional().label("Job Title")
2431
+ jobTitle: string30().trim().max(100).optional().label("Job Title")
2393
2432
  }).noUnknown().strict().label("Coordinator Page Link");
2394
- var UserCoordinatorProfileSchema = object31({
2395
- coordinatorProfile: object31({
2433
+ var UserCoordinatorProfileSchema = object32({
2434
+ coordinatorProfile: object32({
2396
2435
  coordinatesAt: array13().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2397
2436
  }).optional().default(void 0).label("Coordinator Profile")
2398
2437
  }).noUnknown().strict().label("User Coordinator Profile");
2399
2438
 
2400
2439
  // src/user/user.schema.ts
2401
- var UserSchema = object32({
2440
+ var UserSchema = object33({
2402
2441
  /**
2403
2442
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
2404
2443
  */
2405
- authAccountId: string30().required().label("Auth Account ID"),
2444
+ authAccountId: string31().required().label("Auth Account ID"),
2406
2445
  /**
2407
2446
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
2408
2447
  */
@@ -2442,11 +2481,11 @@ var UserSchema = object32({
2442
2481
  /**
2443
2482
  * Status of the user account
2444
2483
  */
2445
- status: string30().oneOf(SupportedUserStatuses).required().label("Status"),
2484
+ status: string31().oneOf(SupportedUserStatuses).required().label("Status"),
2446
2485
  /**
2447
2486
  * Roles assigned to the user
2448
2487
  */
2449
- roles: array14().of(string30().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2488
+ roles: array14().of(string31().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2450
2489
  /**
2451
2490
  * Explicit consent to receive marketing email (newsletters, job alerts by
2452
2491
  * broadcast, product updates). Marketing sends are HARD-GATED on
@@ -2458,27 +2497,33 @@ var UserSchema = object32({
2458
2497
  * unsubscribe sets `subscribed=false` so consent and the email-service
2459
2498
  * suppression list stay consistent. Defaults to NOT subscribed (opt-in).
2460
2499
  */
2461
- marketingConsent: object32({
2500
+ marketingConsent: object33({
2462
2501
  subscribed: boolean15().default(false).label("Subscribed to marketing email"),
2463
2502
  /** Epoch ms of the last consent change (opt-in or opt-out). */
2464
2503
  updatedAt: number10().optional().label("Consent updated at"),
2465
2504
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
2466
- source: string30().optional().label("Consent source")
2505
+ source: string31().optional().label("Consent source"),
2506
+ /**
2507
+ * How often the user receives job-alert emails. `off` disables job alerts
2508
+ * only; other marketing stays governed by `subscribed`. Unset means the
2509
+ * user has not chosen a cadence yet.
2510
+ */
2511
+ jobAlertFrequency: string31().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2467
2512
  }).default({ subscribed: false }).label("Marketing Consent"),
2468
2513
  /**
2469
2514
  * Vector embedding of the user's profile for semantic/hybrid search.
2470
2515
  * Generated from a structured summary of skills, experience, education, etc.
2471
2516
  * Only generated for public profiles with sufficient completeness (≥60%).
2472
2517
  */
2473
- embedding: object32({
2518
+ embedding: object33({
2474
2519
  vector: array14(number10().required()).optional().label("Embedding vector"),
2475
- model: string30().optional().label("Embedding model")
2520
+ model: string31().optional().label("Embedding model")
2476
2521
  }).nullable().optional().label("Embedding")
2477
2522
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
2478
2523
 
2479
2524
  // src/user/user-completeness.schema.ts
2480
- import { object as object33 } from "yup";
2481
- var UserCompletenessSchema = object33({
2525
+ import { object as object34 } from "yup";
2526
+ var UserCompletenessSchema = object34({
2482
2527
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
2483
2528
  // Optional
2484
2529
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -2524,6 +2569,10 @@ export {
2524
2569
  EmployeeCount,
2525
2570
  EmploymentType,
2526
2571
  ExperienceLevel,
2572
+ FEEDBACK_MESSAGE_MAX,
2573
+ FeedbackSchema,
2574
+ FeedbackStatus,
2575
+ FeedbackType,
2527
2576
  GeneraDetailFields,
2528
2577
  GroupManagedBy,
2529
2578
  GroupMembershipSchema,
@@ -2534,6 +2583,7 @@ export {
2534
2583
  GroupVisibility,
2535
2584
  InputQuestionSchema,
2536
2585
  JOB_TAXONOMY,
2586
+ JobAlertFrequency,
2537
2587
  JobCategory,
2538
2588
  JobIndustry,
2539
2589
  JobSchema,
@@ -2578,6 +2628,9 @@ export {
2578
2628
  SupportedEmployeeCounts,
2579
2629
  SupportedEmploymentTypes,
2580
2630
  SupportedExperienceLevels,
2631
+ SupportedFeedbackStatuses,
2632
+ SupportedFeedbackTypes,
2633
+ SupportedJobAlertFrequencies,
2581
2634
  SupportedJobCategories,
2582
2635
  SupportedJobIndustries,
2583
2636
  SupportedJobSearchUrgencies,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thejob/schema",
3
- "version": "2.1.0",
3
+ "version": "2.1.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -0,0 +1,21 @@
1
+ export enum FeedbackType {
2
+ Bug = "bug",
3
+ Feature = "feature",
4
+ Suggestion = "suggestion",
5
+ Report = "report",
6
+ Other = "other",
7
+ }
8
+
9
+ export const SupportedFeedbackTypes = Object.values(FeedbackType);
10
+
11
+ export enum FeedbackStatus {
12
+ New = "new",
13
+ InReview = "in_review",
14
+ Resolved = "resolved",
15
+ Archived = "archived",
16
+ }
17
+
18
+ export const SupportedFeedbackStatuses = Object.values(FeedbackStatus);
19
+
20
+ /** Max length of a feedback message body (enforced client + server). */
21
+ export const FEEDBACK_MESSAGE_MAX = 4000;
@@ -0,0 +1,32 @@
1
+ import { mixed, object, string } from "yup";
2
+ import {
3
+ FEEDBACK_MESSAGE_MAX,
4
+ FeedbackStatus,
5
+ FeedbackType,
6
+ SupportedFeedbackStatuses,
7
+ SupportedFeedbackTypes,
8
+ } from "./feedback.constant.js";
9
+
10
+ /**
11
+ * A user-submitted feedback / report record (bug, feature request, suggestion,
12
+ * abuse report, …) captured by the app-wide feedback widget and stored by
13
+ * common-service. `email` is an optional reply-to for signed-out submitters;
14
+ * the rest of the identity/diagnostic fields are attached server-side.
15
+ */
16
+ export const FeedbackSchema = object({
17
+ type: mixed<FeedbackType>()
18
+ .oneOf(SupportedFeedbackTypes)
19
+ .required()
20
+ .label("Type"),
21
+ message: string()
22
+ .trim()
23
+ .required("Please enter a message")
24
+ .max(FEEDBACK_MESSAGE_MAX)
25
+ .label("Message"),
26
+ email: string().email().optional().label("Email"),
27
+ pageUrl: string().optional().label("Page URL"),
28
+ status: mixed<FeedbackStatus>()
29
+ .oneOf(SupportedFeedbackStatuses)
30
+ .optional()
31
+ .label("Status"),
32
+ }).label("Feedback Schema");
package/src/index.ts CHANGED
@@ -68,6 +68,12 @@ export * from "./pagination/pagination.constant.js";
68
68
  export * from "./report/report.schema.js";
69
69
  export * from "./report/report.constant.js";
70
70
 
71
+ /**
72
+ * Feedback schemas and constants (feedback widget + reports inbox).
73
+ */
74
+ export * from "./feedback/feedback.schema.js";
75
+ export * from "./feedback/feedback.constant.js";
76
+
71
77
  /**
72
78
  * Skill schemas and constants.
73
79
  */
@@ -84,6 +84,19 @@ export enum ReferralSource {
84
84
 
85
85
  export const SupportedReferralSources = Object.values(ReferralSource);
86
86
 
87
+ /**
88
+ * How often a subscribed user receives job-alert emails. `Off` disables job
89
+ * alerts specifically while leaving other marketing (newsletters, product
90
+ * updates) governed by `marketingConsent.subscribed`.
91
+ */
92
+ export enum JobAlertFrequency {
93
+ Off = "off",
94
+ Daily = "daily",
95
+ Weekly = "weekly",
96
+ }
97
+
98
+ export const SupportedJobAlertFrequencies = Object.values(JobAlertFrequency);
99
+
87
100
  /** ISO-4217 currency codes accepted for the salary preference (extend as needed). */
88
101
  export const SupportedSalaryCurrencies = ["USD", "EUR", "GBP", "SEK", "INR"] as const;
89
102
  export type SupportedSalaryCurrency = (typeof SupportedSalaryCurrencies)[number];
@@ -2,6 +2,7 @@ import { array, boolean, number, object, string } from "yup";
2
2
 
3
3
  import {
4
4
  DefaultUserRoles,
5
+ SupportedJobAlertFrequencies,
5
6
  SupportedUserRoles,
6
7
  SupportedUserStatuses,
7
8
  } from "./user.constant.js";
@@ -127,6 +128,15 @@ export const UserSchema = object({
127
128
  updatedAt: number().optional().label("Consent updated at"),
128
129
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
129
130
  source: string().optional().label("Consent source"),
131
+ /**
132
+ * How often the user receives job-alert emails. `off` disables job alerts
133
+ * only; other marketing stays governed by `subscribed`. Unset means the
134
+ * user has not chosen a cadence yet.
135
+ */
136
+ jobAlertFrequency: string()
137
+ .oneOf(SupportedJobAlertFrequencies)
138
+ .optional()
139
+ .label("Job alert frequency"),
130
140
  })
131
141
  .default({ subscribed: false })
132
142
  .label("Marketing Consent"),