@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.
@@ -9,8 +9,11 @@ const question_1 = require("../question");
9
9
  const yup_extended_1 = require("../yup-extended");
10
10
  const job_constant_1 = require("./job.constant");
11
11
  const utils_1 = require("./utils");
12
- exports.JobSchema = (0, yup_extended_1.object)()
13
- .shape({
12
+ exports.JobSchema = (0, yup_extended_1.object)({
13
+ /**
14
+ * Unique ID for the job post, it can be used by external systems to reference the job.
15
+ */
16
+ uniqueId: (0, yup_extended_1.string)().optional().label("Unique ID"),
14
17
  /*
15
18
  * Job headline defines the title of the job post.
16
19
  * It is required and should be a string with a minimum length of 10 characters and a maximum length of 100 characters.
@@ -61,6 +64,7 @@ exports.JobSchema = (0, yup_extended_1.object)()
61
64
  .required()
62
65
  .label("Company"),
63
66
  /*
67
+ * @deprecated: This field is deprecated and will be removed in future versions.
64
68
  * This property is required and can be used to specify the designation associated with the job post.
65
69
  * It can be a predefined designation (NameIdLogoSchema) or an other value (OtherValueSchema).
66
70
  * The value should be an object with name, id, and logo properties.
@@ -86,6 +90,7 @@ exports.JobSchema = (0, yup_extended_1.object)()
86
90
  * It is useful for jobs that require specific skills, such as programming languages, frameworks, etc.
87
91
  * The value should be an array of skills, each skill can be a predefined skill (NameIdLogoSchema) or an other value (OtherValueSchema).
88
92
  *
93
+ * TODO: Make this field as array of string.
89
94
  * TODO: Add knockout skills that if not present in the application should immediately disqualify the application.
90
95
  */
91
96
  skills: (0, yup_extended_1.array)()
@@ -100,10 +105,7 @@ exports.JobSchema = (0, yup_extended_1.object)()
100
105
  * This field will store the information about users who have bookmarked the job post.
101
106
  * It is optional and can be used to track the users who are interested in the job
102
107
  */
103
- bookmarks: (0, yup_extended_1.array)()
104
- .of(common_1.UserIdAndCreatedAtSchema)
105
- .optional()
106
- .label("Bookmarks"),
108
+ bookmarks: (0, yup_extended_1.array)().of(common_1.UserIdAndCreatedAtSchema).optional().label("Bookmarks"),
107
109
  /*
108
110
  * This field will store the information about users who have applied for the job post using Direct/Quick Apply feature.
109
111
  * It is optional and can be used to track the users who have applied for the job.
@@ -166,13 +168,15 @@ exports.JobSchema = (0, yup_extended_1.object)()
166
168
  * This section is required and can be used to specify the location of the job.
167
169
  * It is useful for jobs that are location-specific, such as on-site jobs.
168
170
  * The value should be an array of locations.
169
- *
170
171
  * NOTE: Location is also required even if the job is remote, This is to comply with compliance and legal requirements.
172
+ *
173
+ * TODO: Make this field optional in the future.
171
174
  */
172
175
  locations: (0, yup_extended_1.array)()
173
176
  .of(location_1.LocationSchema)
174
- .required()
175
- .min(1)
177
+ .default([])
178
+ // .required()
179
+ // .min(1)
176
180
  .label("Location"),
177
181
  /*
178
182
  * Educational level section
@@ -272,9 +276,8 @@ exports.JobSchema = (0, yup_extended_1.object)()
272
276
  * This is optional and can be used to improve the visibility of the job post in search engines.
273
277
  * It includes meta tags for description and keywords.
274
278
  */
275
- seoTags: (0, yup_extended_1.object)()
276
- .shape({
277
- meta: (0, yup_extended_1.object)().shape({
279
+ seoTags: (0, yup_extended_1.object)({
280
+ meta: (0, yup_extended_1.object)({
278
281
  description: (0, yup_extended_1.string)().optional().label("Description"),
279
282
  keywords: (0, yup_extended_1.array)().of((0, yup_extended_1.string)()).optional().label("Keywords"),
280
283
  }),
@@ -332,8 +335,7 @@ exports.JobSchema = (0, yup_extended_1.object)()
332
335
  * This is optional and can be used to specify the salary range for the job.
333
336
  * It includes currency, minimum, and maximum salary.
334
337
  */
335
- salaryRange: (0, yup_extended_1.object)()
336
- .shape({
338
+ salaryRange: (0, yup_extended_1.object)({
337
339
  currency: (0, yup_extended_1.string)().required().label("Currency").default("USD"), // Default to USD if not provided
338
340
  min: (0, yup_extended_1.number)().optional().min(0).label("Minimum Salary"),
339
341
  max: (0, yup_extended_1.number)().optional().min(0).label("Maximum Salary"),
@@ -341,10 +343,7 @@ exports.JobSchema = (0, yup_extended_1.object)()
341
343
  .oneOf(common_1.SupportedCompensationTypes)
342
344
  .required()
343
345
  .label("Compensation Type"),
344
- isNegotiable: (0, yup_extended_1.boolean)()
345
- .optional()
346
- .default(false)
347
- .label("Is Negotiable"),
346
+ isNegotiable: (0, yup_extended_1.boolean)().optional().default(false).label("Is Negotiable"),
348
347
  })
349
348
  .default(undefined)
350
349
  .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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAQhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,SAAS,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
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"}
@@ -134,6 +134,7 @@ export interface IAiPromptOutput {
134
134
  }
135
135
  export interface IAiPromptJobApplicationSummary {
136
136
  job: Partial<{
137
+ uniqueId?: string | undefined;
137
138
  externalApplyLink?: string | undefined;
138
139
  isOwner?: boolean | undefined;
139
140
  updatedBy?: string | undefined;
@@ -823,6 +824,7 @@ export interface IGroupSchema {
823
824
  };
824
825
  }
825
826
  export interface IJobSchema {
827
+ uniqueId?: string | undefined;
826
828
  externalApplyLink?: string | undefined;
827
829
  isOwner?: boolean | undefined;
828
830
  updatedBy?: string | undefined;