@zyacreatives/shared 2.0.94 → 2.0.95
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.
|
@@ -1,4 +1,79 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
+
export declare const MinimalJobApplicationEntitySchema: z.ZodObject<{
|
|
3
|
+
user: z.ZodObject<{
|
|
4
|
+
id: z.ZodCUID2;
|
|
5
|
+
username: z.ZodOptional<z.ZodString>;
|
|
6
|
+
email: z.ZodString;
|
|
7
|
+
name: z.ZodOptional<z.ZodString>;
|
|
8
|
+
image: z.ZodOptional<z.ZodString>;
|
|
9
|
+
role: z.ZodEnum<{
|
|
10
|
+
CREATIVE: "CREATIVE";
|
|
11
|
+
BRAND: "BRAND";
|
|
12
|
+
INVESTOR: "INVESTOR";
|
|
13
|
+
ADMIN: "ADMIN";
|
|
14
|
+
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
jobId: z.ZodCUID2;
|
|
17
|
+
coverLetter: z.ZodString;
|
|
18
|
+
applicationStatus: z.ZodEnum<{
|
|
19
|
+
"Application Sent": "Application Sent";
|
|
20
|
+
Opened: "Opened";
|
|
21
|
+
Rejected: "Rejected";
|
|
22
|
+
Offered: "Offered";
|
|
23
|
+
Hired: "Hired";
|
|
24
|
+
}>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export declare const BaseJobApplicationEntitySchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
29
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
30
|
+
availability: z.ZodEnum<{
|
|
31
|
+
readonly FULL_TIME: "Full Time";
|
|
32
|
+
readonly PART_TIME: "Part Time";
|
|
33
|
+
readonly CONTRACT: "Contract";
|
|
34
|
+
readonly FREELANCE: "Freelance";
|
|
35
|
+
readonly INTERNSHIP: "Internship";
|
|
36
|
+
}>;
|
|
37
|
+
experienceLevel: z.ZodEnum<{
|
|
38
|
+
readonly YEAR_0_1: "0-1 year";
|
|
39
|
+
readonly YEAR_1_3: "1-3 years";
|
|
40
|
+
readonly YEAR_3_5: "3-5 years";
|
|
41
|
+
readonly YEAR_5_PLUS: "5+ years";
|
|
42
|
+
}>;
|
|
43
|
+
jobId: z.ZodString;
|
|
44
|
+
applicantId: z.ZodString;
|
|
45
|
+
firstName: z.ZodString;
|
|
46
|
+
lastName: z.ZodString;
|
|
47
|
+
emailAddress: z.ZodString;
|
|
48
|
+
phoneNumber: z.ZodNullable<z.ZodString>;
|
|
49
|
+
currentRole: z.ZodString;
|
|
50
|
+
resumeUrl: z.ZodURL;
|
|
51
|
+
workSampleUrls: z.ZodArray<z.ZodObject<{
|
|
52
|
+
url: z.ZodURL;
|
|
53
|
+
name: z.ZodOptional<z.ZodString>;
|
|
54
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
55
|
+
}, z.core.$strip>>;
|
|
56
|
+
zyaProjects: z.ZodArray<z.ZodObject<{
|
|
57
|
+
projectName: z.ZodString;
|
|
58
|
+
projectImgUrl: z.ZodURL;
|
|
59
|
+
projectId: z.ZodString;
|
|
60
|
+
tags: z.ZodArray<z.ZodString>;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
applicationStatus: z.ZodEnum<{
|
|
63
|
+
readonly SENT: "Application Sent";
|
|
64
|
+
readonly OPENED: "Opened";
|
|
65
|
+
readonly REJECTED: "Rejected";
|
|
66
|
+
readonly OFFERED: "Offered";
|
|
67
|
+
readonly HIRED: "Hired";
|
|
68
|
+
}>;
|
|
69
|
+
linkUrls: z.ZodArray<z.ZodObject<{
|
|
70
|
+
url: z.ZodURL;
|
|
71
|
+
isPortfolioUrl: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
coverLetter: z.ZodNullable<z.ZodString>;
|
|
74
|
+
receiveEmailUpdates: z.ZodBoolean;
|
|
75
|
+
wagesAmount: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
}, z.core.$strip>;
|
|
2
77
|
export declare const JobApplicationEntitySchema: z.ZodObject<{
|
|
3
78
|
firstName: z.ZodString;
|
|
4
79
|
lastName: z.ZodString;
|
|
@@ -1,9 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateJobApplicationStatusSchema = exports.CreateJobApplicationInputSchema = exports.JobApplicationEntitySchema = void 0;
|
|
3
|
+
exports.UpdateJobApplicationStatusSchema = 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
|
+
exports.MinimalJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
8
|
+
user: user_1.MinimalUserSchema,
|
|
9
|
+
jobId: zod_openapi_1.z.cuid2(),
|
|
10
|
+
coverLetter: zod_openapi_1.z.string(),
|
|
11
|
+
applicationStatus: zod_openapi_1.z.enum(Object.values(constants_1.APPLICATION_STATUS)),
|
|
12
|
+
});
|
|
13
|
+
exports.BaseJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
14
|
+
id: zod_openapi_1.z.string(),
|
|
15
|
+
createdAt: zod_openapi_1.z.coerce.date(),
|
|
16
|
+
updatedAt: zod_openapi_1.z.coerce.date(),
|
|
17
|
+
availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES),
|
|
18
|
+
experienceLevel: zod_openapi_1.z.enum(constants_1.EXPERIENCE_LEVELS),
|
|
19
|
+
jobId: zod_openapi_1.z.string(),
|
|
20
|
+
applicantId: zod_openapi_1.z.string(),
|
|
21
|
+
firstName: zod_openapi_1.z.string(),
|
|
22
|
+
lastName: zod_openapi_1.z.string(),
|
|
23
|
+
emailAddress: zod_openapi_1.z.string(),
|
|
24
|
+
phoneNumber: zod_openapi_1.z.string().nullable(),
|
|
25
|
+
currentRole: zod_openapi_1.z.string(),
|
|
26
|
+
resumeUrl: zod_openapi_1.z.url(),
|
|
27
|
+
workSampleUrls: zod_openapi_1.z.array(zod_openapi_1.z.object({
|
|
28
|
+
url: zod_openapi_1.z.url(),
|
|
29
|
+
name: zod_openapi_1.z.string().optional(),
|
|
30
|
+
mimeType: zod_openapi_1.z.string().optional(),
|
|
31
|
+
})),
|
|
32
|
+
zyaProjects: zod_openapi_1.z.array(zod_openapi_1.z.object({
|
|
33
|
+
projectName: zod_openapi_1.z.string(),
|
|
34
|
+
projectImgUrl: zod_openapi_1.z.url(),
|
|
35
|
+
projectId: zod_openapi_1.z.string(),
|
|
36
|
+
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
|
|
37
|
+
})),
|
|
38
|
+
applicationStatus: zod_openapi_1.z.enum(constants_1.APPLICATION_STATUS),
|
|
39
|
+
linkUrls: zod_openapi_1.z.array(zod_openapi_1.z.object({
|
|
40
|
+
url: zod_openapi_1.z.url(),
|
|
41
|
+
isPortfolioUrl: zod_openapi_1.z.boolean().optional(),
|
|
42
|
+
})),
|
|
43
|
+
coverLetter: zod_openapi_1.z.string().nullable(),
|
|
44
|
+
receiveEmailUpdates: zod_openapi_1.z.boolean(),
|
|
45
|
+
wagesAmount: zod_openapi_1.z.number().nullable(),
|
|
46
|
+
});
|
|
7
47
|
exports.JobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
8
48
|
firstName: zod_openapi_1.z.string(),
|
|
9
49
|
lastName: zod_openapi_1.z.string(),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import z from "zod";
|
|
2
|
-
import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema } from "../schemas/job-application";
|
|
2
|
+
import { JobApplicationEntitySchema, CreateJobApplicationInputSchema, UpdateJobApplicationStatusSchema, MinimalJobApplicationEntitySchema, BaseJobApplicationEntitySchema } 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
|
+
export type MinimalJobApplicationEntity = z.infer<typeof MinimalJobApplicationEntitySchema>;
|
|
7
|
+
export type BaseJobApplicationEntity = z.infer<typeof BaseJobApplicationEntitySchema>;
|
package/package.json
CHANGED
|
@@ -9,6 +9,68 @@ import {
|
|
|
9
9
|
} from "../constants";
|
|
10
10
|
import { MinimalUserSchema } from "./user";
|
|
11
11
|
|
|
12
|
+
export const MinimalJobApplicationEntitySchema = z.object({
|
|
13
|
+
user: MinimalUserSchema,
|
|
14
|
+
jobId: z.cuid2(),
|
|
15
|
+
coverLetter: z.string(),
|
|
16
|
+
applicationStatus: z.enum(
|
|
17
|
+
Object.values(APPLICATION_STATUS) as [
|
|
18
|
+
ApplicationStatus,
|
|
19
|
+
...ApplicationStatus[]
|
|
20
|
+
]
|
|
21
|
+
),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export const BaseJobApplicationEntitySchema = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
createdAt: z.coerce.date(),
|
|
27
|
+
updatedAt: z.coerce.date(),
|
|
28
|
+
availability: z.enum(JOB_AVAILABILITY_TYPES),
|
|
29
|
+
experienceLevel: z.enum(EXPERIENCE_LEVELS),
|
|
30
|
+
|
|
31
|
+
jobId: z.string(),
|
|
32
|
+
applicantId: z.string(),
|
|
33
|
+
|
|
34
|
+
firstName: z.string(),
|
|
35
|
+
lastName: z.string(),
|
|
36
|
+
emailAddress: z.string(),
|
|
37
|
+
phoneNumber: z.string().nullable(),
|
|
38
|
+
|
|
39
|
+
currentRole: z.string(),
|
|
40
|
+
resumeUrl: z.url(),
|
|
41
|
+
|
|
42
|
+
workSampleUrls: z.array(
|
|
43
|
+
z.object({
|
|
44
|
+
url: z.url(),
|
|
45
|
+
name: z.string().optional(),
|
|
46
|
+
mimeType: z.string().optional(),
|
|
47
|
+
})
|
|
48
|
+
),
|
|
49
|
+
|
|
50
|
+
zyaProjects: z.array(
|
|
51
|
+
z.object({
|
|
52
|
+
projectName: z.string(),
|
|
53
|
+
projectImgUrl: z.url(),
|
|
54
|
+
projectId: z.string(),
|
|
55
|
+
tags: z.array(z.string()),
|
|
56
|
+
})
|
|
57
|
+
),
|
|
58
|
+
|
|
59
|
+
applicationStatus: z.enum(APPLICATION_STATUS),
|
|
60
|
+
|
|
61
|
+
linkUrls: z.array(
|
|
62
|
+
z.object({
|
|
63
|
+
url: z.url(),
|
|
64
|
+
isPortfolioUrl: z.boolean().optional(),
|
|
65
|
+
})
|
|
66
|
+
),
|
|
67
|
+
|
|
68
|
+
coverLetter: z.string().nullable(),
|
|
69
|
+
receiveEmailUpdates: z.boolean(),
|
|
70
|
+
|
|
71
|
+
wagesAmount: z.number().nullable(),
|
|
72
|
+
});
|
|
73
|
+
|
|
12
74
|
export const JobApplicationEntitySchema = z.object({
|
|
13
75
|
firstName: z.string(),
|
|
14
76
|
lastName: z.string(),
|
|
@@ -3,6 +3,8 @@ import {
|
|
|
3
3
|
JobApplicationEntitySchema,
|
|
4
4
|
CreateJobApplicationInputSchema,
|
|
5
5
|
UpdateJobApplicationStatusSchema,
|
|
6
|
+
MinimalJobApplicationEntitySchema,
|
|
7
|
+
BaseJobApplicationEntitySchema,
|
|
6
8
|
} from "../schemas/job-application";
|
|
7
9
|
|
|
8
10
|
export type CreateJobApplicationInput = z.infer<
|
|
@@ -14,3 +16,11 @@ export type UpdateJobApplicationStatusInput = z.infer<
|
|
|
14
16
|
>;
|
|
15
17
|
|
|
16
18
|
export type JobApplicationEntity = z.infer<typeof JobApplicationEntitySchema>;
|
|
19
|
+
|
|
20
|
+
export type MinimalJobApplicationEntity = z.infer<
|
|
21
|
+
typeof MinimalJobApplicationEntitySchema
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export type BaseJobApplicationEntity = z.infer<
|
|
25
|
+
typeof BaseJobApplicationEntitySchema
|
|
26
|
+
>;
|