@thejob/schema 1.0.40 → 1.0.42
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/cjs/interfaces.index.d.ts +2 -0
- package/dist/cjs/interfaces.index.d.ts.map +1 -1
- package/dist/cjs/job/job.schema.d.ts +3 -1
- package/dist/cjs/job/job.schema.d.ts.map +1 -1
- package/dist/cjs/job/job.schema.js +17 -18
- package/dist/cjs/job-role-template/job-role-template.schema.d.ts +2 -1
- package/dist/cjs/job-role-template/job-role-template.schema.d.ts.map +1 -1
- package/dist/esm/interfaces.index.d.ts +2 -0
- package/dist/esm/interfaces.index.d.ts.map +1 -1
- package/dist/esm/job/job.schema.d.ts +3 -1
- package/dist/esm/job/job.schema.d.ts.map +1 -1
- package/dist/esm/job/job.schema.js +17 -18
- package/dist/esm/job-role-template/job-role-template.schema.d.ts +2 -1
- package/dist/esm/job-role-template/job-role-template.schema.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -6,8 +6,11 @@ import { QuestionType, } from "../question";
|
|
|
6
6
|
import { array, boolean, lazy, mixed, number, object, string, } from "../yup-extended";
|
|
7
7
|
import { JobStatus, SupportedJobStatuses } from "./job.constant";
|
|
8
8
|
import { getSchemaByQuestion } from "./utils";
|
|
9
|
-
export const JobSchema = object(
|
|
10
|
-
|
|
9
|
+
export const JobSchema = object({
|
|
10
|
+
/**
|
|
11
|
+
* Unique ID for the job post, it can be used by external systems to reference the job.
|
|
12
|
+
*/
|
|
13
|
+
uniqueId: string().optional().label("Unique ID"),
|
|
11
14
|
/*
|
|
12
15
|
* Job headline defines the title of the job post.
|
|
13
16
|
* It is required and should be a string with a minimum length of 10 characters and a maximum length of 100 characters.
|
|
@@ -58,6 +61,7 @@ export const JobSchema = object()
|
|
|
58
61
|
.required()
|
|
59
62
|
.label("Company"),
|
|
60
63
|
/*
|
|
64
|
+
* @deprecated: This field is deprecated and will be removed in future versions.
|
|
61
65
|
* This property is required and can be used to specify the designation associated with the job post.
|
|
62
66
|
* It can be a predefined designation (NameIdLogoSchema) or an other value (OtherValueSchema).
|
|
63
67
|
* The value should be an object with name, id, and logo properties.
|
|
@@ -83,6 +87,7 @@ export const JobSchema = object()
|
|
|
83
87
|
* It is useful for jobs that require specific skills, such as programming languages, frameworks, etc.
|
|
84
88
|
* The value should be an array of skills, each skill can be a predefined skill (NameIdLogoSchema) or an other value (OtherValueSchema).
|
|
85
89
|
*
|
|
90
|
+
* TODO: Make this field as array of string.
|
|
86
91
|
* TODO: Add knockout skills that if not present in the application should immediately disqualify the application.
|
|
87
92
|
*/
|
|
88
93
|
skills: array()
|
|
@@ -97,10 +102,7 @@ export const JobSchema = object()
|
|
|
97
102
|
* This field will store the information about users who have bookmarked the job post.
|
|
98
103
|
* It is optional and can be used to track the users who are interested in the job
|
|
99
104
|
*/
|
|
100
|
-
bookmarks: array()
|
|
101
|
-
.of(UserIdAndCreatedAtSchema)
|
|
102
|
-
.optional()
|
|
103
|
-
.label("Bookmarks"),
|
|
105
|
+
bookmarks: array().of(UserIdAndCreatedAtSchema).optional().label("Bookmarks"),
|
|
104
106
|
/*
|
|
105
107
|
* This field will store the information about users who have applied for the job post using Direct/Quick Apply feature.
|
|
106
108
|
* It is optional and can be used to track the users who have applied for the job.
|
|
@@ -163,13 +165,15 @@ export const JobSchema = object()
|
|
|
163
165
|
* This section is required and can be used to specify the location of the job.
|
|
164
166
|
* It is useful for jobs that are location-specific, such as on-site jobs.
|
|
165
167
|
* The value should be an array of locations.
|
|
166
|
-
*
|
|
167
168
|
* NOTE: Location is also required even if the job is remote, This is to comply with compliance and legal requirements.
|
|
169
|
+
*
|
|
170
|
+
* TODO: Make this field optional in the future.
|
|
168
171
|
*/
|
|
169
172
|
locations: array()
|
|
170
173
|
.of(LocationSchema)
|
|
171
|
-
.
|
|
172
|
-
.
|
|
174
|
+
.default([])
|
|
175
|
+
// .required()
|
|
176
|
+
// .min(1)
|
|
173
177
|
.label("Location"),
|
|
174
178
|
/*
|
|
175
179
|
* Educational level section
|
|
@@ -269,9 +273,8 @@ export const JobSchema = object()
|
|
|
269
273
|
* This is optional and can be used to improve the visibility of the job post in search engines.
|
|
270
274
|
* It includes meta tags for description and keywords.
|
|
271
275
|
*/
|
|
272
|
-
seoTags: object(
|
|
273
|
-
|
|
274
|
-
meta: object().shape({
|
|
276
|
+
seoTags: object({
|
|
277
|
+
meta: object({
|
|
275
278
|
description: string().optional().label("Description"),
|
|
276
279
|
keywords: array().of(string()).optional().label("Keywords"),
|
|
277
280
|
}),
|
|
@@ -329,8 +332,7 @@ export const JobSchema = object()
|
|
|
329
332
|
* This is optional and can be used to specify the salary range for the job.
|
|
330
333
|
* It includes currency, minimum, and maximum salary.
|
|
331
334
|
*/
|
|
332
|
-
salaryRange: object(
|
|
333
|
-
.shape({
|
|
335
|
+
salaryRange: object({
|
|
334
336
|
currency: string().required().label("Currency").default("USD"), // Default to USD if not provided
|
|
335
337
|
min: number().optional().min(0).label("Minimum Salary"),
|
|
336
338
|
max: number().optional().min(0).label("Maximum Salary"),
|
|
@@ -338,10 +340,7 @@ export const JobSchema = object()
|
|
|
338
340
|
.oneOf(SupportedCompensationTypes)
|
|
339
341
|
.required()
|
|
340
342
|
.label("Compensation Type"),
|
|
341
|
-
isNegotiable: boolean()
|
|
342
|
-
.optional()
|
|
343
|
-
.default(false)
|
|
344
|
-
.label("Is Negotiable"),
|
|
343
|
+
isNegotiable: boolean().optional().default(false).label("Is Negotiable"),
|
|
345
344
|
})
|
|
346
345
|
.default(undefined)
|
|
347
346
|
.optional()
|
|
@@ -101,6 +101,7 @@ export declare const JobRoleTemplateSchema: import("yup").ObjectSchema<{
|
|
|
101
101
|
preferredAnswer: NonNullable<import("..").Common.Yes | import("..").Common.No | undefined>;
|
|
102
102
|
})[] | undefined;
|
|
103
103
|
}, import("yup").AnyObject, {
|
|
104
|
+
uniqueId: undefined;
|
|
104
105
|
headline: undefined;
|
|
105
106
|
slug: undefined;
|
|
106
107
|
applicationReceivePreference: undefined;
|
|
@@ -117,7 +118,7 @@ export declare const JobRoleTemplateSchema: import("yup").ObjectSchema<{
|
|
|
117
118
|
description: undefined;
|
|
118
119
|
descriptionMarkdown: undefined;
|
|
119
120
|
descriptionHTML: undefined;
|
|
120
|
-
locations:
|
|
121
|
+
locations: never[];
|
|
121
122
|
educationLevel: undefined;
|
|
122
123
|
validity: any;
|
|
123
124
|
experienceLevel: undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-role-template.schema.d.ts","sourceRoot":"","sources":["../../../src/job-role-template/job-role-template.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"job-role-template.schema.d.ts","sourceRoot":"","sources":["../../../src/job-role-template/job-role-template.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|