@zyacreatives/shared 2.5.56 → 2.5.57
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 +44 -56
- package/dist/schemas/job.d.ts +380 -78
- package/dist/schemas/job.js +67 -34
- package/package.json +1 -1
- package/src/schemas/job.ts +74 -40
|
@@ -174,25 +174,11 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
174
174
|
version: z.ZodInt;
|
|
175
175
|
title: z.ZodString;
|
|
176
176
|
brandId: z.ZodCUID2;
|
|
177
|
-
jobType: z.ZodEnum<{
|
|
178
|
-
GIG: "GIG";
|
|
179
|
-
ROLE: "ROLE";
|
|
180
|
-
}>;
|
|
181
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
182
|
-
"Full Time": "Full Time";
|
|
183
|
-
"Part Time": "Part Time";
|
|
184
|
-
Freelance: "Freelance";
|
|
185
|
-
Internship: "Internship";
|
|
186
|
-
}>>;
|
|
187
177
|
workMode: z.ZodEnum<{
|
|
188
178
|
Remote: "Remote";
|
|
189
179
|
Hybrid: "Hybrid";
|
|
190
180
|
"On Site": "On Site";
|
|
191
181
|
}>;
|
|
192
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
193
|
-
"One Time": "One Time";
|
|
194
|
-
Recurring: "Recurring";
|
|
195
|
-
}>>;
|
|
196
182
|
location: z.ZodEnum<{
|
|
197
183
|
Africa: "Africa";
|
|
198
184
|
Asia: "Asia";
|
|
@@ -237,6 +223,17 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
237
223
|
Monthly: "Monthly";
|
|
238
224
|
"Project Based": "Project Based";
|
|
239
225
|
}>>;
|
|
226
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
227
|
+
gigType: z.ZodEnum<{
|
|
228
|
+
"One Time": "One Time";
|
|
229
|
+
Recurring: "Recurring";
|
|
230
|
+
}>;
|
|
231
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
232
|
+
"Full Time": "Full Time";
|
|
233
|
+
"Part Time": "Part Time";
|
|
234
|
+
Freelance: "Freelance";
|
|
235
|
+
Internship: "Internship";
|
|
236
|
+
}>>;
|
|
240
237
|
}, z.core.$strip>, z.ZodObject<{
|
|
241
238
|
status: z.ZodEnum<{
|
|
242
239
|
ACTIVE: "ACTIVE";
|
|
@@ -253,25 +250,11 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
253
250
|
version: z.ZodInt;
|
|
254
251
|
title: z.ZodString;
|
|
255
252
|
brandId: z.ZodCUID2;
|
|
256
|
-
jobType: z.ZodEnum<{
|
|
257
|
-
GIG: "GIG";
|
|
258
|
-
ROLE: "ROLE";
|
|
259
|
-
}>;
|
|
260
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
261
|
-
"Full Time": "Full Time";
|
|
262
|
-
"Part Time": "Part Time";
|
|
263
|
-
Freelance: "Freelance";
|
|
264
|
-
Internship: "Internship";
|
|
265
|
-
}>>;
|
|
266
253
|
workMode: z.ZodEnum<{
|
|
267
254
|
Remote: "Remote";
|
|
268
255
|
Hybrid: "Hybrid";
|
|
269
256
|
"On Site": "On Site";
|
|
270
257
|
}>;
|
|
271
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
272
|
-
"One Time": "One Time";
|
|
273
|
-
Recurring: "Recurring";
|
|
274
|
-
}>>;
|
|
275
258
|
location: z.ZodEnum<{
|
|
276
259
|
Africa: "Africa";
|
|
277
260
|
Asia: "Asia";
|
|
@@ -322,6 +305,17 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
322
305
|
Monthly: "Monthly";
|
|
323
306
|
"Project Based": "Project Based";
|
|
324
307
|
}>>;
|
|
308
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
309
|
+
employmentType: z.ZodEnum<{
|
|
310
|
+
"Full Time": "Full Time";
|
|
311
|
+
"Part Time": "Part Time";
|
|
312
|
+
Freelance: "Freelance";
|
|
313
|
+
Internship: "Internship";
|
|
314
|
+
}>;
|
|
315
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
316
|
+
"One Time": "One Time";
|
|
317
|
+
Recurring: "Recurring";
|
|
318
|
+
}>>;
|
|
325
319
|
}, z.core.$strip>, z.ZodObject<{
|
|
326
320
|
status: z.ZodEnum<{
|
|
327
321
|
ACTIVE: "ACTIVE";
|
|
@@ -543,25 +537,11 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
543
537
|
version: z.ZodInt;
|
|
544
538
|
title: z.ZodString;
|
|
545
539
|
brandId: z.ZodCUID2;
|
|
546
|
-
jobType: z.ZodEnum<{
|
|
547
|
-
GIG: "GIG";
|
|
548
|
-
ROLE: "ROLE";
|
|
549
|
-
}>;
|
|
550
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
551
|
-
"Full Time": "Full Time";
|
|
552
|
-
"Part Time": "Part Time";
|
|
553
|
-
Freelance: "Freelance";
|
|
554
|
-
Internship: "Internship";
|
|
555
|
-
}>>;
|
|
556
540
|
workMode: z.ZodEnum<{
|
|
557
541
|
Remote: "Remote";
|
|
558
542
|
Hybrid: "Hybrid";
|
|
559
543
|
"On Site": "On Site";
|
|
560
544
|
}>;
|
|
561
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
562
|
-
"One Time": "One Time";
|
|
563
|
-
Recurring: "Recurring";
|
|
564
|
-
}>>;
|
|
565
545
|
location: z.ZodEnum<{
|
|
566
546
|
Africa: "Africa";
|
|
567
547
|
Asia: "Asia";
|
|
@@ -606,6 +586,17 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
606
586
|
Monthly: "Monthly";
|
|
607
587
|
"Project Based": "Project Based";
|
|
608
588
|
}>>;
|
|
589
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
590
|
+
gigType: z.ZodEnum<{
|
|
591
|
+
"One Time": "One Time";
|
|
592
|
+
Recurring: "Recurring";
|
|
593
|
+
}>;
|
|
594
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
595
|
+
"Full Time": "Full Time";
|
|
596
|
+
"Part Time": "Part Time";
|
|
597
|
+
Freelance: "Freelance";
|
|
598
|
+
Internship: "Internship";
|
|
599
|
+
}>>;
|
|
609
600
|
}, z.core.$strip>, z.ZodObject<{
|
|
610
601
|
status: z.ZodEnum<{
|
|
611
602
|
ACTIVE: "ACTIVE";
|
|
@@ -622,25 +613,11 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
622
613
|
version: z.ZodInt;
|
|
623
614
|
title: z.ZodString;
|
|
624
615
|
brandId: z.ZodCUID2;
|
|
625
|
-
jobType: z.ZodEnum<{
|
|
626
|
-
GIG: "GIG";
|
|
627
|
-
ROLE: "ROLE";
|
|
628
|
-
}>;
|
|
629
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
630
|
-
"Full Time": "Full Time";
|
|
631
|
-
"Part Time": "Part Time";
|
|
632
|
-
Freelance: "Freelance";
|
|
633
|
-
Internship: "Internship";
|
|
634
|
-
}>>;
|
|
635
616
|
workMode: z.ZodEnum<{
|
|
636
617
|
Remote: "Remote";
|
|
637
618
|
Hybrid: "Hybrid";
|
|
638
619
|
"On Site": "On Site";
|
|
639
620
|
}>;
|
|
640
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
641
|
-
"One Time": "One Time";
|
|
642
|
-
Recurring: "Recurring";
|
|
643
|
-
}>>;
|
|
644
621
|
location: z.ZodEnum<{
|
|
645
622
|
Africa: "Africa";
|
|
646
623
|
Asia: "Asia";
|
|
@@ -691,6 +668,17 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
691
668
|
Monthly: "Monthly";
|
|
692
669
|
"Project Based": "Project Based";
|
|
693
670
|
}>>;
|
|
671
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
672
|
+
employmentType: z.ZodEnum<{
|
|
673
|
+
"Full Time": "Full Time";
|
|
674
|
+
"Part Time": "Part Time";
|
|
675
|
+
Freelance: "Freelance";
|
|
676
|
+
Internship: "Internship";
|
|
677
|
+
}>;
|
|
678
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
679
|
+
"One Time": "One Time";
|
|
680
|
+
Recurring: "Recurring";
|
|
681
|
+
}>>;
|
|
694
682
|
}, z.core.$strip>, z.ZodObject<{
|
|
695
683
|
status: z.ZodEnum<{
|
|
696
684
|
ACTIVE: "ACTIVE";
|
package/dist/schemas/job.d.ts
CHANGED
|
@@ -1,10 +1,82 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
/**
|
|
3
|
+
* --------------------------------
|
|
4
|
+
* ENUMS
|
|
5
|
+
* --------------------------------
|
|
6
|
+
*/
|
|
7
|
+
export declare const JobTypeSchema: z.ZodEnum<{
|
|
8
|
+
GIG: "GIG";
|
|
9
|
+
ROLE: "ROLE";
|
|
10
|
+
}>;
|
|
11
|
+
export declare const EmploymentTypeSchema: z.ZodEnum<{
|
|
12
|
+
"Full Time": "Full Time";
|
|
13
|
+
"Part Time": "Part Time";
|
|
14
|
+
Freelance: "Freelance";
|
|
15
|
+
Internship: "Internship";
|
|
16
|
+
}>;
|
|
17
|
+
export declare const WorkModeSchema: z.ZodEnum<{
|
|
18
|
+
Remote: "Remote";
|
|
19
|
+
Hybrid: "Hybrid";
|
|
20
|
+
"On Site": "On Site";
|
|
21
|
+
}>;
|
|
22
|
+
export declare const JobStatusSchema: z.ZodEnum<{
|
|
23
|
+
ACTIVE: "ACTIVE";
|
|
24
|
+
DELETED: "DELETED";
|
|
25
|
+
DRAFT: "DRAFT";
|
|
26
|
+
ARCHIVED: "ARCHIVED";
|
|
27
|
+
}>;
|
|
28
|
+
export declare const GigTypeSchema: z.ZodEnum<{
|
|
29
|
+
"One Time": "One Time";
|
|
30
|
+
Recurring: "Recurring";
|
|
31
|
+
}>;
|
|
32
|
+
export declare const JobLocationSchema: z.ZodEnum<{
|
|
33
|
+
Africa: "Africa";
|
|
34
|
+
Asia: "Asia";
|
|
35
|
+
Europe: "Europe";
|
|
36
|
+
"North America": "North America";
|
|
37
|
+
"South America": "South America";
|
|
38
|
+
"Middle East": "Middle East";
|
|
39
|
+
Oceania: "Oceania";
|
|
40
|
+
Global: "Global";
|
|
41
|
+
Other: "Other";
|
|
42
|
+
Remote: "Remote";
|
|
43
|
+
EMEA: "EMEA";
|
|
44
|
+
"Asia Pacific": "Asia Pacific";
|
|
45
|
+
}>;
|
|
46
|
+
export declare const ExperienceLevelSchema: z.ZodEnum<{
|
|
47
|
+
"0-1 year": "0-1 year";
|
|
48
|
+
"1-3 years": "1-3 years";
|
|
49
|
+
"3-5 years": "3-5 years";
|
|
50
|
+
"5+ years": "5+ years";
|
|
51
|
+
}>;
|
|
52
|
+
export declare const WageCurrencySchema: z.ZodEnum<{
|
|
53
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
54
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
55
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
56
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
57
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
58
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
59
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
60
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
61
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
62
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
63
|
+
}>;
|
|
64
|
+
export declare const WageTypeSchema: z.ZodEnum<{
|
|
65
|
+
Hourly: "Hourly";
|
|
66
|
+
Daily: "Daily";
|
|
67
|
+
Weekly: "Weekly";
|
|
68
|
+
Monthly: "Monthly";
|
|
69
|
+
"Project Based": "Project Based";
|
|
70
|
+
}>;
|
|
71
|
+
export declare const JobSectionSchema: z.ZodEnum<{
|
|
72
|
+
[x: string]: string;
|
|
73
|
+
}>;
|
|
2
74
|
/**
|
|
3
75
|
* --------------------------------
|
|
4
76
|
* SHAPE
|
|
5
77
|
* --------------------------------
|
|
6
78
|
*/
|
|
7
|
-
declare const JobShape: z.ZodObject<{
|
|
79
|
+
export declare const JobShape: z.ZodObject<{
|
|
8
80
|
title: z.ZodString;
|
|
9
81
|
brandId: z.ZodCUID2;
|
|
10
82
|
jobType: z.ZodEnum<{
|
|
@@ -105,7 +177,79 @@ export declare const JobEntitySchema: z.ZodObject<{
|
|
|
105
177
|
id: z.ZodCUID2;
|
|
106
178
|
}, z.core.$strip>;
|
|
107
179
|
export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
108
|
-
|
|
180
|
+
/**
|
|
181
|
+
* --------------------------------
|
|
182
|
+
* ROLE / GIG DETAILS
|
|
183
|
+
* --------------------------------
|
|
184
|
+
*/
|
|
185
|
+
export declare const GigDetailsSchema: z.ZodObject<{
|
|
186
|
+
overview: z.ZodString;
|
|
187
|
+
deliverables: z.ZodString;
|
|
188
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
189
|
+
aboutCompany: z.ZodOptional<z.ZodString>;
|
|
190
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
191
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
192
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
193
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
194
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
195
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
196
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
197
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
198
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
199
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
200
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
201
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
202
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
203
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
204
|
+
}>>;
|
|
205
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
206
|
+
Hourly: "Hourly";
|
|
207
|
+
Daily: "Daily";
|
|
208
|
+
Weekly: "Weekly";
|
|
209
|
+
Monthly: "Monthly";
|
|
210
|
+
"Project Based": "Project Based";
|
|
211
|
+
}>>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export declare const RoleDetailsSchema: z.ZodObject<{
|
|
214
|
+
experienceLevel: z.ZodEnum<{
|
|
215
|
+
"0-1 year": "0-1 year";
|
|
216
|
+
"1-3 years": "1-3 years";
|
|
217
|
+
"3-5 years": "3-5 years";
|
|
218
|
+
"5+ years": "5+ years";
|
|
219
|
+
}>;
|
|
220
|
+
overview: z.ZodString;
|
|
221
|
+
keyResponsibilities: z.ZodString;
|
|
222
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
223
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
224
|
+
companyBenefits: z.ZodOptional<z.ZodString>;
|
|
225
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
226
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
227
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
228
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
229
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
230
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
231
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
232
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
233
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
234
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
235
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
236
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
237
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
238
|
+
}>>;
|
|
239
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
Hourly: "Hourly";
|
|
241
|
+
Daily: "Daily";
|
|
242
|
+
Weekly: "Weekly";
|
|
243
|
+
Monthly: "Monthly";
|
|
244
|
+
"Project Based": "Project Based";
|
|
245
|
+
}>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
/**
|
|
248
|
+
* --------------------------------
|
|
249
|
+
* DETAILED ENTITIES
|
|
250
|
+
* --------------------------------
|
|
251
|
+
*/
|
|
252
|
+
export declare const GigJobEntitySchema: z.ZodObject<{
|
|
109
253
|
status: z.ZodEnum<{
|
|
110
254
|
ACTIVE: "ACTIVE";
|
|
111
255
|
DELETED: "DELETED";
|
|
@@ -121,9 +265,59 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
121
265
|
version: z.ZodInt;
|
|
122
266
|
title: z.ZodString;
|
|
123
267
|
brandId: z.ZodCUID2;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
268
|
+
workMode: z.ZodEnum<{
|
|
269
|
+
Remote: "Remote";
|
|
270
|
+
Hybrid: "Hybrid";
|
|
271
|
+
"On Site": "On Site";
|
|
272
|
+
}>;
|
|
273
|
+
location: z.ZodEnum<{
|
|
274
|
+
Africa: "Africa";
|
|
275
|
+
Asia: "Asia";
|
|
276
|
+
Europe: "Europe";
|
|
277
|
+
"North America": "North America";
|
|
278
|
+
"South America": "South America";
|
|
279
|
+
"Middle East": "Middle East";
|
|
280
|
+
Oceania: "Oceania";
|
|
281
|
+
Global: "Global";
|
|
282
|
+
Other: "Other";
|
|
283
|
+
Remote: "Remote";
|
|
284
|
+
EMEA: "EMEA";
|
|
285
|
+
"Asia Pacific": "Asia Pacific";
|
|
286
|
+
}>;
|
|
287
|
+
jobSections: z.ZodArray<z.ZodEnum<{
|
|
288
|
+
[x: string]: string;
|
|
289
|
+
}>>;
|
|
290
|
+
id: z.ZodCUID2;
|
|
291
|
+
overview: z.ZodString;
|
|
292
|
+
deliverables: z.ZodString;
|
|
293
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
294
|
+
aboutCompany: z.ZodOptional<z.ZodString>;
|
|
295
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
296
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
297
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
298
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
299
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
300
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
301
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
302
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
303
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
304
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
305
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
306
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
307
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
308
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
309
|
+
}>>;
|
|
310
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
311
|
+
Hourly: "Hourly";
|
|
312
|
+
Daily: "Daily";
|
|
313
|
+
Weekly: "Weekly";
|
|
314
|
+
Monthly: "Monthly";
|
|
315
|
+
"Project Based": "Project Based";
|
|
316
|
+
}>>;
|
|
317
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
318
|
+
gigType: z.ZodEnum<{
|
|
319
|
+
"One Time": "One Time";
|
|
320
|
+
Recurring: "Recurring";
|
|
127
321
|
}>;
|
|
128
322
|
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
129
323
|
"Full Time": "Full Time";
|
|
@@ -131,15 +325,116 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
131
325
|
Freelance: "Freelance";
|
|
132
326
|
Internship: "Internship";
|
|
133
327
|
}>>;
|
|
328
|
+
}, z.core.$strip>;
|
|
329
|
+
export type GigJobEntity = z.infer<typeof GigJobEntitySchema>;
|
|
330
|
+
export declare const RoleJobEntitySchema: z.ZodObject<{
|
|
331
|
+
status: z.ZodEnum<{
|
|
332
|
+
ACTIVE: "ACTIVE";
|
|
333
|
+
DELETED: "DELETED";
|
|
334
|
+
DRAFT: "DRAFT";
|
|
335
|
+
ARCHIVED: "ARCHIVED";
|
|
336
|
+
}>;
|
|
337
|
+
brandName: z.ZodString;
|
|
338
|
+
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
339
|
+
isApplied: z.ZodDefault<z.ZodBoolean>;
|
|
340
|
+
isBookmarked: z.ZodBoolean;
|
|
341
|
+
createdAt: z.ZodISODateTime;
|
|
342
|
+
updatedAt: z.ZodISODateTime;
|
|
343
|
+
version: z.ZodInt;
|
|
344
|
+
title: z.ZodString;
|
|
345
|
+
brandId: z.ZodCUID2;
|
|
134
346
|
workMode: z.ZodEnum<{
|
|
135
347
|
Remote: "Remote";
|
|
136
348
|
Hybrid: "Hybrid";
|
|
137
349
|
"On Site": "On Site";
|
|
138
350
|
}>;
|
|
351
|
+
location: z.ZodEnum<{
|
|
352
|
+
Africa: "Africa";
|
|
353
|
+
Asia: "Asia";
|
|
354
|
+
Europe: "Europe";
|
|
355
|
+
"North America": "North America";
|
|
356
|
+
"South America": "South America";
|
|
357
|
+
"Middle East": "Middle East";
|
|
358
|
+
Oceania: "Oceania";
|
|
359
|
+
Global: "Global";
|
|
360
|
+
Other: "Other";
|
|
361
|
+
Remote: "Remote";
|
|
362
|
+
EMEA: "EMEA";
|
|
363
|
+
"Asia Pacific": "Asia Pacific";
|
|
364
|
+
}>;
|
|
365
|
+
jobSections: z.ZodArray<z.ZodEnum<{
|
|
366
|
+
[x: string]: string;
|
|
367
|
+
}>>;
|
|
368
|
+
id: z.ZodCUID2;
|
|
369
|
+
experienceLevel: z.ZodEnum<{
|
|
370
|
+
"0-1 year": "0-1 year";
|
|
371
|
+
"1-3 years": "1-3 years";
|
|
372
|
+
"3-5 years": "3-5 years";
|
|
373
|
+
"5+ years": "5+ years";
|
|
374
|
+
}>;
|
|
375
|
+
overview: z.ZodString;
|
|
376
|
+
keyResponsibilities: z.ZodString;
|
|
377
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
378
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
379
|
+
companyBenefits: z.ZodOptional<z.ZodString>;
|
|
380
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
381
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
382
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
383
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
384
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
385
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
386
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
387
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
388
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
389
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
390
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
391
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
392
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
393
|
+
}>>;
|
|
394
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
395
|
+
Hourly: "Hourly";
|
|
396
|
+
Daily: "Daily";
|
|
397
|
+
Weekly: "Weekly";
|
|
398
|
+
Monthly: "Monthly";
|
|
399
|
+
"Project Based": "Project Based";
|
|
400
|
+
}>>;
|
|
401
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
402
|
+
employmentType: z.ZodEnum<{
|
|
403
|
+
"Full Time": "Full Time";
|
|
404
|
+
"Part Time": "Part Time";
|
|
405
|
+
Freelance: "Freelance";
|
|
406
|
+
Internship: "Internship";
|
|
407
|
+
}>;
|
|
139
408
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
140
409
|
"One Time": "One Time";
|
|
141
410
|
Recurring: "Recurring";
|
|
142
411
|
}>>;
|
|
412
|
+
}, z.core.$strip>;
|
|
413
|
+
export type RoleJobEntity = z.infer<typeof RoleJobEntitySchema>;
|
|
414
|
+
/**
|
|
415
|
+
* Backwards-compatible names.
|
|
416
|
+
*/
|
|
417
|
+
export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
418
|
+
status: z.ZodEnum<{
|
|
419
|
+
ACTIVE: "ACTIVE";
|
|
420
|
+
DELETED: "DELETED";
|
|
421
|
+
DRAFT: "DRAFT";
|
|
422
|
+
ARCHIVED: "ARCHIVED";
|
|
423
|
+
}>;
|
|
424
|
+
brandName: z.ZodString;
|
|
425
|
+
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
426
|
+
isApplied: z.ZodDefault<z.ZodBoolean>;
|
|
427
|
+
isBookmarked: z.ZodBoolean;
|
|
428
|
+
createdAt: z.ZodISODateTime;
|
|
429
|
+
updatedAt: z.ZodISODateTime;
|
|
430
|
+
version: z.ZodInt;
|
|
431
|
+
title: z.ZodString;
|
|
432
|
+
brandId: z.ZodCUID2;
|
|
433
|
+
workMode: z.ZodEnum<{
|
|
434
|
+
Remote: "Remote";
|
|
435
|
+
Hybrid: "Hybrid";
|
|
436
|
+
"On Site": "On Site";
|
|
437
|
+
}>;
|
|
143
438
|
location: z.ZodEnum<{
|
|
144
439
|
Africa: "Africa";
|
|
145
440
|
Asia: "Asia";
|
|
@@ -184,8 +479,19 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
184
479
|
Monthly: "Monthly";
|
|
185
480
|
"Project Based": "Project Based";
|
|
186
481
|
}>>;
|
|
482
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
483
|
+
gigType: z.ZodEnum<{
|
|
484
|
+
"One Time": "One Time";
|
|
485
|
+
Recurring: "Recurring";
|
|
486
|
+
}>;
|
|
487
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
488
|
+
"Full Time": "Full Time";
|
|
489
|
+
"Part Time": "Part Time";
|
|
490
|
+
Freelance: "Freelance";
|
|
491
|
+
Internship: "Internship";
|
|
492
|
+
}>>;
|
|
187
493
|
}, z.core.$strip>;
|
|
188
|
-
export type JobWithGigDetailsEntity =
|
|
494
|
+
export type JobWithGigDetailsEntity = GigJobEntity;
|
|
189
495
|
export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
190
496
|
status: z.ZodEnum<{
|
|
191
497
|
ACTIVE: "ACTIVE";
|
|
@@ -202,25 +508,11 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
|
202
508
|
version: z.ZodInt;
|
|
203
509
|
title: z.ZodString;
|
|
204
510
|
brandId: z.ZodCUID2;
|
|
205
|
-
jobType: z.ZodEnum<{
|
|
206
|
-
GIG: "GIG";
|
|
207
|
-
ROLE: "ROLE";
|
|
208
|
-
}>;
|
|
209
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
210
|
-
"Full Time": "Full Time";
|
|
211
|
-
"Part Time": "Part Time";
|
|
212
|
-
Freelance: "Freelance";
|
|
213
|
-
Internship: "Internship";
|
|
214
|
-
}>>;
|
|
215
511
|
workMode: z.ZodEnum<{
|
|
216
512
|
Remote: "Remote";
|
|
217
513
|
Hybrid: "Hybrid";
|
|
218
514
|
"On Site": "On Site";
|
|
219
515
|
}>;
|
|
220
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
221
|
-
"One Time": "One Time";
|
|
222
|
-
Recurring: "Recurring";
|
|
223
|
-
}>>;
|
|
224
516
|
location: z.ZodEnum<{
|
|
225
517
|
Africa: "Africa";
|
|
226
518
|
Asia: "Asia";
|
|
@@ -271,8 +563,26 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
|
271
563
|
Monthly: "Monthly";
|
|
272
564
|
"Project Based": "Project Based";
|
|
273
565
|
}>>;
|
|
566
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
567
|
+
employmentType: z.ZodEnum<{
|
|
568
|
+
"Full Time": "Full Time";
|
|
569
|
+
"Part Time": "Part Time";
|
|
570
|
+
Freelance: "Freelance";
|
|
571
|
+
Internship: "Internship";
|
|
572
|
+
}>;
|
|
573
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
574
|
+
"One Time": "One Time";
|
|
575
|
+
Recurring: "Recurring";
|
|
576
|
+
}>>;
|
|
274
577
|
}, z.core.$strip>;
|
|
275
|
-
export type JobWithRoleDetailsEntity =
|
|
578
|
+
export type JobWithRoleDetailsEntity = RoleJobEntity;
|
|
579
|
+
/**
|
|
580
|
+
* Keep this as a regular union.
|
|
581
|
+
*
|
|
582
|
+
* Do not use discriminatedUnion here because JobEntitySchema has jobType as
|
|
583
|
+
* "GIG" | "ROLE", while GigJobEntitySchema and RoleJobEntitySchema use
|
|
584
|
+
* literals. That makes the discriminator ambiguous.
|
|
585
|
+
*/
|
|
276
586
|
export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
277
587
|
status: z.ZodEnum<{
|
|
278
588
|
ACTIVE: "ACTIVE";
|
|
@@ -289,25 +599,11 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
289
599
|
version: z.ZodInt;
|
|
290
600
|
title: z.ZodString;
|
|
291
601
|
brandId: z.ZodCUID2;
|
|
292
|
-
jobType: z.ZodEnum<{
|
|
293
|
-
GIG: "GIG";
|
|
294
|
-
ROLE: "ROLE";
|
|
295
|
-
}>;
|
|
296
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
297
|
-
"Full Time": "Full Time";
|
|
298
|
-
"Part Time": "Part Time";
|
|
299
|
-
Freelance: "Freelance";
|
|
300
|
-
Internship: "Internship";
|
|
301
|
-
}>>;
|
|
302
602
|
workMode: z.ZodEnum<{
|
|
303
603
|
Remote: "Remote";
|
|
304
604
|
Hybrid: "Hybrid";
|
|
305
605
|
"On Site": "On Site";
|
|
306
606
|
}>;
|
|
307
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
308
|
-
"One Time": "One Time";
|
|
309
|
-
Recurring: "Recurring";
|
|
310
|
-
}>>;
|
|
311
607
|
location: z.ZodEnum<{
|
|
312
608
|
Africa: "Africa";
|
|
313
609
|
Asia: "Asia";
|
|
@@ -352,6 +648,17 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
352
648
|
Monthly: "Monthly";
|
|
353
649
|
"Project Based": "Project Based";
|
|
354
650
|
}>>;
|
|
651
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
652
|
+
gigType: z.ZodEnum<{
|
|
653
|
+
"One Time": "One Time";
|
|
654
|
+
Recurring: "Recurring";
|
|
655
|
+
}>;
|
|
656
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
657
|
+
"Full Time": "Full Time";
|
|
658
|
+
"Part Time": "Part Time";
|
|
659
|
+
Freelance: "Freelance";
|
|
660
|
+
Internship: "Internship";
|
|
661
|
+
}>>;
|
|
355
662
|
}, z.core.$strip>, z.ZodObject<{
|
|
356
663
|
status: z.ZodEnum<{
|
|
357
664
|
ACTIVE: "ACTIVE";
|
|
@@ -368,25 +675,11 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
368
675
|
version: z.ZodInt;
|
|
369
676
|
title: z.ZodString;
|
|
370
677
|
brandId: z.ZodCUID2;
|
|
371
|
-
jobType: z.ZodEnum<{
|
|
372
|
-
GIG: "GIG";
|
|
373
|
-
ROLE: "ROLE";
|
|
374
|
-
}>;
|
|
375
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
376
|
-
"Full Time": "Full Time";
|
|
377
|
-
"Part Time": "Part Time";
|
|
378
|
-
Freelance: "Freelance";
|
|
379
|
-
Internship: "Internship";
|
|
380
|
-
}>>;
|
|
381
678
|
workMode: z.ZodEnum<{
|
|
382
679
|
Remote: "Remote";
|
|
383
680
|
Hybrid: "Hybrid";
|
|
384
681
|
"On Site": "On Site";
|
|
385
682
|
}>;
|
|
386
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
387
|
-
"One Time": "One Time";
|
|
388
|
-
Recurring: "Recurring";
|
|
389
|
-
}>>;
|
|
390
683
|
location: z.ZodEnum<{
|
|
391
684
|
Africa: "Africa";
|
|
392
685
|
Asia: "Asia";
|
|
@@ -437,6 +730,17 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
437
730
|
Monthly: "Monthly";
|
|
438
731
|
"Project Based": "Project Based";
|
|
439
732
|
}>>;
|
|
733
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
734
|
+
employmentType: z.ZodEnum<{
|
|
735
|
+
"Full Time": "Full Time";
|
|
736
|
+
"Part Time": "Part Time";
|
|
737
|
+
Freelance: "Freelance";
|
|
738
|
+
Internship: "Internship";
|
|
739
|
+
}>;
|
|
740
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
741
|
+
"One Time": "One Time";
|
|
742
|
+
Recurring: "Recurring";
|
|
743
|
+
}>>;
|
|
440
744
|
}, z.core.$strip>, z.ZodObject<{
|
|
441
745
|
status: z.ZodEnum<{
|
|
442
746
|
ACTIVE: "ACTIVE";
|
|
@@ -619,25 +923,11 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
619
923
|
version: z.ZodInt;
|
|
620
924
|
title: z.ZodString;
|
|
621
925
|
brandId: z.ZodCUID2;
|
|
622
|
-
jobType: z.ZodEnum<{
|
|
623
|
-
GIG: "GIG";
|
|
624
|
-
ROLE: "ROLE";
|
|
625
|
-
}>;
|
|
626
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
627
|
-
"Full Time": "Full Time";
|
|
628
|
-
"Part Time": "Part Time";
|
|
629
|
-
Freelance: "Freelance";
|
|
630
|
-
Internship: "Internship";
|
|
631
|
-
}>>;
|
|
632
926
|
workMode: z.ZodEnum<{
|
|
633
927
|
Remote: "Remote";
|
|
634
928
|
Hybrid: "Hybrid";
|
|
635
929
|
"On Site": "On Site";
|
|
636
930
|
}>;
|
|
637
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
638
|
-
"One Time": "One Time";
|
|
639
|
-
Recurring: "Recurring";
|
|
640
|
-
}>>;
|
|
641
931
|
location: z.ZodEnum<{
|
|
642
932
|
Africa: "Africa";
|
|
643
933
|
Asia: "Asia";
|
|
@@ -682,6 +972,17 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
682
972
|
Monthly: "Monthly";
|
|
683
973
|
"Project Based": "Project Based";
|
|
684
974
|
}>>;
|
|
975
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
976
|
+
gigType: z.ZodEnum<{
|
|
977
|
+
"One Time": "One Time";
|
|
978
|
+
Recurring: "Recurring";
|
|
979
|
+
}>;
|
|
980
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
981
|
+
"Full Time": "Full Time";
|
|
982
|
+
"Part Time": "Part Time";
|
|
983
|
+
Freelance: "Freelance";
|
|
984
|
+
Internship: "Internship";
|
|
985
|
+
}>>;
|
|
685
986
|
}, z.core.$strip>, z.ZodObject<{
|
|
686
987
|
status: z.ZodEnum<{
|
|
687
988
|
ACTIVE: "ACTIVE";
|
|
@@ -698,25 +999,11 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
698
999
|
version: z.ZodInt;
|
|
699
1000
|
title: z.ZodString;
|
|
700
1001
|
brandId: z.ZodCUID2;
|
|
701
|
-
jobType: z.ZodEnum<{
|
|
702
|
-
GIG: "GIG";
|
|
703
|
-
ROLE: "ROLE";
|
|
704
|
-
}>;
|
|
705
|
-
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
706
|
-
"Full Time": "Full Time";
|
|
707
|
-
"Part Time": "Part Time";
|
|
708
|
-
Freelance: "Freelance";
|
|
709
|
-
Internship: "Internship";
|
|
710
|
-
}>>;
|
|
711
1002
|
workMode: z.ZodEnum<{
|
|
712
1003
|
Remote: "Remote";
|
|
713
1004
|
Hybrid: "Hybrid";
|
|
714
1005
|
"On Site": "On Site";
|
|
715
1006
|
}>;
|
|
716
|
-
gigType: z.ZodOptional<z.ZodEnum<{
|
|
717
|
-
"One Time": "One Time";
|
|
718
|
-
Recurring: "Recurring";
|
|
719
|
-
}>>;
|
|
720
1007
|
location: z.ZodEnum<{
|
|
721
1008
|
Africa: "Africa";
|
|
722
1009
|
Asia: "Asia";
|
|
@@ -767,6 +1054,17 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
767
1054
|
Monthly: "Monthly";
|
|
768
1055
|
"Project Based": "Project Based";
|
|
769
1056
|
}>>;
|
|
1057
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
1058
|
+
employmentType: z.ZodEnum<{
|
|
1059
|
+
"Full Time": "Full Time";
|
|
1060
|
+
"Part Time": "Part Time";
|
|
1061
|
+
Freelance: "Freelance";
|
|
1062
|
+
Internship: "Internship";
|
|
1063
|
+
}>;
|
|
1064
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
1065
|
+
"One Time": "One Time";
|
|
1066
|
+
Recurring: "Recurring";
|
|
1067
|
+
}>>;
|
|
770
1068
|
}, z.core.$strip>, z.ZodObject<{
|
|
771
1069
|
status: z.ZodEnum<{
|
|
772
1070
|
ACTIVE: "ACTIVE";
|
|
@@ -829,6 +1127,11 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
829
1127
|
hasPrevPage: z.ZodBoolean;
|
|
830
1128
|
}, z.core.$strip>;
|
|
831
1129
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
1130
|
+
/**
|
|
1131
|
+
* --------------------------------
|
|
1132
|
+
* SEARCH DOCUMENT
|
|
1133
|
+
* --------------------------------
|
|
1134
|
+
*/
|
|
832
1135
|
export declare const JobSearchDocumentSchema: z.ZodObject<{
|
|
833
1136
|
id: z.ZodCUID2;
|
|
834
1137
|
title: z.ZodString;
|
|
@@ -846,4 +1149,3 @@ export declare const JobSearchDocumentSchema: z.ZodObject<{
|
|
|
846
1149
|
updatedAt: z.ZodISODateTime;
|
|
847
1150
|
}, z.core.$strip>;
|
|
848
1151
|
export type JobSearchDocument = z.infer<typeof JobSearchDocumentSchema>;
|
|
849
|
-
export {};
|
package/dist/schemas/job.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JobSearchDocumentSchema = exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.UpdateJobInputSchema = exports.CreateJobInputSchema = exports.NormalizedJobSchema = exports.JobWithRoleDetailsEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema = void 0;
|
|
3
|
+
exports.JobSearchDocumentSchema = exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.UpdateJobInputSchema = exports.CreateJobInputSchema = exports.NormalizedJobSchema = exports.JobWithRoleDetailsEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.RoleJobEntitySchema = exports.GigJobEntitySchema = exports.RoleDetailsSchema = exports.GigDetailsSchema = exports.JobEntitySchema = exports.JobShape = exports.JobSectionSchema = exports.WageTypeSchema = exports.WageCurrencySchema = exports.ExperienceLevelSchema = exports.JobLocationSchema = exports.GigTypeSchema = exports.JobStatusSchema = exports.WorkModeSchema = exports.EmploymentTypeSchema = exports.JobTypeSchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
/**
|
|
@@ -8,29 +8,30 @@ const constants_1 = require("../constants");
|
|
|
8
8
|
* ENUMS
|
|
9
9
|
* --------------------------------
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
exports.JobTypeSchema = zod_openapi_1.z.enum(Object.values(constants_1.JOB_TYPE));
|
|
12
|
+
exports.EmploymentTypeSchema = zod_openapi_1.z.enum(Object.values(constants_1.EMPLOYMENT_TYPE));
|
|
13
|
+
exports.WorkModeSchema = zod_openapi_1.z.enum(Object.values(constants_1.WORK_MODE));
|
|
14
|
+
exports.JobStatusSchema = zod_openapi_1.z.enum(Object.values(constants_1.JOB_STATUS));
|
|
15
|
+
exports.GigTypeSchema = zod_openapi_1.z.enum(Object.values(constants_1.GIG_TYPE));
|
|
16
|
+
exports.JobLocationSchema = zod_openapi_1.z.enum(Object.values(constants_1.JOB_LOCATIONS));
|
|
17
|
+
exports.ExperienceLevelSchema = zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS));
|
|
18
|
+
exports.WageCurrencySchema = zod_openapi_1.z.enum(Object.values(constants_1.WAGES_CURRENCY));
|
|
19
|
+
exports.WageTypeSchema = zod_openapi_1.z.enum(Object.values(constants_1.WAGE_TYPES));
|
|
20
|
+
exports.JobSectionSchema = zod_openapi_1.z.enum(Object.values(constants_1.JOB_SECTIONS));
|
|
20
21
|
/**
|
|
21
22
|
* --------------------------------
|
|
22
23
|
* SHAPE
|
|
23
24
|
* --------------------------------
|
|
24
25
|
*/
|
|
25
|
-
|
|
26
|
+
exports.JobShape = zod_openapi_1.z.object({
|
|
26
27
|
title: zod_openapi_1.z.string().min(3).max(255),
|
|
27
28
|
brandId: zod_openapi_1.z.cuid2(),
|
|
28
|
-
jobType: JobTypeSchema,
|
|
29
|
-
employmentType: EmploymentTypeSchema.optional(),
|
|
30
|
-
workMode: WorkModeSchema,
|
|
31
|
-
gigType: GigTypeSchema.optional(),
|
|
32
|
-
location:
|
|
33
|
-
jobSections: zod_openapi_1.z.array(
|
|
29
|
+
jobType: exports.JobTypeSchema,
|
|
30
|
+
employmentType: exports.EmploymentTypeSchema.optional(),
|
|
31
|
+
workMode: exports.WorkModeSchema,
|
|
32
|
+
gigType: exports.GigTypeSchema.optional(),
|
|
33
|
+
location: exports.JobLocationSchema,
|
|
34
|
+
jobSections: zod_openapi_1.z.array(exports.JobSectionSchema),
|
|
34
35
|
});
|
|
35
36
|
/**
|
|
36
37
|
* --------------------------------
|
|
@@ -40,8 +41,8 @@ const JobShape = zod_openapi_1.z.object({
|
|
|
40
41
|
exports.JobEntitySchema = zod_openapi_1.z
|
|
41
42
|
.object({
|
|
42
43
|
id: zod_openapi_1.z.cuid2(),
|
|
43
|
-
...JobShape.shape,
|
|
44
|
-
status: JobStatusSchema,
|
|
44
|
+
...exports.JobShape.shape,
|
|
45
|
+
status: exports.JobStatusSchema,
|
|
45
46
|
brandName: zod_openapi_1.z.string(),
|
|
46
47
|
brandImgUrl: zod_openapi_1.z.string().nullable().optional(),
|
|
47
48
|
isApplied: zod_openapi_1.z.boolean().default(false),
|
|
@@ -56,7 +57,7 @@ exports.JobEntitySchema = zod_openapi_1.z
|
|
|
56
57
|
* ROLE / GIG DETAILS
|
|
57
58
|
* --------------------------------
|
|
58
59
|
*/
|
|
59
|
-
|
|
60
|
+
exports.GigDetailsSchema = zod_openapi_1.z.object({
|
|
60
61
|
overview: zod_openapi_1.z.string(),
|
|
61
62
|
deliverables: zod_openapi_1.z.string(),
|
|
62
63
|
employeeRequirements: zod_openapi_1.z.string().optional(),
|
|
@@ -64,11 +65,11 @@ const GigDetailsSchema = zod_openapi_1.z.object({
|
|
|
64
65
|
requiredSkills: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
|
65
66
|
wagesMin: zod_openapi_1.z.number().nullable().optional(),
|
|
66
67
|
wagesMax: zod_openapi_1.z.number().nullable().optional(),
|
|
67
|
-
wagesCurrency: WageCurrencySchema.optional(),
|
|
68
|
-
wagesType: WageTypeSchema.optional(),
|
|
68
|
+
wagesCurrency: exports.WageCurrencySchema.optional(),
|
|
69
|
+
wagesType: exports.WageTypeSchema.optional(),
|
|
69
70
|
});
|
|
70
|
-
|
|
71
|
-
experienceLevel: ExperienceLevelSchema,
|
|
71
|
+
exports.RoleDetailsSchema = zod_openapi_1.z.object({
|
|
72
|
+
experienceLevel: exports.ExperienceLevelSchema,
|
|
72
73
|
overview: zod_openapi_1.z.string(),
|
|
73
74
|
keyResponsibilities: zod_openapi_1.z.string(),
|
|
74
75
|
requiredSkills: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
|
@@ -76,14 +77,41 @@ const RoleDetailsSchema = zod_openapi_1.z.object({
|
|
|
76
77
|
companyBenefits: zod_openapi_1.z.string().optional(),
|
|
77
78
|
wagesMin: zod_openapi_1.z.number().nullable().optional(),
|
|
78
79
|
wagesMax: zod_openapi_1.z.number().nullable().optional(),
|
|
79
|
-
wagesCurrency: WageCurrencySchema.optional(),
|
|
80
|
-
wagesType: WageTypeSchema.optional(),
|
|
80
|
+
wagesCurrency: exports.WageCurrencySchema.optional(),
|
|
81
|
+
wagesType: exports.WageTypeSchema.optional(),
|
|
81
82
|
});
|
|
82
|
-
|
|
83
|
-
|
|
83
|
+
/**
|
|
84
|
+
* --------------------------------
|
|
85
|
+
* DETAILED ENTITIES
|
|
86
|
+
* --------------------------------
|
|
87
|
+
*/
|
|
88
|
+
exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
|
|
89
|
+
jobType: zod_openapi_1.z.literal(constants_1.JOB_TYPE.GIG),
|
|
90
|
+
gigType: exports.GigTypeSchema,
|
|
91
|
+
employmentType: exports.EmploymentTypeSchema.optional(),
|
|
92
|
+
...exports.GigDetailsSchema.shape,
|
|
93
|
+
}).openapi("GigJob");
|
|
94
|
+
exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
|
|
95
|
+
jobType: zod_openapi_1.z.literal(constants_1.JOB_TYPE.ROLE),
|
|
96
|
+
employmentType: exports.EmploymentTypeSchema,
|
|
97
|
+
gigType: exports.GigTypeSchema.optional(),
|
|
98
|
+
...exports.RoleDetailsSchema.shape,
|
|
99
|
+
}).openapi("RoleJob");
|
|
100
|
+
/**
|
|
101
|
+
* Backwards-compatible names.
|
|
102
|
+
*/
|
|
103
|
+
exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema;
|
|
104
|
+
exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema;
|
|
105
|
+
/**
|
|
106
|
+
* Keep this as a regular union.
|
|
107
|
+
*
|
|
108
|
+
* Do not use discriminatedUnion here because JobEntitySchema has jobType as
|
|
109
|
+
* "GIG" | "ROLE", while GigJobEntitySchema and RoleJobEntitySchema use
|
|
110
|
+
* literals. That makes the discriminator ambiguous.
|
|
111
|
+
*/
|
|
84
112
|
exports.NormalizedJobSchema = zod_openapi_1.z.union([
|
|
85
|
-
exports.
|
|
86
|
-
exports.
|
|
113
|
+
exports.GigJobEntitySchema,
|
|
114
|
+
exports.RoleJobEntitySchema,
|
|
87
115
|
exports.JobEntitySchema,
|
|
88
116
|
]);
|
|
89
117
|
/**
|
|
@@ -91,7 +119,7 @@ exports.NormalizedJobSchema = zod_openapi_1.z.union([
|
|
|
91
119
|
* INPUTS
|
|
92
120
|
* --------------------------------
|
|
93
121
|
*/
|
|
94
|
-
exports.CreateJobInputSchema = JobShape.superRefine((data, ctx) => {
|
|
122
|
+
exports.CreateJobInputSchema = exports.JobShape.superRefine((data, ctx) => {
|
|
95
123
|
if (data.jobType === constants_1.JOB_TYPE.ROLE && !data.employmentType) {
|
|
96
124
|
ctx.addIssue({
|
|
97
125
|
path: ["employmentType"],
|
|
@@ -109,12 +137,12 @@ exports.CreateJobInputSchema = JobShape.superRefine((data, ctx) => {
|
|
|
109
137
|
});
|
|
110
138
|
exports.UpdateJobInputSchema = exports.CreateJobInputSchema.partial().extend({
|
|
111
139
|
id: zod_openapi_1.z.cuid2(),
|
|
112
|
-
status: JobStatusSchema.optional(),
|
|
140
|
+
status: exports.JobStatusSchema.optional(),
|
|
113
141
|
version: zod_openapi_1.z.int(),
|
|
114
142
|
});
|
|
115
143
|
exports.GetJobsInputSchema = zod_openapi_1.z.object({
|
|
116
144
|
q: zod_openapi_1.z.string().optional(),
|
|
117
|
-
jobType: JobTypeSchema.optional(),
|
|
145
|
+
jobType: exports.JobTypeSchema.optional(),
|
|
118
146
|
page: zod_openapi_1.z.coerce.number().min(1).default(1),
|
|
119
147
|
limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20),
|
|
120
148
|
});
|
|
@@ -132,13 +160,18 @@ exports.GetJobsOutputSchema = zod_openapi_1.z.object({
|
|
|
132
160
|
hasNextPage: zod_openapi_1.z.boolean(),
|
|
133
161
|
hasPrevPage: zod_openapi_1.z.boolean(),
|
|
134
162
|
});
|
|
163
|
+
/**
|
|
164
|
+
* --------------------------------
|
|
165
|
+
* SEARCH DOCUMENT
|
|
166
|
+
* --------------------------------
|
|
167
|
+
*/
|
|
135
168
|
exports.JobSearchDocumentSchema = zod_openapi_1.z.object({
|
|
136
169
|
id: zod_openapi_1.z.cuid2(),
|
|
137
170
|
title: zod_openapi_1.z.string(),
|
|
138
171
|
brandId: zod_openapi_1.z.cuid2(),
|
|
139
172
|
brandName: zod_openapi_1.z.string(),
|
|
140
173
|
brandImgUrl: zod_openapi_1.z.string().nullable().optional(),
|
|
141
|
-
jobType: zod_openapi_1.z.enum([
|
|
174
|
+
jobType: zod_openapi_1.z.enum([constants_1.JOB_TYPE.GIG, constants_1.JOB_TYPE.ROLE]),
|
|
142
175
|
location: zod_openapi_1.z.string(),
|
|
143
176
|
overview: zod_openapi_1.z.string(),
|
|
144
177
|
requiredSkills: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -2,24 +2,24 @@ import { z } from "@hono/zod-openapi";
|
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
EMPLOYMENT_TYPE,
|
|
5
|
-
EmploymentType,
|
|
5
|
+
type EmploymentType,
|
|
6
6
|
EXPERIENCE_LEVELS,
|
|
7
|
-
ExperienceLevel,
|
|
7
|
+
type ExperienceLevel,
|
|
8
8
|
GIG_TYPE,
|
|
9
|
-
GigType,
|
|
9
|
+
type GigType,
|
|
10
10
|
JOB_LOCATIONS,
|
|
11
11
|
JOB_SECTIONS,
|
|
12
12
|
JOB_STATUS,
|
|
13
|
+
type JobStatus,
|
|
13
14
|
JOB_TYPE,
|
|
14
|
-
|
|
15
|
-
JobStatus,
|
|
16
|
-
JobType,
|
|
15
|
+
type JobType,
|
|
17
16
|
WAGES_CURRENCY,
|
|
18
|
-
WagesCurrency,
|
|
17
|
+
type WagesCurrency,
|
|
19
18
|
WAGE_TYPES,
|
|
20
|
-
WageTypes,
|
|
19
|
+
type WageTypes,
|
|
21
20
|
WORK_MODE,
|
|
22
|
-
WorkMode,
|
|
21
|
+
type WorkMode,
|
|
22
|
+
JobLocation,
|
|
23
23
|
} from "../constants";
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -28,59 +28,61 @@ import {
|
|
|
28
28
|
* --------------------------------
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
const JobTypeSchema = z.enum(
|
|
31
|
+
export const JobTypeSchema = z.enum(
|
|
32
32
|
Object.values(JOB_TYPE) as [JobType, ...JobType[]],
|
|
33
33
|
);
|
|
34
34
|
|
|
35
|
-
const EmploymentTypeSchema = z.enum(
|
|
35
|
+
export const EmploymentTypeSchema = z.enum(
|
|
36
36
|
Object.values(EMPLOYMENT_TYPE) as [EmploymentType, ...EmploymentType[]],
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
-
const WorkModeSchema = z.enum(
|
|
39
|
+
export const WorkModeSchema = z.enum(
|
|
40
40
|
Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]],
|
|
41
41
|
);
|
|
42
42
|
|
|
43
|
-
const JobStatusSchema = z.enum(
|
|
43
|
+
export const JobStatusSchema = z.enum(
|
|
44
44
|
Object.values(JOB_STATUS) as [JobStatus, ...JobStatus[]],
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
-
const GigTypeSchema = z.enum(
|
|
47
|
+
export const GigTypeSchema = z.enum(
|
|
48
48
|
Object.values(GIG_TYPE) as [GigType, ...GigType[]],
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
const
|
|
51
|
+
export const JobLocationSchema = z.enum(
|
|
52
52
|
Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]],
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
-
const ExperienceLevelSchema = z.enum(
|
|
55
|
+
export const ExperienceLevelSchema = z.enum(
|
|
56
56
|
Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]],
|
|
57
57
|
);
|
|
58
58
|
|
|
59
|
-
const WageCurrencySchema = z.enum(
|
|
59
|
+
export const WageCurrencySchema = z.enum(
|
|
60
60
|
Object.values(WAGES_CURRENCY) as [WagesCurrency, ...WagesCurrency[]],
|
|
61
61
|
);
|
|
62
62
|
|
|
63
|
-
const WageTypeSchema = z.enum(
|
|
63
|
+
export const WageTypeSchema = z.enum(
|
|
64
64
|
Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]],
|
|
65
65
|
);
|
|
66
66
|
|
|
67
|
+
export const JobSectionSchema = z.enum(
|
|
68
|
+
Object.values(JOB_SECTIONS) as [string, ...string[]],
|
|
69
|
+
);
|
|
70
|
+
|
|
67
71
|
/**
|
|
68
72
|
* --------------------------------
|
|
69
73
|
* SHAPE
|
|
70
74
|
* --------------------------------
|
|
71
75
|
*/
|
|
72
76
|
|
|
73
|
-
const JobShape = z.object({
|
|
77
|
+
export const JobShape = z.object({
|
|
74
78
|
title: z.string().min(3).max(255),
|
|
75
79
|
brandId: z.cuid2(),
|
|
76
80
|
jobType: JobTypeSchema,
|
|
77
81
|
employmentType: EmploymentTypeSchema.optional(),
|
|
78
82
|
workMode: WorkModeSchema,
|
|
79
83
|
gigType: GigTypeSchema.optional(),
|
|
80
|
-
location:
|
|
81
|
-
jobSections: z.array(
|
|
82
|
-
z.enum(Object.values(JOB_SECTIONS) as [string, ...string[]]),
|
|
83
|
-
),
|
|
84
|
+
location: JobLocationSchema,
|
|
85
|
+
jobSections: z.array(JobSectionSchema),
|
|
84
86
|
});
|
|
85
87
|
|
|
86
88
|
export type JobShapeType = z.infer<typeof JobShape>;
|
|
@@ -94,6 +96,7 @@ export type JobShapeType = z.infer<typeof JobShape>;
|
|
|
94
96
|
export const JobEntitySchema = z
|
|
95
97
|
.object({
|
|
96
98
|
id: z.cuid2(),
|
|
99
|
+
|
|
97
100
|
...JobShape.shape,
|
|
98
101
|
|
|
99
102
|
status: JobStatusSchema,
|
|
@@ -118,7 +121,7 @@ export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
|
118
121
|
* --------------------------------
|
|
119
122
|
*/
|
|
120
123
|
|
|
121
|
-
const GigDetailsSchema = z.object({
|
|
124
|
+
export const GigDetailsSchema = z.object({
|
|
122
125
|
overview: z.string(),
|
|
123
126
|
deliverables: z.string(),
|
|
124
127
|
employeeRequirements: z.string().optional(),
|
|
@@ -130,7 +133,7 @@ const GigDetailsSchema = z.object({
|
|
|
130
133
|
wagesType: WageTypeSchema.optional(),
|
|
131
134
|
});
|
|
132
135
|
|
|
133
|
-
const RoleDetailsSchema = z.object({
|
|
136
|
+
export const RoleDetailsSchema = z.object({
|
|
134
137
|
experienceLevel: ExperienceLevelSchema,
|
|
135
138
|
overview: z.string(),
|
|
136
139
|
keyResponsibilities: z.string(),
|
|
@@ -143,25 +146,49 @@ const RoleDetailsSchema = z.object({
|
|
|
143
146
|
wagesType: WageTypeSchema.optional(),
|
|
144
147
|
});
|
|
145
148
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
/**
|
|
150
|
+
* --------------------------------
|
|
151
|
+
* DETAILED ENTITIES
|
|
152
|
+
* --------------------------------
|
|
153
|
+
*/
|
|
149
154
|
|
|
150
|
-
export
|
|
151
|
-
|
|
152
|
-
|
|
155
|
+
export const GigJobEntitySchema = JobEntitySchema.extend({
|
|
156
|
+
jobType: z.literal(JOB_TYPE.GIG),
|
|
157
|
+
gigType: GigTypeSchema,
|
|
158
|
+
employmentType: EmploymentTypeSchema.optional(),
|
|
159
|
+
...GigDetailsSchema.shape,
|
|
160
|
+
}).openapi("GigJob");
|
|
153
161
|
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
export type GigJobEntity = z.infer<typeof GigJobEntitySchema>;
|
|
163
|
+
|
|
164
|
+
export const RoleJobEntitySchema = JobEntitySchema.extend({
|
|
165
|
+
jobType: z.literal(JOB_TYPE.ROLE),
|
|
166
|
+
employmentType: EmploymentTypeSchema,
|
|
167
|
+
gigType: GigTypeSchema.optional(),
|
|
168
|
+
...RoleDetailsSchema.shape,
|
|
169
|
+
}).openapi("RoleJob");
|
|
170
|
+
|
|
171
|
+
export type RoleJobEntity = z.infer<typeof RoleJobEntitySchema>;
|
|
157
172
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
173
|
+
/**
|
|
174
|
+
* Backwards-compatible names.
|
|
175
|
+
*/
|
|
176
|
+
export const JobWithGigDetailsEntitySchema = GigJobEntitySchema;
|
|
177
|
+
export type JobWithGigDetailsEntity = GigJobEntity;
|
|
161
178
|
|
|
179
|
+
export const JobWithRoleDetailsEntitySchema = RoleJobEntitySchema;
|
|
180
|
+
export type JobWithRoleDetailsEntity = RoleJobEntity;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Keep this as a regular union.
|
|
184
|
+
*
|
|
185
|
+
* Do not use discriminatedUnion here because JobEntitySchema has jobType as
|
|
186
|
+
* "GIG" | "ROLE", while GigJobEntitySchema and RoleJobEntitySchema use
|
|
187
|
+
* literals. That makes the discriminator ambiguous.
|
|
188
|
+
*/
|
|
162
189
|
export const NormalizedJobSchema = z.union([
|
|
163
|
-
|
|
164
|
-
|
|
190
|
+
GigJobEntitySchema,
|
|
191
|
+
RoleJobEntitySchema,
|
|
165
192
|
JobEntitySchema,
|
|
166
193
|
]);
|
|
167
194
|
|
|
@@ -181,6 +208,7 @@ export const CreateJobInputSchema = JobShape.superRefine((data, ctx) => {
|
|
|
181
208
|
message: "employmentType is required for ROLE jobs",
|
|
182
209
|
});
|
|
183
210
|
}
|
|
211
|
+
|
|
184
212
|
if (data.jobType === JOB_TYPE.GIG && !data.gigType) {
|
|
185
213
|
ctx.addIssue({
|
|
186
214
|
path: ["gigType"],
|
|
@@ -227,13 +255,19 @@ export const GetJobsOutputSchema = z.object({
|
|
|
227
255
|
|
|
228
256
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
229
257
|
|
|
258
|
+
/**
|
|
259
|
+
* --------------------------------
|
|
260
|
+
* SEARCH DOCUMENT
|
|
261
|
+
* --------------------------------
|
|
262
|
+
*/
|
|
263
|
+
|
|
230
264
|
export const JobSearchDocumentSchema = z.object({
|
|
231
265
|
id: z.cuid2(),
|
|
232
266
|
title: z.string(),
|
|
233
267
|
brandId: z.cuid2(),
|
|
234
268
|
brandName: z.string(),
|
|
235
269
|
brandImgUrl: z.string().nullable().optional(),
|
|
236
|
-
jobType: z.enum([
|
|
270
|
+
jobType: z.enum([JOB_TYPE.GIG, JOB_TYPE.ROLE]),
|
|
237
271
|
location: z.string(),
|
|
238
272
|
overview: z.string(),
|
|
239
273
|
requiredSkills: z.array(z.string()),
|