@thejob/schema 2.0.6 → 2.0.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 +8 -0
- package/dist/index.d.cts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
- package/src/page/page.schema.ts +16 -0
package/dist/index.cjs
CHANGED
|
@@ -551,7 +551,15 @@ var PageSchema = (0, import_yup12.object)().shape({
|
|
|
551
551
|
dark: (0, import_yup12.string)().optional().nullable().label("Dark Logo"),
|
|
552
552
|
light: (0, import_yup12.string)().required().label("Light Logo")
|
|
553
553
|
}).optional().nullable().default(null).label("Logo"),
|
|
554
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
555
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
556
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
557
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
558
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
559
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
554
560
|
categories: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).required().min(1).label("Categories"),
|
|
561
|
+
industries: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).optional().default([]).label("Industries"),
|
|
562
|
+
subCategories: (0, import_yup12.array)().of((0, import_yup12.string)().trim().required()).optional().default([]).label("Sub Categories"),
|
|
555
563
|
socialAccounts: (0, import_yup12.array)().of(SocialAccountSchema).optional().label("Social Accounts"),
|
|
556
564
|
isOwner: (0, import_yup12.boolean)().optional().label("Is Owner"),
|
|
557
565
|
isFeatured: (0, import_yup12.boolean)().optional().default(false).label("Is Featured"),
|
package/dist/index.d.cts
CHANGED
|
@@ -615,6 +615,8 @@ declare const JobSchema: ObjectSchema<{
|
|
|
615
615
|
verified: undefined;
|
|
616
616
|
logo: null;
|
|
617
617
|
categories: "";
|
|
618
|
+
industries: never[];
|
|
619
|
+
subCategories: never[];
|
|
618
620
|
socialAccounts: "";
|
|
619
621
|
isOwner: undefined;
|
|
620
622
|
isFeatured: false;
|
|
@@ -1197,6 +1199,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1197
1199
|
light: string;
|
|
1198
1200
|
} | null;
|
|
1199
1201
|
categories: string[];
|
|
1202
|
+
industries: string[];
|
|
1203
|
+
subCategories: string[];
|
|
1200
1204
|
socialAccounts: {
|
|
1201
1205
|
type: NonNullable<SocialAccount | undefined>;
|
|
1202
1206
|
isNew: boolean;
|
|
@@ -1235,6 +1239,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1235
1239
|
verified: undefined;
|
|
1236
1240
|
logo: null;
|
|
1237
1241
|
categories: "";
|
|
1242
|
+
industries: never[];
|
|
1243
|
+
subCategories: never[];
|
|
1238
1244
|
socialAccounts: "";
|
|
1239
1245
|
isOwner: undefined;
|
|
1240
1246
|
isFeatured: false;
|
|
@@ -1935,6 +1941,8 @@ declare const WorkExperienceSchema: ObjectSchema<{
|
|
|
1935
1941
|
verified: undefined;
|
|
1936
1942
|
logo: null;
|
|
1937
1943
|
categories: "";
|
|
1944
|
+
industries: never[];
|
|
1945
|
+
subCategories: never[];
|
|
1938
1946
|
socialAccounts: "";
|
|
1939
1947
|
isOwner: undefined;
|
|
1940
1948
|
isFeatured: false;
|
|
@@ -2020,6 +2028,8 @@ declare const EducationSchema: ObjectSchema<{
|
|
|
2020
2028
|
verified: undefined;
|
|
2021
2029
|
logo: null;
|
|
2022
2030
|
categories: "";
|
|
2031
|
+
industries: never[];
|
|
2032
|
+
subCategories: never[];
|
|
2023
2033
|
socialAccounts: "";
|
|
2024
2034
|
isOwner: undefined;
|
|
2025
2035
|
isFeatured: false;
|
|
@@ -2285,6 +2295,8 @@ declare const RecruiterPageLinkSchema: yup.ObjectSchema<{
|
|
|
2285
2295
|
verified: undefined;
|
|
2286
2296
|
logo: null;
|
|
2287
2297
|
categories: "";
|
|
2298
|
+
industries: never[];
|
|
2299
|
+
subCategories: never[];
|
|
2288
2300
|
socialAccounts: "";
|
|
2289
2301
|
isOwner: undefined;
|
|
2290
2302
|
isFeatured: false;
|
|
@@ -2363,6 +2375,8 @@ declare const CoordinatorPageLinkSchema: yup.ObjectSchema<{
|
|
|
2363
2375
|
verified: undefined;
|
|
2364
2376
|
logo: null;
|
|
2365
2377
|
categories: "";
|
|
2378
|
+
industries: never[];
|
|
2379
|
+
subCategories: never[];
|
|
2366
2380
|
socialAccounts: "";
|
|
2367
2381
|
isOwner: undefined;
|
|
2368
2382
|
isFeatured: false;
|
package/dist/index.d.ts
CHANGED
|
@@ -615,6 +615,8 @@ declare const JobSchema: ObjectSchema<{
|
|
|
615
615
|
verified: undefined;
|
|
616
616
|
logo: null;
|
|
617
617
|
categories: "";
|
|
618
|
+
industries: never[];
|
|
619
|
+
subCategories: never[];
|
|
618
620
|
socialAccounts: "";
|
|
619
621
|
isOwner: undefined;
|
|
620
622
|
isFeatured: false;
|
|
@@ -1197,6 +1199,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1197
1199
|
light: string;
|
|
1198
1200
|
} | null;
|
|
1199
1201
|
categories: string[];
|
|
1202
|
+
industries: string[];
|
|
1203
|
+
subCategories: string[];
|
|
1200
1204
|
socialAccounts: {
|
|
1201
1205
|
type: NonNullable<SocialAccount | undefined>;
|
|
1202
1206
|
isNew: boolean;
|
|
@@ -1235,6 +1239,8 @@ declare const PageSchema: yup.ObjectSchema<NonNullable<{
|
|
|
1235
1239
|
verified: undefined;
|
|
1236
1240
|
logo: null;
|
|
1237
1241
|
categories: "";
|
|
1242
|
+
industries: never[];
|
|
1243
|
+
subCategories: never[];
|
|
1238
1244
|
socialAccounts: "";
|
|
1239
1245
|
isOwner: undefined;
|
|
1240
1246
|
isFeatured: false;
|
|
@@ -1935,6 +1941,8 @@ declare const WorkExperienceSchema: ObjectSchema<{
|
|
|
1935
1941
|
verified: undefined;
|
|
1936
1942
|
logo: null;
|
|
1937
1943
|
categories: "";
|
|
1944
|
+
industries: never[];
|
|
1945
|
+
subCategories: never[];
|
|
1938
1946
|
socialAccounts: "";
|
|
1939
1947
|
isOwner: undefined;
|
|
1940
1948
|
isFeatured: false;
|
|
@@ -2020,6 +2028,8 @@ declare const EducationSchema: ObjectSchema<{
|
|
|
2020
2028
|
verified: undefined;
|
|
2021
2029
|
logo: null;
|
|
2022
2030
|
categories: "";
|
|
2031
|
+
industries: never[];
|
|
2032
|
+
subCategories: never[];
|
|
2023
2033
|
socialAccounts: "";
|
|
2024
2034
|
isOwner: undefined;
|
|
2025
2035
|
isFeatured: false;
|
|
@@ -2285,6 +2295,8 @@ declare const RecruiterPageLinkSchema: yup.ObjectSchema<{
|
|
|
2285
2295
|
verified: undefined;
|
|
2286
2296
|
logo: null;
|
|
2287
2297
|
categories: "";
|
|
2298
|
+
industries: never[];
|
|
2299
|
+
subCategories: never[];
|
|
2288
2300
|
socialAccounts: "";
|
|
2289
2301
|
isOwner: undefined;
|
|
2290
2302
|
isFeatured: false;
|
|
@@ -2363,6 +2375,8 @@ declare const CoordinatorPageLinkSchema: yup.ObjectSchema<{
|
|
|
2363
2375
|
verified: undefined;
|
|
2364
2376
|
logo: null;
|
|
2365
2377
|
categories: "";
|
|
2378
|
+
industries: never[];
|
|
2379
|
+
subCategories: never[];
|
|
2366
2380
|
socialAccounts: "";
|
|
2367
2381
|
isOwner: undefined;
|
|
2368
2382
|
isFeatured: false;
|
package/dist/index.js
CHANGED
|
@@ -396,7 +396,15 @@ var PageSchema = object10().shape({
|
|
|
396
396
|
dark: string7().optional().nullable().label("Dark Logo"),
|
|
397
397
|
light: string7().required().label("Light Logo")
|
|
398
398
|
}).optional().nullable().default(null).label("Logo"),
|
|
399
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
400
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
401
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
402
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
403
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
404
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
399
405
|
categories: array5().of(string7().trim().required()).required().min(1).label("Categories"),
|
|
406
|
+
industries: array5().of(string7().trim().required()).optional().default([]).label("Industries"),
|
|
407
|
+
subCategories: array5().of(string7().trim().required()).optional().default([]).label("Sub Categories"),
|
|
400
408
|
socialAccounts: array5().of(SocialAccountSchema).optional().label("Social Accounts"),
|
|
401
409
|
isOwner: boolean7().optional().label("Is Owner"),
|
|
402
410
|
isFeatured: boolean7().optional().default(false).label("Is Featured"),
|
package/package.json
CHANGED
package/src/page/page.schema.ts
CHANGED
|
@@ -53,11 +53,27 @@ export const PageSchema = object()
|
|
|
53
53
|
.nullable()
|
|
54
54
|
.default(null)
|
|
55
55
|
.label("Logo"),
|
|
56
|
+
// Taxonomy (see job-taxonomy.constant.ts): category -> industry -> subCategory,
|
|
57
|
+
// stored as slugs and translated for display. As on JobSchema, these are NOT
|
|
58
|
+
// `oneOf`-constrained: a value that drifts out of the taxonomy must be dropped,
|
|
59
|
+
// never a reason to reject the whole page. `categories` is the top level (kept
|
|
60
|
+
// required for backward compatibility); `industries` and `subCategories` are the
|
|
61
|
+
// deeper levels the tree picker fills in when a leaf auto-selects its parents.
|
|
56
62
|
categories: array()
|
|
57
63
|
.of(string().trim().required())
|
|
58
64
|
.required()
|
|
59
65
|
.min(1)
|
|
60
66
|
.label("Categories"),
|
|
67
|
+
industries: array()
|
|
68
|
+
.of(string().trim().required())
|
|
69
|
+
.optional()
|
|
70
|
+
.default([])
|
|
71
|
+
.label("Industries"),
|
|
72
|
+
subCategories: array()
|
|
73
|
+
.of(string().trim().required())
|
|
74
|
+
.optional()
|
|
75
|
+
.default([])
|
|
76
|
+
.label("Sub Categories"),
|
|
61
77
|
socialAccounts: array()
|
|
62
78
|
.of(SocialAccountSchema)
|
|
63
79
|
.optional()
|