@zyacreatives/shared 2.5.52 → 2.5.55
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.
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/schemas/activity.d.ts +1 -0
- package/dist/schemas/auth.d.ts +2 -0
- package/dist/schemas/bookmark.d.ts +62 -7
- package/dist/schemas/bookmark.js +32 -30
- package/dist/schemas/brand.d.ts +3 -3
- package/dist/schemas/chat.d.ts +96 -52
- package/dist/schemas/chat.js +44 -18
- package/dist/schemas/comment.d.ts +65 -21
- package/dist/schemas/comment.js +48 -54
- package/dist/schemas/common.d.ts +15 -11
- package/dist/schemas/creative.d.ts +21 -21
- package/dist/schemas/creative.js +3 -3
- package/dist/schemas/discipline.d.ts +63 -12
- package/dist/schemas/discipline.js +62 -65
- package/dist/schemas/entity-stats.d.ts +35 -3
- package/dist/schemas/entity-stats.js +24 -38
- package/dist/schemas/feed.d.ts +50 -3
- package/dist/schemas/feed.js +43 -13
- package/dist/schemas/file.d.ts +65 -24
- package/dist/schemas/file.js +60 -49
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/investor-shortlist.d.ts +68 -11
- package/dist/schemas/investor-shortlist.js +46 -24
- package/dist/schemas/investor-signal.d.ts +52 -12
- package/dist/schemas/investor-signal.js +59 -39
- package/dist/schemas/investor.d.ts +3 -3
- package/dist/schemas/job-application.d.ts +291 -279
- package/dist/schemas/job-application.js +59 -95
- package/dist/schemas/job.d.ts +200 -659
- package/dist/schemas/job.js +98 -231
- package/dist/schemas/like.d.ts +3 -0
- package/dist/schemas/message.d.ts +125 -94
- package/dist/schemas/message.js +54 -55
- package/dist/schemas/notification.d.ts +99 -32
- package/dist/schemas/notification.js +46 -42
- package/dist/schemas/payout-method.d.ts +51 -31
- package/dist/schemas/payout-method.js +48 -58
- package/dist/schemas/post.d.ts +295 -204
- package/dist/schemas/post.js +148 -272
- package/dist/schemas/product.d.ts +308 -229
- package/dist/schemas/product.js +111 -94
- package/dist/schemas/project.d.ts +75 -107
- package/dist/schemas/project.js +1 -5
- package/dist/schemas/seller.d.ts +10 -10
- package/dist/schemas/user-strike.d.ts +3 -0
- package/dist/schemas/user.d.ts +128 -126
- package/dist/schemas/user.js +10 -1
- package/dist/schemas/username.d.ts +1 -0
- package/dist/schemas/view.d.ts +1 -0
- package/dist/types/activity.d.ts +1 -3
- package/dist/types/auth.d.ts +1 -4
- package/dist/types/bookmark.d.ts +1 -3
- package/dist/types/chat.d.ts +1 -11
- package/dist/types/comment.d.ts +1 -5
- package/dist/types/common.d.ts +2 -8
- package/dist/types/discipline.d.ts +1 -11
- package/dist/types/entity-stats.d.ts +1 -3
- package/dist/types/feed.d.ts +1 -5
- package/dist/types/investor-shortlist.d.ts +1 -6
- package/dist/types/investor-signal.d.ts +1 -7
- package/dist/types/like.d.ts +1 -3
- package/dist/types/message.d.ts +1 -9
- package/dist/types/notification.d.ts +1 -9
- package/dist/types/user-strike.d.ts +1 -5
- package/dist/types/username.d.ts +1 -3
- package/package.json +1 -1
- package/src/index.ts +4 -5
- package/src/schemas/activity.ts +5 -4
- package/src/schemas/auth.ts +14 -10
- package/src/schemas/bookmark.ts +48 -29
- package/src/schemas/chat.ts +79 -18
- package/src/schemas/comment.ts +63 -49
- package/src/schemas/common.ts +8 -3
- package/src/schemas/creative.ts +3 -3
- package/src/schemas/discipline.ts +103 -71
- package/src/schemas/entity-stats.ts +32 -38
- package/src/schemas/feed.ts +62 -15
- package/src/schemas/file.ts +85 -58
- package/src/schemas/index.ts +1 -0
- package/src/schemas/investor-shortlist.ts +57 -8
- package/src/schemas/investor-signal.ts +79 -27
- package/src/schemas/job-application.ts +81 -115
- package/src/schemas/job.ts +160 -301
- package/src/schemas/like.ts +5 -1
- package/src/schemas/message.ts +71 -64
- package/src/schemas/notification.ts +63 -51
- package/src/schemas/payout-method.ts +47 -63
- package/src/schemas/post.ts +211 -272
- package/src/schemas/product.ts +202 -139
- package/src/schemas/project.ts +7 -10
- package/src/schemas/user-strike.ts +7 -1
- package/src/schemas/user.ts +17 -5
- package/src/schemas/username.ts +5 -3
- package/src/schemas/view.ts +0 -50
- package/src/types/activity.ts +0 -4
- package/src/types/auth.ts +0 -5
- package/src/types/bookmark.ts +0 -4
- package/src/types/chat.ts +0 -31
- package/src/types/comment.ts +0 -12
- package/src/types/common.ts +0 -14
- package/src/types/discipline.ts +0 -32
- package/src/types/entity-stats.ts +0 -4
- package/src/types/feed.ts +0 -10
- package/src/types/index.ts +0 -16
- package/src/types/investor-shortlist.ts +0 -18
- package/src/types/investor-signal.ts +0 -26
- package/src/types/like.ts +0 -4
- package/src/types/message.ts +0 -26
- package/src/types/notification.ts +0 -34
- package/src/types/user-strike.ts +0 -10
- package/src/types/username.ts +0 -4
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetTrackedJobApplicationsOutputSchema = exports.GetTrackedJobApplicationsInputSchema = exports.UpdateJobApplicationInputSchema = exports.
|
|
3
|
+
exports.GetTrackedJobApplicationsOutputSchema = exports.GetTrackedJobApplicationsInputSchema = exports.UpdateJobApplicationInputSchema = exports.CreateJobApplicationInputSchema = exports.TrackedJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = exports.JobApplicationEntitySchema = 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
7
|
const job_1 = require("./job");
|
|
8
|
+
/**
|
|
9
|
+
* --------------------------------
|
|
10
|
+
* ENUMS
|
|
11
|
+
* --------------------------------
|
|
12
|
+
*/
|
|
8
13
|
const ApplicationStatusSchema = zod_openapi_1.z.enum(Object.values(constants_1.APPLICATION_STATUS));
|
|
9
14
|
const ExperienceLevelSchema = zod_openapi_1.z.enum(Object.values(constants_1.EXPERIENCE_LEVELS));
|
|
10
15
|
const JobAvailabilitySchema = zod_openapi_1.z.enum(Object.values(constants_1.JOB_AVAILABILITY_TYPES));
|
|
11
|
-
|
|
12
|
-
|
|
16
|
+
/**
|
|
17
|
+
* --------------------------------
|
|
18
|
+
* SHAPE
|
|
19
|
+
* --------------------------------
|
|
20
|
+
*/
|
|
21
|
+
const JobApplicationShape = zod_openapi_1.z.object({
|
|
13
22
|
jobId: zod_openapi_1.z.cuid2(),
|
|
14
|
-
id: zod_openapi_1.z.cuid2(),
|
|
15
|
-
coverLetter: zod_openapi_1.z.string(),
|
|
16
|
-
createdAt: zod_openapi_1.z.coerce.date(),
|
|
17
|
-
applicationStatus: ApplicationStatusSchema,
|
|
18
|
-
});
|
|
19
|
-
exports.BaseJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
20
|
-
id: zod_openapi_1.z.string(),
|
|
21
|
-
createdAt: zod_openapi_1.z.coerce.date(),
|
|
22
|
-
updatedAt: zod_openapi_1.z.coerce.date(),
|
|
23
|
-
availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES).optional(),
|
|
24
|
-
experienceLevel: zod_openapi_1.z.enum(constants_1.EXPERIENCE_LEVELS).optional(),
|
|
25
|
-
jobId: zod_openapi_1.z.string(),
|
|
26
|
-
applicantId: zod_openapi_1.z.string(),
|
|
27
23
|
firstName: zod_openapi_1.z.string().optional(),
|
|
28
24
|
lastName: zod_openapi_1.z.string().optional(),
|
|
29
|
-
emailAddress: zod_openapi_1.z.
|
|
25
|
+
emailAddress: zod_openapi_1.z.email().optional(),
|
|
30
26
|
phoneNumber: zod_openapi_1.z.string().nullable(),
|
|
31
27
|
currentRole: zod_openapi_1.z.string(),
|
|
32
28
|
resumeUrl: zod_openapi_1.z.url(),
|
|
29
|
+
experienceLevel: ExperienceLevelSchema.optional(),
|
|
30
|
+
availability: JobAvailabilitySchema.optional(),
|
|
31
|
+
coverLetter: zod_openapi_1.z.string().nullable(),
|
|
32
|
+
receiveEmailUpdates: zod_openapi_1.z.boolean(),
|
|
33
|
+
wagesAmount: zod_openapi_1.z.number().nullable(),
|
|
33
34
|
workSampleUrls: zod_openapi_1.z
|
|
34
35
|
.array(zod_openapi_1.z.object({
|
|
35
36
|
url: zod_openapi_1.z.url(),
|
|
@@ -41,102 +42,60 @@ exports.BaseJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
|
41
42
|
.array(zod_openapi_1.z.object({
|
|
42
43
|
projectName: zod_openapi_1.z.string(),
|
|
43
44
|
projectImgUrl: zod_openapi_1.z.url().optional(),
|
|
44
|
-
projectId: zod_openapi_1.z.
|
|
45
|
+
projectId: zod_openapi_1.z.cuid2(),
|
|
45
46
|
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
46
47
|
}))
|
|
47
48
|
.optional(),
|
|
48
|
-
applicationStatus: ApplicationStatusSchema,
|
|
49
49
|
linkUrls: zod_openapi_1.z
|
|
50
50
|
.array(zod_openapi_1.z.object({
|
|
51
51
|
url: zod_openapi_1.z.url(),
|
|
52
52
|
isPortfolioUrl: zod_openapi_1.z.boolean().optional(),
|
|
53
53
|
}))
|
|
54
54
|
.optional(),
|
|
55
|
-
coverLetter: zod_openapi_1.z.string().nullable(),
|
|
56
|
-
receiveEmailUpdates: zod_openapi_1.z.boolean(),
|
|
57
|
-
wagesAmount: zod_openapi_1.z.number().nullable(),
|
|
58
55
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
currentRole: zod_openapi_1.z.string().optional(),
|
|
68
|
-
experienceLevel: ExperienceLevelSchema.optional(),
|
|
69
|
-
resumeUrl: zod_openapi_1.z.url(),
|
|
70
|
-
workSampleUrls: zod_openapi_1.z
|
|
71
|
-
.array(zod_openapi_1.z.object({
|
|
72
|
-
url: zod_openapi_1.z.url(),
|
|
73
|
-
name: zod_openapi_1.z.string().optional(),
|
|
74
|
-
mimeType: zod_openapi_1.z.string().optional(),
|
|
75
|
-
}))
|
|
76
|
-
.optional(),
|
|
77
|
-
zyaProjects: zod_openapi_1.z
|
|
78
|
-
.array(zod_openapi_1.z.object({
|
|
79
|
-
projectName: zod_openapi_1.z.string(),
|
|
80
|
-
projectImgUrl: zod_openapi_1.z.url(),
|
|
81
|
-
projectId: zod_openapi_1.z.cuid2(),
|
|
82
|
-
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
83
|
-
}))
|
|
84
|
-
.optional(),
|
|
85
|
-
applicationStatus: ApplicationStatusSchema.default("Application Sent"),
|
|
56
|
+
/**
|
|
57
|
+
* --------------------------------
|
|
58
|
+
* BASE ENTITY
|
|
59
|
+
* --------------------------------
|
|
60
|
+
*/
|
|
61
|
+
exports.JobApplicationEntitySchema = zod_openapi_1.z
|
|
62
|
+
.object({
|
|
63
|
+
id: zod_openapi_1.z.cuid2(),
|
|
86
64
|
applicantId: zod_openapi_1.z.cuid2(),
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
65
|
+
user: user_1.MinimalUserSchema,
|
|
66
|
+
...JobApplicationShape.shape,
|
|
67
|
+
applicationStatus: ApplicationStatusSchema,
|
|
68
|
+
createdAt: zod_openapi_1.z.iso.datetime(),
|
|
69
|
+
updatedAt: zod_openapi_1.z.iso.datetime(),
|
|
70
|
+
})
|
|
71
|
+
.openapi("JobApplication");
|
|
72
|
+
/**
|
|
73
|
+
* --------------------------------
|
|
74
|
+
* DERIVED ENTITIES
|
|
75
|
+
* --------------------------------
|
|
76
|
+
*/
|
|
77
|
+
exports.MinimalJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
78
|
+
id: zod_openapi_1.z.cuid2(),
|
|
101
79
|
jobId: zod_openapi_1.z.cuid2(),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
emailAddress: zod_openapi_1.z.email().optional(),
|
|
107
|
-
phoneNumber: zod_openapi_1.z.string().optional(),
|
|
108
|
-
currentRole: zod_openapi_1.z.string().optional(),
|
|
109
|
-
experienceLevel: ExperienceLevelSchema.optional(),
|
|
110
|
-
resumeUrl: zod_openapi_1.z.url().optional(),
|
|
111
|
-
coverLetter: zod_openapi_1.z.string().optional(),
|
|
112
|
-
availability: zod_openapi_1.z.enum(constants_1.JOB_AVAILABILITY_TYPES).optional(),
|
|
113
|
-
wagesAmount: zod_openapi_1.z.coerce.number().optional(),
|
|
114
|
-
receiveEmailUpdates: zod_openapi_1.z.boolean().optional(),
|
|
115
|
-
workSampleUrls: zod_openapi_1.z
|
|
116
|
-
.array(zod_openapi_1.z.object({
|
|
117
|
-
url: zod_openapi_1.z.url(),
|
|
118
|
-
name: zod_openapi_1.z.string().optional(),
|
|
119
|
-
mimeType: zod_openapi_1.z.string().optional(),
|
|
120
|
-
}))
|
|
121
|
-
.optional(),
|
|
122
|
-
linkUrls: zod_openapi_1.z
|
|
123
|
-
.array(zod_openapi_1.z.object({ url: zod_openapi_1.z.url(), isPortfolioUrl: zod_openapi_1.z.boolean() }))
|
|
124
|
-
.optional(),
|
|
125
|
-
zyaProjects: zod_openapi_1.z
|
|
126
|
-
.array(zod_openapi_1.z.object({
|
|
127
|
-
projectName: zod_openapi_1.z.string(),
|
|
128
|
-
projectId: zod_openapi_1.z.cuid2(),
|
|
129
|
-
projectImgUrl: zod_openapi_1.z.url(),
|
|
130
|
-
tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
|
|
131
|
-
}))
|
|
132
|
-
.optional(),
|
|
80
|
+
user: user_1.MinimalUserSchema,
|
|
81
|
+
coverLetter: zod_openapi_1.z.string(),
|
|
82
|
+
applicationStatus: ApplicationStatusSchema,
|
|
83
|
+
createdAt: zod_openapi_1.z.iso.datetime(),
|
|
133
84
|
});
|
|
134
85
|
exports.TrackedJobApplicationEntitySchema = zod_openapi_1.z.object({
|
|
135
86
|
id: zod_openapi_1.z.cuid2(),
|
|
136
|
-
createdAt: zod_openapi_1.z.coerce.date(),
|
|
137
87
|
applicationStatus: ApplicationStatusSchema,
|
|
88
|
+
createdAt: zod_openapi_1.z.iso.datetime(),
|
|
138
89
|
job: job_1.NormalizedJobSchema,
|
|
139
90
|
});
|
|
91
|
+
/**
|
|
92
|
+
* --------------------------------
|
|
93
|
+
* INPUTS
|
|
94
|
+
* --------------------------------
|
|
95
|
+
*/
|
|
96
|
+
exports.CreateJobApplicationInputSchema = JobApplicationShape.extend({
|
|
97
|
+
jobSections: zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.JOB_SECTIONS)).optional(),
|
|
98
|
+
});
|
|
140
99
|
exports.UpdateJobApplicationInputSchema = exports.CreateJobApplicationInputSchema.partial().extend({
|
|
141
100
|
id: zod_openapi_1.z.cuid2(),
|
|
142
101
|
applicationStatus: ApplicationStatusSchema.optional(),
|
|
@@ -150,6 +109,11 @@ exports.GetTrackedJobApplicationsInputSchema = zod_openapi_1.z.object({
|
|
|
150
109
|
page: zod_openapi_1.z.coerce.number().min(1).default(1),
|
|
151
110
|
limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(20),
|
|
152
111
|
});
|
|
112
|
+
/**
|
|
113
|
+
* --------------------------------
|
|
114
|
+
* OUTPUTS
|
|
115
|
+
* --------------------------------
|
|
116
|
+
*/
|
|
153
117
|
exports.GetTrackedJobApplicationsOutputSchema = zod_openapi_1.z.object({
|
|
154
118
|
applications: zod_openapi_1.z.array(exports.TrackedJobApplicationEntitySchema),
|
|
155
119
|
total: zod_openapi_1.z.number(),
|