@zyacreatives/shared 2.1.13 → 2.1.14

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.
@@ -29,37 +29,37 @@ export declare const BaseJobApplicationEntitySchema: z.ZodObject<{
29
29
  id: z.ZodString;
30
30
  createdAt: z.ZodCoercedDate<unknown>;
31
31
  updatedAt: z.ZodCoercedDate<unknown>;
32
- availability: z.ZodEnum<{
32
+ availability: z.ZodOptional<z.ZodEnum<{
33
33
  readonly IMMEDIATE: "Immediate (Within 1 week)";
34
34
  readonly TWO_WEEKS_NOTICE: "2 weeks notice";
35
35
  readonly ONE_MONTH_NOTICE: "1 month notice";
36
36
  readonly FLEXIBLE: "Flexible";
37
- }>;
38
- experienceLevel: z.ZodEnum<{
37
+ }>>;
38
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
39
39
  readonly YEAR_0_1: "0-1 year";
40
40
  readonly YEAR_1_3: "1-3 years";
41
41
  readonly YEAR_3_5: "3-5 years";
42
42
  readonly YEAR_5_PLUS: "5+ years";
43
- }>;
43
+ }>>;
44
44
  jobId: z.ZodString;
45
45
  applicantId: z.ZodString;
46
- firstName: z.ZodString;
47
- lastName: z.ZodString;
48
- emailAddress: z.ZodString;
46
+ firstName: z.ZodOptional<z.ZodString>;
47
+ lastName: z.ZodOptional<z.ZodString>;
48
+ emailAddress: z.ZodOptional<z.ZodString>;
49
49
  phoneNumber: z.ZodNullable<z.ZodString>;
50
50
  currentRole: z.ZodString;
51
51
  resumeUrl: z.ZodURL;
52
- workSampleUrls: z.ZodArray<z.ZodObject<{
52
+ workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
53
53
  url: z.ZodURL;
54
54
  name: z.ZodOptional<z.ZodString>;
55
55
  mimeType: z.ZodOptional<z.ZodString>;
56
- }, z.core.$strip>>;
57
- zyaProjects: z.ZodArray<z.ZodObject<{
56
+ }, z.core.$strip>>>;
57
+ zyaProjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
58
58
  projectName: z.ZodString;
59
- projectImgUrl: z.ZodURL;
59
+ projectImgUrl: z.ZodOptional<z.ZodURL>;
60
60
  projectId: z.ZodString;
61
- tags: z.ZodArray<z.ZodString>;
62
- }, z.core.$strip>>;
61
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
62
+ }, z.core.$strip>>>;
63
63
  applicationStatus: z.ZodEnum<{
64
64
  readonly SENT: "Application Sent";
65
65
  readonly OPENED: "Opened";
@@ -67,10 +67,10 @@ export declare const BaseJobApplicationEntitySchema: z.ZodObject<{
67
67
  readonly OFFERED: "Offered";
68
68
  readonly HIRED: "Hired";
69
69
  }>;
70
- linkUrls: z.ZodArray<z.ZodObject<{
70
+ linkUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
71
71
  url: z.ZodURL;
72
72
  isPortfolioUrl: z.ZodOptional<z.ZodBoolean>;
73
- }, z.core.$strip>>;
73
+ }, z.core.$strip>>>;
74
74
  coverLetter: z.ZodNullable<z.ZodString>;
75
75
  receiveEmailUpdates: z.ZodBoolean;
76
76
  wagesAmount: z.ZodNullable<z.ZodNumber>;
@@ -138,19 +138,8 @@ export declare const JobApplicationEntitySchema: z.ZodObject<{
138
138
  updatedAt: z.ZodCoercedDate<unknown>;
139
139
  }, z.core.$strip>;
140
140
  export declare const CreateJobApplicationInputSchema: z.ZodObject<{
141
- firstName: z.ZodString;
142
- lastName: z.ZodString;
143
141
  jobId: z.ZodCUID2;
144
142
  applicantId: z.ZodCUID2;
145
- emailAddress: z.ZodEmail;
146
- phoneNumber: z.ZodOptional<z.ZodString>;
147
- currentRole: z.ZodString;
148
- experienceLevel: z.ZodEnum<{
149
- "0-1 year": "0-1 year";
150
- "1-3 years": "1-3 years";
151
- "3-5 years": "3-5 years";
152
- "5+ years": "5+ years";
153
- }>;
154
143
  jobSections: z.ZodOptional<z.ZodArray<z.ZodEnum<{
155
144
  readonly PERSONAL_INFORMATION: "PERSONAL_INFORMATION";
156
145
  readonly PHONE_NO: "PHONE_NO";
@@ -161,31 +150,42 @@ export declare const CreateJobApplicationInputSchema: z.ZodObject<{
161
150
  readonly AVAILABILITY: "AVAILABILITY";
162
151
  readonly WAGES: "WAGES";
163
152
  }>>>;
164
- resumeUrl: z.ZodURL;
153
+ firstName: z.ZodOptional<z.ZodString>;
154
+ lastName: z.ZodOptional<z.ZodString>;
155
+ emailAddress: z.ZodOptional<z.ZodEmail>;
156
+ phoneNumber: z.ZodOptional<z.ZodString>;
157
+ currentRole: z.ZodOptional<z.ZodString>;
158
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
159
+ "0-1 year": "0-1 year";
160
+ "1-3 years": "1-3 years";
161
+ "3-5 years": "3-5 years";
162
+ "5+ years": "5+ years";
163
+ }>>;
164
+ resumeUrl: z.ZodOptional<z.ZodURL>;
165
+ coverLetter: z.ZodOptional<z.ZodString>;
166
+ availability: z.ZodOptional<z.ZodEnum<{
167
+ readonly IMMEDIATE: "Immediate (Within 1 week)";
168
+ readonly TWO_WEEKS_NOTICE: "2 weeks notice";
169
+ readonly ONE_MONTH_NOTICE: "1 month notice";
170
+ readonly FLEXIBLE: "Flexible";
171
+ }>>;
172
+ wagesAmount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
173
+ receiveEmailUpdates: z.ZodDefault<z.ZodBoolean>;
165
174
  workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
166
175
  url: z.ZodURL;
167
176
  name: z.ZodOptional<z.ZodString>;
168
177
  mimeType: z.ZodOptional<z.ZodString>;
169
178
  }, z.core.$strip>>>;
179
+ linkUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
180
+ url: z.ZodURL;
181
+ isPortfolioUrl: z.ZodBoolean;
182
+ }, z.core.$strip>>>;
170
183
  zyaProjects: z.ZodOptional<z.ZodArray<z.ZodObject<{
171
184
  projectName: z.ZodString;
172
185
  projectId: z.ZodCUID2;
173
186
  projectImgUrl: z.ZodURL;
174
187
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
175
188
  }, z.core.$strip>>>;
176
- linkUrls: z.ZodOptional<z.ZodArray<z.ZodObject<{
177
- url: z.ZodURL;
178
- isPortfolioUrl: z.ZodBoolean;
179
- }, z.core.$strip>>>;
180
- coverLetter: z.ZodString;
181
- receiveEmailUpdates: z.ZodBoolean;
182
- wagesAmount: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
183
- availability: z.ZodOptional<z.ZodEnum<{
184
- readonly IMMEDIATE: "Immediate (Within 1 week)";
185
- readonly TWO_WEEKS_NOTICE: "2 weeks notice";
186
- readonly ONE_MONTH_NOTICE: "1 month notice";
187
- readonly FLEXIBLE: "Flexible";
188
- }>>;
189
189
  }, z.core.$strip>;
190
190
  export declare const UpdateJobApplicationStatusSchema: z.ZodObject<{
191
191
  applicationStatus: z.ZodEnum<{
@@ -16,32 +16,38 @@ exports.BaseJobApplicationEntitySchema = zod_openapi_1.z.object({
16
16
  id: zod_openapi_1.z.string(),
17
17
  createdAt: zod_openapi_1.z.coerce.date(),
18
18
  updatedAt: zod_openapi_1.z.coerce.date(),
19
- availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES),
20
- experienceLevel: zod_openapi_1.z.enum(constants_1.EXPERIENCE_LEVELS),
19
+ availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES).optional(),
20
+ experienceLevel: zod_openapi_1.z.enum(constants_1.EXPERIENCE_LEVELS).optional(),
21
21
  jobId: zod_openapi_1.z.string(),
22
22
  applicantId: zod_openapi_1.z.string(),
23
- firstName: zod_openapi_1.z.string(),
24
- lastName: zod_openapi_1.z.string(),
25
- emailAddress: zod_openapi_1.z.string(),
23
+ firstName: zod_openapi_1.z.string().optional(),
24
+ lastName: zod_openapi_1.z.string().optional(),
25
+ emailAddress: zod_openapi_1.z.string().optional(),
26
26
  phoneNumber: zod_openapi_1.z.string().nullable(),
27
27
  currentRole: zod_openapi_1.z.string(),
28
28
  resumeUrl: zod_openapi_1.z.url(),
29
- workSampleUrls: zod_openapi_1.z.array(zod_openapi_1.z.object({
29
+ workSampleUrls: zod_openapi_1.z
30
+ .array(zod_openapi_1.z.object({
30
31
  url: zod_openapi_1.z.url(),
31
32
  name: zod_openapi_1.z.string().optional(),
32
33
  mimeType: zod_openapi_1.z.string().optional(),
33
- })),
34
- zyaProjects: zod_openapi_1.z.array(zod_openapi_1.z.object({
34
+ }))
35
+ .optional(),
36
+ zyaProjects: zod_openapi_1.z
37
+ .array(zod_openapi_1.z.object({
35
38
  projectName: zod_openapi_1.z.string(),
36
- projectImgUrl: zod_openapi_1.z.url(),
39
+ projectImgUrl: zod_openapi_1.z.url().optional(),
37
40
  projectId: zod_openapi_1.z.string(),
38
- tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
39
- })),
41
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
42
+ }))
43
+ .optional(),
40
44
  applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
41
- linkUrls: zod_openapi_1.z.array(zod_openapi_1.z.object({
45
+ linkUrls: zod_openapi_1.z
46
+ .array(zod_openapi_1.z.object({
42
47
  url: zod_openapi_1.z.url(),
43
48
  isPortfolioUrl: zod_openapi_1.z.boolean().optional(),
44
- })),
49
+ }))
50
+ .optional(),
45
51
  coverLetter: zod_openapi_1.z.string().nullable(),
46
52
  receiveEmailUpdates: zod_openapi_1.z.boolean(),
47
53
  wagesAmount: zod_openapi_1.z.number().nullable(),
@@ -87,16 +93,22 @@ exports.JobApplicationEntitySchema = zod_openapi_1.z.object({
87
93
  updatedAt: zod_openapi_1.z.coerce.date().openapi({ example: "2025-10-13T09:00:00.000Z" }),
88
94
  });
89
95
  exports.CreateJobApplicationInputSchema = zod_openapi_1.z.object({
90
- firstName: zod_openapi_1.z.string(),
91
- lastName: zod_openapi_1.z.string(),
92
96
  jobId: zod_openapi_1.z.cuid2(),
93
97
  applicantId: zod_openapi_1.z.cuid2(),
94
- emailAddress: zod_openapi_1.z.email(),
95
- phoneNumber: zod_openapi_1.z.string().optional(),
96
- currentRole: zod_openapi_1.z.string(),
97
- experienceLevel: zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
98
98
  jobSections: zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.JOB_SECTIONS)).optional(),
99
- resumeUrl: zod_openapi_1.z.url(),
99
+ firstName: zod_openapi_1.z.string().optional(),
100
+ lastName: zod_openapi_1.z.string().optional(),
101
+ emailAddress: zod_openapi_1.z.email().optional(),
102
+ phoneNumber: zod_openapi_1.z.string().optional(),
103
+ currentRole: zod_openapi_1.z.string().optional(),
104
+ experienceLevel: zod_openapi_1.z
105
+ .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
106
+ .optional(),
107
+ resumeUrl: zod_openapi_1.z.url().optional(),
108
+ coverLetter: zod_openapi_1.z.string().optional(),
109
+ availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES).optional(),
110
+ wagesAmount: zod_openapi_1.z.coerce.number().optional(),
111
+ receiveEmailUpdates: zod_openapi_1.z.boolean().default(false),
100
112
  workSampleUrls: zod_openapi_1.z
101
113
  .array(zod_openapi_1.z.object({
102
114
  url: zod_openapi_1.z.url(),
@@ -104,6 +116,9 @@ exports.CreateJobApplicationInputSchema = zod_openapi_1.z.object({
104
116
  mimeType: zod_openapi_1.z.string().optional(),
105
117
  }))
106
118
  .optional(),
119
+ linkUrls: zod_openapi_1.z
120
+ .array(zod_openapi_1.z.object({ url: zod_openapi_1.z.url(), isPortfolioUrl: zod_openapi_1.z.boolean() }))
121
+ .optional(),
107
122
  zyaProjects: zod_openapi_1.z
108
123
  .array(zod_openapi_1.z.object({
109
124
  projectName: zod_openapi_1.z.string(),
@@ -112,13 +127,6 @@ exports.CreateJobApplicationInputSchema = zod_openapi_1.z.object({
112
127
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
113
128
  }))
114
129
  .optional(),
115
- linkUrls: zod_openapi_1.z
116
- .array(zod_openapi_1.z.object({ url: zod_openapi_1.z.url(), isPortfolioUrl: zod_openapi_1.z.boolean() }))
117
- .optional(),
118
- coverLetter: zod_openapi_1.z.string(),
119
- receiveEmailUpdates: zod_openapi_1.z.boolean(),
120
- wagesAmount: zod_openapi_1.z.coerce.number().optional(),
121
- availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES).optional(),
122
130
  });
123
131
  exports.UpdateJobApplicationStatusSchema = zod_openapi_1.z.object({
124
132
  applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.13",
3
+ "version": "2.1.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,49 +29,54 @@ export const BaseJobApplicationEntitySchema = z.object({
29
29
  id: z.string(),
30
30
  createdAt: z.coerce.date(),
31
31
  updatedAt: z.coerce.date(),
32
- availability: z.enum(JOB_AVAILABILITY_TYPES),
33
- experienceLevel: z.enum(EXPERIENCE_LEVELS),
32
+ availability: z.enum(JOB_AVAILABILITY_TYPES).optional(),
33
+ experienceLevel: z.enum(EXPERIENCE_LEVELS).optional(),
34
34
 
35
35
  jobId: z.string(),
36
36
  applicantId: z.string(),
37
37
 
38
- firstName: z.string(),
39
- lastName: z.string(),
40
- emailAddress: z.string(),
38
+ firstName: z.string().optional(),
39
+ lastName: z.string().optional(),
40
+ emailAddress: z.string().optional(),
41
41
  phoneNumber: z.string().nullable(),
42
42
 
43
43
  currentRole: z.string(),
44
44
  resumeUrl: z.url(),
45
45
 
46
- workSampleUrls: z.array(
47
- z.object({
48
- url: z.url(),
49
- name: z.string().optional(),
50
- mimeType: z.string().optional(),
51
- })
52
- ),
46
+ workSampleUrls: z
47
+ .array(
48
+ z.object({
49
+ url: z.url(),
50
+ name: z.string().optional(),
51
+ mimeType: z.string().optional(),
52
+ })
53
+ )
54
+ .optional(),
53
55
 
54
- zyaProjects: z.array(
55
- z.object({
56
- projectName: z.string(),
57
- projectImgUrl: z.url(),
58
- projectId: z.string(),
59
- tags: z.array(z.string()),
60
- })
61
- ),
56
+ zyaProjects: z
57
+ .array(
58
+ z.object({
59
+ projectName: z.string(),
60
+ projectImgUrl: z.url().optional(),
61
+ projectId: z.string(),
62
+ tags: z.array(z.string()).optional(),
63
+ })
64
+ )
65
+ .optional(),
62
66
 
63
67
  applicationStatus: z.enum(APPLICATION_STATUS),
64
68
 
65
- linkUrls: z.array(
66
- z.object({
67
- url: z.url(),
68
- isPortfolioUrl: z.boolean().optional(),
69
- })
70
- ),
69
+ linkUrls: z
70
+ .array(
71
+ z.object({
72
+ url: z.url(),
73
+ isPortfolioUrl: z.boolean().optional(),
74
+ })
75
+ )
76
+ .optional(),
71
77
 
72
78
  coverLetter: z.string().nullable(),
73
79
  receiveEmailUpdates: z.boolean(),
74
-
75
80
  wagesAmount: z.number().nullable(),
76
81
  });
77
82
 
@@ -135,19 +140,30 @@ export const JobApplicationEntitySchema = z.object({
135
140
  });
136
141
 
137
142
  export const CreateJobApplicationInputSchema = z.object({
138
- firstName: z.string(),
139
- lastName: z.string(),
140
143
  jobId: z.cuid2(),
141
144
  applicantId: z.cuid2(),
142
- emailAddress: z.email(),
143
- phoneNumber: z.string().optional(),
144
- currentRole: z.string(),
145
- experienceLevel: z.enum(
146
- Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
147
- ),
148
145
  jobSections: z.array(z.enum(JOB_SECTIONS)).optional(),
146
+ firstName: z.string().optional(),
147
+ lastName: z.string().optional(),
148
+ emailAddress: z.email().optional(),
149
+ phoneNumber: z.string().optional(),
150
+ currentRole: z.string().optional(),
151
+ experienceLevel: z
152
+ .enum(
153
+ Object.values(EXPERIENCE_LEVELS) as [
154
+ ExperienceLevel,
155
+ ...ExperienceLevel[]
156
+ ]
157
+ )
158
+ .optional(),
159
+
160
+ resumeUrl: z.url().optional(),
161
+ coverLetter: z.string().optional(),
162
+
163
+ availability: z.enum(JOB_AVAILABILITY_TYPES).optional(),
164
+ wagesAmount: z.coerce.number().optional(),
165
+ receiveEmailUpdates: z.boolean().default(false),
149
166
 
150
- resumeUrl: z.url(),
151
167
  workSampleUrls: z
152
168
  .array(
153
169
  z.object({
@@ -157,6 +173,9 @@ export const CreateJobApplicationInputSchema = z.object({
157
173
  })
158
174
  )
159
175
  .optional(),
176
+ linkUrls: z
177
+ .array(z.object({ url: z.url(), isPortfolioUrl: z.boolean() }))
178
+ .optional(),
160
179
  zyaProjects: z
161
180
  .array(
162
181
  z.object({
@@ -167,13 +186,6 @@ export const CreateJobApplicationInputSchema = z.object({
167
186
  })
168
187
  )
169
188
  .optional(),
170
- linkUrls: z
171
- .array(z.object({ url: z.url(), isPortfolioUrl: z.boolean() }))
172
- .optional(),
173
- coverLetter: z.string(),
174
- receiveEmailUpdates: z.boolean(),
175
- wagesAmount: z.coerce.number().optional(),
176
- availability: z.enum(JOB_AVAILABILITY_TYPES).optional(),
177
189
  });
178
190
 
179
191
  export const UpdateJobApplicationStatusSchema = z.object({