@zyacreatives/shared 2.1.14 → 2.1.15

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.
@@ -187,6 +187,170 @@ export declare const CreateJobApplicationInputSchema: z.ZodObject<{
187
187
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
188
188
  }, z.core.$strip>>>;
189
189
  }, z.core.$strip>;
190
+ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
191
+ id: z.ZodCUID2;
192
+ createdAt: z.ZodCoercedDate<unknown>;
193
+ applicationStatus: z.ZodEnum<{
194
+ "Application Sent": "Application Sent";
195
+ Opened: "Opened";
196
+ Rejected: "Rejected";
197
+ Offered: "Offered";
198
+ Hired: "Hired";
199
+ }>;
200
+ job: z.ZodDiscriminatedUnion<[z.ZodObject<{
201
+ title: z.ZodString;
202
+ brandId: z.ZodCUID2;
203
+ brandName: z.ZodCUID2;
204
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
205
+ status: z.ZodEnum<{
206
+ ACTIVE: "ACTIVE";
207
+ DELETED: "DELETED";
208
+ DRAFT: "DRAFT";
209
+ ARCHIVED: "ARCHIVED";
210
+ }>;
211
+ employmentType: z.ZodOptional<z.ZodEnum<{
212
+ "Full Time": "Full Time";
213
+ "Part Time": "Part Time";
214
+ Freelance: "Freelance";
215
+ Internship: "Internship";
216
+ }>>;
217
+ workMode: z.ZodEnum<{
218
+ Remote: "Remote";
219
+ Hybrid: "Hybrid";
220
+ "On Site": "On Site";
221
+ }>;
222
+ gigType: z.ZodOptional<z.ZodEnum<{
223
+ "One Time": "One Time";
224
+ Recurring: "Recurring";
225
+ }>>;
226
+ location: z.ZodEnum<{
227
+ Africa: "Africa";
228
+ Asia: "Asia";
229
+ Europe: "Europe";
230
+ "North America": "North America";
231
+ "South America": "South America";
232
+ "Middle East": "Middle East";
233
+ Oceania: "Oceania";
234
+ Global: "Global";
235
+ Other: "Other";
236
+ Remote: "Remote";
237
+ EMEA: "EMEA";
238
+ "Asia Pacific": "Asia Pacific";
239
+ }>;
240
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
241
+ [x: string]: string;
242
+ }>>>;
243
+ createdAt: z.ZodDate;
244
+ updatedAt: z.ZodDate;
245
+ id: z.ZodCUID2;
246
+ jobType: z.ZodLiteral<"GIG">;
247
+ overview: z.ZodString;
248
+ deliverables: z.ZodString;
249
+ employeeRequirements: z.ZodOptional<z.ZodString>;
250
+ aboutCompany: z.ZodOptional<z.ZodString>;
251
+ requiredSkills: z.ZodArray<z.ZodString>;
252
+ wagesMin: z.ZodOptional<z.ZodNumber>;
253
+ wagesMax: z.ZodOptional<z.ZodNumber>;
254
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
255
+ "USD (United States Dollar)": "USD (United States Dollar)";
256
+ "EUR (Euro)": "EUR (Euro)";
257
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
258
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
259
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
260
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
261
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
262
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
263
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
264
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
265
+ }>>;
266
+ wagesType: z.ZodOptional<z.ZodEnum<{
267
+ Hourly: "Hourly";
268
+ Daily: "Daily";
269
+ Weekly: "Weekly";
270
+ Monthly: "Monthly";
271
+ "Project Based": "Project Based";
272
+ }>>;
273
+ }, z.core.$strip>, z.ZodObject<{
274
+ title: z.ZodString;
275
+ brandId: z.ZodCUID2;
276
+ brandName: z.ZodCUID2;
277
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
278
+ status: z.ZodEnum<{
279
+ ACTIVE: "ACTIVE";
280
+ DELETED: "DELETED";
281
+ DRAFT: "DRAFT";
282
+ ARCHIVED: "ARCHIVED";
283
+ }>;
284
+ employmentType: z.ZodOptional<z.ZodEnum<{
285
+ "Full Time": "Full Time";
286
+ "Part Time": "Part Time";
287
+ Freelance: "Freelance";
288
+ Internship: "Internship";
289
+ }>>;
290
+ workMode: z.ZodEnum<{
291
+ Remote: "Remote";
292
+ Hybrid: "Hybrid";
293
+ "On Site": "On Site";
294
+ }>;
295
+ gigType: z.ZodOptional<z.ZodEnum<{
296
+ "One Time": "One Time";
297
+ Recurring: "Recurring";
298
+ }>>;
299
+ location: z.ZodEnum<{
300
+ Africa: "Africa";
301
+ Asia: "Asia";
302
+ Europe: "Europe";
303
+ "North America": "North America";
304
+ "South America": "South America";
305
+ "Middle East": "Middle East";
306
+ Oceania: "Oceania";
307
+ Global: "Global";
308
+ Other: "Other";
309
+ Remote: "Remote";
310
+ EMEA: "EMEA";
311
+ "Asia Pacific": "Asia Pacific";
312
+ }>;
313
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
314
+ [x: string]: string;
315
+ }>>>;
316
+ createdAt: z.ZodDate;
317
+ updatedAt: z.ZodDate;
318
+ id: z.ZodCUID2;
319
+ jobType: z.ZodLiteral<"ROLE">;
320
+ experienceLevel: z.ZodEnum<{
321
+ "0-1 year": "0-1 year";
322
+ "1-3 years": "1-3 years";
323
+ "3-5 years": "3-5 years";
324
+ "5+ years": "5+ years";
325
+ }>;
326
+ overview: z.ZodString;
327
+ keyResponsibilities: z.ZodString;
328
+ requiredSkills: z.ZodArray<z.ZodString>;
329
+ employeeRequirements: z.ZodOptional<z.ZodString>;
330
+ companyBenefits: z.ZodOptional<z.ZodString>;
331
+ wagesMin: z.ZodOptional<z.ZodNumber>;
332
+ wagesMax: z.ZodOptional<z.ZodNumber>;
333
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
334
+ "USD (United States Dollar)": "USD (United States Dollar)";
335
+ "EUR (Euro)": "EUR (Euro)";
336
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
337
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
338
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
339
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
340
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
341
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
342
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
343
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
344
+ }>>;
345
+ wagesType: z.ZodOptional<z.ZodEnum<{
346
+ Hourly: "Hourly";
347
+ Daily: "Daily";
348
+ Weekly: "Weekly";
349
+ Monthly: "Monthly";
350
+ "Project Based": "Project Based";
351
+ }>>;
352
+ }, z.core.$strip>], "jobType">;
353
+ }, z.core.$strip>;
190
354
  export declare const UpdateJobApplicationStatusSchema: z.ZodObject<{
191
355
  applicationStatus: z.ZodEnum<{
192
356
  readonly SENT: "Application Sent";
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateJobApplicationStatusSchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = exports.BaseJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = void 0;
3
+ exports.UpdateJobApplicationStatusSchema = exports.TrackedJobApplicationEntitySchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = exports.BaseJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const user_1 = require("./user");
7
+ const job_1 = require("./job");
7
8
  exports.MinimalJobApplicationEntitySchema = zod_openapi_1.z.object({
8
9
  user: user_1.MinimalUserSchema,
9
10
  jobId: zod_openapi_1.z.cuid2(),
@@ -128,6 +129,12 @@ exports.CreateJobApplicationInputSchema = zod_openapi_1.z.object({
128
129
  }))
129
130
  .optional(),
130
131
  });
132
+ exports.TrackedJobApplicationEntitySchema = zod_openapi_1.z.object({
133
+ id: zod_openapi_1.z.cuid2(),
134
+ createdAt: zod_openapi_1.z.coerce.date(),
135
+ applicationStatus: zod_openapi_1.z.enum(Object.values(constants_1.APPLICATION_STATUS)),
136
+ job: job_1.NormalizedJobOutputSchema,
137
+ });
131
138
  exports.UpdateJobApplicationStatusSchema = zod_openapi_1.z.object({
132
139
  applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
133
140
  });
@@ -1,7 +1,8 @@
1
1
  import z from "zod";
2
- import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema } from "../schemas/job-application";
2
+ import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema, TrackedJobApplicationEntitySchema } from "../schemas/job-application";
3
3
  export type CreateJobApplicationInput = z.infer<typeof CreateJobApplicationInputSchema>;
4
4
  export type UpdateJobApplicationStatusInput = z.infer<typeof UpdateJobApplicationStatusSchema>;
5
5
  export type JobApplicationEntity = z.infer<typeof JobApplicationEntitySchema>;
6
6
  export type MinimalJobApplicationEntity = z.infer<typeof MinimalJobApplicationEntitySchema>;
7
7
  export type BaseJobApplicationEntity = z.infer<typeof BaseJobApplicationEntitySchema>;
8
+ export type TrackedJobApplicationEntity = z.infer<typeof TrackedJobApplicationEntitySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.14",
3
+ "version": "2.1.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,9 +7,9 @@ import {
7
7
  JOB_AVAILABILITY_TYPES,
8
8
  JOB_SECTIONS,
9
9
  JobAvailabilityTypes,
10
- JobSections,
11
10
  } from "../constants";
12
11
  import { MinimalUserSchema } from "./user";
12
+ import { NormalizedJobOutputSchema } from "./job";
13
13
 
14
14
  export const MinimalJobApplicationEntitySchema = z.object({
15
15
  user: MinimalUserSchema,
@@ -188,6 +188,18 @@ export const CreateJobApplicationInputSchema = z.object({
188
188
  .optional(),
189
189
  });
190
190
 
191
+ export const TrackedJobApplicationEntitySchema = z.object({
192
+ id: z.cuid2(),
193
+ createdAt: z.coerce.date(),
194
+ applicationStatus: z.enum(
195
+ Object.values(APPLICATION_STATUS) as [
196
+ ApplicationStatus,
197
+ ...ApplicationStatus[]
198
+ ]
199
+ ),
200
+ job: NormalizedJobOutputSchema,
201
+ });
202
+
191
203
  export const UpdateJobApplicationStatusSchema = z.object({
192
204
  applicationStatus: z.enum(APPLICATION_STATUS),
193
205
  });
@@ -5,6 +5,7 @@ import {
5
5
  UpdateJobApplicationStatusSchema,
6
6
  MinimalJobApplicationEntitySchema,
7
7
  BaseJobApplicationEntitySchema,
8
+ TrackedJobApplicationEntitySchema,
8
9
  } from "../schemas/job-application";
9
10
 
10
11
  export type CreateJobApplicationInput = z.infer<
@@ -24,3 +25,7 @@ export type MinimalJobApplicationEntity = z.infer<
24
25
  export type BaseJobApplicationEntity = z.infer<
25
26
  typeof BaseJobApplicationEntitySchema
26
27
  >;
28
+
29
+ export type TrackedJobApplicationEntity = z.infer<
30
+ typeof TrackedJobApplicationEntitySchema
31
+ >;