@zyacreatives/shared 1.9.0 → 1.9.2

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.
@@ -9,3 +9,4 @@ export * from "./file";
9
9
  export * from "./username";
10
10
  export * from "./post";
11
11
  export * from "./entity-stats";
12
+ export * from "./job-application";
@@ -25,3 +25,4 @@ __exportStar(require("./file"), exports);
25
25
  __exportStar(require("./username"), exports);
26
26
  __exportStar(require("./post"), exports);
27
27
  __exportStar(require("./entity-stats"), exports);
28
+ __exportStar(require("./job-application"), exports);
@@ -0,0 +1,20 @@
1
+ import z from "zod";
2
+ export declare const CreateJobApplicationInputSchema: z.ZodObject<{
3
+ firstName: z.ZodString;
4
+ lastName: z.ZodString;
5
+ emailAddress: z.ZodEmail;
6
+ phoneNumber: z.ZodOptional<z.ZodString>;
7
+ currentRole: z.ZodString;
8
+ experienceLevel: z.ZodEnum<{
9
+ "0-1 year": "0-1 year";
10
+ "1-3 years": "1-3 years";
11
+ "3-5 years": "3-5 years";
12
+ "5+ years": "5+ years";
13
+ }>;
14
+ resumeUrl: z.ZodURL;
15
+ workSampleUrls: z.ZodOptional<z.ZodArray<z.ZodURL>>;
16
+ portfolioUrl: z.ZodOptional<z.ZodURL>;
17
+ coverLetterUrl: z.ZodOptional<z.ZodURL>;
18
+ receiveEmailUpdates: z.ZodBoolean;
19
+ wagesAmount: z.ZodBoolean;
20
+ }, z.core.$strip>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.CreateJobApplicationInputSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ const constants_1 = require("../constants");
9
+ exports.CreateJobApplicationInputSchema = zod_1.default.object({
10
+ firstName: zod_1.default.string(),
11
+ lastName: zod_1.default.string(),
12
+ emailAddress: zod_1.default.email(),
13
+ phoneNumber: zod_1.default.string().optional(),
14
+ currentRole: zod_1.default.string(),
15
+ experienceLevel: zod_1.default.enum(Object.values(constants_1.EXPERIENCE_LEVELS)),
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(),
20
+ receiveEmailUpdates: zod_1.default.boolean(),
21
+ wagesAmount: zod_1.default.boolean(),
22
+ });
@@ -9,7 +9,7 @@ export declare const PostEntitySchema: z.ZodObject<{
9
9
  creatorFullName: z.ZodOptional<z.ZodString>;
10
10
  creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
11
11
  content: z.ZodString;
12
- title: z.ZodNullable<z.ZodString>;
12
+ title: z.ZodOptional<z.ZodString>;
13
13
  postType: z.ZodEnum<{
14
14
  readonly MARKETPLACE: "MARKETPLACE";
15
15
  readonly PROJECT: "PROJECT";
@@ -42,7 +42,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
42
42
  creatorFullName: z.ZodOptional<z.ZodString>;
43
43
  creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
44
44
  content: z.ZodString;
45
- title: z.ZodNullable<z.ZodString>;
45
+ title: z.ZodOptional<z.ZodString>;
46
46
  postType: z.ZodEnum<{
47
47
  readonly MARKETPLACE: "MARKETPLACE";
48
48
  readonly PROJECT: "PROJECT";
@@ -96,7 +96,7 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
96
96
  creatorFullName: z.ZodOptional<z.ZodString>;
97
97
  creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
98
98
  content: z.ZodString;
99
- title: z.ZodNullable<z.ZodString>;
99
+ title: z.ZodOptional<z.ZodString>;
100
100
  postType: z.ZodEnum<{
101
101
  readonly MARKETPLACE: "MARKETPLACE";
102
102
  readonly PROJECT: "PROJECT";
@@ -123,7 +123,7 @@ export declare const GetPostOutputSchema: z.ZodObject<{
123
123
  creatorFullName: z.ZodOptional<z.ZodString>;
124
124
  creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
125
125
  content: z.ZodString;
126
- title: z.ZodNullable<z.ZodString>;
126
+ title: z.ZodOptional<z.ZodString>;
127
127
  postType: z.ZodEnum<{
128
128
  readonly MARKETPLACE: "MARKETPLACE";
129
129
  readonly PROJECT: "PROJECT";
@@ -152,13 +152,13 @@ export declare const PostIdSchema: z.ZodObject<{
152
152
  }, z.core.$strip>;
153
153
  export declare const MinimalPostSchema: z.ZodObject<{
154
154
  id: z.ZodCUID2;
155
- title: z.ZodNullable<z.ZodString>;
155
+ title: z.ZodOptional<z.ZodString>;
156
156
  parentId: z.ZodOptional<z.ZodCUID2>;
157
157
  content: z.ZodString;
158
158
  }, z.core.$strip>;
159
159
  export declare const PostWithLikesEntitySchema: z.ZodObject<{
160
160
  id: z.ZodCUID2;
161
- title: z.ZodNullable<z.ZodString>;
161
+ title: z.ZodOptional<z.ZodString>;
162
162
  parentId: z.ZodOptional<z.ZodCUID2>;
163
163
  content: z.ZodString;
164
164
  likes: z.ZodArray<z.ZodObject<{
@@ -174,7 +174,7 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
174
174
  }, z.core.$strip>;
175
175
  export declare const PostWithCommentsEntitySchema: z.ZodObject<{
176
176
  id: z.ZodCUID2;
177
- title: z.ZodNullable<z.ZodString>;
177
+ title: z.ZodOptional<z.ZodString>;
178
178
  parentId: z.ZodOptional<z.ZodCUID2>;
179
179
  content: z.ZodString;
180
180
  comments: z.ZodArray<z.ZodObject<{
@@ -196,7 +196,7 @@ export declare const PostWithCommentsEntitySchema: z.ZodObject<{
196
196
  }, z.core.$strip>;
197
197
  export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
198
198
  id: z.ZodCUID2;
199
- title: z.ZodNullable<z.ZodString>;
199
+ title: z.ZodOptional<z.ZodString>;
200
200
  parentId: z.ZodOptional<z.ZodCUID2>;
201
201
  content: z.ZodString;
202
202
  bookmarks: z.ZodArray<z.ZodObject<{
@@ -28,7 +28,7 @@ exports.PostEntitySchema = zod_openapi_1.z.object({
28
28
  .openapi({ description: "Post content", example: "Hello world" }),
29
29
  title: zod_openapi_1.z
30
30
  .string()
31
- .nullable()
31
+ .optional()
32
32
  .openapi({ description: "Optional title", example: "My first post" }),
33
33
  postType: zod_openapi_1.z.enum(constants_1.POST_TYPES).openapi({
34
34
  description: "Type of the post entity this statistic belongs to.",
@@ -9,3 +9,4 @@ export * from "./user";
9
9
  export * from "./username";
10
10
  export * from "./entity-stats";
11
11
  export * from "./post";
12
+ export * from "./job-application";
@@ -25,3 +25,4 @@ __exportStar(require("./user"), exports);
25
25
  __exportStar(require("./username"), exports);
26
26
  __exportStar(require("./entity-stats"), exports);
27
27
  __exportStar(require("./post"), exports);
28
+ __exportStar(require("./job-application"), exports);
@@ -0,0 +1,3 @@
1
+ import z from "zod";
2
+ import { CreateJobApplicationInputSchema } from "../schemas/job-application";
3
+ export type CreateJobApplicationInput = z.infer<typeof CreateJobApplicationInputSchema>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.9.0",
3
+ "version": "1.9.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -8,4 +8,5 @@ export * from "./discipline";
8
8
  export * from "./file";
9
9
  export * from "./username";
10
10
  export * from "./post";
11
- export * from "./entity-stats";
11
+ export * from "./entity-stats";
12
+ export * from "./job-application";
@@ -0,0 +1,19 @@
1
+ import z from "zod";
2
+ import { EXPERIENCE_LEVELS, ExperienceLevel } from "../constants";
3
+
4
+ export const CreateJobApplicationInputSchema = z.object({
5
+ firstName: z.string(),
6
+ lastName: z.string(),
7
+ emailAddress: z.email(),
8
+ phoneNumber: z.string().optional(),
9
+ currentRole: z.string(),
10
+ experienceLevel: z.enum(
11
+ Object.values(EXPERIENCE_LEVELS) as [ExperienceLevel, ...ExperienceLevel[]]
12
+ ),
13
+ resumeUrl: z.url(),
14
+ workSampleUrls: z.array(z.url()).optional(),
15
+ portfolioUrl: z.url().optional(),
16
+ coverLetterUrl: z.url().optional(),
17
+ receiveEmailUpdates: z.boolean(),
18
+ wagesAmount: z.boolean(),
19
+ });
@@ -32,7 +32,7 @@ export const PostEntitySchema = z.object({
32
32
 
33
33
  title: z
34
34
  .string()
35
- .nullable()
35
+ .optional()
36
36
  .openapi({ description: "Optional title", example: "My first post" }),
37
37
 
38
38
  postType: z.enum(POST_TYPES).openapi({
@@ -9,3 +9,4 @@ export * from "./user";
9
9
  export * from "./username";
10
10
  export * from "./entity-stats";
11
11
  export * from "./post";
12
+ export * from "./job-application"
@@ -0,0 +1,6 @@
1
+ import z from "zod";
2
+ import { CreateJobApplicationInputSchema } from "../schemas/job-application";
3
+
4
+ export type CreateJobApplicationInput = z.infer<
5
+ typeof CreateJobApplicationInputSchema
6
+ >;