@zyacreatives/shared 2.5.25 → 2.5.27
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/schemas/job-application.d.ts +150 -135
- package/dist/schemas/job-application.js +0 -3
- package/dist/schemas/job.d.ts +522 -474
- package/dist/schemas/job.js +93 -200
- package/dist/schemas/user.d.ts +2 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +0 -1
- package/dist/types/job.d.ts +1 -27
- package/package.json +1 -1
- package/src/schemas/job-application.ts +0 -3
- package/src/schemas/job.ts +138 -224
- package/src/types/index.ts +0 -1
- package/src/types/job.ts +0 -77
package/dist/schemas/job.js
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.JobSearchDocumentSchema = exports.GetCreatedJobsOutputSchema = exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.UpdateJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.NormalizedJobSchema = exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = exports.BaseJobEntitySchema = exports.JobIdSchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const JobSectionEnum = zod_openapi_1.z
|
|
7
7
|
.enum(Object.values(constants_1.JOB_SECTIONS))
|
|
8
8
|
.openapi({ example: "PROFESSIONAL_INFORMATION" });
|
|
9
|
-
exports.
|
|
10
|
-
|
|
11
|
-
title: zod_openapi_1.z.string().openapi({ example: "Senior Frontend Engineer" }),
|
|
12
|
-
brandId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000brnd" }),
|
|
13
|
-
jobType: zod_openapi_1.z
|
|
14
|
-
.enum(Object.values(constants_1.JOB_TYPE))
|
|
15
|
-
.openapi({ example: "ROLE" }),
|
|
9
|
+
exports.JobIdSchema = zod_openapi_1.z.object({
|
|
10
|
+
jobId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000job1" }),
|
|
16
11
|
});
|
|
17
12
|
exports.BaseJobEntitySchema = zod_openapi_1.z.object({
|
|
18
13
|
id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000job1" }),
|
|
@@ -54,55 +49,18 @@ exports.BaseJobEntitySchema = zod_openapi_1.z.object({
|
|
|
54
49
|
"COVER_LETTER",
|
|
55
50
|
],
|
|
56
51
|
}),
|
|
57
|
-
createdAt: zod_openapi_1.z.date().openapi({ example: "2026-
|
|
58
|
-
version: zod_openapi_1.z.int().openapi({ example: 1 }),
|
|
59
|
-
updatedAt: zod_openapi_1.z.date().openapi({ example: "2026-
|
|
60
|
-
});
|
|
61
|
-
exports.JobIdSchema = zod_openapi_1.z.object({
|
|
62
|
-
jobId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000job1" }),
|
|
52
|
+
createdAt: zod_openapi_1.z.date().openapi({ example: "2026-04-09T12:00:00.000Z" }),
|
|
53
|
+
version: zod_openapi_1.z.number().int().openapi({ example: 1 }),
|
|
54
|
+
updatedAt: zod_openapi_1.z.date().openapi({ example: "2026-04-09T12:00:00.000Z" }),
|
|
63
55
|
});
|
|
64
|
-
exports.JobEntitySchema =
|
|
65
|
-
id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000job1" }),
|
|
66
|
-
title: zod_openapi_1.z.string().openapi({ example: "Senior Frontend Engineer" }),
|
|
67
|
-
brandId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000brnd" }),
|
|
56
|
+
exports.JobEntitySchema = exports.BaseJobEntitySchema.extend({
|
|
68
57
|
brandName: zod_openapi_1.z.string().openapi({ example: "Acme Corp" }),
|
|
58
|
+
isApplied: zod_openapi_1.z.boolean().default(false).optional(),
|
|
69
59
|
brandImgUrl: zod_openapi_1.z
|
|
70
60
|
.url()
|
|
71
61
|
.optional()
|
|
72
62
|
.openapi({ example: "https://example.com/logo.png" }),
|
|
73
|
-
jobType: zod_openapi_1.z
|
|
74
|
-
.enum(Object.values(constants_1.JOB_TYPE))
|
|
75
|
-
.openapi({ example: "ROLE" }),
|
|
76
|
-
status: zod_openapi_1.z
|
|
77
|
-
.enum(Object.values(constants_1.JOB_STATUS))
|
|
78
|
-
.openapi({ example: "OPEN" }),
|
|
79
|
-
employmentType: zod_openapi_1.z
|
|
80
|
-
.enum(Object.values(constants_1.EMPLOYMENT_TYPE))
|
|
81
|
-
.optional()
|
|
82
|
-
.openapi({ example: "FULL_TIME" }),
|
|
83
|
-
workMode: zod_openapi_1.z
|
|
84
|
-
.enum(Object.values(constants_1.WORK_MODE))
|
|
85
|
-
.openapi({ example: "REMOTE" }),
|
|
86
|
-
gigType: zod_openapi_1.z
|
|
87
|
-
.enum(Object.values(constants_1.GIG_TYPE))
|
|
88
|
-
.optional()
|
|
89
|
-
.openapi({ example: "PROJECT_BASED" }),
|
|
90
|
-
location: zod_openapi_1.z
|
|
91
|
-
.enum(Object.values(constants_1.JOB_LOCATIONS))
|
|
92
|
-
.openapi({ example: "LAGOS" }),
|
|
93
|
-
jobSections: zod_openapi_1.z
|
|
94
|
-
.array(JobSectionEnum)
|
|
95
|
-
.default([
|
|
96
|
-
constants_1.JOB_SECTIONS.PERSONAL_INFORMATION,
|
|
97
|
-
constants_1.JOB_SECTIONS.PROFESSIONAL_INFORMATION,
|
|
98
|
-
constants_1.JOB_SECTIONS.RESUME,
|
|
99
|
-
constants_1.JOB_SECTIONS.COVER_LETTER,
|
|
100
|
-
])
|
|
101
|
-
.openapi({ example: ["PERSONAL_INFORMATION", "RESUME"] }),
|
|
102
63
|
isBookmarked: zod_openapi_1.z.boolean().openapi({ example: false }),
|
|
103
|
-
createdAt: zod_openapi_1.z.date().openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
104
|
-
version: zod_openapi_1.z.int().openapi({ example: 1 }),
|
|
105
|
-
updatedAt: zod_openapi_1.z.date().openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
106
64
|
});
|
|
107
65
|
exports.GigJobEntitySchema = zod_openapi_1.z.object({
|
|
108
66
|
id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000gig1" }),
|
|
@@ -124,8 +82,8 @@ exports.GigJobEntitySchema = zod_openapi_1.z.object({
|
|
|
124
82
|
requiredSkills: zod_openapi_1.z
|
|
125
83
|
.array(zod_openapi_1.z.string())
|
|
126
84
|
.openapi({ example: ["Figma", "UI Design"] }),
|
|
127
|
-
wagesMin: zod_openapi_1.z.number().optional().openapi({ example: 500 }),
|
|
128
|
-
wagesMax: zod_openapi_1.z.number().optional().openapi({ example: 1000 }),
|
|
85
|
+
wagesMin: zod_openapi_1.z.number().optional().nullable().openapi({ example: 500 }),
|
|
86
|
+
wagesMax: zod_openapi_1.z.number().optional().nullable().openapi({ example: 1000 }),
|
|
129
87
|
wagesCurrency: zod_openapi_1.z
|
|
130
88
|
.enum(Object.values(constants_1.WAGES_CURRENCY))
|
|
131
89
|
.optional()
|
|
@@ -135,7 +93,7 @@ exports.GigJobEntitySchema = zod_openapi_1.z.object({
|
|
|
135
93
|
.optional()
|
|
136
94
|
.openapi({ example: "FIXED" }),
|
|
137
95
|
});
|
|
138
|
-
exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema.extend(exports.GigJobEntitySchema.shape);
|
|
96
|
+
exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema.extend(exports.GigJobEntitySchema.omit({ id: true, jobType: true }).shape);
|
|
139
97
|
exports.RoleJobEntitySchema = zod_openapi_1.z.object({
|
|
140
98
|
id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000rol1" }),
|
|
141
99
|
jobType: zod_openapi_1.z.literal(constants_1.JOB_TYPE.ROLE).openapi({ example: "ROLE" }),
|
|
@@ -170,9 +128,18 @@ exports.RoleJobEntitySchema = zod_openapi_1.z.object({
|
|
|
170
128
|
.optional()
|
|
171
129
|
.openapi({ example: "YEARLY" }),
|
|
172
130
|
});
|
|
173
|
-
exports.JobWithRoleDetailsEntitySchema = exports.JobEntitySchema.extend(exports.RoleJobEntitySchema.shape);
|
|
131
|
+
exports.JobWithRoleDetailsEntitySchema = exports.JobEntitySchema.extend(exports.RoleJobEntitySchema.omit({ id: true, jobType: true }).shape);
|
|
132
|
+
exports.NormalizedJobSchema = zod_openapi_1.z.union([
|
|
133
|
+
exports.JobWithGigDetailsEntitySchema,
|
|
134
|
+
exports.JobWithRoleDetailsEntitySchema,
|
|
135
|
+
exports.JobEntitySchema,
|
|
136
|
+
]);
|
|
174
137
|
const CreateJobInputBaseSchema = zod_openapi_1.z.object({
|
|
175
|
-
title: zod_openapi_1.z
|
|
138
|
+
title: zod_openapi_1.z
|
|
139
|
+
.string()
|
|
140
|
+
.min(3)
|
|
141
|
+
.max(255)
|
|
142
|
+
.openapi({ example: "Senior Frontend Engineer" }),
|
|
176
143
|
brandId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000brnd" }),
|
|
177
144
|
jobType: zod_openapi_1.z
|
|
178
145
|
.enum(Object.values(constants_1.JOB_TYPE))
|
|
@@ -213,175 +180,101 @@ exports.CreateJobInputSchema = CreateJobInputBaseSchema.superRefine((data, ctx)
|
|
|
213
180
|
});
|
|
214
181
|
}
|
|
215
182
|
}).transform((data) => {
|
|
216
|
-
if (data.jobType === constants_1.JOB_TYPE.ROLE)
|
|
183
|
+
if (data.jobType === constants_1.JOB_TYPE.ROLE)
|
|
217
184
|
return { ...data, gigType: undefined };
|
|
218
|
-
|
|
219
|
-
if (data.jobType === constants_1.JOB_TYPE.GIG) {
|
|
185
|
+
if (data.jobType === constants_1.JOB_TYPE.GIG)
|
|
220
186
|
return { ...data, employmentType: undefined };
|
|
221
|
-
}
|
|
222
187
|
return data;
|
|
223
188
|
});
|
|
224
|
-
exports.CreateRoleJobInputSchema =
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
experienceLevel: zod_openapi_1.z
|
|
228
|
-
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
229
|
-
.openapi({ example: "MID_LEVEL" }),
|
|
230
|
-
overview: zod_openapi_1.z
|
|
231
|
-
.string()
|
|
232
|
-
.openapi({ example: "Build cool features for our app." }),
|
|
233
|
-
keyResponsibilities: zod_openapi_1.z
|
|
234
|
-
.string()
|
|
235
|
-
.openapi({ example: "Write code, review PRs." }),
|
|
236
|
-
requiredSkills: zod_openapi_1.z
|
|
237
|
-
.array(zod_openapi_1.z.string())
|
|
238
|
-
.openapi({ example: ["JavaScript", "React"] }),
|
|
239
|
-
employeeRequirements: zod_openapi_1.z
|
|
240
|
-
.string()
|
|
241
|
-
.optional()
|
|
242
|
-
.openapi({ example: "Good communication skills." }),
|
|
243
|
-
companyBenefits: zod_openapi_1.z
|
|
244
|
-
.string()
|
|
245
|
-
.optional()
|
|
246
|
-
.openapi({ example: "Unlimited PTO." }),
|
|
247
|
-
wagesMin: zod_openapi_1.z.number().optional().nullable().openapi({ example: 60000 }),
|
|
248
|
-
wagesMax: zod_openapi_1.z.number().optional().nullable().openapi({ example: 90000 }),
|
|
249
|
-
wagesCurrency: zod_openapi_1.z
|
|
250
|
-
.enum(Object.values(constants_1.WAGES_CURRENCY))
|
|
251
|
-
.optional()
|
|
252
|
-
.openapi({ example: "USD" }),
|
|
253
|
-
wagesType: zod_openapi_1.z
|
|
254
|
-
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
255
|
-
.optional()
|
|
256
|
-
.openapi({ example: "YEARLY" }),
|
|
189
|
+
exports.CreateRoleJobInputSchema = exports.RoleJobEntitySchema.omit({
|
|
190
|
+
id: true,
|
|
191
|
+
jobType: true,
|
|
257
192
|
})
|
|
193
|
+
.extend({ id: zod_openapi_1.z.cuid2() })
|
|
258
194
|
.refine(({ wagesMin, wagesMax }) => wagesMin == null || wagesMax == null || wagesMax > wagesMin, {
|
|
259
195
|
message: "wagesMax must be greater than wagesMin",
|
|
260
196
|
path: ["wagesMax"],
|
|
261
197
|
});
|
|
262
|
-
exports.CreateGigJobInputSchema =
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
overview: zod_openapi_1.z
|
|
266
|
-
.string()
|
|
267
|
-
.openapi({ example: "Need a logo designed for a new brand." }),
|
|
268
|
-
deliverables: zod_openapi_1.z
|
|
269
|
-
.string()
|
|
270
|
-
.openapi({ example: "Vector files, PNGs, and a brand guide." }),
|
|
271
|
-
employeeRequirements: zod_openapi_1.z
|
|
272
|
-
.string()
|
|
273
|
-
.optional()
|
|
274
|
-
.openapi({ example: "Portfolio required." }),
|
|
275
|
-
aboutCompany: zod_openapi_1.z
|
|
276
|
-
.string()
|
|
277
|
-
.optional()
|
|
278
|
-
.openapi({ example: "E-commerce store." }),
|
|
279
|
-
requiredSkills: zod_openapi_1.z
|
|
280
|
-
.array(zod_openapi_1.z.string())
|
|
281
|
-
.openapi({ example: ["Graphic Design", "Illustrator"] }),
|
|
282
|
-
wagesMin: zod_openapi_1.z.number().optional().nullable().openapi({ example: 100 }),
|
|
283
|
-
wagesMax: zod_openapi_1.z.number().optional().nullable().openapi({ example: 500 }),
|
|
284
|
-
wagesCurrency: zod_openapi_1.z
|
|
285
|
-
.enum(Object.values(constants_1.WAGES_CURRENCY))
|
|
286
|
-
.optional()
|
|
287
|
-
.openapi({ example: "USD" }),
|
|
288
|
-
wagesType: zod_openapi_1.z
|
|
289
|
-
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
290
|
-
.optional()
|
|
291
|
-
.openapi({ example: "FIXED" }),
|
|
198
|
+
exports.CreateGigJobInputSchema = exports.GigJobEntitySchema.omit({
|
|
199
|
+
id: true,
|
|
200
|
+
jobType: true,
|
|
292
201
|
})
|
|
202
|
+
.extend({ id: zod_openapi_1.z.cuid2() })
|
|
293
203
|
.refine(({ wagesMin, wagesMax }) => wagesMin == null || wagesMax == null || wagesMax > wagesMin, {
|
|
294
204
|
message: "wagesMax must be greater than wagesMin",
|
|
295
205
|
path: ["wagesMax"],
|
|
296
206
|
});
|
|
297
|
-
exports.UpdateRoleJobInputSchema = exports.CreateRoleJobInputSchema.partial()
|
|
298
|
-
.extend({ version: zod_openapi_1.z.int().openapi({ example: 2 }) })
|
|
299
|
-
.required({ id: true });
|
|
300
|
-
exports.UpdateGigJobInputSchema = exports.CreateGigJobInputSchema.partial()
|
|
301
|
-
.extend({ version: zod_openapi_1.z.int().openapi({ example: 2 }) })
|
|
302
|
-
.required({ id: true });
|
|
303
207
|
exports.UpdateJobInputSchema = CreateJobInputBaseSchema.partial().extend({
|
|
304
208
|
id: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000job1" }),
|
|
305
209
|
status: zod_openapi_1.z
|
|
306
210
|
.enum(Object.values(constants_1.JOB_STATUS))
|
|
307
|
-
.optional()
|
|
308
|
-
|
|
309
|
-
version: zod_openapi_1.z.int().openapi({ example: 2 }),
|
|
310
|
-
});
|
|
311
|
-
exports.NormalizedJobSchema = zod_openapi_1.z.union([
|
|
312
|
-
exports.JobWithGigDetailsEntitySchema,
|
|
313
|
-
exports.JobEntitySchema,
|
|
314
|
-
exports.JobWithRoleDetailsEntitySchema,
|
|
315
|
-
]);
|
|
316
|
-
exports.GetCreatedJobsOutputSchema = zod_openapi_1.z.object({
|
|
317
|
-
jobs: zod_openapi_1.z.array(exports.NormalizedJobSchema).openapi({ example: [] }),
|
|
318
|
-
noOfJobs: zod_openapi_1.z.number().openapi({ example: 45 }),
|
|
319
|
-
noOfActiveJobs: zod_openapi_1.z.number().openapi({ example: 12 }),
|
|
320
|
-
noOfArchivedJobs: zod_openapi_1.z.number().openapi({ example: 33 }),
|
|
211
|
+
.optional(),
|
|
212
|
+
version: zod_openapi_1.z.number().int().openapi({ example: 2 }),
|
|
321
213
|
});
|
|
322
214
|
exports.GetJobsInputSchema = zod_openapi_1.z.object({
|
|
323
215
|
q: zod_openapi_1.z.string().optional().openapi({ example: "frontend engineer" }),
|
|
324
|
-
jobType: zod_openapi_1.z
|
|
325
|
-
|
|
326
|
-
.optional()
|
|
327
|
-
.openapi({ example: "ROLE" }),
|
|
328
|
-
workMode: zod_openapi_1.z
|
|
329
|
-
.string()
|
|
330
|
-
.optional()
|
|
331
|
-
.describe("Comma-separated values, e.g. 'Remote,Hybrid'")
|
|
332
|
-
.openapi({ example: "Remote,Hybrid" }),
|
|
216
|
+
jobType: zod_openapi_1.z.enum(Object.values(constants_1.JOB_TYPE)).optional(),
|
|
217
|
+
workMode: zod_openapi_1.z.string().optional().describe("Comma-separated values"),
|
|
333
218
|
location: zod_openapi_1.z
|
|
334
219
|
.enum(Object.values(constants_1.JOB_LOCATIONS))
|
|
335
|
-
.optional()
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
gigType: zod_openapi_1.z
|
|
343
|
-
.enum(Object.values(constants_1.GIG_TYPE))
|
|
344
|
-
.optional()
|
|
345
|
-
.openapi({ example: "PROJECT_BASED" }),
|
|
346
|
-
requiredSkills: zod_openapi_1.z
|
|
347
|
-
.string()
|
|
348
|
-
.optional()
|
|
349
|
-
.describe("Comma-separated skills")
|
|
350
|
-
.openapi({ example: "React,TypeScript" }),
|
|
351
|
-
status: zod_openapi_1.z.string().optional().openapi({ example: "OPEN" }),
|
|
352
|
-
page: zod_openapi_1.z.coerce.number().min(1).default(1).openapi({ example: 1 }),
|
|
353
|
-
limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20).openapi({ example: 20 }),
|
|
220
|
+
.optional(),
|
|
221
|
+
employmentType: zod_openapi_1.z.string().optional().describe("Comma-separated values"),
|
|
222
|
+
gigType: zod_openapi_1.z.enum(Object.values(constants_1.GIG_TYPE)).optional(),
|
|
223
|
+
requiredSkills: zod_openapi_1.z.string().optional().describe("Comma-separated skills"),
|
|
224
|
+
status: zod_openapi_1.z.string().optional(),
|
|
225
|
+
page: zod_openapi_1.z.coerce.number().int().min(1).default(1),
|
|
226
|
+
limit: zod_openapi_1.z.coerce.number().int().min(1).max(100).default(20),
|
|
354
227
|
});
|
|
355
228
|
exports.GetJobsOutputSchema = zod_openapi_1.z.object({
|
|
356
|
-
jobs: zod_openapi_1.z.array(exports.NormalizedJobSchema)
|
|
357
|
-
total: zod_openapi_1.z.number()
|
|
358
|
-
page: zod_openapi_1.z.number()
|
|
359
|
-
limit: zod_openapi_1.z.number()
|
|
360
|
-
totalPages: zod_openapi_1.z.number()
|
|
361
|
-
hasNextPage: zod_openapi_1.z.boolean()
|
|
362
|
-
hasPrevPage: zod_openapi_1.z.boolean()
|
|
229
|
+
jobs: zod_openapi_1.z.array(exports.NormalizedJobSchema),
|
|
230
|
+
total: zod_openapi_1.z.number(),
|
|
231
|
+
page: zod_openapi_1.z.number(),
|
|
232
|
+
limit: zod_openapi_1.z.number(),
|
|
233
|
+
totalPages: zod_openapi_1.z.number(),
|
|
234
|
+
hasNextPage: zod_openapi_1.z.boolean(),
|
|
235
|
+
hasPrevPage: zod_openapi_1.z.boolean(),
|
|
363
236
|
});
|
|
364
|
-
exports.
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
237
|
+
exports.GetCreatedJobsOutputSchema = zod_openapi_1.z.object({
|
|
238
|
+
jobs: zod_openapi_1.z.array(exports.NormalizedJobSchema),
|
|
239
|
+
noOfJobs: zod_openapi_1.z.number(),
|
|
240
|
+
noOfActiveJobs: zod_openapi_1.z.number(),
|
|
241
|
+
noOfArchivedJobs: zod_openapi_1.z.number(),
|
|
242
|
+
});
|
|
243
|
+
exports.JobSearchDocumentSchema = zod_openapi_1.z
|
|
244
|
+
.object({
|
|
245
|
+
id: zod_openapi_1.z.cuid2(),
|
|
246
|
+
title: zod_openapi_1.z.string(),
|
|
247
|
+
isApplied: zod_openapi_1.z.boolean().default(false).optional(),
|
|
248
|
+
brandId: zod_openapi_1.z.cuid2(),
|
|
249
|
+
brandName: zod_openapi_1.z.string(),
|
|
250
|
+
brandImgUrl: zod_openapi_1.z.string().nullable().optional(),
|
|
251
|
+
jobType: zod_openapi_1.z.enum(["GIG", "ROLE"]),
|
|
252
|
+
status: zod_openapi_1.z.string().optional(),
|
|
253
|
+
employmentType: zod_openapi_1.z.string().nullable().optional(),
|
|
254
|
+
workMode: zod_openapi_1.z.string(),
|
|
255
|
+
gigType: zod_openapi_1.z.string().nullable().optional(),
|
|
256
|
+
location: zod_openapi_1.z.string(),
|
|
257
|
+
overview: zod_openapi_1.z.string(),
|
|
258
|
+
requiredSkills: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
|
259
|
+
wagesMin: zod_openapi_1.z.number().nullable().optional(),
|
|
260
|
+
wagesMax: zod_openapi_1.z.number().nullable().optional(),
|
|
261
|
+
wagesCurrency: zod_openapi_1.z.string().nullable().optional(),
|
|
262
|
+
wagesType: zod_openapi_1.z.string().nullable().optional(),
|
|
263
|
+
createdAt: zod_openapi_1.z.string(),
|
|
264
|
+
updatedAt: zod_openapi_1.z.string(),
|
|
265
|
+
})
|
|
266
|
+
.openapi("JobSearchDocument");
|
|
267
|
+
exports.UpdateRoleJobInputSchema = exports.CreateRoleJobInputSchema.partial()
|
|
268
|
+
.extend({
|
|
269
|
+
version: zod_openapi_1.z.number().int().openapi({ example: 2 })
|
|
270
|
+
})
|
|
271
|
+
.required({
|
|
272
|
+
id: true
|
|
273
|
+
});
|
|
274
|
+
exports.UpdateGigJobInputSchema = exports.CreateGigJobInputSchema.partial()
|
|
275
|
+
.extend({
|
|
276
|
+
version: zod_openapi_1.z.number().int().openapi({ example: 2 })
|
|
277
|
+
})
|
|
278
|
+
.required({
|
|
279
|
+
id: true
|
|
387
280
|
});
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -459,6 +459,7 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
|
|
|
459
459
|
job: z.ZodObject<{
|
|
460
460
|
id: z.ZodCUID2;
|
|
461
461
|
title: z.ZodString;
|
|
462
|
+
isApplied: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
462
463
|
brandId: z.ZodCUID2;
|
|
463
464
|
brandName: z.ZodString;
|
|
464
465
|
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -511,6 +512,7 @@ export declare const UserWithJobBookmarksOutputSchema: z.ZodObject<{
|
|
|
511
512
|
job: z.ZodObject<{
|
|
512
513
|
id: z.ZodCUID2;
|
|
513
514
|
title: z.ZodString;
|
|
515
|
+
isApplied: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
514
516
|
brandId: z.ZodCUID2;
|
|
515
517
|
brandName: z.ZodString;
|
|
516
518
|
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -26,7 +26,6 @@ __exportStar(require("./feed"), exports);
|
|
|
26
26
|
__exportStar(require("./activity"), exports);
|
|
27
27
|
__exportStar(require("./message"), exports);
|
|
28
28
|
__exportStar(require("./chat"), exports);
|
|
29
|
-
__exportStar(require("./job"), exports);
|
|
30
29
|
__exportStar(require("./user-strike"), exports);
|
|
31
30
|
__exportStar(require("./notification"), exports);
|
|
32
31
|
__exportStar(require("./investor-signal"), exports);
|
package/dist/types/job.d.ts
CHANGED
|
@@ -1,27 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema, BaseJobEntitySchema, JobIdSchema, GetJobsOutputSchema, GetJobsInputSchema, GetCreatedJobsOutputSchema, JobSearchDocumentSchema } from "../schemas/job";
|
|
3
|
-
export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
|
|
4
|
-
export type JobIdInput = z.infer<typeof JobIdSchema>;
|
|
5
|
-
export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
6
|
-
export type GigJobEntity = z.infer<typeof GigJobEntitySchema>;
|
|
7
|
-
export type RoleJobEntity = z.infer<typeof RoleJobEntitySchema>;
|
|
8
|
-
export type CreateJobInput = z.infer<typeof CreateJobInputSchema>;
|
|
9
|
-
export type CreateJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
10
|
-
export type CreateRoleJobInput = z.infer<typeof CreateRoleJobInputSchema>;
|
|
11
|
-
export type CreateRoleJobOutput = z.infer<typeof RoleJobEntitySchema>;
|
|
12
|
-
export type CreateGigJobInput = z.infer<typeof CreateGigJobInputSchema>;
|
|
13
|
-
export type CreateGigJobOutput = z.infer<typeof GigJobEntitySchema>;
|
|
14
|
-
export type UpdateRoleJobInput = z.infer<typeof UpdateRoleJobInputSchema>;
|
|
15
|
-
export type UpdateRoleJobOutput = z.infer<typeof RoleJobEntitySchema>;
|
|
16
|
-
export type UpdateGigJobInput = z.infer<typeof UpdateGigJobInputSchema>;
|
|
17
|
-
export type UpdateGigJobOutput = z.infer<typeof GigJobEntitySchema>;
|
|
18
|
-
export type UpdateJobInput = z.infer<typeof UpdateJobInputSchema>;
|
|
19
|
-
export type UpdateJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
20
|
-
export type GetJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
21
|
-
export type JobWithGigDetailsEntity = z.infer<typeof JobWithGigDetailsEntitySchema>;
|
|
22
|
-
export type JobWithRoleDetailsEntity = z.infer<typeof JobWithRoleDetailsEntitySchema>;
|
|
23
|
-
export type GetJobsInput = z.infer<typeof GetJobsInputSchema>;
|
|
24
|
-
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
25
|
-
export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
|
|
26
|
-
export type NormalizedJobEntity = JobEntity | JobWithGigDetailsEntity | JobWithRoleDetailsEntity;
|
|
27
|
-
export type JobSearchDocument = z.infer<typeof JobSearchDocumentSchema>;
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -38,7 +38,6 @@ export const MinimalJobApplicationEntitySchema = z.object({
|
|
|
38
38
|
coverLetter: z.string(),
|
|
39
39
|
createdAt: z.coerce.date(),
|
|
40
40
|
applicationStatus: ApplicationStatusSchema,
|
|
41
|
-
isApplied: z.boolean(),
|
|
42
41
|
});
|
|
43
42
|
|
|
44
43
|
export type MinimalJobApplicationEntity = z.infer<
|
|
@@ -59,7 +58,6 @@ export const BaseJobApplicationEntitySchema = z.object({
|
|
|
59
58
|
phoneNumber: z.string().nullable(),
|
|
60
59
|
currentRole: z.string(),
|
|
61
60
|
resumeUrl: z.url(),
|
|
62
|
-
isApplied: z.boolean(),
|
|
63
61
|
workSampleUrls: z
|
|
64
62
|
.array(
|
|
65
63
|
z.object({
|
|
@@ -138,7 +136,6 @@ export const JobApplicationEntitySchema = z.object({
|
|
|
138
136
|
receiveEmailUpdates: z.boolean().optional(),
|
|
139
137
|
wagesAmount: z.coerce.number().optional(),
|
|
140
138
|
availability: JobAvailabilitySchema.optional(),
|
|
141
|
-
isApplied: z.boolean(),
|
|
142
139
|
createdAt: z.coerce
|
|
143
140
|
.date()
|
|
144
141
|
.optional()
|