@zyacreatives/shared 1.9.7 → 1.9.8
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 +124 -0
- package/dist/schemas/job.js +6 -2
- package/dist/types/job.d.ts +3 -1
- package/package.json +1 -1
- package/src/schemas/job.ts +11 -1
- package/src/types/job.ts +10 -0
package/dist/schemas/job.d.ts
CHANGED
|
@@ -91,6 +91,63 @@ export declare const GigJobEntitySchema: z.ZodObject<{
|
|
|
91
91
|
PROJECT_BASED: "PROJECT_BASED";
|
|
92
92
|
}>>;
|
|
93
93
|
}, z.core.$strip>;
|
|
94
|
+
export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
95
|
+
title: z.ZodString;
|
|
96
|
+
brandId: z.ZodCUID2;
|
|
97
|
+
brandName: z.ZodCUID2;
|
|
98
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
99
|
+
workMode: z.ZodEnum<{
|
|
100
|
+
[x: string]: string;
|
|
101
|
+
}>;
|
|
102
|
+
location: z.ZodArray<z.ZodEnum<{
|
|
103
|
+
Africa: "Africa";
|
|
104
|
+
Asia: "Asia";
|
|
105
|
+
Europe: "Europe";
|
|
106
|
+
"North America": "North America";
|
|
107
|
+
"South America": "South America";
|
|
108
|
+
"Middle East": "Middle East";
|
|
109
|
+
Oceania: "Oceania";
|
|
110
|
+
Global: "Global";
|
|
111
|
+
Other: "Other";
|
|
112
|
+
Remote: "Remote";
|
|
113
|
+
EMEA: "EMEA";
|
|
114
|
+
"Asia Pacific": "Asia Pacific";
|
|
115
|
+
}>>;
|
|
116
|
+
createdAt: z.ZodDate;
|
|
117
|
+
updatedAt: z.ZodDate;
|
|
118
|
+
id: z.ZodCUID2;
|
|
119
|
+
jobType: z.ZodLiteral<string>;
|
|
120
|
+
employmentType: z.ZodNull;
|
|
121
|
+
gigType: z.ZodEnum<{
|
|
122
|
+
[x: string]: string;
|
|
123
|
+
}>;
|
|
124
|
+
overview: z.ZodString;
|
|
125
|
+
deliverables: z.ZodArray<z.ZodString>;
|
|
126
|
+
employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
127
|
+
aboutCompany: z.ZodOptional<z.ZodString>;
|
|
128
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
129
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
132
|
+
USD: "USD";
|
|
133
|
+
EUR: "EUR";
|
|
134
|
+
GBP: "GBP";
|
|
135
|
+
NGN: "NGN";
|
|
136
|
+
CAD: "CAD";
|
|
137
|
+
AUD: "AUD";
|
|
138
|
+
JPY: "JPY";
|
|
139
|
+
CHF: "CHF";
|
|
140
|
+
INR: "INR";
|
|
141
|
+
ZAR: "ZAR";
|
|
142
|
+
}>>;
|
|
143
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
HOURLY: "HOURLY";
|
|
145
|
+
DAILY: "DAILY";
|
|
146
|
+
WEEKLY: "WEEKLY";
|
|
147
|
+
MONTHLY: "MONTHLY";
|
|
148
|
+
PROJECT_BASED: "PROJECT_BASED";
|
|
149
|
+
}>>;
|
|
150
|
+
}, z.core.$strip>;
|
|
94
151
|
export declare const RoleJobEntitySchema: z.ZodObject<{
|
|
95
152
|
id: z.ZodCUID2;
|
|
96
153
|
title: z.ZodString;
|
|
@@ -154,6 +211,69 @@ export declare const RoleJobEntitySchema: z.ZodObject<{
|
|
|
154
211
|
PROJECT_BASED: "PROJECT_BASED";
|
|
155
212
|
}>>;
|
|
156
213
|
}, z.core.$strip>;
|
|
214
|
+
export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
215
|
+
id: z.ZodCUID2;
|
|
216
|
+
title: z.ZodString;
|
|
217
|
+
brandId: z.ZodCUID2;
|
|
218
|
+
brandName: z.ZodCUID2;
|
|
219
|
+
brandImgUrl: z.ZodOptional<z.ZodCUID2>;
|
|
220
|
+
workMode: z.ZodEnum<{
|
|
221
|
+
[x: string]: string;
|
|
222
|
+
}>;
|
|
223
|
+
location: z.ZodArray<z.ZodEnum<{
|
|
224
|
+
Africa: "Africa";
|
|
225
|
+
Asia: "Asia";
|
|
226
|
+
Europe: "Europe";
|
|
227
|
+
"North America": "North America";
|
|
228
|
+
"South America": "South America";
|
|
229
|
+
"Middle East": "Middle East";
|
|
230
|
+
Oceania: "Oceania";
|
|
231
|
+
Global: "Global";
|
|
232
|
+
Other: "Other";
|
|
233
|
+
Remote: "Remote";
|
|
234
|
+
EMEA: "EMEA";
|
|
235
|
+
"Asia Pacific": "Asia Pacific";
|
|
236
|
+
}>>;
|
|
237
|
+
createdAt: z.ZodDate;
|
|
238
|
+
updatedAt: z.ZodDate;
|
|
239
|
+
jobType: z.ZodLiteral<string>;
|
|
240
|
+
gigType: z.ZodNull;
|
|
241
|
+
employmentType: z.ZodEnum<{
|
|
242
|
+
[x: string]: string;
|
|
243
|
+
}>;
|
|
244
|
+
experienceLevel: z.ZodEnum<{
|
|
245
|
+
"0-1 year": "0-1 year";
|
|
246
|
+
"1-3 years": "1-3 years";
|
|
247
|
+
"3-5 years": "3-5 years";
|
|
248
|
+
"5+ years": "5+ years";
|
|
249
|
+
}>;
|
|
250
|
+
overview: z.ZodString;
|
|
251
|
+
keyResponsibilities: z.ZodArray<z.ZodString>;
|
|
252
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
253
|
+
employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
254
|
+
companyBenefits: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
+
wagesMin: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
wagesMax: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
wagesCurrency: z.ZodOptional<z.ZodEnum<{
|
|
258
|
+
USD: "USD";
|
|
259
|
+
EUR: "EUR";
|
|
260
|
+
GBP: "GBP";
|
|
261
|
+
NGN: "NGN";
|
|
262
|
+
CAD: "CAD";
|
|
263
|
+
AUD: "AUD";
|
|
264
|
+
JPY: "JPY";
|
|
265
|
+
CHF: "CHF";
|
|
266
|
+
INR: "INR";
|
|
267
|
+
ZAR: "ZAR";
|
|
268
|
+
}>>;
|
|
269
|
+
wagesType: z.ZodOptional<z.ZodEnum<{
|
|
270
|
+
HOURLY: "HOURLY";
|
|
271
|
+
DAILY: "DAILY";
|
|
272
|
+
WEEKLY: "WEEKLY";
|
|
273
|
+
MONTHLY: "MONTHLY";
|
|
274
|
+
PROJECT_BASED: "PROJECT_BASED";
|
|
275
|
+
}>>;
|
|
276
|
+
}, z.core.$strip>;
|
|
157
277
|
export declare const CreateJobInputSchema: z.ZodObject<{
|
|
158
278
|
title: z.ZodString;
|
|
159
279
|
brandId: z.ZodCUID2;
|
|
@@ -185,6 +305,7 @@ export declare const CreateJobInputSchema: z.ZodObject<{
|
|
|
185
305
|
}>>>;
|
|
186
306
|
}, z.core.$strip>;
|
|
187
307
|
export declare const CreateRoleJobInputSchema: z.ZodObject<{
|
|
308
|
+
jobId: z.ZodCUID2;
|
|
188
309
|
experienceLevel: z.ZodEnum<{
|
|
189
310
|
"0-1 year": "0-1 year";
|
|
190
311
|
"1-3 years": "1-3 years";
|
|
@@ -219,6 +340,7 @@ export declare const CreateRoleJobInputSchema: z.ZodObject<{
|
|
|
219
340
|
}>>;
|
|
220
341
|
}, z.core.$strip>;
|
|
221
342
|
export declare const CreateGigJobInputSchema: z.ZodObject<{
|
|
343
|
+
jobId: z.ZodCUID2;
|
|
222
344
|
overview: z.ZodString;
|
|
223
345
|
deliverables: z.ZodArray<z.ZodString>;
|
|
224
346
|
employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -247,6 +369,7 @@ export declare const CreateGigJobInputSchema: z.ZodObject<{
|
|
|
247
369
|
}>>;
|
|
248
370
|
}, z.core.$strip>;
|
|
249
371
|
export declare const UpdateRoleJobInputSchema: z.ZodObject<{
|
|
372
|
+
jobId: z.ZodOptional<z.ZodCUID2>;
|
|
250
373
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
251
374
|
"0-1 year": "0-1 year";
|
|
252
375
|
"1-3 years": "1-3 years";
|
|
@@ -285,6 +408,7 @@ export declare const UpdateRoleJobInputSchema: z.ZodObject<{
|
|
|
285
408
|
}>>>;
|
|
286
409
|
}, z.core.$strip>;
|
|
287
410
|
export declare const UpdateGigJobInputSchema: z.ZodObject<{
|
|
411
|
+
jobId: z.ZodOptional<z.ZodCUID2>;
|
|
288
412
|
overview: z.ZodOptional<z.ZodString>;
|
|
289
413
|
deliverables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
414
|
employeeRequirements: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
package/dist/schemas/job.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.RoleJobEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = void 0;
|
|
3
|
+
exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.JobWithRoleDetailsEntitySchema = exports.RoleJobEntitySchema = exports.JobWithGigDetailsEntitySchema = exports.GigJobEntitySchema = exports.JobEntitySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
exports.JobEntitySchema = zod_1.z.object({
|
|
@@ -26,7 +26,7 @@ exports.JobEntitySchema = zod_1.z.object({
|
|
|
26
26
|
exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
|
|
27
27
|
id: zod_1.z.cuid2(),
|
|
28
28
|
jobType: zod_1.z.literal(constants_1.JOB_TYPE.GIG),
|
|
29
|
-
employmentType: zod_1.z.null(),
|
|
29
|
+
employmentType: zod_1.z.null(),
|
|
30
30
|
gigType: zod_1.z.enum(Object.values(constants_1.GIG_TYPE)),
|
|
31
31
|
overview: zod_1.z.string(),
|
|
32
32
|
deliverables: zod_1.z.array(zod_1.z.string()),
|
|
@@ -42,6 +42,7 @@ exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
|
|
|
42
42
|
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
43
43
|
.optional(),
|
|
44
44
|
});
|
|
45
|
+
exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema.extend(exports.GigJobEntitySchema.shape);
|
|
45
46
|
exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
|
|
46
47
|
jobType: zod_1.z.literal(constants_1.JOB_TYPE.ROLE),
|
|
47
48
|
gigType: zod_1.z.null(), // enforce null for ROLE
|
|
@@ -61,6 +62,7 @@ exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
|
|
|
61
62
|
.enum(Object.values(constants_1.WAGE_TYPES))
|
|
62
63
|
.optional(),
|
|
63
64
|
});
|
|
65
|
+
exports.JobWithRoleDetailsEntitySchema = exports.JobEntitySchema.extend(exports.RoleJobEntitySchema.shape);
|
|
64
66
|
exports.CreateJobInputSchema = zod_1.z
|
|
65
67
|
.object({
|
|
66
68
|
title: zod_1.z.string(),
|
|
@@ -112,6 +114,7 @@ exports.CreateJobInputSchema = zod_1.z
|
|
|
112
114
|
}
|
|
113
115
|
});
|
|
114
116
|
exports.CreateRoleJobInputSchema = zod_1.z.object({
|
|
117
|
+
jobId: zod_1.z.cuid2(),
|
|
115
118
|
experienceLevel: zod_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
|
|
116
119
|
overview: zod_1.z.string(),
|
|
117
120
|
keyResponsibilities: zod_1.z.array(zod_1.z.string()),
|
|
@@ -128,6 +131,7 @@ exports.CreateRoleJobInputSchema = zod_1.z.object({
|
|
|
128
131
|
.optional(),
|
|
129
132
|
});
|
|
130
133
|
exports.CreateGigJobInputSchema = zod_1.z.object({
|
|
134
|
+
jobId: zod_1.z.cuid2(),
|
|
131
135
|
overview: zod_1.z.string(),
|
|
132
136
|
deliverables: zod_1.z.array(zod_1.z.string()),
|
|
133
137
|
employeeRequirements: zod_1.z.array(zod_1.z.string()).optional(),
|
package/dist/types/job.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema } from "../schemas/job";
|
|
2
|
+
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema } from "../schemas/job";
|
|
3
3
|
export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
4
4
|
export type GigJobEntity = z.infer<typeof GigJobEntitySchema>;
|
|
5
5
|
export type RoleJobEntity = z.infer<typeof RoleJobEntitySchema>;
|
|
6
|
+
export type JobWithGigDetailsEntity = z.infer<typeof JobWithGigDetailsEntitySchema>;
|
|
7
|
+
export type JobWithRoleDetailsEntity = z.infer<typeof JobWithRoleDetailsEntitySchema>;
|
|
6
8
|
export type CreateJobInput = z.infer<typeof CreateJobInputSchema>;
|
|
7
9
|
export type CreateRoleJobInput = z.infer<typeof CreateRoleJobInputSchema>;
|
|
8
10
|
export type CreateGigJobInput = z.infer<typeof CreateGigJobInputSchema>;
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -49,7 +49,7 @@ export const JobEntitySchema = z.object({
|
|
|
49
49
|
export const GigJobEntitySchema = JobEntitySchema.extend({
|
|
50
50
|
id: z.cuid2(),
|
|
51
51
|
jobType: z.literal(JOB_TYPE.GIG),
|
|
52
|
-
employmentType: z.null(),
|
|
52
|
+
employmentType: z.null(),
|
|
53
53
|
gigType: z.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]]),
|
|
54
54
|
overview: z.string(),
|
|
55
55
|
deliverables: z.array(z.string()),
|
|
@@ -66,6 +66,10 @@ export const GigJobEntitySchema = JobEntitySchema.extend({
|
|
|
66
66
|
.optional(),
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
+
export const JobWithGigDetailsEntitySchema = JobEntitySchema.extend(
|
|
70
|
+
GigJobEntitySchema.shape
|
|
71
|
+
);
|
|
72
|
+
|
|
69
73
|
export const RoleJobEntitySchema = JobEntitySchema.extend({
|
|
70
74
|
jobType: z.literal(JOB_TYPE.ROLE),
|
|
71
75
|
gigType: z.null(), // enforce null for ROLE
|
|
@@ -90,6 +94,10 @@ export const RoleJobEntitySchema = JobEntitySchema.extend({
|
|
|
90
94
|
.optional(),
|
|
91
95
|
});
|
|
92
96
|
|
|
97
|
+
export const JobWithRoleDetailsEntitySchema = JobEntitySchema.extend(
|
|
98
|
+
RoleJobEntitySchema.shape
|
|
99
|
+
);
|
|
100
|
+
|
|
93
101
|
export const CreateJobInputSchema = z
|
|
94
102
|
.object({
|
|
95
103
|
title: z.string(),
|
|
@@ -147,6 +155,7 @@ export const CreateJobInputSchema = z
|
|
|
147
155
|
});
|
|
148
156
|
|
|
149
157
|
export const CreateRoleJobInputSchema = z.object({
|
|
158
|
+
jobId: z.cuid2(),
|
|
150
159
|
experienceLevel: z.enum(
|
|
151
160
|
Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
|
|
152
161
|
),
|
|
@@ -166,6 +175,7 @@ export const CreateRoleJobInputSchema = z.object({
|
|
|
166
175
|
});
|
|
167
176
|
|
|
168
177
|
export const CreateGigJobInputSchema = z.object({
|
|
178
|
+
jobId: z.cuid2(),
|
|
169
179
|
overview: z.string(),
|
|
170
180
|
deliverables: z.array(z.string()),
|
|
171
181
|
employeeRequirements: z.array(z.string()).optional(),
|
package/src/types/job.ts
CHANGED
|
@@ -9,6 +9,8 @@ import {
|
|
|
9
9
|
UpdateRoleJobInputSchema,
|
|
10
10
|
UpdateGigJobInputSchema,
|
|
11
11
|
UpdateJobInputSchema,
|
|
12
|
+
JobWithGigDetailsEntitySchema,
|
|
13
|
+
JobWithRoleDetailsEntitySchema,
|
|
12
14
|
} from "../schemas/job";
|
|
13
15
|
|
|
14
16
|
export type JobEntity = z.infer<typeof JobEntitySchema>;
|
|
@@ -17,6 +19,14 @@ export type GigJobEntity = z.infer<typeof GigJobEntitySchema>;
|
|
|
17
19
|
|
|
18
20
|
export type RoleJobEntity = z.infer<typeof RoleJobEntitySchema>;
|
|
19
21
|
|
|
22
|
+
export type JobWithGigDetailsEntity = z.infer<
|
|
23
|
+
typeof JobWithGigDetailsEntitySchema
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
export type JobWithRoleDetailsEntity = z.infer<
|
|
27
|
+
typeof JobWithRoleDetailsEntitySchema
|
|
28
|
+
>;
|
|
29
|
+
|
|
20
30
|
export type CreateJobInput = z.infer<typeof CreateJobInputSchema>;
|
|
21
31
|
|
|
22
32
|
export type CreateRoleJobInput = z.infer<typeof CreateRoleJobInputSchema>;
|