@zyacreatives/shared 2.0.77 → 2.0.79

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.
@@ -58,9 +58,8 @@ export declare const CreateBrandProfileInputSchema: z.ZodObject<{
58
58
  export declare const UpdateBrandProfileInputSchema: z.ZodObject<{
59
59
  brandName: z.ZodOptional<z.ZodString>;
60
60
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
61
- name: z.ZodString;
62
- url: z.ZodURL;
63
- type: z.ZodDefault<z.ZodEnum<{
61
+ url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
62
+ type: z.ZodOptional<z.ZodEnum<{
64
63
  readonly INSTAGRAM: "Instagram";
65
64
  readonly LINKEDIN: "LinkedIn";
66
65
  readonly TWITTER: "Twitter";
@@ -121,9 +121,13 @@ exports.UpdateBrandProfileInputSchema = zod_openapi_1.z
121
121
  brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
122
122
  links: zod_openapi_1.z
123
123
  .object({
124
- name: zod_openapi_1.z.string(),
125
- url: zod_openapi_1.z.url(),
126
- type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).default(constants_1.LINK_TYPES.GENERIC_WEBSITE),
124
+ url: zod_openapi_1.z
125
+ .union([
126
+ zod_openapi_1.z.url({ message: "Please enter a valid URL" }),
127
+ zod_openapi_1.z.literal(""),
128
+ ])
129
+ .optional(),
130
+ type: zod_openapi_1.z.enum(constants_1.LINK_TYPES).optional(),
127
131
  })
128
132
  .array()
129
133
  .optional(),
@@ -36,7 +36,7 @@ export declare const CreativeEntitySchema: z.ZodObject<{
36
36
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
37
37
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
38
38
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
39
- description: z.ZodOptional<z.ZodString>;
39
+ description: z.ZodString;
40
40
  }, z.core.$strip>>>;
41
41
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
42
42
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -152,7 +152,7 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
152
152
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
153
153
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
154
154
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
155
- description: z.ZodOptional<z.ZodString>;
155
+ description: z.ZodString;
156
156
  }, z.core.$strip>>>;
157
157
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
158
158
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -193,7 +193,7 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
193
193
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
194
194
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
195
195
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
196
- description: z.ZodOptional<z.ZodString>;
196
+ description: z.ZodString;
197
197
  }, z.core.$strip>>>;
198
198
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
199
199
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -234,7 +234,7 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
234
234
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
235
235
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
236
236
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
237
- description: z.ZodOptional<z.ZodString>;
237
+ description: z.ZodString;
238
238
  }, z.core.$strip>>>;
239
239
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
240
240
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -59,7 +59,7 @@ exports.CreativeEntitySchema = zod_openapi_1.z
59
59
  startDate: zod_openapi_1.z.coerce.date().optional(),
60
60
  endDate: zod_openapi_1.z.coerce.date().optional(),
61
61
  currentlyWorking: zod_openapi_1.z.boolean().optional(),
62
- description: zod_openapi_1.z.string().optional(),
62
+ description: zod_openapi_1.z.string(),
63
63
  })
64
64
  .array()
65
65
  .optional(),
@@ -690,3 +690,161 @@ export declare const NormalizedJobOutputSchema: z.ZodDiscriminatedUnion<[z.ZodOb
690
690
  "Project Based": "Project Based";
691
691
  }>>;
692
692
  }, z.core.$strip>], "jobType">;
693
+ export declare const GetJobsOutputSchema: z.ZodObject<{
694
+ jobs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
695
+ title: z.ZodString;
696
+ brandId: z.ZodCUID2;
697
+ brandName: z.ZodCUID2;
698
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
699
+ status: z.ZodEnum<{
700
+ ACTIVE: "ACTIVE";
701
+ DELETED: "DELETED";
702
+ DRAFT: "DRAFT";
703
+ ARCHIVED: "ARCHIVED";
704
+ }>;
705
+ employmentType: z.ZodOptional<z.ZodEnum<{
706
+ "Full Time": "Full Time";
707
+ "Part Time": "Part Time";
708
+ Freelance: "Freelance";
709
+ Internship: "Internship";
710
+ }>>;
711
+ workMode: z.ZodEnum<{
712
+ Remote: "Remote";
713
+ Hybrid: "Hybrid";
714
+ "On Site": "On Site";
715
+ }>;
716
+ gigType: z.ZodOptional<z.ZodEnum<{
717
+ "One Time": "One Time";
718
+ Recurring: "Recurring";
719
+ }>>;
720
+ location: z.ZodEnum<{
721
+ Africa: "Africa";
722
+ Asia: "Asia";
723
+ Europe: "Europe";
724
+ "North America": "North America";
725
+ "South America": "South America";
726
+ "Middle East": "Middle East";
727
+ Oceania: "Oceania";
728
+ Global: "Global";
729
+ Other: "Other";
730
+ Remote: "Remote";
731
+ EMEA: "EMEA";
732
+ "Asia Pacific": "Asia Pacific";
733
+ }>;
734
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
735
+ [x: string]: string;
736
+ }>>>;
737
+ createdAt: z.ZodDate;
738
+ updatedAt: z.ZodDate;
739
+ id: z.ZodCUID2;
740
+ jobType: z.ZodLiteral<"GIG">;
741
+ overview: z.ZodString;
742
+ deliverables: z.ZodString;
743
+ employeeRequirements: z.ZodOptional<z.ZodString>;
744
+ aboutCompany: z.ZodOptional<z.ZodString>;
745
+ requiredSkills: z.ZodArray<z.ZodString>;
746
+ wagesMin: z.ZodOptional<z.ZodNumber>;
747
+ wagesMax: z.ZodOptional<z.ZodNumber>;
748
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
749
+ "USD (United States Dollar)": "USD (United States Dollar)";
750
+ "EUR (Euro)": "EUR (Euro)";
751
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
752
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
753
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
754
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
755
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
756
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
757
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
758
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
759
+ }>>;
760
+ wagesType: z.ZodOptional<z.ZodEnum<{
761
+ Hourly: "Hourly";
762
+ Daily: "Daily";
763
+ Weekly: "Weekly";
764
+ Monthly: "Monthly";
765
+ "Project Based": "Project Based";
766
+ }>>;
767
+ }, z.core.$strip>, z.ZodObject<{
768
+ title: z.ZodString;
769
+ brandId: z.ZodCUID2;
770
+ brandName: z.ZodCUID2;
771
+ brandImgUrl: z.ZodOptional<z.ZodCUID2>;
772
+ status: z.ZodEnum<{
773
+ ACTIVE: "ACTIVE";
774
+ DELETED: "DELETED";
775
+ DRAFT: "DRAFT";
776
+ ARCHIVED: "ARCHIVED";
777
+ }>;
778
+ employmentType: z.ZodOptional<z.ZodEnum<{
779
+ "Full Time": "Full Time";
780
+ "Part Time": "Part Time";
781
+ Freelance: "Freelance";
782
+ Internship: "Internship";
783
+ }>>;
784
+ workMode: z.ZodEnum<{
785
+ Remote: "Remote";
786
+ Hybrid: "Hybrid";
787
+ "On Site": "On Site";
788
+ }>;
789
+ gigType: z.ZodOptional<z.ZodEnum<{
790
+ "One Time": "One Time";
791
+ Recurring: "Recurring";
792
+ }>>;
793
+ location: z.ZodEnum<{
794
+ Africa: "Africa";
795
+ Asia: "Asia";
796
+ Europe: "Europe";
797
+ "North America": "North America";
798
+ "South America": "South America";
799
+ "Middle East": "Middle East";
800
+ Oceania: "Oceania";
801
+ Global: "Global";
802
+ Other: "Other";
803
+ Remote: "Remote";
804
+ EMEA: "EMEA";
805
+ "Asia Pacific": "Asia Pacific";
806
+ }>;
807
+ jobSections: z.ZodDefault<z.ZodArray<z.ZodEnum<{
808
+ [x: string]: string;
809
+ }>>>;
810
+ createdAt: z.ZodDate;
811
+ updatedAt: z.ZodDate;
812
+ id: z.ZodCUID2;
813
+ jobType: z.ZodLiteral<"ROLE">;
814
+ experienceLevel: z.ZodEnum<{
815
+ "0-1 year": "0-1 year";
816
+ "1-3 years": "1-3 years";
817
+ "3-5 years": "3-5 years";
818
+ "5+ years": "5+ years";
819
+ }>;
820
+ overview: z.ZodString;
821
+ keyResponsibilities: z.ZodString;
822
+ requiredSkills: z.ZodArray<z.ZodString>;
823
+ employeeRequirements: z.ZodOptional<z.ZodString>;
824
+ companyBenefits: z.ZodOptional<z.ZodString>;
825
+ wagesMin: z.ZodOptional<z.ZodNumber>;
826
+ wagesMax: z.ZodOptional<z.ZodNumber>;
827
+ wagesCurrency: z.ZodOptional<z.ZodEnum<{
828
+ "USD (United States Dollar)": "USD (United States Dollar)";
829
+ "EUR (Euro)": "EUR (Euro)";
830
+ "GBP (British Pound Sterling)": "GBP (British Pound Sterling)";
831
+ "NGN (Nigerian Naira)": "NGN (Nigerian Naira)";
832
+ "CAD (Canadian Dollar)": "CAD (Canadian Dollar)";
833
+ "AUD (Australian Dollar)": "AUD (Australian Dollar)";
834
+ "JPY (Japanese Yen)": "JPY (Japanese Yen)";
835
+ "CHF (Swiss Franc)": "CHF (Swiss Franc)";
836
+ "INR (Indian Rupee)": "INR (Indian Rupee)";
837
+ "ZAR (South African Rand)": "ZAR (South African Rand)";
838
+ }>>;
839
+ wagesType: z.ZodOptional<z.ZodEnum<{
840
+ Hourly: "Hourly";
841
+ Daily: "Daily";
842
+ Weekly: "Weekly";
843
+ Monthly: "Monthly";
844
+ "Project Based": "Project Based";
845
+ }>>;
846
+ }, z.core.$strip>], "jobType">>;
847
+ noOfJobs: z.ZodNumber;
848
+ noOfActiveJobs: z.ZodNumber;
849
+ noOfArchivedJobs: z.ZodNumber;
850
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NormalizedJobOutputSchema = 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;
3
+ exports.GetJobsOutputSchema = exports.NormalizedJobOutputSchema = 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));
@@ -201,3 +201,9 @@ exports.NormalizedJobOutputSchema = zod_1.z.discriminatedUnion("jobType", [
201
201
  exports.JobWithGigDetailsEntitySchema,
202
202
  exports.JobWithRoleDetailsEntitySchema,
203
203
  ]);
204
+ exports.GetJobsOutputSchema = zod_1.z.object({
205
+ jobs: zod_1.z.array(exports.NormalizedJobOutputSchema),
206
+ noOfJobs: zod_1.z.number(),
207
+ noOfActiveJobs: zod_1.z.number(),
208
+ noOfArchivedJobs: zod_1.z.number(),
209
+ });
@@ -142,7 +142,7 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
142
142
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
143
143
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
144
144
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
145
- description: z.ZodOptional<z.ZodString>;
145
+ description: z.ZodString;
146
146
  }, z.core.$strip>>>;
147
147
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
148
148
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -528,7 +528,7 @@ export declare const GetAuthenticatedUserProfileOutputSchema: z.ZodObject<{
528
528
  startDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
529
529
  endDate: z.ZodOptional<z.ZodCoercedDate<unknown>>;
530
530
  currentlyWorking: z.ZodOptional<z.ZodBoolean>;
531
- description: z.ZodOptional<z.ZodString>;
531
+ description: z.ZodString;
532
532
  }, z.core.$strip>>>;
533
533
  links: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
534
  url: z.ZodOptional<z.ZodUnion<readonly [z.ZodURL, z.ZodLiteral<"">]>>;
@@ -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 } from "../schemas/job";
2
+ import { JobEntitySchema, GigJobEntitySchema, RoleJobEntitySchema, CreateJobInputSchema, CreateRoleJobInputSchema, CreateGigJobInputSchema, UpdateRoleJobInputSchema, UpdateGigJobInputSchema, UpdateJobInputSchema, JobWithGigDetailsEntitySchema, JobWithRoleDetailsEntitySchema, BaseJobEntitySchema, JobIdSchema, GetJobsOutputSchema } 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>;
@@ -20,3 +20,4 @@ export type UpdateJobOutput = z.infer<typeof BaseJobEntitySchema>;
20
20
  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
+ export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.0.77",
3
+ "version": "2.0.79",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -132,9 +132,13 @@ export const UpdateBrandProfileInputSchema = z
132
132
  brandName: z.string().min(1).optional().openapi({ example: "Acme Studio" }),
133
133
  links: z
134
134
  .object({
135
- name: z.string(),
136
- url: z.url(),
137
- type: z.enum(LINK_TYPES).default(LINK_TYPES.GENERIC_WEBSITE),
135
+ url: z
136
+ .union([
137
+ z.url({ message: "Please enter a valid URL" }),
138
+ z.literal(""),
139
+ ])
140
+ .optional(),
141
+ type: z.enum(LINK_TYPES).optional(),
138
142
  })
139
143
  .array()
140
144
  .optional(),
@@ -70,7 +70,7 @@ export const CreativeEntitySchema = z
70
70
  startDate: z.coerce.date().optional(),
71
71
  endDate: z.coerce.date().optional(),
72
72
  currentlyWorking: z.boolean().optional(),
73
- description: z.string().optional(),
73
+ description: z.string(),
74
74
  })
75
75
  .array()
76
76
  .optional(),
@@ -264,3 +264,10 @@ export const NormalizedJobOutputSchema = z.discriminatedUnion("jobType", [
264
264
  JobWithGigDetailsEntitySchema,
265
265
  JobWithRoleDetailsEntitySchema,
266
266
  ]);
267
+
268
+ export const GetJobsOutputSchema = z.object({
269
+ jobs: z.array(NormalizedJobOutputSchema),
270
+ noOfJobs: z.number(),
271
+ noOfActiveJobs: z.number(),
272
+ noOfArchivedJobs: z.number(),
273
+ });
package/src/types/job.ts CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  JobWithRoleDetailsEntitySchema,
14
14
  BaseJobEntitySchema,
15
15
  JobIdSchema,
16
+ GetJobsOutputSchema,
16
17
  } from "../schemas/job";
17
18
 
18
19
  export type BaseJobEntity = z.infer<typeof BaseJobEntitySchema>;
@@ -58,3 +59,5 @@ export type JobWithGigDetailsEntity = z.infer<
58
59
  export type JobWithRoleDetailsEntity = z.infer<
59
60
  typeof JobWithRoleDetailsEntitySchema
60
61
  >;
62
+
63
+ export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;