@zyacreatives/shared 1.9.95 → 1.9.97

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.
@@ -71,35 +71,8 @@ export declare const JobEntitySchema: z.ZodObject<{
71
71
  updatedAt: z.ZodDate;
72
72
  }, z.core.$strip>;
73
73
  export declare const GigJobEntitySchema: z.ZodObject<{
74
- title: z.ZodString;
75
- brandId: z.ZodCUID2;
76
- brandName: z.ZodCUID2;
77
- brandImgUrl: z.ZodOptional<z.ZodCUID2>;
78
- workMode: z.ZodEnum<{
79
- [x: string]: string;
80
- }>;
81
- location: z.ZodEnum<{
82
- Africa: "Africa";
83
- Asia: "Asia";
84
- Europe: "Europe";
85
- "North America": "North America";
86
- "South America": "South America";
87
- "Middle East": "Middle East";
88
- Oceania: "Oceania";
89
- Global: "Global";
90
- Other: "Other";
91
- Remote: "Remote";
92
- EMEA: "EMEA";
93
- "Asia Pacific": "Asia Pacific";
94
- }>;
95
- createdAt: z.ZodDate;
96
- updatedAt: z.ZodDate;
97
74
  id: z.ZodCUID2;
98
75
  jobType: z.ZodLiteral<string>;
99
- employmentType: z.ZodNull;
100
- gigType: z.ZodEnum<{
101
- [x: string]: string;
102
- }>;
103
76
  overview: z.ZodString;
104
77
  deliverables: z.ZodArray<z.ZodString>;
105
78
  employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -133,9 +106,15 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
133
106
  brandId: z.ZodCUID2;
134
107
  brandName: z.ZodCUID2;
135
108
  brandImgUrl: z.ZodOptional<z.ZodCUID2>;
109
+ employmentType: z.ZodOptional<z.ZodEnum<{
110
+ [x: string]: string;
111
+ }>>;
136
112
  workMode: z.ZodEnum<{
137
113
  [x: string]: string;
138
114
  }>;
115
+ gigType: z.ZodOptional<z.ZodEnum<{
116
+ [x: string]: string;
117
+ }>>;
139
118
  location: z.ZodEnum<{
140
119
  Africa: "Africa";
141
120
  Asia: "Asia";
@@ -154,10 +133,6 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
154
133
  updatedAt: z.ZodDate;
155
134
  id: z.ZodCUID2;
156
135
  jobType: z.ZodLiteral<string>;
157
- employmentType: z.ZodNull;
158
- gigType: z.ZodEnum<{
159
- [x: string]: string;
160
- }>;
161
136
  overview: z.ZodString;
162
137
  deliverables: z.ZodArray<z.ZodString>;
163
138
  employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -187,35 +162,8 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
187
162
  jobSections: z.ZodDefault<z.ZodArray<z.ZodString>>;
188
163
  }, z.core.$strip>;
189
164
  export declare const RoleJobEntitySchema: z.ZodObject<{
190
- title: z.ZodString;
191
- brandId: z.ZodCUID2;
192
- brandName: z.ZodCUID2;
193
- brandImgUrl: z.ZodOptional<z.ZodCUID2>;
194
- workMode: z.ZodEnum<{
195
- [x: string]: string;
196
- }>;
197
- location: z.ZodEnum<{
198
- Africa: "Africa";
199
- Asia: "Asia";
200
- Europe: "Europe";
201
- "North America": "North America";
202
- "South America": "South America";
203
- "Middle East": "Middle East";
204
- Oceania: "Oceania";
205
- Global: "Global";
206
- Other: "Other";
207
- Remote: "Remote";
208
- EMEA: "EMEA";
209
- "Asia Pacific": "Asia Pacific";
210
- }>;
211
- createdAt: z.ZodDate;
212
- updatedAt: z.ZodDate;
213
165
  id: z.ZodCUID2;
214
166
  jobType: z.ZodLiteral<string>;
215
- gigType: z.ZodNull;
216
- employmentType: z.ZodEnum<{
217
- [x: string]: string;
218
- }>;
219
167
  experienceLevel: z.ZodEnum<{
220
168
  "0-1 year": "0-1 year";
221
169
  "1-3 years": "1-3 years";
@@ -255,9 +203,15 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
255
203
  brandId: z.ZodCUID2;
256
204
  brandName: z.ZodCUID2;
257
205
  brandImgUrl: z.ZodOptional<z.ZodCUID2>;
206
+ employmentType: z.ZodOptional<z.ZodEnum<{
207
+ [x: string]: string;
208
+ }>>;
258
209
  workMode: z.ZodEnum<{
259
210
  [x: string]: string;
260
211
  }>;
212
+ gigType: z.ZodOptional<z.ZodEnum<{
213
+ [x: string]: string;
214
+ }>>;
261
215
  location: z.ZodEnum<{
262
216
  Africa: "Africa";
263
217
  Asia: "Asia";
@@ -276,10 +230,6 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
276
230
  updatedAt: z.ZodDate;
277
231
  id: z.ZodCUID2;
278
232
  jobType: z.ZodLiteral<string>;
279
- gigType: z.ZodNull;
280
- employmentType: z.ZodEnum<{
281
- [x: string]: string;
282
- }>;
283
233
  experienceLevel: z.ZodEnum<{
284
234
  "0-1 year": "0-1 year";
285
235
  "1-3 years": "1-3 years";
@@ -514,9 +464,15 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
514
464
  brandId: z.ZodCUID2;
515
465
  brandName: z.ZodCUID2;
516
466
  brandImgUrl: z.ZodOptional<z.ZodCUID2>;
467
+ employmentType: z.ZodOptional<z.ZodEnum<{
468
+ [x: string]: string;
469
+ }>>;
517
470
  workMode: z.ZodEnum<{
518
471
  [x: string]: string;
519
472
  }>;
473
+ gigType: z.ZodOptional<z.ZodEnum<{
474
+ [x: string]: string;
475
+ }>>;
520
476
  location: z.ZodEnum<{
521
477
  Africa: "Africa";
522
478
  Asia: "Asia";
@@ -535,10 +491,6 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
535
491
  updatedAt: z.ZodDate;
536
492
  id: z.ZodCUID2;
537
493
  jobType: z.ZodLiteral<string>;
538
- employmentType: z.ZodNull;
539
- gigType: z.ZodEnum<{
540
- [x: string]: string;
541
- }>;
542
494
  overview: z.ZodString;
543
495
  deliverables: z.ZodArray<z.ZodString>;
544
496
  employeeRequirements: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -571,9 +523,15 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
571
523
  brandId: z.ZodCUID2;
572
524
  brandName: z.ZodCUID2;
573
525
  brandImgUrl: z.ZodOptional<z.ZodCUID2>;
526
+ employmentType: z.ZodOptional<z.ZodEnum<{
527
+ [x: string]: string;
528
+ }>>;
574
529
  workMode: z.ZodEnum<{
575
530
  [x: string]: string;
576
531
  }>;
532
+ gigType: z.ZodOptional<z.ZodEnum<{
533
+ [x: string]: string;
534
+ }>>;
577
535
  location: z.ZodEnum<{
578
536
  Africa: "Africa";
579
537
  Asia: "Asia";
@@ -592,10 +550,6 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
592
550
  updatedAt: z.ZodDate;
593
551
  id: z.ZodCUID2;
594
552
  jobType: z.ZodLiteral<string>;
595
- gigType: z.ZodNull;
596
- employmentType: z.ZodEnum<{
597
- [x: string]: string;
598
- }>;
599
553
  experienceLevel: z.ZodEnum<{
600
554
  "0-1 year": "0-1 year";
601
555
  "1-3 years": "1-3 years";
@@ -40,11 +40,9 @@ exports.JobEntitySchema = zod_1.z.object({
40
40
  createdAt: zod_1.z.date(),
41
41
  updatedAt: zod_1.z.date(),
42
42
  });
43
- exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
43
+ exports.GigJobEntitySchema = zod_1.z.object({
44
44
  id: zod_1.z.cuid2(),
45
45
  jobType: zod_1.z.literal(constants_1.JOB_TYPE.GIG),
46
- employmentType: zod_1.z.null(),
47
- gigType: zod_1.z.enum(Object.values(constants_1.GIG_TYPE)),
48
46
  overview: zod_1.z.string(),
49
47
  deliverables: zod_1.z.array(zod_1.z.string()),
50
48
  employeeRequirements: zod_1.z.array(zod_1.z.string()).optional(),
@@ -63,11 +61,9 @@ exports.GigJobEntitySchema = exports.JobEntitySchema.extend({
63
61
  .default(["PERSONAL_INFORMATION", "PROFESSIONAL_INFORMATION", "RESUME"]),
64
62
  });
65
63
  exports.JobWithGigDetailsEntitySchema = exports.JobEntitySchema.extend(exports.GigJobEntitySchema.shape);
66
- exports.RoleJobEntitySchema = exports.JobEntitySchema.extend({
64
+ exports.RoleJobEntitySchema = zod_1.z.object({
67
65
  id: zod_1.z.cuid2(),
68
66
  jobType: zod_1.z.literal(constants_1.JOB_TYPE.ROLE),
69
- gigType: zod_1.z.null(), // enforce null for ROLE
70
- employmentType: zod_1.z.enum(Object.values(constants_1.EMPLOYMENT_TYPE)),
71
67
  experienceLevel: zod_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
72
68
  overview: zod_1.z.string(),
73
69
  keyResponsibilities: zod_1.z.array(zod_1.z.string()),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.9.95",
3
+ "version": "1.9.97",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -69,11 +69,9 @@ export const JobEntitySchema = z.object({
69
69
  updatedAt: z.date(),
70
70
  });
71
71
 
72
- export const GigJobEntitySchema = JobEntitySchema.extend({
72
+ export const GigJobEntitySchema = z.object({
73
73
  id: z.cuid2(),
74
74
  jobType: z.literal(JOB_TYPE.GIG),
75
- employmentType: z.null(),
76
- gigType: z.enum(Object.values(GIG_TYPE) as [GigType, ...GigType[]]),
77
75
  overview: z.string(),
78
76
  deliverables: z.array(z.string()),
79
77
  employeeRequirements: z.array(z.string()).optional(),
@@ -96,13 +94,9 @@ export const JobWithGigDetailsEntitySchema = JobEntitySchema.extend(
96
94
  GigJobEntitySchema.shape
97
95
  );
98
96
 
99
- export const RoleJobEntitySchema = JobEntitySchema.extend({
97
+ export const RoleJobEntitySchema = z.object({
100
98
  id: z.cuid2(),
101
99
  jobType: z.literal(JOB_TYPE.ROLE),
102
- gigType: z.null(), // enforce null for ROLE
103
- employmentType: z.enum(
104
- Object.values(EMPLOYMENT_TYPE) as [EmploymentType, ...EmploymentType[]]
105
- ),
106
100
  experienceLevel: z.enum(
107
101
  Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
108
102
  ),