@thejob/schema 2.1.1 → 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,
@@ -109,6 +113,8 @@ __export(index_exports, {
109
113
  SupportedEmployeeCounts: () => SupportedEmployeeCounts,
110
114
  SupportedEmploymentTypes: () => SupportedEmploymentTypes,
111
115
  SupportedExperienceLevels: () => SupportedExperienceLevels,
116
+ SupportedFeedbackStatuses: () => SupportedFeedbackStatuses,
117
+ SupportedFeedbackTypes: () => SupportedFeedbackTypes,
112
118
  SupportedJobAlertFrequencies: () => SupportedJobAlertFrequencies,
113
119
  SupportedJobCategories: () => SupportedJobCategories,
114
120
  SupportedJobIndustries: () => SupportedJobIndustries,
@@ -2315,55 +2321,87 @@ var ReportSchema = (0, import_yup22.object)({
2315
2321
  comment: (0, import_yup22.string)().max(1e3).optional().label("Comment")
2316
2322
  }).label("Report Schema");
2317
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
+
2318
2356
  // src/user/user.schema.ts
2319
- var import_yup35 = require("yup");
2357
+ var import_yup36 = require("yup");
2320
2358
 
2321
2359
  // src/user/work-experience.schema.ts
2322
- var import_yup23 = require("yup");
2323
- var WorkExperienceSchema = (0, import_yup23.object)().shape({
2360
+ var import_yup24 = require("yup");
2361
+ var WorkExperienceSchema = (0, import_yup24.object)().shape({
2324
2362
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
2325
- designation: (0, import_yup23.string)().trim().required().label("Designation"),
2363
+ designation: (0, import_yup24.string)().trim().required().label("Designation"),
2326
2364
  duration: DurationSchema({
2327
2365
  format: "YYYY-MM",
2328
2366
  startLabel: "Start Date",
2329
2367
  endLabel: "End Date"
2330
2368
  }).required().label("Duration"),
2331
- description: (0, import_yup23.string)().trim().max(3e3).optional().label("Description"),
2369
+ description: (0, import_yup24.string)().trim().max(3e3).optional().label("Description"),
2332
2370
  location: LocationSchema.required().label("Location"),
2333
- 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")
2334
2372
  }).noUnknown().strict().label("Work Experience");
2335
2373
 
2336
2374
  // src/user/education.schema.ts
2337
- var import_yup24 = require("yup");
2338
- var EducationSchema = (0, import_yup24.object)({
2375
+ var import_yup25 = require("yup");
2376
+ var EducationSchema = (0, import_yup25.object)({
2339
2377
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
2340
- course: (0, import_yup24.string)().trim().required().label("Course"),
2341
- 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"),
2342
2380
  duration: DurationSchema({
2343
2381
  format: "YYYY-MM",
2344
2382
  startLabel: "Start Date",
2345
2383
  endLabel: "End Date"
2346
2384
  }).required().label("Duration"),
2347
- description: (0, import_yup24.string)().trim().max(3e3).optional().label("Description"),
2348
- 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"),
2349
2387
  location: LocationSchema.required().label("Location"),
2350
- 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")
2351
2389
  }).noUnknown().strict().label("Education");
2352
2390
 
2353
2391
  // src/user/user-skill.schema.ts
2354
- var import_yup25 = require("yup");
2355
- var UserSkillSchema = (0, import_yup25.object)({
2356
- name: (0, import_yup25.string)().required().label("Name"),
2357
- 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"),
2358
2396
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
2359
2397
  }).noUnknown().strict().label("Skill");
2360
2398
 
2361
2399
  // src/user/project.schema.ts
2362
- var import_yup26 = require("yup");
2363
- var UserProjectSchema = (0, import_yup26.object)({
2364
- name: (0, import_yup26.string)().trim().max(50).required().label("Name"),
2365
- url: (0, import_yup26.string)().optional().label("URL"),
2366
- 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"),
2367
2405
  duration: DurationSchema({
2368
2406
  format: "YYYY-MM",
2369
2407
  startLabel: "Start Date",
@@ -2372,83 +2410,83 @@ var UserProjectSchema = (0, import_yup26.object)({
2372
2410
  }).noUnknown().strict().label("Project");
2373
2411
 
2374
2412
  // src/user/user-certification.schema.ts
2375
- var import_yup27 = require("yup");
2376
- var UserCertificationSchema = (0, import_yup27.object)({
2377
- 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"),
2378
2416
  // TODO: Add validation for authority
2379
- authority: (0, import_yup27.string)().trim().max(100).required().label("Authority"),
2380
- 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"),
2381
2419
  duration: DurationSchema({
2382
2420
  format: "YYYY-MM",
2383
2421
  startLabel: "Start Date",
2384
2422
  endLabel: "End Date"
2385
2423
  }).optional().nullable().label("Duration"),
2386
- url: (0, import_yup27.string)().optional().label("URL")
2424
+ url: (0, import_yup28.string)().optional().label("URL")
2387
2425
  }).noUnknown().strict().label("Certification");
2388
2426
 
2389
2427
  // src/user/user-interest.schema.ts
2390
- var import_yup28 = require("yup");
2391
- 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");
2392
2430
 
2393
2431
  // src/user/user-language.schema.ts
2394
- var import_yup29 = require("yup");
2395
- var UserLanguageSchema = (0, import_yup29.object)({
2396
- name: (0, import_yup29.string)().trim().required().label("Name"),
2397
- 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")
2398
2436
  }).noUnknown().strict().label("Language");
2399
2437
 
2400
2438
  // src/user/user-additional-info.schema.ts
2401
- var import_yup30 = require("yup");
2402
- var UserAdditionalInfoSchema = (0, import_yup30.object)({
2403
- title: (0, import_yup30.string)().trim().max(60).required().label("Title"),
2404
- 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")
2405
2443
  }).noUnknown().strict().label("User Additional Info");
2406
2444
 
2407
2445
  // src/user/general-detail.schema.ts
2408
- var import_yup31 = require("yup");
2409
- var UserGeneralDetailSchema = (0, import_yup31.object)({
2410
- id: (0, import_yup31.string)().optional().label("ID"),
2411
- name: (0, import_yup31.object)().shape({
2412
- first: (0, import_yup31.string)().trim().max(50).required().label("First Name"),
2413
- 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")
2414
2452
  }).required().label("Name"),
2415
- headline: (0, import_yup31.string)().trim().max(200).optional().label("Headline"),
2416
- image: (0, import_yup31.string)().optional().label("Image"),
2417
- aboutMe: (0, import_yup31.string)().trim().max(3e3).optional().label("About Me"),
2418
- email: (0, import_yup31.string)().required().label("Email"),
2419
- mobile: (0, import_yup31.string)().nullable().optional().label("Mobile"),
2420
- emailVerified: (0, import_yup31.string)().nullable().optional().label("Email Verified"),
2421
- mobileVerified: (0, import_yup31.string)().nullable().optional().label("Mobile Verified"),
2422
- 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"),
2423
2461
  location: LocationSchema.required().label("Location"),
2424
- region: (0, import_yup31.object)().shape({
2425
- country: (0, import_yup31.string)().trim().required().label("Region Country"),
2426
- 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")
2427
2465
  }).optional().default(void 0).label("Region"),
2428
- 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")
2429
2467
  }).noUnknown().strict().label("General Detail");
2430
2468
 
2431
2469
  // src/user/user-job-preferences.schema.ts
2432
- var import_yup32 = require("yup");
2433
- var UserJobPreferencesSchema = (0, import_yup32.object)({
2470
+ var import_yup33 = require("yup");
2471
+ var UserJobPreferencesSchema = (0, import_yup33.object)({
2434
2472
  /**
2435
2473
  * Whether the job seeker is openly signalling availability. Surfaces the
2436
2474
  * "Open to work" badge on the public profile and boosts visibility in
2437
2475
  * recruiter search. Defaults to `false` - users must opt in.
2438
2476
  */
2439
- openToWork: (0, import_yup32.boolean)().default(false).label("Open to Work"),
2477
+ openToWork: (0, import_yup33.boolean)().default(false).label("Open to Work"),
2440
2478
  /**
2441
2479
  * How urgently the user is looking for their next job. Drives match scoring
2442
2480
  * and can downgrade the visibility of expired or low-relevance postings for
2443
2481
  * users in `passively_browsing` mode.
2444
2482
  */
2445
- 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"),
2446
2484
  /**
2447
2485
  * Locations the user wants to work in. Stores the full `LocationSchema`
2448
2486
  * shape (country, city, state, geo, etc.) as returned by the locations
2449
2487
  * autocomplete API.
2450
2488
  */
2451
- 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"),
2452
2490
  /**
2453
2491
  * Seniority levels the user wants jobs to be matched against. Multi-select
2454
2492
  * (up to 2) for borderline candidates.
@@ -2459,7 +2497,7 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2459
2497
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
2460
2498
  * so search/match logic doesn't have to translate between two vocabularies.
2461
2499
  */
2462
- 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"),
2463
2501
  /**
2464
2502
  * Specializations the user is searching for - free-form titles.
2465
2503
  *
@@ -2468,19 +2506,19 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2468
2506
  * surfaces a curated "Popular Roles" picker for discovery, but the user
2469
2507
  * can ultimately add any title; matching/normalization happens downstream.
2470
2508
  */
2471
- 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"),
2472
2510
  /**
2473
2511
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
2474
2512
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
2475
2513
  * Defaults to 0 ("any salary") rather than being optional - every job-seeker
2476
2514
  * has a floor, even if it's zero.
2477
2515
  */
2478
- minSalary: (0, import_yup32.number)().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2479
- 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"),
2480
2518
  /**
2481
2519
  * Marketing-attribution capture from the final onboarding step.
2482
2520
  */
2483
- referralSource: (0, import_yup32.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
2521
+ referralSource: (0, import_yup33.string)().oneOf(SupportedReferralSources).required().label("Referral Source"),
2484
2522
  /**
2485
2523
  * Resumes the user has uploaded. Embedded directly on the user document
2486
2524
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -2494,25 +2532,25 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2494
2532
  * AI resume-builder flow - onboarding uploads land here, AI-built resumes
2495
2533
  * live in their own collection.
2496
2534
  */
2497
- resumes: (0, import_yup32.array)().of(
2498
- (0, import_yup32.object)({
2535
+ resumes: (0, import_yup33.array)().of(
2536
+ (0, import_yup33.object)({
2499
2537
  // Stable id assigned on upload - used to address a specific entry
2500
2538
  // for delete / set-primary operations without exposing the GCS URL
2501
2539
  // as a route key.
2502
- id: (0, import_yup32.string)().required().label("ID"),
2503
- url: (0, import_yup32.string)().required().label("Resume URL"),
2504
- filename: (0, import_yup32.string)().trim().max(255).optional().label("Filename"),
2505
- sizeBytes: (0, import_yup32.number)().integer().min(0).optional().label("Size (bytes)"),
2506
- mimeType: (0, import_yup32.string)().trim().max(120).optional().label("MIME Type"),
2507
- uploadedAt: (0, import_yup32.date)().required().label("Uploaded At"),
2508
- 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")
2509
2547
  }).noUnknown().strict().label("Resume")
2510
2548
  ).max(5, "You can keep at most 5 resumes on file.").default([]).label("Resumes"),
2511
2549
  /**
2512
2550
  * Set when the user finishes the wizard's last step. Acts as the gate the
2513
2551
  * onboarding hook checks to redirect users who haven't completed setup.
2514
2552
  */
2515
- onboardingCompletedAt: (0, import_yup32.date)().nullable().optional().label("Onboarding Completed At"),
2553
+ onboardingCompletedAt: (0, import_yup33.date)().nullable().optional().label("Onboarding Completed At"),
2516
2554
  /**
2517
2555
  * Parser-suggested values for wizard fields, written by the resume-upload
2518
2556
  * flow. Every parser-derived field lands here - including profile-shaped
@@ -2532,92 +2570,92 @@ var UserJobPreferencesSchema = (0, import_yup32.object)({
2532
2570
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
2533
2571
  * because the user has not confirmed it yet.
2534
2572
  */
2535
- pendingPrefill: (0, import_yup32.object)({
2536
- headline: (0, import_yup32.string)().trim().optional().label("Pending Headline"),
2537
- aboutMe: (0, import_yup32.string)().trim().optional().label("Pending About Me"),
2538
- 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"),
2539
2577
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
2540
- experienceLevel: (0, import_yup32.string)().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2541
- socialAccounts: (0, import_yup32.array)().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2542
- workExperiences: (0, import_yup32.array)().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2543
- 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")
2544
2582
  }).nullable().optional().default(void 0).label("Pending Prefill")
2545
2583
  }).noUnknown().strict().label("User Job Preferences Schema");
2546
2584
 
2547
2585
  // src/user/user-recruiter-profile.schema.ts
2548
- var import_yup33 = require("yup");
2549
- var RecruiterPageLinkSchema = (0, import_yup33.object)({
2586
+ var import_yup34 = require("yup");
2587
+ var RecruiterPageLinkSchema = (0, import_yup34.object)({
2550
2588
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
2551
- 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")
2552
2590
  }).noUnknown().strict().label("Recruiter Page Link");
2553
- var UserRecruiterProfileSchema = (0, import_yup33.object)({
2554
- recruiterProfile: (0, import_yup33.object)({
2555
- 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")
2556
2594
  }).optional().default(void 0).label("Recruiter Profile")
2557
2595
  }).noUnknown().strict().label("User Recruiter Profile");
2558
2596
 
2559
2597
  // src/user/user-coordinator-profile.schema.ts
2560
- var import_yup34 = require("yup");
2561
- var CoordinatorPageLinkSchema = (0, import_yup34.object)({
2598
+ var import_yup35 = require("yup");
2599
+ var CoordinatorPageLinkSchema = (0, import_yup35.object)({
2562
2600
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
2563
- 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")
2564
2602
  }).noUnknown().strict().label("Coordinator Page Link");
2565
- var UserCoordinatorProfileSchema = (0, import_yup34.object)({
2566
- coordinatorProfile: (0, import_yup34.object)({
2567
- 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")
2568
2606
  }).optional().default(void 0).label("Coordinator Profile")
2569
2607
  }).noUnknown().strict().label("User Coordinator Profile");
2570
2608
 
2571
2609
  // src/user/user.schema.ts
2572
- var UserSchema = (0, import_yup35.object)({
2610
+ var UserSchema = (0, import_yup36.object)({
2573
2611
  /**
2574
2612
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
2575
2613
  */
2576
- authAccountId: (0, import_yup35.string)().required().label("Auth Account ID"),
2614
+ authAccountId: (0, import_yup36.string)().required().label("Auth Account ID"),
2577
2615
  /**
2578
2616
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
2579
2617
  */
2580
- socialAccounts: (0, import_yup35.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
2618
+ socialAccounts: (0, import_yup36.array)().of(SocialAccountSchema).default([]).label("Social Accounts"),
2581
2619
  /**
2582
2620
  * Work experience information about the user
2583
2621
  */
2584
- 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"),
2585
2623
  /**
2586
2624
  * Education information about the user
2587
2625
  */
2588
- educations: (0, import_yup35.array)().of(EducationSchema).required().default([]).label("Educations"),
2626
+ educations: (0, import_yup36.array)().of(EducationSchema).required().default([]).label("Educations"),
2589
2627
  /**
2590
2628
  * Skills information about the user
2591
2629
  */
2592
- skills: (0, import_yup35.array)().of(UserSkillSchema).required().default([]).label("Skills"),
2630
+ skills: (0, import_yup36.array)().of(UserSkillSchema).required().default([]).label("Skills"),
2593
2631
  /**
2594
2632
  * Projects information about the user
2595
2633
  */
2596
- projects: (0, import_yup35.array)().of(UserProjectSchema).default([]).label("Projects"),
2634
+ projects: (0, import_yup36.array)().of(UserProjectSchema).default([]).label("Projects"),
2597
2635
  /**
2598
2636
  * Certifications information about the user
2599
2637
  */
2600
- certifications: (0, import_yup35.array)().of(UserCertificationSchema).default([]).label("Certifications"),
2638
+ certifications: (0, import_yup36.array)().of(UserCertificationSchema).default([]).label("Certifications"),
2601
2639
  /**
2602
2640
  * Interests information about the user.
2603
2641
  */
2604
- interests: (0, import_yup35.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
2642
+ interests: (0, import_yup36.array)().of(UserInterestSchema).optional().default([]).label("Interests"),
2605
2643
  /**
2606
2644
  * Languages information about the user
2607
2645
  */
2608
- languages: (0, import_yup35.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
2646
+ languages: (0, import_yup36.array)().of(UserLanguageSchema).required().default([]).label("Languages"),
2609
2647
  /**
2610
2648
  * Additional information about the user
2611
2649
  */
2612
- additionalInfo: (0, import_yup35.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2650
+ additionalInfo: (0, import_yup36.array)().of(UserAdditionalInfoSchema).default([]).label("Additional Information"),
2613
2651
  /**
2614
2652
  * Status of the user account
2615
2653
  */
2616
- status: (0, import_yup35.string)().oneOf(SupportedUserStatuses).required().label("Status"),
2654
+ status: (0, import_yup36.string)().oneOf(SupportedUserStatuses).required().label("Status"),
2617
2655
  /**
2618
2656
  * Roles assigned to the user
2619
2657
  */
2620
- 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"),
2621
2659
  /**
2622
2660
  * Explicit consent to receive marketing email (newsletters, job alerts by
2623
2661
  * broadcast, product updates). Marketing sends are HARD-GATED on
@@ -2629,33 +2667,33 @@ var UserSchema = (0, import_yup35.object)({
2629
2667
  * unsubscribe sets `subscribed=false` so consent and the email-service
2630
2668
  * suppression list stay consistent. Defaults to NOT subscribed (opt-in).
2631
2669
  */
2632
- marketingConsent: (0, import_yup35.object)({
2633
- 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"),
2634
2672
  /** Epoch ms of the last consent change (opt-in or opt-out). */
2635
- updatedAt: (0, import_yup35.number)().optional().label("Consent updated at"),
2673
+ updatedAt: (0, import_yup36.number)().optional().label("Consent updated at"),
2636
2674
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
2637
- source: (0, import_yup35.string)().optional().label("Consent source"),
2675
+ source: (0, import_yup36.string)().optional().label("Consent source"),
2638
2676
  /**
2639
2677
  * How often the user receives job-alert emails. `off` disables job alerts
2640
2678
  * only; other marketing stays governed by `subscribed`. Unset means the
2641
2679
  * user has not chosen a cadence yet.
2642
2680
  */
2643
- jobAlertFrequency: (0, import_yup35.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2681
+ jobAlertFrequency: (0, import_yup36.string)().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2644
2682
  }).default({ subscribed: false }).label("Marketing Consent"),
2645
2683
  /**
2646
2684
  * Vector embedding of the user's profile for semantic/hybrid search.
2647
2685
  * Generated from a structured summary of skills, experience, education, etc.
2648
2686
  * Only generated for public profiles with sufficient completeness (≥60%).
2649
2687
  */
2650
- embedding: (0, import_yup35.object)({
2651
- vector: (0, import_yup35.array)((0, import_yup35.number)().required()).optional().label("Embedding vector"),
2652
- 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")
2653
2691
  }).nullable().optional().label("Embedding")
2654
2692
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
2655
2693
 
2656
2694
  // src/user/user-completeness.schema.ts
2657
- var import_yup36 = require("yup");
2658
- var UserCompletenessSchema = (0, import_yup36.object)({
2695
+ var import_yup37 = require("yup");
2696
+ var UserCompletenessSchema = (0, import_yup37.object)({
2659
2697
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
2660
2698
  // Optional
2661
2699
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -2702,6 +2740,10 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2702
2740
  EmployeeCount,
2703
2741
  EmploymentType,
2704
2742
  ExperienceLevel,
2743
+ FEEDBACK_MESSAGE_MAX,
2744
+ FeedbackSchema,
2745
+ FeedbackStatus,
2746
+ FeedbackType,
2705
2747
  GeneraDetailFields,
2706
2748
  GroupManagedBy,
2707
2749
  GroupMembershipSchema,
@@ -2757,6 +2799,8 @@ var StudentCompletenessSchema = UserCompletenessSchema.omit([
2757
2799
  SupportedEmployeeCounts,
2758
2800
  SupportedEmploymentTypes,
2759
2801
  SupportedExperienceLevels,
2802
+ SupportedFeedbackStatuses,
2803
+ SupportedFeedbackTypes,
2760
2804
  SupportedJobAlertFrequencies,
2761
2805
  SupportedJobCategories,
2762
2806
  SupportedJobIndustries,
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: {
@@ -2872,4 +2910,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
2872
2910
  };
2873
2911
  }, "">;
2874
2912
 
2875
- 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, 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, 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 };
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: {
@@ -2872,4 +2910,4 @@ declare const StudentCompletenessSchema: yup.ObjectSchema<{
2872
2910
  };
2873
2911
  }, "">;
2874
2912
 
2875
- 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, 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, 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 };
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
@@ -2151,55 +2151,87 @@ var ReportSchema = object20({
2151
2151
  comment: string17().max(1e3).optional().label("Comment")
2152
2152
  }).label("Report Schema");
2153
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
+
2154
2186
  // src/user/user.schema.ts
2155
- 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";
2156
2188
 
2157
2189
  // src/user/work-experience.schema.ts
2158
- import { boolean as boolean12, object as object21, string as string18 } from "yup";
2159
- var WorkExperienceSchema = object21().shape({
2190
+ import { boolean as boolean12, object as object22, string as string19 } from "yup";
2191
+ var WorkExperienceSchema = object22().shape({
2160
2192
  company: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company"),
2161
- designation: string18().trim().required().label("Designation"),
2193
+ designation: string19().trim().required().label("Designation"),
2162
2194
  duration: DurationSchema({
2163
2195
  format: "YYYY-MM",
2164
2196
  startLabel: "Start Date",
2165
2197
  endLabel: "End Date"
2166
2198
  }).required().label("Duration"),
2167
- description: string18().trim().max(3e3).optional().label("Description"),
2199
+ description: string19().trim().max(3e3).optional().label("Description"),
2168
2200
  location: LocationSchema.required().label("Location"),
2169
2201
  isRemote: boolean12().oneOf([true, false]).default(false).label("Is Remote")
2170
2202
  }).noUnknown().strict().label("Work Experience");
2171
2203
 
2172
2204
  // src/user/education.schema.ts
2173
- import { boolean as boolean13, object as object22, string as string19 } from "yup";
2174
- var EducationSchema = object22({
2205
+ import { boolean as boolean13, object as object23, string as string20 } from "yup";
2206
+ var EducationSchema = object23({
2175
2207
  institute: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute"),
2176
- course: string19().trim().required().label("Course"),
2177
- fieldOfStudy: string19().trim().required().label("Field of Study"),
2208
+ course: string20().trim().required().label("Course"),
2209
+ fieldOfStudy: string20().trim().required().label("Field of Study"),
2178
2210
  duration: DurationSchema({
2179
2211
  format: "YYYY-MM",
2180
2212
  startLabel: "Start Date",
2181
2213
  endLabel: "End Date"
2182
2214
  }).required().label("Duration"),
2183
- description: string19().trim().max(3e3).optional().label("Description"),
2215
+ description: string20().trim().max(3e3).optional().label("Description"),
2184
2216
  isDistanceLearning: boolean13().default(false).label("Is Distance Learning"),
2185
2217
  location: LocationSchema.required().label("Location"),
2186
- studyType: string19().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2218
+ studyType: string20().oneOf(SupportedStudyTypes).trim().max(50).required().label("Study Type")
2187
2219
  }).noUnknown().strict().label("Education");
2188
2220
 
2189
2221
  // src/user/user-skill.schema.ts
2190
- import { object as object23, string as string20 } from "yup";
2191
- var UserSkillSchema = object23({
2192
- name: string20().required().label("Name"),
2193
- 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"),
2194
2226
  lastUsed: dateString().format("YYYY-MM").nullable().optional().label("Last Used")
2195
2227
  }).noUnknown().strict().label("Skill");
2196
2228
 
2197
2229
  // src/user/project.schema.ts
2198
- import { object as object24, string as string21 } from "yup";
2199
- var UserProjectSchema = object24({
2200
- name: string21().trim().max(50).required().label("Name"),
2201
- url: string21().optional().label("URL"),
2202
- 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"),
2203
2235
  duration: DurationSchema({
2204
2236
  format: "YYYY-MM",
2205
2237
  startLabel: "Start Date",
@@ -2208,65 +2240,65 @@ var UserProjectSchema = object24({
2208
2240
  }).noUnknown().strict().label("Project");
2209
2241
 
2210
2242
  // src/user/user-certification.schema.ts
2211
- import { object as object25, string as string22 } from "yup";
2212
- var UserCertificationSchema = object25({
2213
- 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"),
2214
2246
  // TODO: Add validation for authority
2215
- authority: string22().trim().max(100).required().label("Authority"),
2216
- 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"),
2217
2249
  duration: DurationSchema({
2218
2250
  format: "YYYY-MM",
2219
2251
  startLabel: "Start Date",
2220
2252
  endLabel: "End Date"
2221
2253
  }).optional().nullable().label("Duration"),
2222
- url: string22().optional().label("URL")
2254
+ url: string23().optional().label("URL")
2223
2255
  }).noUnknown().strict().label("Certification");
2224
2256
 
2225
2257
  // src/user/user-interest.schema.ts
2226
- import { string as string23 } from "yup";
2227
- var UserInterestSchema = string23().trim().required().label("Interest");
2258
+ import { string as string24 } from "yup";
2259
+ var UserInterestSchema = string24().trim().required().label("Interest");
2228
2260
 
2229
2261
  // src/user/user-language.schema.ts
2230
- import { object as object26, string as string24 } from "yup";
2231
- var UserLanguageSchema = object26({
2232
- name: string24().trim().required().label("Name"),
2233
- 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")
2234
2266
  }).noUnknown().strict().label("Language");
2235
2267
 
2236
2268
  // src/user/user-additional-info.schema.ts
2237
- import { object as object27, string as string25 } from "yup";
2238
- var UserAdditionalInfoSchema = object27({
2239
- title: string25().trim().max(60).required().label("Title"),
2240
- 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")
2241
2273
  }).noUnknown().strict().label("User Additional Info");
2242
2274
 
2243
2275
  // src/user/general-detail.schema.ts
2244
- import { object as object28, string as string26 } from "yup";
2245
- var UserGeneralDetailSchema = object28({
2246
- id: string26().optional().label("ID"),
2247
- name: object28().shape({
2248
- first: string26().trim().max(50).required().label("First Name"),
2249
- 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")
2250
2282
  }).required().label("Name"),
2251
- headline: string26().trim().max(200).optional().label("Headline"),
2252
- image: string26().optional().label("Image"),
2253
- aboutMe: string26().trim().max(3e3).optional().label("About Me"),
2254
- email: string26().required().label("Email"),
2255
- mobile: string26().nullable().optional().label("Mobile"),
2256
- emailVerified: string26().nullable().optional().label("Email Verified"),
2257
- mobileVerified: string26().nullable().optional().label("Mobile Verified"),
2258
- 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"),
2259
2291
  location: LocationSchema.required().label("Location"),
2260
- region: object28().shape({
2261
- country: string26().trim().required().label("Region Country"),
2262
- 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")
2263
2295
  }).optional().default(void 0).label("Region"),
2264
- profileVisibility: string26().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2296
+ profileVisibility: string27().oneOf(SupportedUserProfileVisibilities).default("public" /* Public */).label("Profile Visibility")
2265
2297
  }).noUnknown().strict().label("General Detail");
2266
2298
 
2267
2299
  // src/user/user-job-preferences.schema.ts
2268
- import { array as array11, boolean as boolean14, date as date2, number as number9, object as object29, string as string27 } from "yup";
2269
- 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({
2270
2302
  /**
2271
2303
  * Whether the job seeker is openly signalling availability. Surfaces the
2272
2304
  * "Open to work" badge on the public profile and boosts visibility in
@@ -2278,7 +2310,7 @@ var UserJobPreferencesSchema = object29({
2278
2310
  * and can downgrade the visibility of expired or low-relevance postings for
2279
2311
  * users in `passively_browsing` mode.
2280
2312
  */
2281
- jobSearchUrgency: string27().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2313
+ jobSearchUrgency: string28().oneOf(SupportedJobSearchUrgencies).required().label("Job Search Urgency"),
2282
2314
  /**
2283
2315
  * Locations the user wants to work in. Stores the full `LocationSchema`
2284
2316
  * shape (country, city, state, geo, etc.) as returned by the locations
@@ -2295,7 +2327,7 @@ var UserJobPreferencesSchema = object29({
2295
2327
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
2296
2328
  * so search/match logic doesn't have to translate between two vocabularies.
2297
2329
  */
2298
- 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"),
2299
2331
  /**
2300
2332
  * Specializations the user is searching for - free-form titles.
2301
2333
  *
@@ -2304,7 +2336,7 @@ var UserJobPreferencesSchema = object29({
2304
2336
  * surfaces a curated "Popular Roles" picker for discovery, but the user
2305
2337
  * can ultimately add any title; matching/normalization happens downstream.
2306
2338
  */
2307
- 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"),
2308
2340
  /**
2309
2341
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
2310
2342
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
@@ -2312,11 +2344,11 @@ var UserJobPreferencesSchema = object29({
2312
2344
  * has a floor, even if it's zero.
2313
2345
  */
2314
2346
  minSalary: number9().integer().min(MIN_SALARY_LOWER_BOUND).max(MIN_SALARY_UPPER_BOUND).default(0).required().label("Minimum Salary"),
2315
- minSalaryCurrency: string27().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2347
+ minSalaryCurrency: string28().oneOf(SupportedSalaryCurrencies).default("USD").required().label("Minimum Salary Currency"),
2316
2348
  /**
2317
2349
  * Marketing-attribution capture from the final onboarding step.
2318
2350
  */
2319
- referralSource: string27().oneOf(SupportedReferralSources).required().label("Referral Source"),
2351
+ referralSource: string28().oneOf(SupportedReferralSources).required().label("Referral Source"),
2320
2352
  /**
2321
2353
  * Resumes the user has uploaded. Embedded directly on the user document
2322
2354
  * (capped at 5) - they're cheap to denormalize, every wizard step that
@@ -2331,15 +2363,15 @@ var UserJobPreferencesSchema = object29({
2331
2363
  * live in their own collection.
2332
2364
  */
2333
2365
  resumes: array11().of(
2334
- object29({
2366
+ object30({
2335
2367
  // Stable id assigned on upload - used to address a specific entry
2336
2368
  // for delete / set-primary operations without exposing the GCS URL
2337
2369
  // as a route key.
2338
- id: string27().required().label("ID"),
2339
- url: string27().required().label("Resume URL"),
2340
- 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"),
2341
2373
  sizeBytes: number9().integer().min(0).optional().label("Size (bytes)"),
2342
- mimeType: string27().trim().max(120).optional().label("MIME Type"),
2374
+ mimeType: string28().trim().max(120).optional().label("MIME Type"),
2343
2375
  uploadedAt: date2().required().label("Uploaded At"),
2344
2376
  isPrimary: boolean14().default(false).label("Is Primary")
2345
2377
  }).noUnknown().strict().label("Resume")
@@ -2368,12 +2400,12 @@ var UserJobPreferencesSchema = object29({
2368
2400
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
2369
2401
  * because the user has not confirmed it yet.
2370
2402
  */
2371
- pendingPrefill: object29({
2372
- headline: string27().trim().optional().label("Pending Headline"),
2373
- aboutMe: string27().trim().optional().label("Pending About Me"),
2374
- 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"),
2375
2407
  location: LocationSchema.optional().default(void 0).label("Pending Location"),
2376
- experienceLevel: string27().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2408
+ experienceLevel: string28().oneOf(SupportedExperienceLevels).optional().label("Pending Experience Level"),
2377
2409
  socialAccounts: array11().of(SocialAccountSchema.required()).optional().label("Pending Social Accounts"),
2378
2410
  workExperiences: array11().of(WorkExperienceSchema.required()).optional().label("Pending Work Experiences"),
2379
2411
  educations: array11().of(EducationSchema.required()).optional().label("Pending Educations")
@@ -2381,35 +2413,35 @@ var UserJobPreferencesSchema = object29({
2381
2413
  }).noUnknown().strict().label("User Job Preferences Schema");
2382
2414
 
2383
2415
  // src/user/user-recruiter-profile.schema.ts
2384
- import { array as array12, object as object30, string as string28 } from "yup";
2385
- var RecruiterPageLinkSchema = object30({
2416
+ import { array as array12, object as object31, string as string29 } from "yup";
2417
+ var RecruiterPageLinkSchema = object31({
2386
2418
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Company Page"),
2387
- jobTitle: string28().trim().max(100).optional().label("Job Title")
2419
+ jobTitle: string29().trim().max(100).optional().label("Job Title")
2388
2420
  }).noUnknown().strict().label("Recruiter Page Link");
2389
- var UserRecruiterProfileSchema = object30({
2390
- recruiterProfile: object30({
2421
+ var UserRecruiterProfileSchema = object31({
2422
+ recruiterProfile: object31({
2391
2423
  hiringFor: array12().of(RecruiterPageLinkSchema).default([]).label("Hiring For")
2392
2424
  }).optional().default(void 0).label("Recruiter Profile")
2393
2425
  }).noUnknown().strict().label("User Recruiter Profile");
2394
2426
 
2395
2427
  // src/user/user-coordinator-profile.schema.ts
2396
- import { array as array13, object as object31, string as string29 } from "yup";
2397
- var CoordinatorPageLinkSchema = object31({
2428
+ import { array as array13, object as object32, string as string30 } from "yup";
2429
+ var CoordinatorPageLinkSchema = object32({
2398
2430
  page: PageSchema.pick(["name", "slug", "type", "logo"]).deepPartial().concat(PageSchema.pick(["name", "type"])).required().label("Institute Page"),
2399
- jobTitle: string29().trim().max(100).optional().label("Job Title")
2431
+ jobTitle: string30().trim().max(100).optional().label("Job Title")
2400
2432
  }).noUnknown().strict().label("Coordinator Page Link");
2401
- var UserCoordinatorProfileSchema = object31({
2402
- coordinatorProfile: object31({
2433
+ var UserCoordinatorProfileSchema = object32({
2434
+ coordinatorProfile: object32({
2403
2435
  coordinatesAt: array13().of(CoordinatorPageLinkSchema).default([]).label("Coordinates At")
2404
2436
  }).optional().default(void 0).label("Coordinator Profile")
2405
2437
  }).noUnknown().strict().label("User Coordinator Profile");
2406
2438
 
2407
2439
  // src/user/user.schema.ts
2408
- var UserSchema = object32({
2440
+ var UserSchema = object33({
2409
2441
  /**
2410
2442
  * Related auth account id from auth Server (e.g. Better auth https://auth.thejob.dev)
2411
2443
  */
2412
- authAccountId: string30().required().label("Auth Account ID"),
2444
+ authAccountId: string31().required().label("Auth Account ID"),
2413
2445
  /**
2414
2446
  * Social media information about the user (e.g. LinkedIn, GitHub, etc.)
2415
2447
  */
@@ -2449,11 +2481,11 @@ var UserSchema = object32({
2449
2481
  /**
2450
2482
  * Status of the user account
2451
2483
  */
2452
- status: string30().oneOf(SupportedUserStatuses).required().label("Status"),
2484
+ status: string31().oneOf(SupportedUserStatuses).required().label("Status"),
2453
2485
  /**
2454
2486
  * Roles assigned to the user
2455
2487
  */
2456
- roles: array14().of(string30().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2488
+ roles: array14().of(string31().oneOf(SupportedUserRoles)).required().default(DefaultUserRoles).label("Roles"),
2457
2489
  /**
2458
2490
  * Explicit consent to receive marketing email (newsletters, job alerts by
2459
2491
  * broadcast, product updates). Marketing sends are HARD-GATED on
@@ -2465,33 +2497,33 @@ var UserSchema = object32({
2465
2497
  * unsubscribe sets `subscribed=false` so consent and the email-service
2466
2498
  * suppression list stay consistent. Defaults to NOT subscribed (opt-in).
2467
2499
  */
2468
- marketingConsent: object32({
2500
+ marketingConsent: object33({
2469
2501
  subscribed: boolean15().default(false).label("Subscribed to marketing email"),
2470
2502
  /** Epoch ms of the last consent change (opt-in or opt-out). */
2471
2503
  updatedAt: number10().optional().label("Consent updated at"),
2472
2504
  /** Where the consent change originated, e.g. `onboarding`, `unsubscribe`, `settings`. */
2473
- source: string30().optional().label("Consent source"),
2505
+ source: string31().optional().label("Consent source"),
2474
2506
  /**
2475
2507
  * How often the user receives job-alert emails. `off` disables job alerts
2476
2508
  * only; other marketing stays governed by `subscribed`. Unset means the
2477
2509
  * user has not chosen a cadence yet.
2478
2510
  */
2479
- jobAlertFrequency: string30().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2511
+ jobAlertFrequency: string31().oneOf(SupportedJobAlertFrequencies).optional().label("Job alert frequency")
2480
2512
  }).default({ subscribed: false }).label("Marketing Consent"),
2481
2513
  /**
2482
2514
  * Vector embedding of the user's profile for semantic/hybrid search.
2483
2515
  * Generated from a structured summary of skills, experience, education, etc.
2484
2516
  * Only generated for public profiles with sufficient completeness (≥60%).
2485
2517
  */
2486
- embedding: object32({
2518
+ embedding: object33({
2487
2519
  vector: array14(number10().required()).optional().label("Embedding vector"),
2488
- model: string30().optional().label("Embedding model")
2520
+ model: string31().optional().label("Embedding model")
2489
2521
  }).nullable().optional().label("Embedding")
2490
2522
  }).concat(UserGeneralDetailSchema).concat(UserJobPreferencesSchema).concat(UserRecruiterProfileSchema).concat(UserCoordinatorProfileSchema).noUnknown().strict().label("User Schema");
2491
2523
 
2492
2524
  // src/user/user-completeness.schema.ts
2493
- import { object as object33 } from "yup";
2494
- var UserCompletenessSchema = object33({
2525
+ import { object as object34 } from "yup";
2526
+ var UserCompletenessSchema = object34({
2495
2527
  additionalInfo: CompletenessScoreSchema(0).label("Additional Info"),
2496
2528
  // Optional
2497
2529
  certifications: CompletenessScoreSchema(0).label("Certifications"),
@@ -2537,6 +2569,10 @@ export {
2537
2569
  EmployeeCount,
2538
2570
  EmploymentType,
2539
2571
  ExperienceLevel,
2572
+ FEEDBACK_MESSAGE_MAX,
2573
+ FeedbackSchema,
2574
+ FeedbackStatus,
2575
+ FeedbackType,
2540
2576
  GeneraDetailFields,
2541
2577
  GroupManagedBy,
2542
2578
  GroupMembershipSchema,
@@ -2592,6 +2628,8 @@ export {
2592
2628
  SupportedEmployeeCounts,
2593
2629
  SupportedEmploymentTypes,
2594
2630
  SupportedExperienceLevels,
2631
+ SupportedFeedbackStatuses,
2632
+ SupportedFeedbackTypes,
2595
2633
  SupportedJobAlertFrequencies,
2596
2634
  SupportedJobCategories,
2597
2635
  SupportedJobIndustries,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thejob/schema",
3
- "version": "2.1.1",
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
  */