@zyacreatives/shared 2.1.16 → 2.1.17
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 +101 -1
- package/dist/schemas/job.js +4 -3
- package/dist/types/job.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/job-application.ts +2 -2
- package/src/schemas/job.ts +4 -3
- package/src/types/job.ts +3 -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;
|
|
@@ -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;
|
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.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,12 +189,13 @@ 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
197
|
exports.GetJobsOutputSchema = zod_1.z.object({
|
|
197
|
-
jobs: zod_1.z.array(exports.
|
|
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(),
|
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 } 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>;
|
|
@@ -21,3 +21,4 @@ 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
23
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
24
|
+
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,7 +206,7 @@ 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({
|
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
|
-
|
|
199
|
+
.object({
|
|
200
200
|
id: z.cuid2(),
|
|
201
201
|
experienceLevel: z.enum(
|
|
202
202
|
Object.values(EXPERIENCE_LEVELS) as [
|
|
@@ -270,13 +270,14 @@ 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
279
|
export const GetJobsOutputSchema = z.object({
|
|
279
|
-
jobs: z.array(
|
|
280
|
+
jobs: z.array(NormalizedJobSchema),
|
|
280
281
|
noOfJobs: z.number(),
|
|
281
282
|
noOfActiveJobs: z.number(),
|
|
282
283
|
noOfArchivedJobs: z.number(),
|
package/src/types/job.ts
CHANGED
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
BaseJobEntitySchema,
|
|
15
15
|
JobIdSchema,
|
|
16
16
|
GetJobsOutputSchema,
|
|
17
|
+
NormalizedJobSchema,
|
|
17
18
|
} from "../schemas/job";
|
|
18
19
|
|
|
19
20
|
export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
|
|
@@ -61,3 +62,5 @@ export type JobWithRoleDetailsEntity = z.infer<
|
|
|
61
62
|
>;
|
|
62
63
|
|
|
63
64
|
export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
|
|
65
|
+
|
|
66
|
+
export type NormalizedJobEntity = z.infer<typeof NormalizedJobSchema>;
|