@thejob/schema 2.0.0 → 2.0.1

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.
@@ -27,7 +27,7 @@ export const UserJobPreferencesSchema = object({
27
27
  /**
28
28
  * Whether the job seeker is openly signalling availability. Surfaces the
29
29
  * "Open to work" badge on the public profile and boosts visibility in
30
- * recruiter search. Defaults to `false` users must opt in.
30
+ * recruiter search. Defaults to `false` - users must opt in.
31
31
  */
32
32
  openToWork: boolean().default(false).label("Open to Work"),
33
33
 
@@ -57,7 +57,7 @@ export const UserJobPreferencesSchema = object({
57
57
  * (up to 2) for borderline candidates.
58
58
  *
59
59
  * Distinct from the singular `experienceLevel` field on `UserSchema`
60
- * (concat'd via `UserGeneralDetailSchema`) that field captures the user's
60
+ * (concat'd via `UserGeneralDetailSchema`) - that field captures the user's
61
61
  * own current seniority, while these are the levels they want to *target*.
62
62
  * Both reuse the same `ExperienceLevel` taxonomy from `common.constant.ts`
63
63
  * so search/match logic doesn't have to translate between two vocabularies.
@@ -70,7 +70,7 @@ export const UserJobPreferencesSchema = object({
70
70
  .label("Target Experience Levels"),
71
71
 
72
72
  /**
73
- * Specializations the user is searching for free-form titles.
73
+ * Specializations the user is searching for - free-form titles.
74
74
  *
75
75
  * Job titles are an open vocabulary (think O*NET, ESCO, LinkedIn's title
76
76
  * graph), so the schema only enforces length bounds per entry. The wizard
@@ -86,7 +86,7 @@ export const UserJobPreferencesSchema = object({
86
86
  /**
87
87
  * Minimum acceptable annual base salary, in `minSalaryCurrency`.
88
88
  * Stored as an integer in the currency's major unit (e.g. dollars, not cents).
89
- * Defaults to 0 ("any salary") rather than being optional every job-seeker
89
+ * Defaults to 0 ("any salary") rather than being optional - every job-seeker
90
90
  * has a floor, even if it's zero.
91
91
  */
92
92
  minSalary: number()
@@ -113,7 +113,7 @@ export const UserJobPreferencesSchema = object({
113
113
 
114
114
  /**
115
115
  * Resumes the user has uploaded. Embedded directly on the user document
116
- * (capped at 5) they're cheap to denormalize, every wizard step that
116
+ * (capped at 5) - they're cheap to denormalize, every wizard step that
117
117
  * cares about them is already loading the user doc, and the cap keeps the
118
118
  * subdoc bounded.
119
119
  *
@@ -121,13 +121,13 @@ export const UserJobPreferencesSchema = object({
121
121
  * the API can sign for download is kept here.
122
122
  *
123
123
  * Distinct from the `Resumes` collection used by the (currently unused)
124
- * AI resume-builder flow onboarding uploads land here, AI-built resumes
124
+ * AI resume-builder flow - onboarding uploads land here, AI-built resumes
125
125
  * live in their own collection.
126
126
  */
127
127
  resumes: array()
128
128
  .of(
129
129
  object({
130
- // Stable id assigned on upload used to address a specific entry
130
+ // Stable id assigned on upload - used to address a specific entry
131
131
  // for delete / set-primary operations without exposing the GCS URL
132
132
  // as a route key.
133
133
  id: string().required().label("ID"),
@@ -157,18 +157,18 @@ export const UserJobPreferencesSchema = object({
157
157
 
158
158
  /**
159
159
  * Parser-suggested values for wizard fields, written by the resume-upload
160
- * flow. Every parser-derived field lands here including profile-shaped
160
+ * flow. Every parser-derived field lands here - including profile-shaped
161
161
  * fields (headline, aboutMe, mobile, location, experienceLevel,
162
- * socialAccounts, workExperiences, educations) so nothing reaches the
162
+ * socialAccounts, workExperiences, educations) - so nothing reaches the
163
163
  * top-level user document until the user confirms it on the matching
164
164
  * wizard step. When a user clicks Next on a step, the API drops the
165
165
  * matching key from this sub-doc so a re-uploaded resume can't overwrite
166
166
  * confirmed answers.
167
167
  *
168
- * READ RULE strict:
168
+ * READ RULE - strict:
169
169
  * `pendingPrefill.<field>` is ONLY for seeding a wizard step's form
170
170
  * initial value (e.g. `prefer(user.<field>, user.pendingPrefill?.<field>)`
171
- * in a step's `load`). It is NOT the user's actual value it's an
171
+ * in a step's `load`). It is NOT the user's actual value - it's an
172
172
  * unconfirmed suggestion. Never substitute it as a fallback in profile
173
173
  * pages, search/match, recommendations, public profile, dashboards, or
174
174
  * APIs. If `user.<field>` is empty there, the correct behavior is empty,
@@ -26,7 +26,7 @@ export const RecruiterPageLinkSchema = object({
26
26
 
27
27
  /**
28
28
  * Recruiter-role-specific fields on UserSchema. All optional at the field
29
- * level presence is gated by `UserRole.Recruiter` in the user's `roles`,
29
+ * level - presence is gated by `UserRole.Recruiter` in the user's `roles`,
30
30
  * not by schema branching, so the user shape stays flat.
31
31
  */
32
32
  export const UserRecruiterProfileSchema = object({
@@ -68,7 +68,7 @@ export enum JobSearchUrgency {
68
68
  export const SupportedJobSearchUrgencies = Object.values(JobSearchUrgency);
69
69
 
70
70
  /**
71
- * How the user heard about the platform captured at the end of onboarding
71
+ * How the user heard about the platform - captured at the end of onboarding
72
72
  * for marketing attribution.
73
73
  */
74
74
  export enum ReferralSource {