@zyacreatives/shared 2.1.17 → 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.d.ts +251 -1
- package/dist/schemas/job.js +35 -2
- package/dist/types/job.d.ts +3 -1
- package/package.json +1 -1
- package/src/schemas/job-application.ts +2 -0
- package/src/schemas/job.ts +40 -2
- package/src/types/job.ts +4 -1
package/dist/schemas/job.d.ts
CHANGED
|
@@ -758,7 +758,7 @@ export declare const NormalizedJobSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
758
758
|
"Project Based": "Project Based";
|
|
759
759
|
}>>;
|
|
760
760
|
}, z.core.$strip>], "jobType">;
|
|
761
|
-
export declare const
|
|
761
|
+
export declare const GetCreatedJobsOutputSchema: z.ZodObject<{
|
|
762
762
|
jobs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
763
763
|
title: z.ZodString;
|
|
764
764
|
brandId: z.ZodCUID2;
|
|
@@ -966,3 +966,253 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
966
966
|
noOfActiveJobs: z.ZodNumber;
|
|
967
967
|
noOfArchivedJobs: z.ZodNumber;
|
|
968
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.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;
|
|
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));
|
|
@@ -194,9 +194,42 @@ exports.NormalizedJobSchema = zod_1.z.discriminatedUnion("jobType", [
|
|
|
194
194
|
exports.JobEntitySchema,
|
|
195
195
|
exports.JobWithRoleDetailsEntitySchema,
|
|
196
196
|
]);
|
|
197
|
-
exports.
|
|
197
|
+
exports.GetCreatedJobsOutputSchema = zod_1.z.object({
|
|
198
198
|
jobs: zod_1.z.array(exports.NormalizedJobSchema),
|
|
199
199
|
noOfJobs: zod_1.z.number(),
|
|
200
200
|
noOfActiveJobs: zod_1.z.number(),
|
|
201
201
|
noOfArchivedJobs: zod_1.z.number(),
|
|
202
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, NormalizedJobSchema } 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,5 +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>;
|
|
24
26
|
export type NormalizedJobEntity = z.infer<typeof NormalizedJobSchema>;
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -196,7 +196,7 @@ export const CreateJobInputSchema = CreateJobInputBaseSchema.superRefine(
|
|
|
196
196
|
});
|
|
197
197
|
|
|
198
198
|
export const CreateRoleJobInputSchema = z
|
|
199
|
-
.object({
|
|
199
|
+
.object({
|
|
200
200
|
id: z.cuid2(),
|
|
201
201
|
experienceLevel: z.enum(
|
|
202
202
|
Object.values(EXPERIENCE_LEVELS) as [
|
|
@@ -276,9 +276,47 @@ export const NormalizedJobSchema = z.discriminatedUnion("jobType", [
|
|
|
276
276
|
JobWithRoleDetailsEntitySchema,
|
|
277
277
|
]);
|
|
278
278
|
|
|
279
|
-
export const
|
|
279
|
+
export const GetCreatedJobsOutputSchema = z.object({
|
|
280
280
|
jobs: z.array(NormalizedJobSchema),
|
|
281
281
|
noOfJobs: z.number(),
|
|
282
282
|
noOfActiveJobs: z.number(),
|
|
283
283
|
noOfArchivedJobs: z.number(),
|
|
284
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
|
@@ -15,6 +15,8 @@ import {
|
|
|
15
15
|
JobIdSchema,
|
|
16
16
|
GetJobsOutputSchema,
|
|
17
17
|
NormalizedJobSchema,
|
|
18
|
+
GetJobsInputSchema,
|
|
19
|
+
GetCreatedJobsOutputSchema,
|
|
18
20
|
} from "../schemas/job";
|
|
19
21
|
|
|
20
22
|
export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
|
|
@@ -61,6 +63,7 @@ export type JobWithRoleDetailsEntity = z.infer<
|
|
|
61
63
|
typeof JobWithRoleDetailsEntitySchema
|
|
62
64
|
>;
|
|
63
65
|
|
|
66
|
+
export type GetJobsInput = z.infer<typeof GetJobsInputSchema>;
|
|
64
67
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
65
|
-
|
|
68
|
+
export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
|
|
66
69
|
export type NormalizedJobEntity = z.infer<typeof NormalizedJobSchema>;
|