@zyacreatives/shared 2.0.79 → 2.0.81

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.
@@ -12,9 +12,17 @@ export declare const CreateJobApplicationInputSchema: z.ZodObject<{
12
12
  "5+ years": "5+ years";
13
13
  }>;
14
14
  resumeUrl: z.ZodURL;
15
- workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodURL>>;
16
- portfolioUrl: z.ZodOptional<z.ZodURL>;
17
- coverLetterUrl: z.ZodOptional<z.ZodURL>;
15
+ workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
16
+ url: z.ZodURL;
17
+ isZyaProject: z.ZodDefault<z.ZodBoolean>;
18
+ name: z.ZodOptional<z.ZodString>;
19
+ mimeType: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>>>;
21
+ linkUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ url: z.ZodURL;
23
+ isPortfolioUrl: z.ZodDefault<z.ZodBoolean>;
24
+ }, z.core.$strip>>>;
25
+ coverLetter: z.ZodString;
18
26
  receiveEmailUpdates: z.ZodBoolean;
19
27
  wagesAmount: z.ZodString;
20
28
  wagesType: z.ZodEnum<{
@@ -14,9 +14,18 @@ exports.CreateJobApplicationInputSchema = zod_1.default.object({
14
14
  currentRole: zod_1.default.string(),
15
15
  experienceLevel: zod_1.default.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
16
16
  resumeUrl: zod_1.default.url(),
17
- workSampleUrls: zod_1.default.array(zod_1.default.url()).optional(),
18
- portfolioUrl: zod_1.default.url().optional(),
19
- coverLetterUrl: zod_1.default.url().optional(),
17
+ workSampleUrls: zod_1.default
18
+ .array(zod_1.default.object({
19
+ url: zod_1.default.url(),
20
+ isZyaProject: zod_1.default.boolean().default(false),
21
+ name: zod_1.default.string().optional(),
22
+ mimeType: zod_1.default.string().optional(),
23
+ }))
24
+ .optional(),
25
+ linkUrls: zod_1.default
26
+ .array(zod_1.default.object({ url: zod_1.default.url(), isPortfolioUrl: zod_1.default.boolean().default(false) }))
27
+ .optional(),
28
+ coverLetter: zod_1.default.string(),
20
29
  receiveEmailUpdates: zod_1.default.boolean(),
21
30
  wagesAmount: zod_1.default.string(),
22
31
  wagesType: zod_1.default.enum(Object.values(constants_1.WAGE_TYPES)),
@@ -156,7 +156,8 @@ exports.CreateJobInputSchema = zod_1.z
156
156
  }
157
157
  }
158
158
  });
159
- exports.CreateRoleJobInputSchema = zod_1.z.object({
159
+ exports.CreateRoleJobInputSchema = zod_1.z
160
+ .object({
160
161
  id: zod_1.z.cuid2(),
161
162
  experienceLevel: zod_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
162
163
  overview: zod_1.z.string(),
@@ -172,8 +173,13 @@ exports.CreateRoleJobInputSchema = zod_1.z.object({
172
173
  wagesType: zod_1.z
173
174
  .enum(Object.values(constants_1.WAGE_TYPES))
174
175
  .optional(),
176
+ })
177
+ .refine(({ wagesMin, wagesMax }) => wagesMin === undefined || wagesMax === undefined || wagesMax > wagesMin, {
178
+ message: "wagesMax must be greater than wagesMin",
179
+ path: ["wagesMax"],
175
180
  });
176
- exports.CreateGigJobInputSchema = zod_1.z.object({
181
+ exports.CreateGigJobInputSchema = zod_1.z
182
+ .object({
177
183
  id: zod_1.z.cuid2(),
178
184
  overview: zod_1.z.string(),
179
185
  deliverables: zod_1.z.string(),
@@ -188,6 +194,10 @@ exports.CreateGigJobInputSchema = zod_1.z.object({
188
194
  wagesType: zod_1.z
189
195
  .enum(Object.values(constants_1.WAGE_TYPES))
190
196
  .optional(),
197
+ })
198
+ .refine(({ wagesMin, wagesMax }) => wagesMin === undefined || wagesMax === undefined || wagesMax > wagesMin, {
199
+ message: "wagesMax must be greater than wagesMin",
200
+ path: ["wagesMax"],
191
201
  });
192
202
  exports.UpdateRoleJobInputSchema = exports.CreateRoleJobInputSchema.partial().required({ id: true });
193
203
  exports.UpdateGigJobInputSchema = exports.CreateGigJobInputSchema.partial().required({ id: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.79",
3
+ "version": "2.0.81",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,9 +18,22 @@ export const CreateJobApplicationInputSchema = z.object({
18
18
  Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
19
19
  ),
20
20
  resumeUrl: z.url(),
21
- workSampleUrls: z.array(z.url()).optional(),
22
- portfolioUrl: z.url().optional(),
23
- coverLetterUrl: z.url().optional(),
21
+ workSampleUrls: z
22
+ .array(
23
+ z.object({
24
+ url: z.url(),
25
+ isZyaProject: z.boolean().default(false),
26
+ name: z.string().optional(),
27
+ mimeType: z.string().optional(),
28
+ })
29
+ )
30
+ .optional(),
31
+ linkUrls: z
32
+ .array(
33
+ z.object({ url: z.url(), isPortfolioUrl: z.boolean().default(false) })
34
+ )
35
+ .optional(),
36
+ coverLetter: z.string(),
24
37
  receiveEmailUpdates: z.boolean(),
25
38
  wagesAmount: z.string(),
26
39
  wagesType: z.enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]]),
@@ -210,42 +210,67 @@ export const CreateJobInputSchema = z
210
210
  }
211
211
  });
212
212
 
213
- export const CreateRoleJobInputSchema = z.object({
214
- id: z.cuid2(),
215
- experienceLevel: z.enum(
216
- Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
217
- ),
218
- overview: z.string(),
219
- keyResponsibilities: z.string(),
220
- requiredSkills: z.array(z.string()),
221
- employeeRequirements: z.string().optional(),
222
- companyBenefits: z.string().optional(),
223
- wagesMin: z.number().optional(),
224
- wagesMax: z.number().optional(),
225
- wagesCurrency: z
226
- .enum(Object.values(WAGES_CURRENCY) as [WagesCurrency, ...WagesCurrency[]])
227
- .optional(),
228
- wagesType: z
229
- .enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
230
- .optional(),
231
- });
213
+ export const CreateRoleJobInputSchema = z
214
+ .object({
215
+ id: z.cuid2(),
216
+ experienceLevel: z.enum(
217
+ Object.values(EXPERIENCE_LEVELS) as [
218
+ ExperienceLevel,
219
+ ...ExperienceLevel[]
220
+ ]
221
+ ),
222
+ overview: z.string(),
223
+ keyResponsibilities: z.string(),
224
+ requiredSkills: z.array(z.string()),
225
+ employeeRequirements: z.string().optional(),
226
+ companyBenefits: z.string().optional(),
227
+ wagesMin: z.number().optional(),
228
+ wagesMax: z.number().optional(),
229
+ wagesCurrency: z
230
+ .enum(
231
+ Object.values(WAGES_CURRENCY) as [WagesCurrency, ...WagesCurrency[]]
232
+ )
233
+ .optional(),
234
+ wagesType: z
235
+ .enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
236
+ .optional(),
237
+ })
238
+ .refine(
239
+ ({ wagesMin, wagesMax }) =>
240
+ wagesMin === undefined || wagesMax === undefined || wagesMax > wagesMin,
241
+ {
242
+ message: "wagesMax must be greater than wagesMin",
243
+ path: ["wagesMax"],
244
+ }
245
+ );
232
246
 
233
- export const CreateGigJobInputSchema = z.object({
234
- id: z.cuid2(),
235
- overview: z.string(),
236
- deliverables: z.string(),
237
- employeeRequirements: z.string().optional(),
238
- aboutCompany: z.string().optional(),
239
- requiredSkills: z.array(z.string()),
240
- wagesMin: z.number().optional(),
241
- wagesMax: z.number().optional(),
242
- wagesCurrency: z
243
- .enum(Object.values(WAGES_CURRENCY) as [WagesCurrency, ...WagesCurrency[]])
244
- .optional(),
245
- wagesType: z
246
- .enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
247
- .optional(),
248
- });
247
+ export const CreateGigJobInputSchema = z
248
+ .object({
249
+ id: z.cuid2(),
250
+ overview: z.string(),
251
+ deliverables: z.string(),
252
+ employeeRequirements: z.string().optional(),
253
+ aboutCompany: z.string().optional(),
254
+ requiredSkills: z.array(z.string()),
255
+ wagesMin: z.number().optional(),
256
+ wagesMax: z.number().optional(),
257
+ wagesCurrency: z
258
+ .enum(
259
+ Object.values(WAGES_CURRENCY) as [WagesCurrency, ...WagesCurrency[]]
260
+ )
261
+ .optional(),
262
+ wagesType: z
263
+ .enum(Object.values(WAGE_TYPES) as [WageTypes, ...WageTypes[]])
264
+ .optional(),
265
+ })
266
+ .refine(
267
+ ({ wagesMin, wagesMax }) =>
268
+ wagesMin === undefined || wagesMax === undefined || wagesMax > wagesMin,
269
+ {
270
+ message: "wagesMax must be greater than wagesMin",
271
+ path: ["wagesMax"],
272
+ }
273
+ );
249
274
 
250
275
  export const UpdateRoleJobInputSchema =
251
276
  CreateRoleJobInputSchema.partial().required({ id: true });