@thejob/schema 1.0.7 → 1.0.8
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/common/common.schema.d.ts +12 -4
- package/dist/cjs/common/common.schema.d.ts.map +1 -1
- package/dist/cjs/common/common.schema.js +14 -4
- package/dist/cjs/common/constants.d.ts +8 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +10 -1
- package/dist/cjs/interfaces.index.d.ts +19 -8
- package/dist/cjs/interfaces.index.d.ts.map +1 -1
- package/dist/cjs/job/job.schema.d.ts +18 -7
- package/dist/cjs/job/job.schema.d.ts.map +1 -1
- package/dist/cjs/job/job.schema.js +28 -16
- package/dist/cjs/job-application/job-application.schema.d.ts +7 -7
- package/dist/cjs/job-role-template/job-role-template.schema.d.ts +7 -3
- package/dist/cjs/job-role-template/job-role-template.schema.d.ts.map +1 -1
- package/dist/cjs/resume/resume.schema.d.ts +4 -4
- package/dist/esm/common/common.schema.d.ts +12 -4
- package/dist/esm/common/common.schema.d.ts.map +1 -1
- package/dist/esm/common/common.schema.js +14 -4
- package/dist/esm/common/constants.d.ts +8 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +9 -0
- package/dist/esm/interfaces.index.d.ts +19 -8
- package/dist/esm/interfaces.index.d.ts.map +1 -1
- package/dist/esm/job/job.schema.d.ts +18 -7
- package/dist/esm/job/job.schema.d.ts.map +1 -1
- package/dist/esm/job/job.schema.js +30 -18
- package/dist/esm/job-application/job-application.schema.d.ts +7 -7
- package/dist/esm/job-role-template/job-role-template.schema.d.ts +7 -3
- package/dist/esm/job-role-template/job-role-template.schema.d.ts.map +1 -1
- package/dist/esm/resume/resume.schema.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ApplicationReceivePreference, DbDefaultSchema, NameIdLogoSchema, OtherValueSchema, SupportedEducationLevels, SupportedExperienceLevels, SystemDateFormat, } from "../common";
|
|
1
|
+
import { ApplicationReceivePreference, DbDefaultSchema, NameIdLogoSchema, OtherValueSchema, SupportedCompensationTypes, SupportedEducationLevels, SupportedExperienceLevels, SystemDateFormat, UserIdAndCreatedAtSchema, } from "../common";
|
|
2
2
|
import { DurationSchema } from "../duration";
|
|
3
3
|
import { LocationSchema } from "../location";
|
|
4
|
-
import { array, boolean,
|
|
4
|
+
import { array, boolean, lazy, mixed, number, object, string, } from "../yup-extended";
|
|
5
5
|
import { JobStatus, SupportedJobStatuses } from "./job.constant";
|
|
6
6
|
import { getSchemaByQuestion } from "./utils";
|
|
7
7
|
export const JobSchema = object()
|
|
@@ -93,10 +93,7 @@ export const JobSchema = object()
|
|
|
93
93
|
* It is optional and can be used to track the users who are interested in the job
|
|
94
94
|
*/
|
|
95
95
|
bookmarks: array()
|
|
96
|
-
.of(
|
|
97
|
-
userId: string().required().label("Use Id"),
|
|
98
|
-
createdAt: string().optional().label("Created At"),
|
|
99
|
-
}))
|
|
96
|
+
.of(UserIdAndCreatedAtSchema)
|
|
100
97
|
.optional()
|
|
101
98
|
.label("Bookmarks"),
|
|
102
99
|
/*
|
|
@@ -106,10 +103,7 @@ export const JobSchema = object()
|
|
|
106
103
|
* It is also useful for analytics and reporting purposes.
|
|
107
104
|
*/
|
|
108
105
|
applicants: array()
|
|
109
|
-
.of(
|
|
110
|
-
userId: string().required().label("User Id"),
|
|
111
|
-
appliedOn: date().required().label("Applied On"),
|
|
112
|
-
}))
|
|
106
|
+
.of(UserIdAndCreatedAtSchema)
|
|
113
107
|
.optional()
|
|
114
108
|
.label("Applicants"),
|
|
115
109
|
/*
|
|
@@ -118,10 +112,7 @@ export const JobSchema = object()
|
|
|
118
112
|
* It is also useful for analytics and reporting purposes.
|
|
119
113
|
*/
|
|
120
114
|
externalApplicants: array()
|
|
121
|
-
.of(
|
|
122
|
-
userId: string().required().label("User Id"),
|
|
123
|
-
appliedOn: date().required().label("Applied On"),
|
|
124
|
-
}))
|
|
115
|
+
.of(UserIdAndCreatedAtSchema)
|
|
125
116
|
.optional()
|
|
126
117
|
.label("External Applicants"),
|
|
127
118
|
/*
|
|
@@ -311,13 +302,34 @@ export const JobSchema = object()
|
|
|
311
302
|
currency: string().required().label("Currency").default("USD"), // Default to USD if not provided
|
|
312
303
|
min: number().optional().min(0).label("Minimum Salary"),
|
|
313
304
|
max: number().optional().min(0).label("Maximum Salary"),
|
|
305
|
+
compensationType: string()
|
|
306
|
+
.oneOf(SupportedCompensationTypes)
|
|
307
|
+
.required()
|
|
308
|
+
.label("Compensation Type"),
|
|
309
|
+
isNegotiable: boolean()
|
|
310
|
+
.optional()
|
|
311
|
+
.default(false)
|
|
312
|
+
.label("Is Negotiable"),
|
|
314
313
|
})
|
|
315
314
|
.optional()
|
|
316
315
|
.label("Salary Range"),
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
316
|
+
/*
|
|
317
|
+
* This field will store the information about users who have reported the job post.
|
|
318
|
+
* It is optional and can be used to track the users who have reported the job for any reason.
|
|
319
|
+
* It includes the user ID and the date when the report was made.
|
|
320
|
+
* It is also useful for analytics and reporting purposes.
|
|
321
|
+
*/
|
|
322
|
+
reports: array().of(UserIdAndCreatedAtSchema).optional().label("Reports"),
|
|
323
|
+
/*
|
|
324
|
+
* Indicates if the user has accepted the terms and conditions for posting a job.
|
|
325
|
+
* This is required and should be a boolean value.
|
|
326
|
+
* It is used to ensure that the user agrees to the terms before proceeding with the job post.
|
|
327
|
+
*/
|
|
328
|
+
termsAccepted: boolean()
|
|
329
|
+
.oneOf([true], "Accept terms before proceeding")
|
|
330
|
+
.required("Accept terms before proceeding")
|
|
331
|
+
.required()
|
|
332
|
+
.label("Terms accepted"),
|
|
321
333
|
})
|
|
322
334
|
.concat(DbDefaultSchema)
|
|
323
335
|
.noUnknown()
|
|
@@ -161,7 +161,7 @@ export declare const JobApplicationSchema: ObjectSchema<{
|
|
|
161
161
|
status: NonNullable<JobApplicationStatus | undefined>;
|
|
162
162
|
}[];
|
|
163
163
|
} & {
|
|
164
|
-
|
|
164
|
+
_id: string;
|
|
165
165
|
shortId: string;
|
|
166
166
|
createdBy: string;
|
|
167
167
|
createdAt: string;
|
|
@@ -190,22 +190,22 @@ export declare const JobApplicationSchema: ObjectSchema<{
|
|
|
190
190
|
status: import("../resume").ResumeStatus.Draft;
|
|
191
191
|
markdown: undefined;
|
|
192
192
|
markdownStyling: import("../resume").ResumeMarkdownStyle.Classic;
|
|
193
|
-
|
|
193
|
+
_id: undefined;
|
|
194
194
|
shortId: undefined;
|
|
195
195
|
createdBy: undefined;
|
|
196
|
-
createdAt:
|
|
196
|
+
createdAt: string;
|
|
197
197
|
updatedBy: undefined;
|
|
198
|
-
updatedAt:
|
|
198
|
+
updatedAt: string;
|
|
199
199
|
};
|
|
200
200
|
status: JobApplicationStatus.Open;
|
|
201
201
|
questionnaire: "";
|
|
202
202
|
history: never[];
|
|
203
|
-
|
|
203
|
+
_id: undefined;
|
|
204
204
|
shortId: undefined;
|
|
205
205
|
createdBy: undefined;
|
|
206
|
-
createdAt:
|
|
206
|
+
createdAt: string;
|
|
207
207
|
updatedBy: undefined;
|
|
208
|
-
updatedAt:
|
|
208
|
+
updatedAt: string;
|
|
209
209
|
}, "">;
|
|
210
210
|
export type TJobApplicationSchema = InferType<typeof JobApplicationSchema>;
|
|
211
211
|
//# sourceMappingURL=job-application.schema.d.ts.map
|
|
@@ -87,13 +87,17 @@ export declare const JobRoleTemplateSchema: import("yup").ObjectSchema<{
|
|
|
87
87
|
currency: "USD";
|
|
88
88
|
min: undefined;
|
|
89
89
|
max: undefined;
|
|
90
|
+
compensationType: undefined;
|
|
91
|
+
isNegotiable: false;
|
|
90
92
|
};
|
|
91
|
-
|
|
93
|
+
reports: "";
|
|
94
|
+
termsAccepted: undefined;
|
|
95
|
+
_id: undefined;
|
|
92
96
|
shortId: undefined;
|
|
93
97
|
createdBy: undefined;
|
|
94
|
-
createdAt:
|
|
98
|
+
createdAt: string;
|
|
95
99
|
updatedBy: undefined;
|
|
96
|
-
updatedAt:
|
|
100
|
+
updatedAt: string;
|
|
97
101
|
}, "">;
|
|
98
102
|
export type TJobRoleTemplateSchema = InferType<typeof JobRoleTemplateSchema>;
|
|
99
103
|
//# sourceMappingURL=job-role-template.schema.d.ts.map
|
|
@@ -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"}
|
|
@@ -242,7 +242,7 @@ export declare const ResumeSchema: import("yup").ObjectSchema<{
|
|
|
242
242
|
markdown: string;
|
|
243
243
|
markdownStyling: ResumeMarkdownStyle;
|
|
244
244
|
} & {
|
|
245
|
-
|
|
245
|
+
_id: string;
|
|
246
246
|
shortId: string;
|
|
247
247
|
createdBy: string;
|
|
248
248
|
createdAt: string;
|
|
@@ -255,12 +255,12 @@ export declare const ResumeSchema: import("yup").ObjectSchema<{
|
|
|
255
255
|
status: ResumeStatus.Draft;
|
|
256
256
|
markdown: undefined;
|
|
257
257
|
markdownStyling: ResumeMarkdownStyle.Classic;
|
|
258
|
-
|
|
258
|
+
_id: undefined;
|
|
259
259
|
shortId: undefined;
|
|
260
260
|
createdBy: undefined;
|
|
261
|
-
createdAt:
|
|
261
|
+
createdAt: string;
|
|
262
262
|
updatedBy: undefined;
|
|
263
|
-
updatedAt:
|
|
263
|
+
updatedAt: string;
|
|
264
264
|
}, "">;
|
|
265
265
|
export type TResumeSchema = InferType<typeof ResumeSchema>;
|
|
266
266
|
export declare const NewResumePromptSchema: (host?: string) => import("yup").ObjectSchema<{
|