@thejob/schema 2.1.6 → 2.1.7

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
@@ -2569,6 +2569,25 @@ var UserGeneralDetailSchema = (0, import_yup33.object)({
2569
2569
  emailVerified: (0, import_yup33.string)().nullable().optional().label("Email Verified"),
2570
2570
  mobileVerified: (0, import_yup33.string)().nullable().optional().label("Mobile Verified"),
2571
2571
  experienceLevel: (0, import_yup33.string)().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2572
+ /**
2573
+ * The user's HIGHEST qualification, e.g. `bachelor`.
2574
+ *
2575
+ * The counterpart of `JobSchema.educationLevel` (what a listing requires), so
2576
+ * matching can compare the two directly. Nothing on the user side answered
2577
+ * that question before: `educations[].studyType` is the MODE of study
2578
+ * (`full_time`, `online`) and says nothing about attainment.
2579
+ *
2580
+ * Deliberately top-level and singular, alongside `experienceLevel`, rather
2581
+ * than per `educations` entry: what matching needs is one fact about the
2582
+ * person, and deriving it by ranking every entry would make the answer depend
2583
+ * on how completely a user filled in their history.
2584
+ *
2585
+ * Optional, unlike `experienceLevel`: every existing user predates it. An
2586
+ * absent value means "level unknown", which must leave matching
2587
+ * UNCONSTRAINED on education rather than filtering the user out — the same
2588
+ * opt-out reasoning `notificationPrefs` uses.
2589
+ */
2590
+ educationLevel: (0, import_yup33.string)().oneOf(SupportedEducationLevels).optional().label("Education level"),
2572
2591
  location: LocationSchema.required().label("Location"),
2573
2592
  /**
2574
2593
  * Where the account was created, captured once and never rewritten.
package/dist/index.d.cts CHANGED
@@ -1943,6 +1943,7 @@ declare const UserSchema: yup.ObjectSchema<{
1943
1943
  emailVerified: string | null | undefined;
1944
1944
  mobileVerified: string | null | undefined;
1945
1945
  experienceLevel: NonNullable<ExperienceLevel | undefined>;
1946
+ educationLevel: EducationLevel | undefined;
1946
1947
  location: {
1947
1948
  placeId?: string | null | undefined;
1948
1949
  state?: string | null | undefined;
@@ -2150,6 +2151,7 @@ declare const UserSchema: yup.ObjectSchema<{
2150
2151
  emailVerified: undefined;
2151
2152
  mobileVerified: undefined;
2152
2153
  experienceLevel: undefined;
2154
+ educationLevel: undefined;
2153
2155
  location: {
2154
2156
  placeId: undefined;
2155
2157
  country: undefined;
@@ -2202,6 +2204,7 @@ declare const UserGeneralDetailSchema: yup.ObjectSchema<{
2202
2204
  emailVerified: string | null | undefined;
2203
2205
  mobileVerified: string | null | undefined;
2204
2206
  experienceLevel: NonNullable<ExperienceLevel | undefined>;
2207
+ educationLevel: EducationLevel | undefined;
2205
2208
  location: {
2206
2209
  placeId?: string | null | undefined;
2207
2210
  state?: string | null | undefined;
@@ -2236,6 +2239,7 @@ declare const UserGeneralDetailSchema: yup.ObjectSchema<{
2236
2239
  emailVerified: undefined;
2237
2240
  mobileVerified: undefined;
2238
2241
  experienceLevel: undefined;
2242
+ educationLevel: undefined;
2239
2243
  location: {
2240
2244
  placeId: undefined;
2241
2245
  country: undefined;
package/dist/index.d.ts CHANGED
@@ -1943,6 +1943,7 @@ declare const UserSchema: yup.ObjectSchema<{
1943
1943
  emailVerified: string | null | undefined;
1944
1944
  mobileVerified: string | null | undefined;
1945
1945
  experienceLevel: NonNullable<ExperienceLevel | undefined>;
1946
+ educationLevel: EducationLevel | undefined;
1946
1947
  location: {
1947
1948
  placeId?: string | null | undefined;
1948
1949
  state?: string | null | undefined;
@@ -2150,6 +2151,7 @@ declare const UserSchema: yup.ObjectSchema<{
2150
2151
  emailVerified: undefined;
2151
2152
  mobileVerified: undefined;
2152
2153
  experienceLevel: undefined;
2154
+ educationLevel: undefined;
2153
2155
  location: {
2154
2156
  placeId: undefined;
2155
2157
  country: undefined;
@@ -2202,6 +2204,7 @@ declare const UserGeneralDetailSchema: yup.ObjectSchema<{
2202
2204
  emailVerified: string | null | undefined;
2203
2205
  mobileVerified: string | null | undefined;
2204
2206
  experienceLevel: NonNullable<ExperienceLevel | undefined>;
2207
+ educationLevel: EducationLevel | undefined;
2205
2208
  location: {
2206
2209
  placeId?: string | null | undefined;
2207
2210
  state?: string | null | undefined;
@@ -2236,6 +2239,7 @@ declare const UserGeneralDetailSchema: yup.ObjectSchema<{
2236
2239
  emailVerified: undefined;
2237
2240
  mobileVerified: undefined;
2238
2241
  experienceLevel: undefined;
2242
+ educationLevel: undefined;
2239
2243
  location: {
2240
2244
  placeId: undefined;
2241
2245
  country: undefined;
package/dist/index.js CHANGED
@@ -2392,6 +2392,25 @@ var UserGeneralDetailSchema = object30({
2392
2392
  emailVerified: string28().nullable().optional().label("Email Verified"),
2393
2393
  mobileVerified: string28().nullable().optional().label("Mobile Verified"),
2394
2394
  experienceLevel: string28().oneOf(SupportedExperienceLevels).required().label("Experience level"),
2395
+ /**
2396
+ * The user's HIGHEST qualification, e.g. `bachelor`.
2397
+ *
2398
+ * The counterpart of `JobSchema.educationLevel` (what a listing requires), so
2399
+ * matching can compare the two directly. Nothing on the user side answered
2400
+ * that question before: `educations[].studyType` is the MODE of study
2401
+ * (`full_time`, `online`) and says nothing about attainment.
2402
+ *
2403
+ * Deliberately top-level and singular, alongside `experienceLevel`, rather
2404
+ * than per `educations` entry: what matching needs is one fact about the
2405
+ * person, and deriving it by ranking every entry would make the answer depend
2406
+ * on how completely a user filled in their history.
2407
+ *
2408
+ * Optional, unlike `experienceLevel`: every existing user predates it. An
2409
+ * absent value means "level unknown", which must leave matching
2410
+ * UNCONSTRAINED on education rather than filtering the user out — the same
2411
+ * opt-out reasoning `notificationPrefs` uses.
2412
+ */
2413
+ educationLevel: string28().oneOf(SupportedEducationLevels).optional().label("Education level"),
2395
2414
  location: LocationSchema.required().label("Location"),
2396
2415
  /**
2397
2416
  * Where the account was created, captured once and never rewritten.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thejob/schema",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -1,5 +1,8 @@
1
1
  import { number, object, string } from "yup";
2
- import { SupportedExperienceLevels } from "../common/common.constant.js";
2
+ import {
3
+ SupportedEducationLevels,
4
+ SupportedExperienceLevels,
5
+ } from "../common/common.constant.js";
3
6
  import { LocationSchema } from "../location/location.schema.js";
4
7
  import {
5
8
  SupportedSignupContextSources,
@@ -30,6 +33,28 @@ export const UserGeneralDetailSchema = object({
30
33
  .oneOf(SupportedExperienceLevels)
31
34
  .required()
32
35
  .label("Experience level"),
36
+ /**
37
+ * The user's HIGHEST qualification, e.g. `bachelor`.
38
+ *
39
+ * The counterpart of `JobSchema.educationLevel` (what a listing requires), so
40
+ * matching can compare the two directly. Nothing on the user side answered
41
+ * that question before: `educations[].studyType` is the MODE of study
42
+ * (`full_time`, `online`) and says nothing about attainment.
43
+ *
44
+ * Deliberately top-level and singular, alongside `experienceLevel`, rather
45
+ * than per `educations` entry: what matching needs is one fact about the
46
+ * person, and deriving it by ranking every entry would make the answer depend
47
+ * on how completely a user filled in their history.
48
+ *
49
+ * Optional, unlike `experienceLevel`: every existing user predates it. An
50
+ * absent value means "level unknown", which must leave matching
51
+ * UNCONSTRAINED on education rather than filtering the user out — the same
52
+ * opt-out reasoning `notificationPrefs` uses.
53
+ */
54
+ educationLevel: string()
55
+ .oneOf(SupportedEducationLevels)
56
+ .optional()
57
+ .label("Education level"),
33
58
  location: LocationSchema.required().label("Location"),
34
59
  /**
35
60
  * Where the account was created, captured once and never rewritten.