@zyacreatives/shared 2.1.14 → 2.1.16
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.
|
@@ -76,8 +76,8 @@ export declare const BaseJobApplicationEntitySchema: z.ZodObject<{
|
|
|
76
76
|
wagesAmount: z.ZodNullable<z.ZodNumber>;
|
|
77
77
|
}, z.core.$strip>;
|
|
78
78
|
export declare const JobApplicationEntitySchema: z.ZodObject<{
|
|
79
|
-
firstName: z.ZodString
|
|
80
|
-
lastName: z.ZodString
|
|
79
|
+
firstName: z.ZodOptional<z.ZodString>;
|
|
80
|
+
lastName: z.ZodOptional<z.ZodString>;
|
|
81
81
|
jobId: z.ZodCUID2;
|
|
82
82
|
user: z.ZodObject<{
|
|
83
83
|
id: z.ZodCUID2;
|
|
@@ -92,15 +92,15 @@ export declare const JobApplicationEntitySchema: z.ZodObject<{
|
|
|
92
92
|
ADMIN: "ADMIN";
|
|
93
93
|
}>;
|
|
94
94
|
}, z.core.$strip>;
|
|
95
|
-
emailAddress: z.ZodEmail
|
|
95
|
+
emailAddress: z.ZodOptional<z.ZodEmail>;
|
|
96
96
|
phoneNumber: z.ZodOptional<z.ZodString>;
|
|
97
|
-
currentRole: z.ZodString
|
|
98
|
-
experienceLevel: z.ZodEnum<{
|
|
97
|
+
currentRole: z.ZodOptional<z.ZodString>;
|
|
98
|
+
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
99
99
|
"0-1 year": "0-1 year";
|
|
100
100
|
"1-3 years": "1-3 years";
|
|
101
101
|
"3-5 years": "3-5 years";
|
|
102
102
|
"5+ years": "5+ years";
|
|
103
|
-
}
|
|
103
|
+
}>>;
|
|
104
104
|
resumeUrl: z.ZodURL;
|
|
105
105
|
workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
106
106
|
url: z.ZodURL;
|
|
@@ -113,27 +113,27 @@ export declare const JobApplicationEntitySchema: z.ZodObject<{
|
|
|
113
113
|
projectId: z.ZodCUID2;
|
|
114
114
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
115
115
|
}, z.core.$strip>>>;
|
|
116
|
-
applicationStatus: z.ZodEnum<{
|
|
116
|
+
applicationStatus: z.ZodDefault<z.ZodEnum<{
|
|
117
117
|
"Application Sent": "Application Sent";
|
|
118
118
|
Opened: "Opened";
|
|
119
119
|
Rejected: "Rejected";
|
|
120
120
|
Offered: "Offered";
|
|
121
121
|
Hired: "Hired";
|
|
122
|
-
}
|
|
122
|
+
}>>;
|
|
123
123
|
applicantId: z.ZodCUID2;
|
|
124
124
|
linkUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
125
125
|
url: z.ZodURL;
|
|
126
126
|
isPortfolioUrl: z.ZodDefault<z.ZodBoolean>;
|
|
127
127
|
}, z.core.$strip>>>;
|
|
128
|
-
coverLetter: z.ZodString
|
|
129
|
-
receiveEmailUpdates: z.ZodBoolean
|
|
130
|
-
wagesAmount: z.ZodOptional<z.ZodCoercedNumber<unknown
|
|
131
|
-
availability: z.ZodEnum<{
|
|
128
|
+
coverLetter: z.ZodOptional<z.ZodString>;
|
|
129
|
+
receiveEmailUpdates: z.ZodOptional<z.ZodBoolean>;
|
|
130
|
+
wagesAmount: z.ZodOptional<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
131
|
+
availability: z.ZodOptional<z.ZodEnum<{
|
|
132
132
|
"Immediate (Within 1 week)": "Immediate (Within 1 week)";
|
|
133
133
|
"2 weeks notice": "2 weeks notice";
|
|
134
134
|
"1 month notice": "1 month notice";
|
|
135
135
|
Flexible: "Flexible";
|
|
136
|
-
}
|
|
136
|
+
}>>;
|
|
137
137
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
138
138
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
139
139
|
}, z.core.$strip>;
|
|
@@ -187,6 +187,170 @@ export declare const CreateJobApplicationInputSchema: z.ZodObject<{
|
|
|
187
187
|
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
188
188
|
}, z.core.$strip>>>;
|
|
189
189
|
}, z.core.$strip>;
|
|
190
|
+
export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
191
|
+
id: z.ZodCUID2;
|
|
192
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
193
|
+
applicationStatus: z.ZodEnum<{
|
|
194
|
+
"Application Sent": "Application Sent";
|
|
195
|
+
Opened: "Opened";
|
|
196
|
+
Rejected: "Rejected";
|
|
197
|
+
Offered: "Offered";
|
|
198
|
+
Hired: "Hired";
|
|
199
|
+
}>;
|
|
200
|
+
job: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
201
|
+
title: z.ZodString;
|
|
202
|
+
brandId: z.ZodCUID2;
|
|
203
|
+
brandName: z.ZodCUID2;
|
|
204
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
205
|
+
status: z.ZodEnum<{
|
|
206
|
+
ACTIVE: "ACTIVE";
|
|
207
|
+
DELETED: "DELETED";
|
|
208
|
+
DRAFT: "DRAFT";
|
|
209
|
+
ARCHIVED: "ARCHIVED";
|
|
210
|
+
}>;
|
|
211
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
"Full Time": "Full Time";
|
|
213
|
+
"Part Time": "Part Time";
|
|
214
|
+
Freelance: "Freelance";
|
|
215
|
+
Internship: "Internship";
|
|
216
|
+
}>>;
|
|
217
|
+
workMode: z.ZodEnum<{
|
|
218
|
+
Remote: "Remote";
|
|
219
|
+
Hybrid: "Hybrid";
|
|
220
|
+
"On Site": "On Site";
|
|
221
|
+
}>;
|
|
222
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
223
|
+
"One Time": "One Time";
|
|
224
|
+
Recurring: "Recurring";
|
|
225
|
+
}>>;
|
|
226
|
+
location: z.ZodEnum<{
|
|
227
|
+
Africa: "Africa";
|
|
228
|
+
Asia: "Asia";
|
|
229
|
+
Europe: "Europe";
|
|
230
|
+
"North America": "North America";
|
|
231
|
+
"South America": "South America";
|
|
232
|
+
"Middle East": "Middle East";
|
|
233
|
+
Oceania: "Oceania";
|
|
234
|
+
Global: "Global";
|
|
235
|
+
Other: "Other";
|
|
236
|
+
Remote: "Remote";
|
|
237
|
+
EMEA: "EMEA";
|
|
238
|
+
"Asia Pacific": "Asia Pacific";
|
|
239
|
+
}>;
|
|
240
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
241
|
+
[x: string]: string;
|
|
242
|
+
}>>>;
|
|
243
|
+
createdAt: z.ZodDate;
|
|
244
|
+
updatedAt: z.ZodDate;
|
|
245
|
+
id: z.ZodCUID2;
|
|
246
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
247
|
+
overview: z.ZodString;
|
|
248
|
+
deliverables: z.ZodString;
|
|
249
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
250
|
+
aboutCompany: z.ZodOptional<z.ZodString>;
|
|
251
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
252
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
255
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
256
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
257
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
258
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
259
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
260
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
261
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
262
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
263
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
264
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
265
|
+
}>>;
|
|
266
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
267
|
+
Hourly: "Hourly";
|
|
268
|
+
Daily: "Daily";
|
|
269
|
+
Weekly: "Weekly";
|
|
270
|
+
Monthly: "Monthly";
|
|
271
|
+
"Project Based": "Project Based";
|
|
272
|
+
}>>;
|
|
273
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
274
|
+
title: z.ZodString;
|
|
275
|
+
brandId: z.ZodCUID2;
|
|
276
|
+
brandName: z.ZodCUID2;
|
|
277
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
278
|
+
status: z.ZodEnum<{
|
|
279
|
+
ACTIVE: "ACTIVE";
|
|
280
|
+
DELETED: "DELETED";
|
|
281
|
+
DRAFT: "DRAFT";
|
|
282
|
+
ARCHIVED: "ARCHIVED";
|
|
283
|
+
}>;
|
|
284
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
285
|
+
"Full Time": "Full Time";
|
|
286
|
+
"Part Time": "Part Time";
|
|
287
|
+
Freelance: "Freelance";
|
|
288
|
+
Internship: "Internship";
|
|
289
|
+
}>>;
|
|
290
|
+
workMode: z.ZodEnum<{
|
|
291
|
+
Remote: "Remote";
|
|
292
|
+
Hybrid: "Hybrid";
|
|
293
|
+
"On Site": "On Site";
|
|
294
|
+
}>;
|
|
295
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
296
|
+
"One Time": "One Time";
|
|
297
|
+
Recurring: "Recurring";
|
|
298
|
+
}>>;
|
|
299
|
+
location: z.ZodEnum<{
|
|
300
|
+
Africa: "Africa";
|
|
301
|
+
Asia: "Asia";
|
|
302
|
+
Europe: "Europe";
|
|
303
|
+
"North America": "North America";
|
|
304
|
+
"South America": "South America";
|
|
305
|
+
"Middle East": "Middle East";
|
|
306
|
+
Oceania: "Oceania";
|
|
307
|
+
Global: "Global";
|
|
308
|
+
Other: "Other";
|
|
309
|
+
Remote: "Remote";
|
|
310
|
+
EMEA: "EMEA";
|
|
311
|
+
"Asia Pacific": "Asia Pacific";
|
|
312
|
+
}>;
|
|
313
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
314
|
+
[x: string]: string;
|
|
315
|
+
}>>>;
|
|
316
|
+
createdAt: z.ZodDate;
|
|
317
|
+
updatedAt: z.ZodDate;
|
|
318
|
+
id: z.ZodCUID2;
|
|
319
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
320
|
+
experienceLevel: z.ZodEnum<{
|
|
321
|
+
"0-1 year": "0-1 year";
|
|
322
|
+
"1-3 years": "1-3 years";
|
|
323
|
+
"3-5 years": "3-5 years";
|
|
324
|
+
"5+ years": "5+ years";
|
|
325
|
+
}>;
|
|
326
|
+
overview: z.ZodString;
|
|
327
|
+
keyResponsibilities: z.ZodString;
|
|
328
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
329
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
330
|
+
companyBenefits: z.ZodOptional<z.ZodString>;
|
|
331
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
332
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
333
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
335
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
336
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
337
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
338
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
339
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
340
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
341
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
342
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
343
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
344
|
+
}>>;
|
|
345
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
346
|
+
Hourly: "Hourly";
|
|
347
|
+
Daily: "Daily";
|
|
348
|
+
Weekly: "Weekly";
|
|
349
|
+
Monthly: "Monthly";
|
|
350
|
+
"Project Based": "Project Based";
|
|
351
|
+
}>>;
|
|
352
|
+
}, z.core.$strip>], "jobType">;
|
|
353
|
+
}, z.core.$strip>;
|
|
190
354
|
export declare const UpdateJobApplicationStatusSchema: z.ZodObject<{
|
|
191
355
|
applicationStatus: z.ZodEnum<{
|
|
192
356
|
readonly SENT: "Application Sent";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateJobApplicationStatusSchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = exports.BaseJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = void 0;
|
|
3
|
+
exports.UpdateJobApplicationStatusSchema = exports.TrackedJobApplicationEntitySchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = exports.BaseJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const user_1 = require("./user");
|
|
7
|
+
const job_1 = require("./job");
|
|
7
8
|
exports.MinimalJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
8
9
|
user: user_1.MinimalUserSchema,
|
|
9
10
|
jobId: zod_openapi_1.z.cuid2(),
|
|
@@ -53,14 +54,16 @@ exports.BaseJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
|
53
54
|
wagesAmount: zod_openapi_1.z.number().nullable(),
|
|
54
55
|
});
|
|
55
56
|
exports.JobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
56
|
-
firstName: zod_openapi_1.z.string(),
|
|
57
|
-
lastName: zod_openapi_1.z.string(),
|
|
57
|
+
firstName: zod_openapi_1.z.string().optional(),
|
|
58
|
+
lastName: zod_openapi_1.z.string().optional(),
|
|
58
59
|
jobId: zod_openapi_1.z.cuid2(),
|
|
59
60
|
user: user_1.MinimalUserSchema,
|
|
60
|
-
emailAddress: zod_openapi_1.z.email(),
|
|
61
|
+
emailAddress: zod_openapi_1.z.email().optional(),
|
|
61
62
|
phoneNumber: zod_openapi_1.z.string().optional(),
|
|
62
|
-
currentRole: zod_openapi_1.z.string(),
|
|
63
|
-
experienceLevel: zod_openapi_1.z
|
|
63
|
+
currentRole: zod_openapi_1.z.string().optional(),
|
|
64
|
+
experienceLevel: zod_openapi_1.z
|
|
65
|
+
.enum(Object.values(constants_1.EXPERIENCE_LEVELS))
|
|
66
|
+
.optional(),
|
|
64
67
|
resumeUrl: zod_openapi_1.z.url(),
|
|
65
68
|
workSampleUrls: zod_openapi_1.z
|
|
66
69
|
.array(zod_openapi_1.z.object({
|
|
@@ -77,15 +80,19 @@ exports.JobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
|
77
80
|
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
78
81
|
}))
|
|
79
82
|
.optional(),
|
|
80
|
-
applicationStatus: zod_openapi_1.z
|
|
83
|
+
applicationStatus: zod_openapi_1.z
|
|
84
|
+
.enum(Object.values(constants_1.APPLICATION_STATUS))
|
|
85
|
+
.default("Application Sent"),
|
|
81
86
|
applicantId: zod_openapi_1.z.cuid2(),
|
|
82
87
|
linkUrls: zod_openapi_1.z
|
|
83
88
|
.array(zod_openapi_1.z.object({ url: zod_openapi_1.z.url(), isPortfolioUrl: zod_openapi_1.z.boolean().default(false) }))
|
|
84
89
|
.optional(),
|
|
85
|
-
coverLetter: zod_openapi_1.z.string(),
|
|
86
|
-
receiveEmailUpdates: zod_openapi_1.z.boolean(),
|
|
87
|
-
wagesAmount: zod_openapi_1.z.coerce.number().optional(),
|
|
88
|
-
availability: zod_openapi_1.z
|
|
90
|
+
coverLetter: zod_openapi_1.z.string().optional(),
|
|
91
|
+
receiveEmailUpdates: zod_openapi_1.z.boolean().optional(),
|
|
92
|
+
wagesAmount: zod_openapi_1.z.coerce.number().optional().optional(),
|
|
93
|
+
availability: zod_openapi_1.z
|
|
94
|
+
.enum(Object.values(constants_1.JOB_AVAILABILITY_TYPES))
|
|
95
|
+
.optional(),
|
|
89
96
|
createdAt: zod_openapi_1.z.coerce
|
|
90
97
|
.date()
|
|
91
98
|
.optional()
|
|
@@ -128,6 +135,12 @@ exports.CreateJobApplicationInputSchema = zod_openapi_1.z.object({
|
|
|
128
135
|
}))
|
|
129
136
|
.optional(),
|
|
130
137
|
});
|
|
138
|
+
exports.TrackedJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
139
|
+
id: zod_openapi_1.z.cuid2(),
|
|
140
|
+
createdAt: zod_openapi_1.z.coerce.date(),
|
|
141
|
+
applicationStatus: zod_openapi_1.z.enum(Object.values(constants_1.APPLICATION_STATUS)),
|
|
142
|
+
job: job_1.NormalizedJobOutputSchema,
|
|
143
|
+
});
|
|
131
144
|
exports.UpdateJobApplicationStatusSchema = zod_openapi_1.z.object({
|
|
132
145
|
applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
|
|
133
146
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema } from "../schemas/job-application";
|
|
2
|
+
import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema, TrackedJobApplicationEntitySchema } from "../schemas/job-application";
|
|
3
3
|
export type CreateJobApplicationInput = z.infer<typeof CreateJobApplicationInputSchema>;
|
|
4
4
|
export type UpdateJobApplicationStatusInput = z.infer<typeof UpdateJobApplicationStatusSchema>;
|
|
5
5
|
export type JobApplicationEntity = z.infer<typeof JobApplicationEntitySchema>;
|
|
6
6
|
export type MinimalJobApplicationEntity = z.infer<typeof MinimalJobApplicationEntitySchema>;
|
|
7
7
|
export type BaseJobApplicationEntity = z.infer<typeof BaseJobApplicationEntitySchema>;
|
|
8
|
+
export type TrackedJobApplicationEntity = z.infer<typeof TrackedJobApplicationEntitySchema>;
|
package/package.json
CHANGED
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
JOB_AVAILABILITY_TYPES,
|
|
8
8
|
JOB_SECTIONS,
|
|
9
9
|
JobAvailabilityTypes,
|
|
10
|
-
JobSections,
|
|
11
10
|
} from "../constants";
|
|
12
11
|
import { MinimalUserSchema } from "./user";
|
|
12
|
+
import { NormalizedJobOutputSchema } from "./job";
|
|
13
13
|
|
|
14
14
|
export const MinimalJobApplicationEntitySchema = z.object({
|
|
15
15
|
user: MinimalUserSchema,
|
|
@@ -81,16 +81,21 @@ export const BaseJobApplicationEntitySchema = z.object({
|
|
|
81
81
|
});
|
|
82
82
|
|
|
83
83
|
export const JobApplicationEntitySchema = z.object({
|
|
84
|
-
firstName: z.string(),
|
|
85
|
-
lastName: z.string(),
|
|
84
|
+
firstName: z.string().optional(),
|
|
85
|
+
lastName: z.string().optional(),
|
|
86
86
|
jobId: z.cuid2(),
|
|
87
87
|
user: MinimalUserSchema,
|
|
88
|
-
emailAddress: z.email(),
|
|
88
|
+
emailAddress: z.email().optional(),
|
|
89
89
|
phoneNumber: z.string().optional(),
|
|
90
|
-
currentRole: z.string(),
|
|
91
|
-
experienceLevel: z
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
currentRole: z.string().optional(),
|
|
91
|
+
experienceLevel: z
|
|
92
|
+
.enum(
|
|
93
|
+
Object.values(EXPERIENCE_LEVELS) as [
|
|
94
|
+
ExperienceLevel,
|
|
95
|
+
...ExperienceLevel[]
|
|
96
|
+
]
|
|
97
|
+
)
|
|
98
|
+
.optional(),
|
|
94
99
|
resumeUrl: z.url(),
|
|
95
100
|
workSampleUrls: z
|
|
96
101
|
.array(
|
|
@@ -111,27 +116,31 @@ export const JobApplicationEntitySchema = z.object({
|
|
|
111
116
|
})
|
|
112
117
|
)
|
|
113
118
|
.optional(),
|
|
114
|
-
applicationStatus: z
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
119
|
+
applicationStatus: z
|
|
120
|
+
.enum(
|
|
121
|
+
Object.values(APPLICATION_STATUS) as [
|
|
122
|
+
ApplicationStatus,
|
|
123
|
+
...ApplicationStatus[]
|
|
124
|
+
]
|
|
125
|
+
)
|
|
126
|
+
.default("Application Sent"),
|
|
120
127
|
applicantId: z.cuid2(),
|
|
121
128
|
linkUrls: z
|
|
122
129
|
.array(
|
|
123
130
|
z.object({ url: z.url(), isPortfolioUrl: z.boolean().default(false) })
|
|
124
131
|
)
|
|
125
132
|
.optional(),
|
|
126
|
-
coverLetter: z.string(),
|
|
127
|
-
receiveEmailUpdates: z.boolean(),
|
|
128
|
-
wagesAmount: z.coerce.number().optional(),
|
|
129
|
-
availability: z
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
coverLetter: z.string().optional(),
|
|
134
|
+
receiveEmailUpdates: z.boolean().optional(),
|
|
135
|
+
wagesAmount: z.coerce.number().optional().optional(),
|
|
136
|
+
availability: z
|
|
137
|
+
.enum(
|
|
138
|
+
Object.values(JOB_AVAILABILITY_TYPES) as [
|
|
139
|
+
JobAvailabilityTypes,
|
|
140
|
+
...JobAvailabilityTypes[]
|
|
141
|
+
]
|
|
142
|
+
)
|
|
143
|
+
.optional(),
|
|
135
144
|
createdAt: z.coerce
|
|
136
145
|
.date()
|
|
137
146
|
.optional()
|
|
@@ -188,6 +197,18 @@ export const CreateJobApplicationInputSchema = z.object({
|
|
|
188
197
|
.optional(),
|
|
189
198
|
});
|
|
190
199
|
|
|
200
|
+
export const TrackedJobApplicationEntitySchema = z.object({
|
|
201
|
+
id: z.cuid2(),
|
|
202
|
+
createdAt: z.coerce.date(),
|
|
203
|
+
applicationStatus: z.enum(
|
|
204
|
+
Object.values(APPLICATION_STATUS) as [
|
|
205
|
+
ApplicationStatus,
|
|
206
|
+
...ApplicationStatus[]
|
|
207
|
+
]
|
|
208
|
+
),
|
|
209
|
+
job: NormalizedJobOutputSchema,
|
|
210
|
+
});
|
|
211
|
+
|
|
191
212
|
export const UpdateJobApplicationStatusSchema = z.object({
|
|
192
213
|
applicationStatus: z.enum(APPLICATION_STATUS),
|
|
193
214
|
});
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
UpdateJobApplicationStatusSchema,
|
|
6
6
|
MinimalJobApplicationEntitySchema,
|
|
7
7
|
BaseJobApplicationEntitySchema,
|
|
8
|
+
TrackedJobApplicationEntitySchema,
|
|
8
9
|
} from "../schemas/job-application";
|
|
9
10
|
|
|
10
11
|
export type CreateJobApplicationInput = z.infer<
|
|
@@ -24,3 +25,7 @@ export type MinimalJobApplicationEntity = z.infer<
|
|
|
24
25
|
export type BaseJobApplicationEntity = z.infer<
|
|
25
26
|
typeof BaseJobApplicationEntitySchema
|
|
26
27
|
>;
|
|
28
|
+
|
|
29
|
+
export type TrackedJobApplicationEntity = z.infer<
|
|
30
|
+
typeof TrackedJobApplicationEntitySchema
|
|
31
|
+
>;
|