@zyacreatives/shared 1.9.93 → 1.9.95
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 +8 -10
- package/dist/schemas/job.js +9 -10
- package/dist/types/job.d.ts +3 -3
- package/package.json +1 -1
- package/src/schemas/job.ts +8 -11
- package/src/types/job.ts +6 -6
package/dist/schemas/job.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export declare const GigJobEntitySchema: z.ZodObject<{
|
|
|
128
128
|
}>>;
|
|
129
129
|
jobSections: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
130
130
|
}, z.core.$strip>;
|
|
131
|
-
export declare const
|
|
131
|
+
export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
132
132
|
title: z.ZodString;
|
|
133
133
|
brandId: z.ZodCUID2;
|
|
134
134
|
brandName: z.ZodCUID2;
|
|
@@ -250,7 +250,7 @@ export declare const RoleJobEntitySchema: z.ZodObject<{
|
|
|
250
250
|
}>>;
|
|
251
251
|
jobSections: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
252
252
|
}, z.core.$strip>;
|
|
253
|
-
export declare const
|
|
253
|
+
export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
254
254
|
title: z.ZodString;
|
|
255
255
|
brandId: z.ZodCUID2;
|
|
256
256
|
brandName: z.ZodCUID2;
|
|
@@ -329,7 +329,7 @@ export declare const CreateJobInputSchema: z.ZodObject<{
|
|
|
329
329
|
gigType: z.ZodOptional<z.ZodEnum<{
|
|
330
330
|
[x: string]: string;
|
|
331
331
|
}>>;
|
|
332
|
-
location: z.ZodDefault<z.
|
|
332
|
+
location: z.ZodDefault<z.ZodEnum<{
|
|
333
333
|
Africa: "Africa";
|
|
334
334
|
Asia: "Asia";
|
|
335
335
|
Europe: "Europe";
|
|
@@ -342,10 +342,10 @@ export declare const CreateJobInputSchema: z.ZodObject<{
|
|
|
342
342
|
Remote: "Remote";
|
|
343
343
|
EMEA: "EMEA";
|
|
344
344
|
"Asia Pacific": "Asia Pacific";
|
|
345
|
-
}
|
|
345
|
+
}>>;
|
|
346
346
|
}, z.core.$strip>;
|
|
347
347
|
export declare const CreateRoleJobInputSchema: z.ZodObject<{
|
|
348
|
-
|
|
348
|
+
id: z.ZodCUID2;
|
|
349
349
|
experienceLevel: z.ZodEnum<{
|
|
350
350
|
"0-1 year": "0-1 year";
|
|
351
351
|
"1-3 years": "1-3 years";
|
|
@@ -380,7 +380,7 @@ export declare const CreateRoleJobInputSchema: z.ZodObject<{
|
|
|
380
380
|
}>>;
|
|
381
381
|
}, z.core.$strip>;
|
|
382
382
|
export declare const CreateGigJobInputSchema: z.ZodObject<{
|
|
383
|
-
|
|
383
|
+
id: z.ZodCUID2;
|
|
384
384
|
overview: z.ZodString;
|
|
385
385
|
deliverables: z.ZodArray<z.ZodString>;
|
|
386
386
|
employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -409,7 +409,6 @@ export declare const CreateGigJobInputSchema: z.ZodObject<{
|
|
|
409
409
|
}>>;
|
|
410
410
|
}, z.core.$strip>;
|
|
411
411
|
export declare const UpdateRoleJobInputSchema: z.ZodObject<{
|
|
412
|
-
jobId: z.ZodOptional<z.ZodCUID2>;
|
|
413
412
|
experienceLevel: z.ZodOptional<z.ZodEnum<{
|
|
414
413
|
"0-1 year": "0-1 year";
|
|
415
414
|
"1-3 years": "1-3 years";
|
|
@@ -448,7 +447,6 @@ export declare const UpdateRoleJobInputSchema: z.ZodObject<{
|
|
|
448
447
|
}>>>;
|
|
449
448
|
}, z.core.$strip>;
|
|
450
449
|
export declare const UpdateGigJobInputSchema: z.ZodObject<{
|
|
451
|
-
jobId: z.ZodOptional<z.ZodCUID2>;
|
|
452
450
|
overview: z.ZodOptional<z.ZodString>;
|
|
453
451
|
deliverables: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
454
452
|
employeeRequirements: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
@@ -495,7 +493,7 @@ export declare const UpdateJobInputSchema: z.ZodObject<{
|
|
|
495
493
|
gigType: z.ZodOptional<z.ZodOptional<z.ZodEnum<{
|
|
496
494
|
[x: string]: string;
|
|
497
495
|
}>>>;
|
|
498
|
-
location: z.ZodOptional<z.ZodDefault<z.
|
|
496
|
+
location: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
|
|
499
497
|
Africa: "Africa";
|
|
500
498
|
Asia: "Asia";
|
|
501
499
|
Europe: "Europe";
|
|
@@ -508,7 +506,7 @@ export declare const UpdateJobInputSchema: z.ZodObject<{
|
|
|
508
506
|
Remote: "Remote";
|
|
509
507
|
EMEA: "EMEA";
|
|
510
508
|
"Asia Pacific": "Asia Pacific";
|
|
511
|
-
}
|
|
509
|
+
}>>>;
|
|
512
510
|
id: z.ZodCUID2;
|
|
513
511
|
}, z.core.$strip>;
|
|
514
512
|
export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
package/dist/schemas/job.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NormalizedJobOutputSchema = exports.UpdateJobInputSchema = exports.UpdateGigJobInputSchema = exports.UpdateRoleJobInputSchema = exports.CreateGigJobInputSchema = exports.CreateRoleJobInputSchema = exports.CreateJobInputSchema = exports.
|
|
3
|
+
exports.NormalizedJobOutputSchema = 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
|
exports.BaseJobEntitySchema = zod_1.z.object({
|
|
@@ -62,7 +62,7 @@ exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
|
|
|
62
62
|
.array(zod_1.z.string())
|
|
63
63
|
.default(["PERSONAL_INFORMATION", "PROFESSIONAL_INFORMATION", "RESUME"]),
|
|
64
64
|
});
|
|
65
|
-
exports.
|
|
65
|
+
exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema.extend(exports.GigJobEntitySchema.shape);
|
|
66
66
|
exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
|
|
67
67
|
id: zod_1.z.cuid2(),
|
|
68
68
|
jobType: zod_1.z.literal(constants_1.JOB_TYPE.ROLE),
|
|
@@ -86,7 +86,7 @@ exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
|
|
|
86
86
|
.array(zod_1.z.string())
|
|
87
87
|
.default(["PERSONAL_INFORMATION", "PROFESSIONAL_INFORMATION", "RESUME"]),
|
|
88
88
|
});
|
|
89
|
-
exports.
|
|
89
|
+
exports.JobWithRoleDetailsEntitySchema = exports.JobEntitySchema.extend(exports.RoleJobEntitySchema.shape);
|
|
90
90
|
exports.CreateJobInputSchema = zod_1.z
|
|
91
91
|
.object({
|
|
92
92
|
title: zod_1.z.string(),
|
|
@@ -100,9 +100,8 @@ exports.CreateJobInputSchema = zod_1.z
|
|
|
100
100
|
.enum(Object.values(constants_1.GIG_TYPE))
|
|
101
101
|
.optional(),
|
|
102
102
|
location: zod_1.z
|
|
103
|
-
.
|
|
104
|
-
.
|
|
105
|
-
.default([constants_1.JOB_LOCATIONS.REMOTE]),
|
|
103
|
+
.enum(Object.values(constants_1.JOB_LOCATIONS))
|
|
104
|
+
.default(constants_1.JOB_LOCATIONS.REMOTE),
|
|
106
105
|
})
|
|
107
106
|
.superRefine((data, ctx) => {
|
|
108
107
|
if (data.jobType === constants_1.JOB_TYPE.ROLE) {
|
|
@@ -139,7 +138,7 @@ exports.CreateJobInputSchema = zod_1.z
|
|
|
139
138
|
}
|
|
140
139
|
});
|
|
141
140
|
exports.CreateRoleJobInputSchema = zod_1.z.object({
|
|
142
|
-
|
|
141
|
+
id: zod_1.z.cuid2(),
|
|
143
142
|
experienceLevel: zod_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
|
|
144
143
|
overview: zod_1.z.string(),
|
|
145
144
|
keyResponsibilities: zod_1.z.array(zod_1.z.string()),
|
|
@@ -156,7 +155,7 @@ exports.CreateRoleJobInputSchema = zod_1.z.object({
|
|
|
156
155
|
.optional(),
|
|
157
156
|
});
|
|
158
157
|
exports.CreateGigJobInputSchema = zod_1.z.object({
|
|
159
|
-
|
|
158
|
+
id: zod_1.z.cuid2(),
|
|
160
159
|
overview: zod_1.z.string(),
|
|
161
160
|
deliverables: zod_1.z.array(zod_1.z.string()),
|
|
162
161
|
employeeRequirements: zod_1.z.array(zod_1.z.string()).optional(),
|
|
@@ -206,6 +205,6 @@ exports.UpdateJobInputSchema = exports.CreateJobInputSchema.partial().extend({
|
|
|
206
205
|
id: zod_1.z.cuid2(),
|
|
207
206
|
});
|
|
208
207
|
exports.NormalizedJobOutputSchema = zod_1.z.discriminatedUnion("jobType", [
|
|
209
|
-
exports.
|
|
210
|
-
exports.
|
|
208
|
+
exports.JobWithGigDetailsEntitySchema,
|
|
209
|
+
exports.JobWithRoleDetailsEntitySchema,
|
|
211
210
|
]);
|
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,
|
|
2
|
+
import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema, BaseJobEntitySchema, JobIdSchema } 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>;
|
|
@@ -18,5 +18,5 @@ export type UpdateGigJobOutput = z.infer<typeof GigJobEntitySchema>;
|
|
|
18
18
|
export type UpdateJobInput = z.infer<typeof UpdateJobInputSchema>;
|
|
19
19
|
export type UpdateJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
20
20
|
export type GetJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
21
|
-
export type
|
|
22
|
-
export type
|
|
21
|
+
export type JobWithGigDetailsEntity = z.infer<typeof JobWithGigDetailsEntitySchema>;
|
|
22
|
+
export type JobWithRoleDetailsEntity = z.infer<typeof JobWithRoleDetailsEntitySchema>;
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -92,7 +92,7 @@ export const GigJobEntitySchema = JobEntitySchema.extend({
|
|
|
92
92
|
.default(["PERSONAL_INFORMATION", "PROFESSIONAL_INFORMATION", "RESUME"]),
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
export const
|
|
95
|
+
export const JobWithGigDetailsEntitySchema = JobEntitySchema.extend(
|
|
96
96
|
GigJobEntitySchema.shape
|
|
97
97
|
);
|
|
98
98
|
|
|
@@ -124,7 +124,7 @@ export const RoleJobEntitySchema = JobEntitySchema.extend({
|
|
|
124
124
|
.default(["PERSONAL_INFORMATION", "PROFESSIONAL_INFORMATION", "RESUME"]),
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
export const
|
|
127
|
+
export const JobWithRoleDetailsEntitySchema = JobEntitySchema.extend(
|
|
128
128
|
RoleJobEntitySchema.shape
|
|
129
129
|
);
|
|
130
130
|
|
|
@@ -143,11 +143,8 @@ export const CreateJobInputSchema = z
|
|
|
143
143
|
.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]])
|
|
144
144
|
.optional(),
|
|
145
145
|
location: z
|
|
146
|
-
.
|
|
147
|
-
|
|
148
|
-
)
|
|
149
|
-
.nonempty("At least one job location must be selected")
|
|
150
|
-
.default([JOB_LOCATIONS.REMOTE]),
|
|
146
|
+
.enum(Object.values(JOB_LOCATIONS) as [JobLocation, ...JobLocation[]])
|
|
147
|
+
.default(JOB_LOCATIONS.REMOTE),
|
|
151
148
|
})
|
|
152
149
|
.superRefine((data, ctx) => {
|
|
153
150
|
if (data.jobType === JOB_TYPE.ROLE) {
|
|
@@ -186,7 +183,7 @@ export const CreateJobInputSchema = z
|
|
|
186
183
|
});
|
|
187
184
|
|
|
188
185
|
export const CreateRoleJobInputSchema = z.object({
|
|
189
|
-
|
|
186
|
+
id: z.cuid2(),
|
|
190
187
|
experienceLevel: z.enum(
|
|
191
188
|
Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
|
|
192
189
|
),
|
|
@@ -206,7 +203,7 @@ export const CreateRoleJobInputSchema = z.object({
|
|
|
206
203
|
});
|
|
207
204
|
|
|
208
205
|
export const CreateGigJobInputSchema = z.object({
|
|
209
|
-
|
|
206
|
+
id: z.cuid2(),
|
|
210
207
|
overview: z.string(),
|
|
211
208
|
deliverables: z.array(z.string()),
|
|
212
209
|
employeeRequirements: z.array(z.string()).optional(),
|
|
@@ -276,6 +273,6 @@ export const UpdateJobInputSchema = CreateJobInputSchema.partial().extend({
|
|
|
276
273
|
});
|
|
277
274
|
|
|
278
275
|
export const NormalizedJobOutputSchema = z.discriminatedUnion("jobType", [
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
JobWithGigDetailsEntitySchema,
|
|
277
|
+
JobWithRoleDetailsEntitySchema,
|
|
281
278
|
]);
|
package/src/types/job.ts
CHANGED
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
UpdateRoleJobInputSchema,
|
|
10
10
|
UpdateGigJobInputSchema,
|
|
11
11
|
UpdateJobInputSchema,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
JobWithGigDetailsEntitySchema,
|
|
13
|
+
JobWithRoleDetailsEntitySchema,
|
|
14
14
|
BaseJobEntitySchema,
|
|
15
15
|
JobIdSchema,
|
|
16
16
|
} from "../schemas/job";
|
|
@@ -51,10 +51,10 @@ export type UpdateJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
|
51
51
|
|
|
52
52
|
export type GetJobOutput = z.infer<typeof BaseJobEntitySchema>;
|
|
53
53
|
|
|
54
|
-
export type
|
|
55
|
-
typeof
|
|
54
|
+
export type JobWithGigDetailsEntity = z.infer<
|
|
55
|
+
typeof JobWithGigDetailsEntitySchema
|
|
56
56
|
>;
|
|
57
57
|
|
|
58
|
-
export type
|
|
59
|
-
typeof
|
|
58
|
+
export type JobWithRoleDetailsEntity = z.infer<
|
|
59
|
+
typeof JobWithRoleDetailsEntitySchema
|
|
60
60
|
>;
|