@zyacreatives/shared 2.2.72 → 2.2.74
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/schemas/job-application.d.ts +6 -6
- package/dist/schemas/job.d.ts +12 -12
- package/dist/schemas/job.js +0 -1
- package/dist/schemas/message.d.ts +1 -1
- package/dist/schemas/message.js +1 -1
- package/dist/schemas/user.d.ts +41 -0
- package/dist/schemas/user.js +34 -8
- package/dist/types/user.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/job.ts +0 -1
- package/src/schemas/message.ts +1 -1
- package/src/schemas/user.ts +47 -20
- package/src/types/user.ts +4 -1
|
@@ -206,7 +206,7 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
206
206
|
title: z.ZodString;
|
|
207
207
|
brandId: z.ZodCUID2;
|
|
208
208
|
brandName: z.ZodString;
|
|
209
|
-
brandImgUrl: z.ZodOptional<z.
|
|
209
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
210
210
|
status: z.ZodEnum<{
|
|
211
211
|
ACTIVE: "ACTIVE";
|
|
212
212
|
DELETED: "DELETED";
|
|
@@ -282,7 +282,7 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
282
282
|
title: z.ZodString;
|
|
283
283
|
brandId: z.ZodCUID2;
|
|
284
284
|
brandName: z.ZodString;
|
|
285
|
-
brandImgUrl: z.ZodOptional<z.
|
|
285
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
286
286
|
jobType: z.ZodEnum<{
|
|
287
287
|
GIG: "GIG";
|
|
288
288
|
ROLE: "ROLE";
|
|
@@ -333,7 +333,7 @@ export declare const TrackedJobApplicationEntitySchema: z.ZodObject<{
|
|
|
333
333
|
title: z.ZodString;
|
|
334
334
|
brandId: z.ZodCUID2;
|
|
335
335
|
brandName: z.ZodString;
|
|
336
|
-
brandImgUrl: z.ZodOptional<z.
|
|
336
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
337
337
|
status: z.ZodEnum<{
|
|
338
338
|
ACTIVE: "ACTIVE";
|
|
339
339
|
DELETED: "DELETED";
|
|
@@ -504,7 +504,7 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
504
504
|
title: z.ZodString;
|
|
505
505
|
brandId: z.ZodCUID2;
|
|
506
506
|
brandName: z.ZodString;
|
|
507
|
-
brandImgUrl: z.ZodOptional<z.
|
|
507
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
508
508
|
status: z.ZodEnum<{
|
|
509
509
|
ACTIVE: "ACTIVE";
|
|
510
510
|
DELETED: "DELETED";
|
|
@@ -580,7 +580,7 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
580
580
|
title: z.ZodString;
|
|
581
581
|
brandId: z.ZodCUID2;
|
|
582
582
|
brandName: z.ZodString;
|
|
583
|
-
brandImgUrl: z.ZodOptional<z.
|
|
583
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
584
584
|
jobType: z.ZodEnum<{
|
|
585
585
|
GIG: "GIG";
|
|
586
586
|
ROLE: "ROLE";
|
|
@@ -631,7 +631,7 @@ export declare const GetTrackedJobApplicationsOutputSchema: z.ZodObject<{
|
|
|
631
631
|
title: z.ZodString;
|
|
632
632
|
brandId: z.ZodCUID2;
|
|
633
633
|
brandName: z.ZodString;
|
|
634
|
-
brandImgUrl: z.ZodOptional<z.
|
|
634
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
635
635
|
status: z.ZodEnum<{
|
|
636
636
|
ACTIVE: "ACTIVE";
|
|
637
637
|
DELETED: "DELETED";
|
package/dist/schemas/job.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export declare const JobEntitySchema: z.ZodObject<{
|
|
|
66
66
|
title: z.ZodString;
|
|
67
67
|
brandId: z.ZodCUID2;
|
|
68
68
|
brandName: z.ZodString;
|
|
69
|
-
brandImgUrl: z.ZodOptional<z.
|
|
69
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
70
70
|
jobType: z.ZodEnum<{
|
|
71
71
|
GIG: "GIG";
|
|
72
72
|
ROLE: "ROLE";
|
|
@@ -148,7 +148,7 @@ export declare const JobWithGigDetailsEntitySchema: z.ZodObject<{
|
|
|
148
148
|
title: z.ZodString;
|
|
149
149
|
brandId: z.ZodCUID2;
|
|
150
150
|
brandName: z.ZodString;
|
|
151
|
-
brandImgUrl: z.ZodOptional<z.
|
|
151
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
152
152
|
status: z.ZodEnum<{
|
|
153
153
|
ACTIVE: "ACTIVE";
|
|
154
154
|
DELETED: "DELETED";
|
|
@@ -260,7 +260,7 @@ export declare const JobWithRoleDetailsEntitySchema: z.ZodObject<{
|
|
|
260
260
|
title: z.ZodString;
|
|
261
261
|
brandId: z.ZodCUID2;
|
|
262
262
|
brandName: z.ZodString;
|
|
263
|
-
brandImgUrl: z.ZodOptional<z.
|
|
263
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
264
264
|
status: z.ZodEnum<{
|
|
265
265
|
ACTIVE: "ACTIVE";
|
|
266
266
|
DELETED: "DELETED";
|
|
@@ -578,7 +578,7 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
578
578
|
title: z.ZodString;
|
|
579
579
|
brandId: z.ZodCUID2;
|
|
580
580
|
brandName: z.ZodString;
|
|
581
|
-
brandImgUrl: z.ZodOptional<z.
|
|
581
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
582
582
|
status: z.ZodEnum<{
|
|
583
583
|
ACTIVE: "ACTIVE";
|
|
584
584
|
DELETED: "DELETED";
|
|
@@ -654,7 +654,7 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
654
654
|
title: z.ZodString;
|
|
655
655
|
brandId: z.ZodCUID2;
|
|
656
656
|
brandName: z.ZodString;
|
|
657
|
-
brandImgUrl: z.ZodOptional<z.
|
|
657
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
658
658
|
jobType: z.ZodEnum<{
|
|
659
659
|
GIG: "GIG";
|
|
660
660
|
ROLE: "ROLE";
|
|
@@ -705,7 +705,7 @@ export declare const NormalizedJobSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
705
705
|
title: z.ZodString;
|
|
706
706
|
brandId: z.ZodCUID2;
|
|
707
707
|
brandName: z.ZodString;
|
|
708
|
-
brandImgUrl: z.ZodOptional<z.
|
|
708
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
709
709
|
status: z.ZodEnum<{
|
|
710
710
|
ACTIVE: "ACTIVE";
|
|
711
711
|
DELETED: "DELETED";
|
|
@@ -788,7 +788,7 @@ export declare const GetCreatedJobsOutputSchema: z.ZodObject<{
|
|
|
788
788
|
title: z.ZodString;
|
|
789
789
|
brandId: z.ZodCUID2;
|
|
790
790
|
brandName: z.ZodString;
|
|
791
|
-
brandImgUrl: z.ZodOptional<z.
|
|
791
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
792
792
|
status: z.ZodEnum<{
|
|
793
793
|
ACTIVE: "ACTIVE";
|
|
794
794
|
DELETED: "DELETED";
|
|
@@ -864,7 +864,7 @@ export declare const GetCreatedJobsOutputSchema: z.ZodObject<{
|
|
|
864
864
|
title: z.ZodString;
|
|
865
865
|
brandId: z.ZodCUID2;
|
|
866
866
|
brandName: z.ZodString;
|
|
867
|
-
brandImgUrl: z.ZodOptional<z.
|
|
867
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
868
868
|
jobType: z.ZodEnum<{
|
|
869
869
|
GIG: "GIG";
|
|
870
870
|
ROLE: "ROLE";
|
|
@@ -915,7 +915,7 @@ export declare const GetCreatedJobsOutputSchema: z.ZodObject<{
|
|
|
915
915
|
title: z.ZodString;
|
|
916
916
|
brandId: z.ZodCUID2;
|
|
917
917
|
brandName: z.ZodString;
|
|
918
|
-
brandImgUrl: z.ZodOptional<z.
|
|
918
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
919
919
|
status: z.ZodEnum<{
|
|
920
920
|
ACTIVE: "ACTIVE";
|
|
921
921
|
DELETED: "DELETED";
|
|
@@ -1020,7 +1020,7 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
1020
1020
|
title: z.ZodString;
|
|
1021
1021
|
brandId: z.ZodCUID2;
|
|
1022
1022
|
brandName: z.ZodString;
|
|
1023
|
-
brandImgUrl: z.ZodOptional<z.
|
|
1023
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
1024
1024
|
status: z.ZodEnum<{
|
|
1025
1025
|
ACTIVE: "ACTIVE";
|
|
1026
1026
|
DELETED: "DELETED";
|
|
@@ -1096,7 +1096,7 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
1096
1096
|
title: z.ZodString;
|
|
1097
1097
|
brandId: z.ZodCUID2;
|
|
1098
1098
|
brandName: z.ZodString;
|
|
1099
|
-
brandImgUrl: z.ZodOptional<z.
|
|
1099
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
1100
1100
|
jobType: z.ZodEnum<{
|
|
1101
1101
|
GIG: "GIG";
|
|
1102
1102
|
ROLE: "ROLE";
|
|
@@ -1147,7 +1147,7 @@ export declare const GetJobsOutputSchema: z.ZodObject<{
|
|
|
1147
1147
|
title: z.ZodString;
|
|
1148
1148
|
brandId: z.ZodCUID2;
|
|
1149
1149
|
brandName: z.ZodString;
|
|
1150
|
-
brandImgUrl: z.ZodOptional<z.
|
|
1150
|
+
brandImgUrl: z.ZodOptional<z.ZodURL>;
|
|
1151
1151
|
status: z.ZodEnum<{
|
|
1152
1152
|
ACTIVE: "ACTIVE";
|
|
1153
1153
|
DELETED: "DELETED";
|
package/dist/schemas/job.js
CHANGED
|
@@ -67,7 +67,6 @@ exports.JobEntitySchema = zod_openapi_1.z.object({
|
|
|
67
67
|
brandId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000brnd" }),
|
|
68
68
|
brandName: zod_openapi_1.z.string().openapi({ example: "Acme Corp" }),
|
|
69
69
|
brandImgUrl: zod_openapi_1.z
|
|
70
|
-
.string()
|
|
71
70
|
.url()
|
|
72
71
|
.optional()
|
|
73
72
|
.openapi({ example: "https://example.com/logo.png" }),
|
|
@@ -150,7 +150,7 @@ export declare const EditMessageInputSchema: z.ZodObject<{
|
|
|
150
150
|
senderId: z.ZodCUID2;
|
|
151
151
|
receiverId: z.ZodCUID2;
|
|
152
152
|
content: z.ZodOptional<z.ZodString>;
|
|
153
|
-
isEdited:
|
|
153
|
+
isEdited: z.ZodDefault<z.ZodBoolean>;
|
|
154
154
|
}, z.core.$strip>;
|
|
155
155
|
export declare const GetMessagesOutputSchema: z.ZodObject<{
|
|
156
156
|
messages: z.ZodArray<z.ZodObject<{
|
package/dist/schemas/message.js
CHANGED
|
@@ -72,7 +72,7 @@ exports.EditMessageInputSchema = zod_openapi_1.z.object({
|
|
|
72
72
|
senderId: zod_openapi_1.z.cuid2(),
|
|
73
73
|
receiverId: zod_openapi_1.z.cuid2(),
|
|
74
74
|
content: zod_openapi_1.z.string().optional(),
|
|
75
|
-
isEdited: true,
|
|
75
|
+
isEdited: zod_openapi_1.z.boolean().default(true),
|
|
76
76
|
});
|
|
77
77
|
exports.GetMessagesOutputSchema = zod_openapi_1.z.object({
|
|
78
78
|
messages: zod_openapi_1.z.array(exports.MessageWithFilesEntitySchema),
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -367,6 +367,47 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
|
|
|
367
367
|
}, z.core.$strip>;
|
|
368
368
|
}, z.core.$strip>>;
|
|
369
369
|
}, z.core.$strip>;
|
|
370
|
+
export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
|
|
371
|
+
userId: z.ZodCUID2;
|
|
372
|
+
jobBookmarks: z.ZodArray<z.ZodObject<{
|
|
373
|
+
id: z.ZodCUID2;
|
|
374
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
375
|
+
userId: z.ZodCUID2;
|
|
376
|
+
parentId: z.ZodCUID2;
|
|
377
|
+
parentType: z.ZodEnum<{
|
|
378
|
+
readonly PROJECT: "PROJECT";
|
|
379
|
+
readonly USER: "USER";
|
|
380
|
+
readonly JOB: "JOB";
|
|
381
|
+
readonly POST: "POST";
|
|
382
|
+
readonly COMMENT: "COMMENT";
|
|
383
|
+
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
384
|
+
}>;
|
|
385
|
+
job: z.ZodObject<{
|
|
386
|
+
id: z.ZodCUID2;
|
|
387
|
+
title: z.ZodString;
|
|
388
|
+
brandId: z.ZodCUID2;
|
|
389
|
+
brandName: z.ZodString;
|
|
390
|
+
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
391
|
+
jobType: z.ZodEnum<{
|
|
392
|
+
GIG: "GIG";
|
|
393
|
+
ROLE: "ROLE";
|
|
394
|
+
}>;
|
|
395
|
+
status: z.ZodOptional<z.ZodString>;
|
|
396
|
+
employmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
397
|
+
workMode: z.ZodString;
|
|
398
|
+
gigType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
399
|
+
location: z.ZodString;
|
|
400
|
+
overview: z.ZodString;
|
|
401
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
402
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
403
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
404
|
+
wagesCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
405
|
+
wagesType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
406
|
+
createdAt: z.ZodString;
|
|
407
|
+
updatedAt: z.ZodString;
|
|
408
|
+
}, z.core.$strip>;
|
|
409
|
+
}, z.core.$strip>>;
|
|
410
|
+
}, z.core.$strip>;
|
|
370
411
|
export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
|
|
371
412
|
userId: z.ZodCUID2;
|
|
372
413
|
projectBookmarks: z.ZodArray<z.ZodObject<{
|
package/dist/schemas/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserSearchDocumentSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.UserWithPostsEntitySchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
|
|
3
|
+
exports.UserSearchDocumentSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.UserWithPostsEntitySchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const project_1 = require("./project");
|
|
@@ -10,6 +10,7 @@ const brand_1 = require("./brand");
|
|
|
10
10
|
const creative_1 = require("./creative");
|
|
11
11
|
const investor_1 = require("./investor");
|
|
12
12
|
const post_1 = require("./post");
|
|
13
|
+
const job_1 = require("./job");
|
|
13
14
|
exports.UserEntitySchema = zod_openapi_1.z
|
|
14
15
|
.object({
|
|
15
16
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -120,6 +121,12 @@ exports.UserWithPostBookmarksEntitySchema = zod_openapi_1.z.object({
|
|
|
120
121
|
}))
|
|
121
122
|
.openapi({ example: [] }),
|
|
122
123
|
});
|
|
124
|
+
exports.UserWithJobBookmarksEntitySchema = zod_openapi_1.z.object({
|
|
125
|
+
userId: zod_openapi_1.z.cuid2().openapi({ example: "afoaifaofi" }),
|
|
126
|
+
jobBookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema.extend({
|
|
127
|
+
job: job_1.JobSearchDocumentSchema,
|
|
128
|
+
})),
|
|
129
|
+
});
|
|
123
130
|
exports.UserWithProjectBookmarksEntitySchema = zod_openapi_1.z
|
|
124
131
|
.object({
|
|
125
132
|
userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -249,21 +256,40 @@ exports.SearchUsersOutputSchema = zod_openapi_1.z.object({
|
|
|
249
256
|
description: "The next cursor for pagination",
|
|
250
257
|
}),
|
|
251
258
|
});
|
|
252
|
-
exports.UserSearchDocumentSchema = zod_openapi_1.z
|
|
259
|
+
exports.UserSearchDocumentSchema = zod_openapi_1.z
|
|
260
|
+
.object({
|
|
253
261
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
254
262
|
email: zod_openapi_1.z.email().openapi({ example: "user@example.com" }),
|
|
255
263
|
username: zod_openapi_1.z.string().nullable().openapi({ example: "johndoe" }),
|
|
256
264
|
name: zod_openapi_1.z.string().nullable().openapi({ example: "John Doe" }),
|
|
257
|
-
image: zod_openapi_1.z
|
|
265
|
+
image: zod_openapi_1.z
|
|
266
|
+
.string()
|
|
267
|
+
.nullable()
|
|
268
|
+
.openapi({ example: "https://example.com/avatar.png" }),
|
|
258
269
|
role: zod_openapi_1.z
|
|
259
270
|
.enum(Object.values(constants_1.ROLES))
|
|
260
271
|
.openapi({ example: "CREATIVE" }),
|
|
261
|
-
bio: zod_openapi_1.z
|
|
272
|
+
bio: zod_openapi_1.z
|
|
273
|
+
.string()
|
|
274
|
+
.nullable()
|
|
275
|
+
.openapi({
|
|
276
|
+
example: "Passionate designer and developer based in Lagos.",
|
|
277
|
+
}),
|
|
262
278
|
location: zod_openapi_1.z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
|
|
263
|
-
disciplines: zod_openapi_1.z
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
279
|
+
disciplines: zod_openapi_1.z
|
|
280
|
+
.array(zod_openapi_1.z.string())
|
|
281
|
+
.nullable()
|
|
282
|
+
.openapi({ example: ["Design Systems", "Web Development"] }),
|
|
283
|
+
updatedAt: zod_openapi_1.z
|
|
284
|
+
.string()
|
|
285
|
+
.nullable()
|
|
286
|
+
.openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
287
|
+
createdAt: zod_openapi_1.z
|
|
288
|
+
.string()
|
|
289
|
+
.nullable()
|
|
290
|
+
.openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
291
|
+
})
|
|
292
|
+
.openapi({
|
|
267
293
|
title: "User Search Document",
|
|
268
294
|
description: "Flattened schema used for indexing users in search engines.",
|
|
269
295
|
});
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, SearchUsersInputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema, UserWithPostsEntitySchema, SearchUsersOutputSchema, UserWithPostBookmarksEntitySchema, UserWithPostLikesEntitySchema, UserSearchDocumentSchema } from "../schemas/user";
|
|
1
|
+
import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, SearchUsersInputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema, UserWithPostsEntitySchema, SearchUsersOutputSchema, UserWithPostBookmarksEntitySchema, UserWithPostLikesEntitySchema, UserSearchDocumentSchema, UserWithJobBookmarksEntitySchema } from "../schemas/user";
|
|
2
2
|
import { z } from "@hono/zod-openapi";
|
|
3
3
|
export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
|
|
4
4
|
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
@@ -29,3 +29,4 @@ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
|
|
|
29
29
|
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
|
30
30
|
export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
|
|
31
31
|
export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
|
|
32
|
+
export type UserWithJobBookmarksOutput = z.infer<typeof UserWithJobBookmarksEntitySchema>;
|
package/package.json
CHANGED
package/src/schemas/job.ts
CHANGED
|
@@ -91,7 +91,6 @@ export const JobEntitySchema = z.object({
|
|
|
91
91
|
brandId: z.cuid2().openapi({ example: "ckj1a2b3c0000brnd" }),
|
|
92
92
|
brandName: z.string().openapi({ example: "Acme Corp" }),
|
|
93
93
|
brandImgUrl: z
|
|
94
|
-
.string()
|
|
95
94
|
.url()
|
|
96
95
|
.optional()
|
|
97
96
|
.openapi({ example: "https://example.com/logo.png" }),
|
package/src/schemas/message.ts
CHANGED
package/src/schemas/user.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { BrandEntitySchema } from "./brand";
|
|
|
21
21
|
import { CreativeEntitySchema } from "./creative";
|
|
22
22
|
import { InvestorEntitySchema } from "./investor";
|
|
23
23
|
import { PostEntitySchema, PostWithFilesEntitySchema } from "./post";
|
|
24
|
+
import { JobEntitySchema, JobSearchDocumentSchema } from "./job";
|
|
24
25
|
|
|
25
26
|
export const UserEntitySchema = z
|
|
26
27
|
.object({
|
|
@@ -151,6 +152,15 @@ export const UserWithPostBookmarksEntitySchema = z.object({
|
|
|
151
152
|
.openapi({ example: [] }),
|
|
152
153
|
});
|
|
153
154
|
|
|
155
|
+
export const UserWithJobBookmarksEntitySchema = z.object({
|
|
156
|
+
userId: z.cuid2().openapi({ example: "afoaifaofi" }),
|
|
157
|
+
jobBookmarks: z.array(
|
|
158
|
+
BookmarkEntitySchema.extend({
|
|
159
|
+
job: JobSearchDocumentSchema,
|
|
160
|
+
}),
|
|
161
|
+
),
|
|
162
|
+
});
|
|
163
|
+
|
|
154
164
|
export const UserWithProjectBookmarksEntitySchema = z
|
|
155
165
|
.object({
|
|
156
166
|
userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -317,23 +327,40 @@ export const SearchUsersOutputSchema = z.object({
|
|
|
317
327
|
}),
|
|
318
328
|
});
|
|
319
329
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
})
|
|
339
|
-
|
|
330
|
+
export const UserSearchDocumentSchema = z
|
|
331
|
+
.object({
|
|
332
|
+
id: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
333
|
+
email: z.email().openapi({ example: "user@example.com" }),
|
|
334
|
+
username: z.string().nullable().openapi({ example: "johndoe" }),
|
|
335
|
+
name: z.string().nullable().openapi({ example: "John Doe" }),
|
|
336
|
+
image: z
|
|
337
|
+
.string()
|
|
338
|
+
.nullable()
|
|
339
|
+
.openapi({ example: "https://example.com/avatar.png" }),
|
|
340
|
+
role: z
|
|
341
|
+
.enum(Object.values(ROLES) as [Role, ...Role[]])
|
|
342
|
+
.openapi({ example: "CREATIVE" }),
|
|
343
|
+
bio: z
|
|
344
|
+
.string()
|
|
345
|
+
.nullable()
|
|
346
|
+
.openapi({
|
|
347
|
+
example: "Passionate designer and developer based in Lagos.",
|
|
348
|
+
}),
|
|
349
|
+
location: z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
|
|
350
|
+
disciplines: z
|
|
351
|
+
.array(z.string())
|
|
352
|
+
.nullable()
|
|
353
|
+
.openapi({ example: ["Design Systems", "Web Development"] }),
|
|
354
|
+
updatedAt: z
|
|
355
|
+
.string()
|
|
356
|
+
.nullable()
|
|
357
|
+
.openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
358
|
+
createdAt: z
|
|
359
|
+
.string()
|
|
360
|
+
.nullable()
|
|
361
|
+
.openapi({ example: "2026-03-11T09:00:00.000Z" }),
|
|
362
|
+
})
|
|
363
|
+
.openapi({
|
|
364
|
+
title: "User Search Document",
|
|
365
|
+
description: "Flattened schema used for indexing users in search engines.",
|
|
366
|
+
});
|
package/src/types/user.ts
CHANGED
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
UserWithPostBookmarksEntitySchema,
|
|
28
28
|
UserWithPostLikesEntitySchema,
|
|
29
29
|
UserSearchDocumentSchema,
|
|
30
|
+
UserWithJobBookmarksEntitySchema,
|
|
30
31
|
} from "../schemas/user";
|
|
31
32
|
|
|
32
33
|
import { z } from "@hono/zod-openapi";
|
|
@@ -95,4 +96,6 @@ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
|
|
|
95
96
|
|
|
96
97
|
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
|
97
98
|
export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
|
|
98
|
-
export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
|
|
99
|
+
export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
|
|
100
|
+
|
|
101
|
+
export type UserWithJobBookmarksOutput = z.infer<typeof UserWithJobBookmarksEntitySchema>;
|