@zyacreatives/shared 2.1.16 → 2.1.18
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 +50 -0
- package/dist/schemas/job-application.js +1 -1
- package/dist/schemas/job.d.ts +352 -2
- package/dist/schemas/job.js +38 -4
- package/dist/types/job.d.ts +4 -1
- package/package.json +1 -1
- package/src/schemas/job-application.ts +4 -2
- package/src/schemas/job.ts +42 -3
- package/src/types/job.ts +6 -0
|
@@ -270,6 +270,56 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
270
270
|
Monthly: "Monthly";
|
|
271
271
|
"Project Based": "Project Based";
|
|
272
272
|
}>>;
|
|
273
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
274
|
+
id: z.ZodCUID2;
|
|
275
|
+
title: z.ZodString;
|
|
276
|
+
brandId: z.ZodCUID2;
|
|
277
|
+
brandName: z.ZodCUID2;
|
|
278
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
279
|
+
jobType: z.ZodEnum<{
|
|
280
|
+
GIG: "GIG";
|
|
281
|
+
ROLE: "ROLE";
|
|
282
|
+
}>;
|
|
283
|
+
status: z.ZodEnum<{
|
|
284
|
+
ACTIVE: "ACTIVE";
|
|
285
|
+
DELETED: "DELETED";
|
|
286
|
+
DRAFT: "DRAFT";
|
|
287
|
+
ARCHIVED: "ARCHIVED";
|
|
288
|
+
}>;
|
|
289
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
290
|
+
"Full Time": "Full Time";
|
|
291
|
+
"Part Time": "Part Time";
|
|
292
|
+
Freelance: "Freelance";
|
|
293
|
+
Internship: "Internship";
|
|
294
|
+
}>>;
|
|
295
|
+
workMode: z.ZodEnum<{
|
|
296
|
+
Remote: "Remote";
|
|
297
|
+
Hybrid: "Hybrid";
|
|
298
|
+
"On Site": "On Site";
|
|
299
|
+
}>;
|
|
300
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
301
|
+
"One Time": "One Time";
|
|
302
|
+
Recurring: "Recurring";
|
|
303
|
+
}>>;
|
|
304
|
+
location: z.ZodEnum<{
|
|
305
|
+
Africa: "Africa";
|
|
306
|
+
Asia: "Asia";
|
|
307
|
+
Europe: "Europe";
|
|
308
|
+
"North America": "North America";
|
|
309
|
+
"South America": "South America";
|
|
310
|
+
"Middle East": "Middle East";
|
|
311
|
+
Oceania: "Oceania";
|
|
312
|
+
Global: "Global";
|
|
313
|
+
Other: "Other";
|
|
314
|
+
Remote: "Remote";
|
|
315
|
+
EMEA: "EMEA";
|
|
316
|
+
"Asia Pacific": "Asia Pacific";
|
|
317
|
+
}>;
|
|
318
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
319
|
+
[x: string]: string;
|
|
320
|
+
}>>>;
|
|
321
|
+
createdAt: z.ZodDate;
|
|
322
|
+
updatedAt: z.ZodDate;
|
|
273
323
|
}, z.core.$strip>, z.ZodObject<{
|
|
274
324
|
title: z.ZodString;
|
|
275
325
|
brandId: z.ZodCUID2;
|
|
@@ -139,7 +139,7 @@ exports.TrackedJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
|
139
139
|
id: zod_openapi_1.z.cuid2(),
|
|
140
140
|
createdAt: zod_openapi_1.z.coerce.date(),
|
|
141
141
|
applicationStatus: zod_openapi_1.z.enum(Object.values(constants_1.APPLICATION_STATUS)),
|
|
142
|
-
job: job_1.
|
|
142
|
+
job: job_1.NormalizedJobSchema,
|
|
143
143
|
});
|
|
144
144
|
exports.UpdateJobApplicationStatusSchema = zod_openapi_1.z.object({
|
|
145
145
|
applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
|
package/dist/schemas/job.d.ts
CHANGED
|
@@ -555,7 +555,7 @@ export declare const UpdateJobInputSchema: z.ZodObject<{
|
|
|
555
555
|
ARCHIVED: "ARCHIVED";
|
|
556
556
|
}>>;
|
|
557
557
|
}, z.core.$strip>;
|
|
558
|
-
export declare const
|
|
558
|
+
export declare const NormalizedJobSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
559
559
|
title: z.ZodString;
|
|
560
560
|
brandId: z.ZodCUID2;
|
|
561
561
|
brandName: z.ZodCUID2;
|
|
@@ -628,6 +628,56 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
628
628
|
Monthly: "Monthly";
|
|
629
629
|
"Project Based": "Project Based";
|
|
630
630
|
}>>;
|
|
631
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
632
|
+
id: z.ZodCUID2;
|
|
633
|
+
title: z.ZodString;
|
|
634
|
+
brandId: z.ZodCUID2;
|
|
635
|
+
brandName: z.ZodCUID2;
|
|
636
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
637
|
+
jobType: z.ZodEnum<{
|
|
638
|
+
GIG: "GIG";
|
|
639
|
+
ROLE: "ROLE";
|
|
640
|
+
}>;
|
|
641
|
+
status: z.ZodEnum<{
|
|
642
|
+
ACTIVE: "ACTIVE";
|
|
643
|
+
DELETED: "DELETED";
|
|
644
|
+
DRAFT: "DRAFT";
|
|
645
|
+
ARCHIVED: "ARCHIVED";
|
|
646
|
+
}>;
|
|
647
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
648
|
+
"Full Time": "Full Time";
|
|
649
|
+
"Part Time": "Part Time";
|
|
650
|
+
Freelance: "Freelance";
|
|
651
|
+
Internship: "Internship";
|
|
652
|
+
}>>;
|
|
653
|
+
workMode: z.ZodEnum<{
|
|
654
|
+
Remote: "Remote";
|
|
655
|
+
Hybrid: "Hybrid";
|
|
656
|
+
"On Site": "On Site";
|
|
657
|
+
}>;
|
|
658
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
659
|
+
"One Time": "One Time";
|
|
660
|
+
Recurring: "Recurring";
|
|
661
|
+
}>>;
|
|
662
|
+
location: z.ZodEnum<{
|
|
663
|
+
Africa: "Africa";
|
|
664
|
+
Asia: "Asia";
|
|
665
|
+
Europe: "Europe";
|
|
666
|
+
"North America": "North America";
|
|
667
|
+
"South America": "South America";
|
|
668
|
+
"Middle East": "Middle East";
|
|
669
|
+
Oceania: "Oceania";
|
|
670
|
+
Global: "Global";
|
|
671
|
+
Other: "Other";
|
|
672
|
+
Remote: "Remote";
|
|
673
|
+
EMEA: "EMEA";
|
|
674
|
+
"Asia Pacific": "Asia Pacific";
|
|
675
|
+
}>;
|
|
676
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
677
|
+
[x: string]: string;
|
|
678
|
+
}>>>;
|
|
679
|
+
createdAt: z.ZodDate;
|
|
680
|
+
updatedAt: z.ZodDate;
|
|
631
681
|
}, z.core.$strip>, z.ZodObject<{
|
|
632
682
|
title: z.ZodString;
|
|
633
683
|
brandId: z.ZodCUID2;
|
|
@@ -708,7 +758,7 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
708
758
|
"Project Based": "Project Based";
|
|
709
759
|
}>>;
|
|
710
760
|
}, z.core.$strip>], "jobType">;
|
|
711
|
-
export declare const
|
|
761
|
+
export declare const GetCreatedJobsOutputSchema: z.ZodObject<{
|
|
712
762
|
jobs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
713
763
|
title: z.ZodString;
|
|
714
764
|
brandId: z.ZodCUID2;
|
|
@@ -782,6 +832,56 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
782
832
|
Monthly: "Monthly";
|
|
783
833
|
"Project Based": "Project Based";
|
|
784
834
|
}>>;
|
|
835
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
836
|
+
id: z.ZodCUID2;
|
|
837
|
+
title: z.ZodString;
|
|
838
|
+
brandId: z.ZodCUID2;
|
|
839
|
+
brandName: z.ZodCUID2;
|
|
840
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
841
|
+
jobType: z.ZodEnum<{
|
|
842
|
+
GIG: "GIG";
|
|
843
|
+
ROLE: "ROLE";
|
|
844
|
+
}>;
|
|
845
|
+
status: z.ZodEnum<{
|
|
846
|
+
ACTIVE: "ACTIVE";
|
|
847
|
+
DELETED: "DELETED";
|
|
848
|
+
DRAFT: "DRAFT";
|
|
849
|
+
ARCHIVED: "ARCHIVED";
|
|
850
|
+
}>;
|
|
851
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
852
|
+
"Full Time": "Full Time";
|
|
853
|
+
"Part Time": "Part Time";
|
|
854
|
+
Freelance: "Freelance";
|
|
855
|
+
Internship: "Internship";
|
|
856
|
+
}>>;
|
|
857
|
+
workMode: z.ZodEnum<{
|
|
858
|
+
Remote: "Remote";
|
|
859
|
+
Hybrid: "Hybrid";
|
|
860
|
+
"On Site": "On Site";
|
|
861
|
+
}>;
|
|
862
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
863
|
+
"One Time": "One Time";
|
|
864
|
+
Recurring: "Recurring";
|
|
865
|
+
}>>;
|
|
866
|
+
location: z.ZodEnum<{
|
|
867
|
+
Africa: "Africa";
|
|
868
|
+
Asia: "Asia";
|
|
869
|
+
Europe: "Europe";
|
|
870
|
+
"North America": "North America";
|
|
871
|
+
"South America": "South America";
|
|
872
|
+
"Middle East": "Middle East";
|
|
873
|
+
Oceania: "Oceania";
|
|
874
|
+
Global: "Global";
|
|
875
|
+
Other: "Other";
|
|
876
|
+
Remote: "Remote";
|
|
877
|
+
EMEA: "EMEA";
|
|
878
|
+
"Asia Pacific": "Asia Pacific";
|
|
879
|
+
}>;
|
|
880
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
881
|
+
[x: string]: string;
|
|
882
|
+
}>>>;
|
|
883
|
+
createdAt: z.ZodDate;
|
|
884
|
+
updatedAt: z.ZodDate;
|
|
785
885
|
}, z.core.$strip>, z.ZodObject<{
|
|
786
886
|
title: z.ZodString;
|
|
787
887
|
brandId: z.ZodCUID2;
|
|
@@ -866,3 +966,253 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
866
966
|
noOfActiveJobs: z.ZodNumber;
|
|
867
967
|
noOfArchivedJobs: z.ZodNumber;
|
|
868
968
|
}, z.core.$strip>;
|
|
969
|
+
export declare const GetJobsInputSchema: z.ZodObject<{
|
|
970
|
+
q: z.ZodOptional<z.ZodString>;
|
|
971
|
+
jobType: z.ZodOptional<z.ZodEnum<{
|
|
972
|
+
GIG: "GIG";
|
|
973
|
+
ROLE: "ROLE";
|
|
974
|
+
}>>;
|
|
975
|
+
workMode: z.ZodOptional<z.ZodEnum<{
|
|
976
|
+
Remote: "Remote";
|
|
977
|
+
Hybrid: "Hybrid";
|
|
978
|
+
"On Site": "On Site";
|
|
979
|
+
}>>;
|
|
980
|
+
location: z.ZodOptional<z.ZodEnum<{
|
|
981
|
+
Africa: "Africa";
|
|
982
|
+
Asia: "Asia";
|
|
983
|
+
Europe: "Europe";
|
|
984
|
+
"North America": "North America";
|
|
985
|
+
"South America": "South America";
|
|
986
|
+
"Middle East": "Middle East";
|
|
987
|
+
Oceania: "Oceania";
|
|
988
|
+
Global: "Global";
|
|
989
|
+
Other: "Other";
|
|
990
|
+
Remote: "Remote";
|
|
991
|
+
EMEA: "EMEA";
|
|
992
|
+
"Asia Pacific": "Asia Pacific";
|
|
993
|
+
}>>;
|
|
994
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
995
|
+
"Full Time": "Full Time";
|
|
996
|
+
"Part Time": "Part Time";
|
|
997
|
+
Freelance: "Freelance";
|
|
998
|
+
Internship: "Internship";
|
|
999
|
+
}>>;
|
|
1000
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
1001
|
+
"One Time": "One Time";
|
|
1002
|
+
Recurring: "Recurring";
|
|
1003
|
+
}>>;
|
|
1004
|
+
requiredSkills: z.ZodOptional<z.ZodString>;
|
|
1005
|
+
status: z.ZodOptional<z.ZodString>;
|
|
1006
|
+
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1007
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
1008
|
+
}, z.core.$strip>;
|
|
1009
|
+
export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
1010
|
+
jobs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1011
|
+
title: z.ZodString;
|
|
1012
|
+
brandId: z.ZodCUID2;
|
|
1013
|
+
brandName: z.ZodCUID2;
|
|
1014
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
1015
|
+
status: z.ZodEnum<{
|
|
1016
|
+
ACTIVE: "ACTIVE";
|
|
1017
|
+
DELETED: "DELETED";
|
|
1018
|
+
DRAFT: "DRAFT";
|
|
1019
|
+
ARCHIVED: "ARCHIVED";
|
|
1020
|
+
}>;
|
|
1021
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
1022
|
+
"Full Time": "Full Time";
|
|
1023
|
+
"Part Time": "Part Time";
|
|
1024
|
+
Freelance: "Freelance";
|
|
1025
|
+
Internship: "Internship";
|
|
1026
|
+
}>>;
|
|
1027
|
+
workMode: z.ZodEnum<{
|
|
1028
|
+
Remote: "Remote";
|
|
1029
|
+
Hybrid: "Hybrid";
|
|
1030
|
+
"On Site": "On Site";
|
|
1031
|
+
}>;
|
|
1032
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
1033
|
+
"One Time": "One Time";
|
|
1034
|
+
Recurring: "Recurring";
|
|
1035
|
+
}>>;
|
|
1036
|
+
location: z.ZodEnum<{
|
|
1037
|
+
Africa: "Africa";
|
|
1038
|
+
Asia: "Asia";
|
|
1039
|
+
Europe: "Europe";
|
|
1040
|
+
"North America": "North America";
|
|
1041
|
+
"South America": "South America";
|
|
1042
|
+
"Middle East": "Middle East";
|
|
1043
|
+
Oceania: "Oceania";
|
|
1044
|
+
Global: "Global";
|
|
1045
|
+
Other: "Other";
|
|
1046
|
+
Remote: "Remote";
|
|
1047
|
+
EMEA: "EMEA";
|
|
1048
|
+
"Asia Pacific": "Asia Pacific";
|
|
1049
|
+
}>;
|
|
1050
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
1051
|
+
[x: string]: string;
|
|
1052
|
+
}>>>;
|
|
1053
|
+
createdAt: z.ZodDate;
|
|
1054
|
+
updatedAt: z.ZodDate;
|
|
1055
|
+
id: z.ZodCUID2;
|
|
1056
|
+
jobType: z.ZodLiteral<"GIG">;
|
|
1057
|
+
overview: z.ZodString;
|
|
1058
|
+
deliverables: z.ZodString;
|
|
1059
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
1060
|
+
aboutCompany: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
1062
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
1063
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
1064
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
1065
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
1066
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
1067
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
1068
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
1069
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
1070
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
1071
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
1072
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
1073
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
1074
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
1075
|
+
}>>;
|
|
1076
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
1077
|
+
Hourly: "Hourly";
|
|
1078
|
+
Daily: "Daily";
|
|
1079
|
+
Weekly: "Weekly";
|
|
1080
|
+
Monthly: "Monthly";
|
|
1081
|
+
"Project Based": "Project Based";
|
|
1082
|
+
}>>;
|
|
1083
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1084
|
+
id: z.ZodCUID2;
|
|
1085
|
+
title: z.ZodString;
|
|
1086
|
+
brandId: z.ZodCUID2;
|
|
1087
|
+
brandName: z.ZodCUID2;
|
|
1088
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
1089
|
+
jobType: z.ZodEnum<{
|
|
1090
|
+
GIG: "GIG";
|
|
1091
|
+
ROLE: "ROLE";
|
|
1092
|
+
}>;
|
|
1093
|
+
status: z.ZodEnum<{
|
|
1094
|
+
ACTIVE: "ACTIVE";
|
|
1095
|
+
DELETED: "DELETED";
|
|
1096
|
+
DRAFT: "DRAFT";
|
|
1097
|
+
ARCHIVED: "ARCHIVED";
|
|
1098
|
+
}>;
|
|
1099
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
1100
|
+
"Full Time": "Full Time";
|
|
1101
|
+
"Part Time": "Part Time";
|
|
1102
|
+
Freelance: "Freelance";
|
|
1103
|
+
Internship: "Internship";
|
|
1104
|
+
}>>;
|
|
1105
|
+
workMode: z.ZodEnum<{
|
|
1106
|
+
Remote: "Remote";
|
|
1107
|
+
Hybrid: "Hybrid";
|
|
1108
|
+
"On Site": "On Site";
|
|
1109
|
+
}>;
|
|
1110
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
1111
|
+
"One Time": "One Time";
|
|
1112
|
+
Recurring: "Recurring";
|
|
1113
|
+
}>>;
|
|
1114
|
+
location: z.ZodEnum<{
|
|
1115
|
+
Africa: "Africa";
|
|
1116
|
+
Asia: "Asia";
|
|
1117
|
+
Europe: "Europe";
|
|
1118
|
+
"North America": "North America";
|
|
1119
|
+
"South America": "South America";
|
|
1120
|
+
"Middle East": "Middle East";
|
|
1121
|
+
Oceania: "Oceania";
|
|
1122
|
+
Global: "Global";
|
|
1123
|
+
Other: "Other";
|
|
1124
|
+
Remote: "Remote";
|
|
1125
|
+
EMEA: "EMEA";
|
|
1126
|
+
"Asia Pacific": "Asia Pacific";
|
|
1127
|
+
}>;
|
|
1128
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
1129
|
+
[x: string]: string;
|
|
1130
|
+
}>>>;
|
|
1131
|
+
createdAt: z.ZodDate;
|
|
1132
|
+
updatedAt: z.ZodDate;
|
|
1133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1134
|
+
title: z.ZodString;
|
|
1135
|
+
brandId: z.ZodCUID2;
|
|
1136
|
+
brandName: z.ZodCUID2;
|
|
1137
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
1138
|
+
status: z.ZodEnum<{
|
|
1139
|
+
ACTIVE: "ACTIVE";
|
|
1140
|
+
DELETED: "DELETED";
|
|
1141
|
+
DRAFT: "DRAFT";
|
|
1142
|
+
ARCHIVED: "ARCHIVED";
|
|
1143
|
+
}>;
|
|
1144
|
+
employmentType: z.ZodOptional<z.ZodEnum<{
|
|
1145
|
+
"Full Time": "Full Time";
|
|
1146
|
+
"Part Time": "Part Time";
|
|
1147
|
+
Freelance: "Freelance";
|
|
1148
|
+
Internship: "Internship";
|
|
1149
|
+
}>>;
|
|
1150
|
+
workMode: z.ZodEnum<{
|
|
1151
|
+
Remote: "Remote";
|
|
1152
|
+
Hybrid: "Hybrid";
|
|
1153
|
+
"On Site": "On Site";
|
|
1154
|
+
}>;
|
|
1155
|
+
gigType: z.ZodOptional<z.ZodEnum<{
|
|
1156
|
+
"One Time": "One Time";
|
|
1157
|
+
Recurring: "Recurring";
|
|
1158
|
+
}>>;
|
|
1159
|
+
location: z.ZodEnum<{
|
|
1160
|
+
Africa: "Africa";
|
|
1161
|
+
Asia: "Asia";
|
|
1162
|
+
Europe: "Europe";
|
|
1163
|
+
"North America": "North America";
|
|
1164
|
+
"South America": "South America";
|
|
1165
|
+
"Middle East": "Middle East";
|
|
1166
|
+
Oceania: "Oceania";
|
|
1167
|
+
Global: "Global";
|
|
1168
|
+
Other: "Other";
|
|
1169
|
+
Remote: "Remote";
|
|
1170
|
+
EMEA: "EMEA";
|
|
1171
|
+
"Asia Pacific": "Asia Pacific";
|
|
1172
|
+
}>;
|
|
1173
|
+
jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
1174
|
+
[x: string]: string;
|
|
1175
|
+
}>>>;
|
|
1176
|
+
createdAt: z.ZodDate;
|
|
1177
|
+
updatedAt: z.ZodDate;
|
|
1178
|
+
id: z.ZodCUID2;
|
|
1179
|
+
jobType: z.ZodLiteral<"ROLE">;
|
|
1180
|
+
experienceLevel: z.ZodEnum<{
|
|
1181
|
+
"0-1 year": "0-1 year";
|
|
1182
|
+
"1-3 years": "1-3 years";
|
|
1183
|
+
"3-5 years": "3-5 years";
|
|
1184
|
+
"5+ years": "5+ years";
|
|
1185
|
+
}>;
|
|
1186
|
+
overview: z.ZodString;
|
|
1187
|
+
keyResponsibilities: z.ZodString;
|
|
1188
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
1189
|
+
employeeRequirements: z.ZodOptional<z.ZodString>;
|
|
1190
|
+
companyBenefits: z.ZodOptional<z.ZodString>;
|
|
1191
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
1192
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
1193
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
1194
|
+
"USD (United States Dollar)": "USD (United States Dollar)";
|
|
1195
|
+
"EUR (Euro)": "EUR (Euro)";
|
|
1196
|
+
"GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
|
|
1197
|
+
"NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
|
|
1198
|
+
"CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
|
|
1199
|
+
"AUD (Australian Dollar)": "AUD (Australian Dollar)";
|
|
1200
|
+
"JPY (Japanese Yen)": "JPY (Japanese Yen)";
|
|
1201
|
+
"CHF (Swiss Franc)": "CHF (Swiss Franc)";
|
|
1202
|
+
"INR (Indian Rupee)": "INR (Indian Rupee)";
|
|
1203
|
+
"ZAR (South African Rand)": "ZAR (South African Rand)";
|
|
1204
|
+
}>>;
|
|
1205
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
1206
|
+
Hourly: "Hourly";
|
|
1207
|
+
Daily: "Daily";
|
|
1208
|
+
Weekly: "Weekly";
|
|
1209
|
+
Monthly: "Monthly";
|
|
1210
|
+
"Project Based": "Project Based";
|
|
1211
|
+
}>>;
|
|
1212
|
+
}, z.core.$strip>], "jobType">>;
|
|
1213
|
+
total: z.ZodNumber;
|
|
1214
|
+
page: z.ZodNumber;
|
|
1215
|
+
totalPages: z.ZodNumber;
|
|
1216
|
+
hasNextPage: z.ZodBoolean;
|
|
1217
|
+
hasPrevPage: z.ZodBoolean;
|
|
1218
|
+
}, z.core.$strip>;
|
package/dist/schemas/job.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetJobsOutputSchema = exports.
|
|
3
|
+
exports.GetJobsOutputSchema = exports.GetJobsInputSchema = exports.GetCreatedJobsOutputSchema = exports.NormalizedJobSchema = exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = exports.JobIdSchema = exports.BaseJobEntitySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const JobSectionEnum = zod_1.z.enum(Object.values(constants_1.JOB_SECTIONS));
|
|
@@ -189,13 +189,47 @@ exports.UpdateJobInputSchema = CreateJobInputBaseSchema.partial().extend({
|
|
|
189
189
|
.enum(Object.values(constants_1.JOB_STATUS))
|
|
190
190
|
.optional(),
|
|
191
191
|
});
|
|
192
|
-
exports.
|
|
192
|
+
exports.NormalizedJobSchema = zod_1.z.discriminatedUnion("jobType", [
|
|
193
193
|
exports.JobWithGigDetailsEntitySchema,
|
|
194
|
+
exports.JobEntitySchema,
|
|
194
195
|
exports.JobWithRoleDetailsEntitySchema,
|
|
195
196
|
]);
|
|
196
|
-
exports.
|
|
197
|
-
jobs: zod_1.z.array(exports.
|
|
197
|
+
exports.GetCreatedJobsOutputSchema = zod_1.z.object({
|
|
198
|
+
jobs: zod_1.z.array(exports.NormalizedJobSchema),
|
|
198
199
|
noOfJobs: zod_1.z.number(),
|
|
199
200
|
noOfActiveJobs: zod_1.z.number(),
|
|
200
201
|
noOfArchivedJobs: zod_1.z.number(),
|
|
201
202
|
});
|
|
203
|
+
exports.GetJobsInputSchema = zod_1.z.object({
|
|
204
|
+
q: zod_1.z.string().optional(),
|
|
205
|
+
jobType: zod_1.z
|
|
206
|
+
.enum(Object.values(constants_1.JOB_TYPE))
|
|
207
|
+
.optional(),
|
|
208
|
+
workMode: zod_1.z
|
|
209
|
+
.enum(Object.values(constants_1.WORK_MODE))
|
|
210
|
+
.optional(),
|
|
211
|
+
location: zod_1.z
|
|
212
|
+
.enum(Object.values(constants_1.JOB_LOCATIONS))
|
|
213
|
+
.optional(),
|
|
214
|
+
employmentType: zod_1.z
|
|
215
|
+
.enum(Object.values(constants_1.EMPLOYMENT_TYPE))
|
|
216
|
+
.optional(),
|
|
217
|
+
gigType: zod_1.z
|
|
218
|
+
.enum(Object.values(constants_1.GIG_TYPE))
|
|
219
|
+
.optional(),
|
|
220
|
+
requiredSkills: zod_1.z
|
|
221
|
+
.string()
|
|
222
|
+
.optional()
|
|
223
|
+
.describe("Comma-separated: React,Node.js"),
|
|
224
|
+
status: zod_1.z.string().optional(),
|
|
225
|
+
page: zod_1.z.coerce.number().min(1).default(1),
|
|
226
|
+
limit: zod_1.z.coerce.number().min(1).max(100).default(20),
|
|
227
|
+
});
|
|
228
|
+
exports.GetJobsOutputSchema = zod_1.z.object({
|
|
229
|
+
jobs: zod_1.z.array(exports.NormalizedJobSchema),
|
|
230
|
+
total: zod_1.z.number(),
|
|
231
|
+
page: zod_1.z.number(),
|
|
232
|
+
totalPages: zod_1.z.number(),
|
|
233
|
+
hasNextPage: zod_1.z.boolean(),
|
|
234
|
+
hasPrevPage: zod_1.z.boolean(),
|
|
235
|
+
});
|
package/dist/types/job.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema, BaseJobEntitySchema, JobIdSchema, GetJobsOutputSchema } from "../schemas/job";
|
|
2
|
+
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema, BaseJobEntitySchema, JobIdSchema, GetJobsOutputSchema, NormalizedJobSchema, GetJobsInputSchema, GetCreatedJobsOutputSchema } from "../schemas/job";
|
|
3
3
|
export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
|
|
4
4
|
export type JobIdInput = z.infer<typeof JobIdSchema>;
|
|
5
5
|
export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
@@ -20,4 +20,7 @@ export type UpdateJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
|
20
20
|
export type GetJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
21
21
|
export type JobWithGigDetailsEntity = z.infer<typeof JobWithGigDetailsEntitySchema>;
|
|
22
22
|
export type JobWithRoleDetailsEntity = z.infer<typeof JobWithRoleDetailsEntitySchema>;
|
|
23
|
+
export type GetJobsInput = z.infer<typeof GetJobsInputSchema>;
|
|
23
24
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
25
|
+
export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
|
|
26
|
+
export type NormalizedJobEntity = z.infer<typeof NormalizedJobSchema>;
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
JobAvailabilityTypes,
|
|
10
10
|
} from "../constants";
|
|
11
11
|
import { MinimalUserSchema } from "./user";
|
|
12
|
-
import {
|
|
12
|
+
import { NormalizedJobSchema } from "./job";
|
|
13
13
|
|
|
14
14
|
export const MinimalJobApplicationEntitySchema = z.object({
|
|
15
15
|
user: MinimalUserSchema,
|
|
@@ -206,9 +206,11 @@ export const TrackedJobApplicationEntitySchema = z.object({
|
|
|
206
206
|
...ApplicationStatus[]
|
|
207
207
|
]
|
|
208
208
|
),
|
|
209
|
-
job:
|
|
209
|
+
job: NormalizedJobSchema,
|
|
210
210
|
});
|
|
211
211
|
|
|
212
212
|
export const UpdateJobApplicationStatusSchema = z.object({
|
|
213
213
|
applicationStatus: z.enum(APPLICATION_STATUS),
|
|
214
214
|
});
|
|
215
|
+
|
|
216
|
+
|
package/src/schemas/job.ts
CHANGED
|
@@ -270,14 +270,53 @@ export const UpdateJobInputSchema = CreateJobInputBaseSchema.partial().extend({
|
|
|
270
270
|
.optional(),
|
|
271
271
|
});
|
|
272
272
|
|
|
273
|
-
export const
|
|
273
|
+
export const NormalizedJobSchema = z.discriminatedUnion("jobType", [
|
|
274
274
|
JobWithGigDetailsEntitySchema,
|
|
275
|
+
JobEntitySchema,
|
|
275
276
|
JobWithRoleDetailsEntitySchema,
|
|
276
277
|
]);
|
|
277
278
|
|
|
278
|
-
export const
|
|
279
|
-
jobs: z.array(
|
|
279
|
+
export const GetCreatedJobsOutputSchema = z.object({
|
|
280
|
+
jobs: z.array(NormalizedJobSchema),
|
|
280
281
|
noOfJobs: z.number(),
|
|
281
282
|
noOfActiveJobs: z.number(),
|
|
282
283
|
noOfArchivedJobs: z.number(),
|
|
283
284
|
});
|
|
285
|
+
|
|
286
|
+
export const GetJobsInputSchema = z.object({
|
|
287
|
+
q: z.string().optional(),
|
|
288
|
+
jobType: z
|
|
289
|
+
.enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]])
|
|
290
|
+
.optional(),
|
|
291
|
+
workMode: z
|
|
292
|
+
.enum(Object.values(WORK_MODE) as [WorkMode, ...WorkMode[]])
|
|
293
|
+
.optional(),
|
|
294
|
+
location: z
|
|
295
|
+
.enum(Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]])
|
|
296
|
+
.optional(),
|
|
297
|
+
employmentType: z
|
|
298
|
+
.enum(
|
|
299
|
+
Object.values(EMPLOYMENT_TYPE) as [EmploymentType, ...EmploymentType[]]
|
|
300
|
+
)
|
|
301
|
+
.optional(),
|
|
302
|
+
gigType: z
|
|
303
|
+
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
304
|
+
.optional(),
|
|
305
|
+
requiredSkills: z
|
|
306
|
+
.string()
|
|
307
|
+
.optional()
|
|
308
|
+
.describe("Comma-separated: React,Node.js"),
|
|
309
|
+
|
|
310
|
+
status: z.string().optional(),
|
|
311
|
+
page: z.coerce.number().min(1).default(1),
|
|
312
|
+
limit: z.coerce.number().min(1).max(100).default(20),
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
export const GetJobsOutputSchema = z.object({
|
|
316
|
+
jobs: z.array(NormalizedJobSchema),
|
|
317
|
+
total: z.number(),
|
|
318
|
+
page: z.number(),
|
|
319
|
+
totalPages: z.number(),
|
|
320
|
+
hasNextPage: z.boolean(),
|
|
321
|
+
hasPrevPage: z.boolean(),
|
|
322
|
+
});
|
package/src/types/job.ts
CHANGED
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
BaseJobEntitySchema,
|
|
15
15
|
JobIdSchema,
|
|
16
16
|
GetJobsOutputSchema,
|
|
17
|
+
NormalizedJobSchema,
|
|
18
|
+
GetJobsInputSchema,
|
|
19
|
+
GetCreatedJobsOutputSchema,
|
|
17
20
|
} from "../schemas/job";
|
|
18
21
|
|
|
19
22
|
export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
|
|
@@ -60,4 +63,7 @@ export type JobWithRoleDetailsEntity = z.infer<
|
|
|
60
63
|
typeof JobWithRoleDetailsEntitySchema
|
|
61
64
|
>;
|
|
62
65
|
|
|
66
|
+
export type GetJobsInput = z.infer<typeof GetJobsInputSchema>;
|
|
63
67
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
68
|
+
export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
|
|
69
|
+
export type NormalizedJobEntity = z.infer<typeof NormalizedJobSchema>;
|