@zyacreatives/shared 2.1.18 → 2.1.19

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.
@@ -410,3 +410,240 @@ export declare const UpdateJobApplicationStatusSchema: z.ZodObject<{
410
410
  readonly HIRED: "Hired";
411
411
  }>;
412
412
  }, z.core.$strip>;
413
+ export declare const GetTrackedJobApplicationsInputSchema: z.ZodObject<{
414
+ q: z.ZodOptional<z.ZodString>;
415
+ status: z.ZodOptional<z.ZodEnum<{
416
+ "Application Sent": "Application Sent";
417
+ Opened: "Opened";
418
+ Rejected: "Rejected";
419
+ Offered: "Offered";
420
+ Hired: "Hired";
421
+ }>>;
422
+ jobType: z.ZodOptional<z.ZodEnum<{
423
+ GIG: "GIG";
424
+ ROLE: "ROLE";
425
+ }>>;
426
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
427
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
428
+ }, z.core.$strip>;
429
+ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
430
+ applications: z.ZodArray<z.ZodObject<{
431
+ id: z.ZodCUID2;
432
+ createdAt: z.ZodCoercedDate<unknown>;
433
+ applicationStatus: z.ZodEnum<{
434
+ "Application Sent": "Application Sent";
435
+ Opened: "Opened";
436
+ Rejected: "Rejected";
437
+ Offered: "Offered";
438
+ Hired: "Hired";
439
+ }>;
440
+ job: z.ZodDiscriminatedUnion<[z.ZodObject<{
441
+ title: z.ZodString;
442
+ brandId: z.ZodCUID2;
443
+ brandName: z.ZodCUID2;
444
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
445
+ status: z.ZodEnum<{
446
+ ACTIVE: "ACTIVE";
447
+ DELETED: "DELETED";
448
+ DRAFT: "DRAFT";
449
+ ARCHIVED: "ARCHIVED";
450
+ }>;
451
+ employmentType: z.ZodOptional<z.ZodEnum<{
452
+ "Full Time": "Full Time";
453
+ "Part Time": "Part Time";
454
+ Freelance: "Freelance";
455
+ Internship: "Internship";
456
+ }>>;
457
+ workMode: z.ZodEnum<{
458
+ Remote: "Remote";
459
+ Hybrid: "Hybrid";
460
+ "On Site": "On Site";
461
+ }>;
462
+ gigType: z.ZodOptional<z.ZodEnum<{
463
+ "One Time": "One Time";
464
+ Recurring: "Recurring";
465
+ }>>;
466
+ location: z.ZodEnum<{
467
+ Africa: "Africa";
468
+ Asia: "Asia";
469
+ Europe: "Europe";
470
+ "North America": "North America";
471
+ "South America": "South America";
472
+ "Middle East": "Middle East";
473
+ Oceania: "Oceania";
474
+ Global: "Global";
475
+ Other: "Other";
476
+ Remote: "Remote";
477
+ EMEA: "EMEA";
478
+ "Asia Pacific": "Asia Pacific";
479
+ }>;
480
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
481
+ [x: string]: string;
482
+ }>>>;
483
+ createdAt: z.ZodDate;
484
+ updatedAt: z.ZodDate;
485
+ id: z.ZodCUID2;
486
+ jobType: z.ZodLiteral<"GIG">;
487
+ overview: z.ZodString;
488
+ deliverables: z.ZodString;
489
+ employeeRequirements: z.ZodOptional<z.ZodString>;
490
+ aboutCompany: z.ZodOptional<z.ZodString>;
491
+ requiredSkills: z.ZodArray<z.ZodString>;
492
+ wagesMin: z.ZodOptional<z.ZodNumber>;
493
+ wagesMax: z.ZodOptional<z.ZodNumber>;
494
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
495
+ "USD (United States Dollar)": "USD (United States Dollar)";
496
+ "EUR (Euro)": "EUR (Euro)";
497
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
498
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
499
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
500
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
501
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
502
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
503
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
504
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
505
+ }>>;
506
+ wagesType: z.ZodOptional<z.ZodEnum<{
507
+ Hourly: "Hourly";
508
+ Daily: "Daily";
509
+ Weekly: "Weekly";
510
+ Monthly: "Monthly";
511
+ "Project Based": "Project Based";
512
+ }>>;
513
+ }, z.core.$strip>, z.ZodObject<{
514
+ id: z.ZodCUID2;
515
+ title: z.ZodString;
516
+ brandId: z.ZodCUID2;
517
+ brandName: z.ZodCUID2;
518
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
519
+ jobType: z.ZodEnum<{
520
+ GIG: "GIG";
521
+ ROLE: "ROLE";
522
+ }>;
523
+ status: z.ZodEnum<{
524
+ ACTIVE: "ACTIVE";
525
+ DELETED: "DELETED";
526
+ DRAFT: "DRAFT";
527
+ ARCHIVED: "ARCHIVED";
528
+ }>;
529
+ employmentType: z.ZodOptional<z.ZodEnum<{
530
+ "Full Time": "Full Time";
531
+ "Part Time": "Part Time";
532
+ Freelance: "Freelance";
533
+ Internship: "Internship";
534
+ }>>;
535
+ workMode: z.ZodEnum<{
536
+ Remote: "Remote";
537
+ Hybrid: "Hybrid";
538
+ "On Site": "On Site";
539
+ }>;
540
+ gigType: z.ZodOptional<z.ZodEnum<{
541
+ "One Time": "One Time";
542
+ Recurring: "Recurring";
543
+ }>>;
544
+ location: z.ZodEnum<{
545
+ Africa: "Africa";
546
+ Asia: "Asia";
547
+ Europe: "Europe";
548
+ "North America": "North America";
549
+ "South America": "South America";
550
+ "Middle East": "Middle East";
551
+ Oceania: "Oceania";
552
+ Global: "Global";
553
+ Other: "Other";
554
+ Remote: "Remote";
555
+ EMEA: "EMEA";
556
+ "Asia Pacific": "Asia Pacific";
557
+ }>;
558
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
559
+ [x: string]: string;
560
+ }>>>;
561
+ createdAt: z.ZodDate;
562
+ updatedAt: z.ZodDate;
563
+ }, z.core.$strip>, z.ZodObject<{
564
+ title: z.ZodString;
565
+ brandId: z.ZodCUID2;
566
+ brandName: z.ZodCUID2;
567
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
568
+ status: z.ZodEnum<{
569
+ ACTIVE: "ACTIVE";
570
+ DELETED: "DELETED";
571
+ DRAFT: "DRAFT";
572
+ ARCHIVED: "ARCHIVED";
573
+ }>;
574
+ employmentType: z.ZodOptional<z.ZodEnum<{
575
+ "Full Time": "Full Time";
576
+ "Part Time": "Part Time";
577
+ Freelance: "Freelance";
578
+ Internship: "Internship";
579
+ }>>;
580
+ workMode: z.ZodEnum<{
581
+ Remote: "Remote";
582
+ Hybrid: "Hybrid";
583
+ "On Site": "On Site";
584
+ }>;
585
+ gigType: z.ZodOptional<z.ZodEnum<{
586
+ "One Time": "One Time";
587
+ Recurring: "Recurring";
588
+ }>>;
589
+ location: z.ZodEnum<{
590
+ Africa: "Africa";
591
+ Asia: "Asia";
592
+ Europe: "Europe";
593
+ "North America": "North America";
594
+ "South America": "South America";
595
+ "Middle East": "Middle East";
596
+ Oceania: "Oceania";
597
+ Global: "Global";
598
+ Other: "Other";
599
+ Remote: "Remote";
600
+ EMEA: "EMEA";
601
+ "Asia Pacific": "Asia Pacific";
602
+ }>;
603
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
604
+ [x: string]: string;
605
+ }>>>;
606
+ createdAt: z.ZodDate;
607
+ updatedAt: z.ZodDate;
608
+ id: z.ZodCUID2;
609
+ jobType: z.ZodLiteral<"ROLE">;
610
+ experienceLevel: z.ZodEnum<{
611
+ "0-1 year": "0-1 year";
612
+ "1-3 years": "1-3 years";
613
+ "3-5 years": "3-5 years";
614
+ "5+ years": "5+ years";
615
+ }>;
616
+ overview: z.ZodString;
617
+ keyResponsibilities: z.ZodString;
618
+ requiredSkills: z.ZodArray<z.ZodString>;
619
+ employeeRequirements: z.ZodOptional<z.ZodString>;
620
+ companyBenefits: z.ZodOptional<z.ZodString>;
621
+ wagesMin: z.ZodOptional<z.ZodNumber>;
622
+ wagesMax: z.ZodOptional<z.ZodNumber>;
623
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
624
+ "USD (United States Dollar)": "USD (United States Dollar)";
625
+ "EUR (Euro)": "EUR (Euro)";
626
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
627
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
628
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
629
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
630
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
631
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
632
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
633
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
634
+ }>>;
635
+ wagesType: z.ZodOptional<z.ZodEnum<{
636
+ Hourly: "Hourly";
637
+ Daily: "Daily";
638
+ Weekly: "Weekly";
639
+ Monthly: "Monthly";
640
+ "Project Based": "Project Based";
641
+ }>>;
642
+ }, z.core.$strip>], "jobType">;
643
+ }, z.core.$strip>>;
644
+ total: z.ZodNumber;
645
+ page: z.ZodNumber;
646
+ totalPages: z.ZodNumber;
647
+ hasNextPage: z.ZodBoolean;
648
+ hasPrevPage: z.ZodBoolean;
649
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateJobApplicationStatusSchema = exports.TrackedJobApplicationEntitySchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = exports.BaseJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = void 0;
3
+ exports.GetTrackedJobApplicationsOutputSchema = exports.GetTrackedJobApplicationsInputSchema = 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");
@@ -144,3 +144,22 @@ exports.TrackedJobApplicationEntitySchema = zod_openapi_1.z.object({
144
144
  exports.UpdateJobApplicationStatusSchema = zod_openapi_1.z.object({
145
145
  applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
146
146
  });
147
+ exports.GetTrackedJobApplicationsInputSchema = zod_openapi_1.z.object({
148
+ q: zod_openapi_1.z.string().optional(),
149
+ status: zod_openapi_1.z
150
+ .enum(Object.values(constants_1.APPLICATION_STATUS))
151
+ .optional(),
152
+ jobType: zod_openapi_1.z
153
+ .enum(Object.values(constants_1.JOB_TYPE))
154
+ .optional(),
155
+ page: zod_openapi_1.z.coerce.number().min(1).default(1),
156
+ limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20),
157
+ });
158
+ exports.GetTrackedJobApplicationsOutputSchema = zod_openapi_1.z.object({
159
+ applications: zod_openapi_1.z.array(exports.TrackedJobApplicationEntitySchema),
160
+ total: zod_openapi_1.z.number(),
161
+ page: zod_openapi_1.z.number(),
162
+ totalPages: zod_openapi_1.z.number(),
163
+ hasNextPage: zod_openapi_1.z.boolean(),
164
+ hasPrevPage: zod_openapi_1.z.boolean(),
165
+ });
@@ -1,8 +1,10 @@
1
1
  import z from "zod";
2
- import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema, TrackedJobApplicationEntitySchema } from "../schemas/job-application";
2
+ import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema, TrackedJobApplicationEntitySchema, GetTrackedJobApplicationsInputSchema, GetTrackedJobApplicationsOutputSchema } 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
8
  export type TrackedJobApplicationEntity = z.infer<typeof TrackedJobApplicationEntitySchema>;
9
+ export type GetTrackedJobApplicationsInput = z.infer<typeof GetTrackedJobApplicationsInputSchema>;
10
+ export type GetTrackedJobApplicationsOutput = z.infer<typeof GetTrackedJobApplicationsOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.18",
3
+ "version": "2.1.19",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -6,7 +6,9 @@ import {
6
6
  ExperienceLevel,
7
7
  JOB_AVAILABILITY_TYPES,
8
8
  JOB_SECTIONS,
9
+ JOB_TYPE,
9
10
  JobAvailabilityTypes,
11
+ JobType,
10
12
  } from "../constants";
11
13
  import { MinimalUserSchema } from "./user";
12
14
  import { NormalizedJobSchema } from "./job";
@@ -213,4 +215,28 @@ export const UpdateJobApplicationStatusSchema = z.object({
213
215
  applicationStatus: z.enum(APPLICATION_STATUS),
214
216
  });
215
217
 
218
+ export const GetTrackedJobApplicationsInputSchema = z.object({
219
+ q: z.string().optional(),
220
+ status: z
221
+ .enum(
222
+ Object.values(APPLICATION_STATUS) as [
223
+ ApplicationStatus,
224
+ ...ApplicationStatus[]
225
+ ]
226
+ )
227
+ .optional(),
228
+ jobType: z
229
+ .enum(Object.values(JOB_TYPE) as [JobType, ...JobType[]])
230
+ .optional(),
231
+ page: z.coerce.number().min(1).default(1),
232
+ limit: z.coerce.number().min(1).max(100).default(20),
233
+ });
216
234
 
235
+ export const GetTrackedJobApplicationsOutputSchema = z.object({
236
+ applications: z.array(TrackedJobApplicationEntitySchema),
237
+ total: z.number(),
238
+ page: z.number(),
239
+ totalPages: z.number(),
240
+ hasNextPage: z.boolean(),
241
+ hasPrevPage: z.boolean(),
242
+ });
@@ -6,6 +6,8 @@ import {
6
6
  MinimalJobApplicationEntitySchema,
7
7
  BaseJobApplicationEntitySchema,
8
8
  TrackedJobApplicationEntitySchema,
9
+ GetTrackedJobApplicationsInputSchema,
10
+ GetTrackedJobApplicationsOutputSchema,
9
11
  } from "../schemas/job-application";
10
12
 
11
13
  export type CreateJobApplicationInput = z.infer<
@@ -29,3 +31,11 @@ export type BaseJobApplicationEntity = z.infer<
29
31
  export type TrackedJobApplicationEntity = z.infer<
30
32
  typeof TrackedJobApplicationEntitySchema
31
33
  >;
34
+
35
+ export type GetTrackedJobApplicationsInput = z.infer<
36
+ typeof GetTrackedJobApplicationsInputSchema
37
+ >;
38
+
39
+ export type GetTrackedJobApplicationsOutput = z.infer<
40
+ typeof GetTrackedJobApplicationsOutputSchema
41
+ >;