@zyacreatives/shared 2.2.75 → 2.2.77
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/user.d.ts +50 -2
- package/dist/schemas/user.js +11 -6
- package/dist/types/user.d.ts +3 -1
- package/package.json +1 -1
- package/src/schemas/user.ts +14 -7
- package/src/types/user.ts +56 -46
package/dist/schemas/user.d.ts
CHANGED
|
@@ -369,7 +369,7 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
|
|
|
369
369
|
}, z.core.$strip>;
|
|
370
370
|
export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
|
|
371
371
|
userId: z.ZodCUID2;
|
|
372
|
-
jobBookmarks: z.ZodArray<z.ZodObject<{
|
|
372
|
+
jobBookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
373
373
|
id: z.ZodCUID2;
|
|
374
374
|
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
375
375
|
userId: z.ZodCUID2;
|
|
@@ -406,7 +406,55 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
|
|
|
406
406
|
createdAt: z.ZodString;
|
|
407
407
|
updatedAt: z.ZodString;
|
|
408
408
|
}, z.core.$strip>;
|
|
409
|
-
}, z.core.$strip
|
|
409
|
+
}, z.core.$strip>>>;
|
|
410
|
+
}, z.core.$strip>;
|
|
411
|
+
export declare const UserWithJobBookmarksInputSchema: z.ZodObject<{
|
|
412
|
+
cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
413
|
+
limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
|
|
414
|
+
}, z.core.$strip>;
|
|
415
|
+
export declare const UserWithJobBookmarksOutputSchema: z.ZodObject<{
|
|
416
|
+
bookmarks: z.ZodObject<{
|
|
417
|
+
userId: z.ZodCUID2;
|
|
418
|
+
jobBookmarks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
419
|
+
id: z.ZodCUID2;
|
|
420
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
421
|
+
userId: z.ZodCUID2;
|
|
422
|
+
parentId: z.ZodCUID2;
|
|
423
|
+
parentType: z.ZodEnum<{
|
|
424
|
+
readonly PROJECT: "PROJECT";
|
|
425
|
+
readonly USER: "USER";
|
|
426
|
+
readonly JOB: "JOB";
|
|
427
|
+
readonly POST: "POST";
|
|
428
|
+
readonly COMMENT: "COMMENT";
|
|
429
|
+
readonly JOB_APPLICATION: "JOB_APPLICATION";
|
|
430
|
+
}>;
|
|
431
|
+
job: z.ZodObject<{
|
|
432
|
+
id: z.ZodCUID2;
|
|
433
|
+
title: z.ZodString;
|
|
434
|
+
brandId: z.ZodCUID2;
|
|
435
|
+
brandName: z.ZodString;
|
|
436
|
+
brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
437
|
+
jobType: z.ZodEnum<{
|
|
438
|
+
GIG: "GIG";
|
|
439
|
+
ROLE: "ROLE";
|
|
440
|
+
}>;
|
|
441
|
+
status: z.ZodOptional<z.ZodString>;
|
|
442
|
+
employmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
443
|
+
workMode: z.ZodString;
|
|
444
|
+
gigType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
445
|
+
location: z.ZodString;
|
|
446
|
+
overview: z.ZodString;
|
|
447
|
+
requiredSkills: z.ZodArray<z.ZodString>;
|
|
448
|
+
wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
449
|
+
wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
450
|
+
wagesCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
451
|
+
wagesType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
452
|
+
createdAt: z.ZodString;
|
|
453
|
+
updatedAt: z.ZodString;
|
|
454
|
+
}, z.core.$strip>;
|
|
455
|
+
}, z.core.$strip>>>;
|
|
456
|
+
}, z.core.$strip>;
|
|
457
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
410
458
|
}, z.core.$strip>;
|
|
411
459
|
export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
|
|
412
460
|
userId: z.ZodCUID2;
|
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.UserWithJobBookmarksEntitySchema = 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.UserWithJobBookmarksOutputSchema = exports.UserWithJobBookmarksInputSchema = 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");
|
|
@@ -125,7 +125,15 @@ exports.UserWithJobBookmarksEntitySchema = zod_openapi_1.z.object({
|
|
|
125
125
|
userId: zod_openapi_1.z.cuid2().openapi({ example: "afoaifaofi" }),
|
|
126
126
|
jobBookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema.extend({
|
|
127
127
|
job: job_1.JobSearchDocumentSchema,
|
|
128
|
-
})),
|
|
128
|
+
})).optional(),
|
|
129
|
+
});
|
|
130
|
+
exports.UserWithJobBookmarksInputSchema = zod_openapi_1.z.object({
|
|
131
|
+
cursor: zod_openapi_1.z.string().optional().nullable(),
|
|
132
|
+
limit: zod_openapi_1.z.int().positive().optional().nullable(),
|
|
133
|
+
});
|
|
134
|
+
exports.UserWithJobBookmarksOutputSchema = zod_openapi_1.z.object({
|
|
135
|
+
bookmarks: exports.UserWithJobBookmarksEntitySchema,
|
|
136
|
+
nextCursor: zod_openapi_1.z.string().nullable(),
|
|
129
137
|
});
|
|
130
138
|
exports.UserWithProjectBookmarksEntitySchema = zod_openapi_1.z
|
|
131
139
|
.object({
|
|
@@ -269,10 +277,7 @@ exports.UserSearchDocumentSchema = zod_openapi_1.z
|
|
|
269
277
|
role: zod_openapi_1.z
|
|
270
278
|
.enum(Object.values(constants_1.ROLES))
|
|
271
279
|
.openapi({ example: "CREATIVE" }),
|
|
272
|
-
bio: zod_openapi_1.z
|
|
273
|
-
.string()
|
|
274
|
-
.nullable()
|
|
275
|
-
.openapi({
|
|
280
|
+
bio: zod_openapi_1.z.string().nullable().openapi({
|
|
276
281
|
example: "Passionate designer and developer based in Lagos.",
|
|
277
282
|
}),
|
|
278
283
|
location: zod_openapi_1.z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
|
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, UserWithJobBookmarksEntitySchema } 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, UserWithJobBookmarksInputSchema, UserWithJobBookmarksOutputSchema } 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>;
|
|
@@ -30,3 +30,5 @@ 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
32
|
export type UserWithJobBookmarksEntity = z.infer<typeof UserWithJobBookmarksEntitySchema>;
|
|
33
|
+
export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksInputSchema>;
|
|
34
|
+
export type UserWithJobBookmarksOutput = z.infer<typeof UserWithJobBookmarksOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/user.ts
CHANGED
|
@@ -158,7 +158,17 @@ export const UserWithJobBookmarksEntitySchema = z.object({
|
|
|
158
158
|
BookmarkEntitySchema.extend({
|
|
159
159
|
job: JobSearchDocumentSchema,
|
|
160
160
|
}),
|
|
161
|
-
),
|
|
161
|
+
).optional(),
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
export const UserWithJobBookmarksInputSchema = z.object({
|
|
165
|
+
cursor: z.string().optional().nullable(),
|
|
166
|
+
limit: z.int().positive().optional().nullable(),
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
export const UserWithJobBookmarksOutputSchema = z.object({
|
|
170
|
+
bookmarks: UserWithJobBookmarksEntitySchema,
|
|
171
|
+
nextCursor: z.string().nullable(),
|
|
162
172
|
});
|
|
163
173
|
|
|
164
174
|
export const UserWithProjectBookmarksEntitySchema = z
|
|
@@ -340,12 +350,9 @@ export const UserSearchDocumentSchema = z
|
|
|
340
350
|
role: z
|
|
341
351
|
.enum(Object.values(ROLES) as [Role, ...Role[]])
|
|
342
352
|
.openapi({ example: "CREATIVE" }),
|
|
343
|
-
bio: z
|
|
344
|
-
.
|
|
345
|
-
|
|
346
|
-
.openapi({
|
|
347
|
-
example: "Passionate designer and developer based in Lagos.",
|
|
348
|
-
}),
|
|
353
|
+
bio: z.string().nullable().openapi({
|
|
354
|
+
example: "Passionate designer and developer based in Lagos.",
|
|
355
|
+
}),
|
|
349
356
|
location: z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
|
|
350
357
|
disciplines: z
|
|
351
358
|
.array(z.string())
|
package/src/types/user.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
MinimalUserSchema,
|
|
3
|
+
UserEntitySchema,
|
|
4
|
+
UserProfileEntitySchema,
|
|
5
|
+
UserWithProjectsEntitySchema,
|
|
6
|
+
UserWithProjectBookmarksEntitySchema,
|
|
7
|
+
GetUserFollowingInputSchema,
|
|
8
|
+
GetUserFollowersInputSchema,
|
|
9
|
+
UserWithFollowingEntitySchema,
|
|
10
|
+
UserWithFollowersEntitySchema,
|
|
11
|
+
GetUserFollowingOutputSchema,
|
|
12
|
+
GetUserFollowersOutputSchema,
|
|
13
|
+
GetAuthenticatedUserOutputSchema,
|
|
14
|
+
GetAuthenticatedUserProfileOutputSchema,
|
|
15
|
+
GetAuthenticatedUserWithProjectsOutputSchema,
|
|
16
|
+
GetAuthenticatedUserWithProjectBookmarksOutputSchema,
|
|
17
|
+
GetAuthenticatedUserWithUserFollowingOutputSchema,
|
|
18
|
+
GetAuthenticatedUserWithUserFollowersOutputSchema,
|
|
19
|
+
SearchUsersInputSchema,
|
|
20
|
+
UserWithProjectLikesEntitySchema,
|
|
21
|
+
GetAuthenticatedUserWithProjectLikesOutputSchema,
|
|
22
|
+
GetUserActivityInputSchema,
|
|
23
|
+
GetUserActivityOutputSchema,
|
|
24
|
+
UserStatsEntitySchema,
|
|
25
|
+
UserWithPostsEntitySchema,
|
|
26
|
+
SearchUsersOutputSchema,
|
|
27
|
+
UserWithPostBookmarksEntitySchema,
|
|
28
|
+
UserWithPostLikesEntitySchema,
|
|
29
|
+
UserSearchDocumentSchema,
|
|
30
|
+
UserWithJobBookmarksEntitySchema,
|
|
31
|
+
UserWithJobBookmarksInputSchema,
|
|
32
|
+
UserWithJobBookmarksOutputSchema,
|
|
31
33
|
} from "../schemas/user";
|
|
32
34
|
|
|
33
35
|
import { z } from "@hono/zod-openapi";
|
|
@@ -37,57 +39,57 @@ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
|
37
39
|
export type UserEntity = z.infer<typeof UserEntitySchema>;
|
|
38
40
|
export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
|
|
39
41
|
export type UserWithProjectsEntity = z.infer<
|
|
40
|
-
|
|
42
|
+
typeof UserWithProjectsEntitySchema
|
|
41
43
|
>;
|
|
42
44
|
export type UserWithProjectBookmarksEntity = z.infer<
|
|
43
|
-
|
|
45
|
+
typeof UserWithProjectBookmarksEntitySchema
|
|
44
46
|
>;
|
|
45
47
|
export type UserWithProjectLikesEntity = z.infer<
|
|
46
|
-
|
|
48
|
+
typeof UserWithProjectLikesEntitySchema
|
|
47
49
|
>;
|
|
48
50
|
|
|
49
51
|
export type UserWithPostBookmarksEntity = z.infer<
|
|
50
|
-
|
|
52
|
+
typeof UserWithPostBookmarksEntitySchema
|
|
51
53
|
>;
|
|
52
54
|
export type UserWithPostLikesEntity = z.infer<
|
|
53
|
-
|
|
55
|
+
typeof UserWithPostLikesEntitySchema
|
|
54
56
|
>;
|
|
55
57
|
|
|
56
58
|
export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
|
|
57
59
|
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
58
60
|
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
59
61
|
export type UserWithFollowingEntity = z.infer<
|
|
60
|
-
|
|
62
|
+
typeof UserWithFollowingEntitySchema
|
|
61
63
|
>;
|
|
62
64
|
export type UserWithFollowersEntity = z.infer<
|
|
63
|
-
|
|
65
|
+
typeof UserWithFollowersEntitySchema
|
|
64
66
|
>;
|
|
65
67
|
export type GetUserFollowingOutput = z.infer<
|
|
66
|
-
|
|
68
|
+
typeof GetUserFollowingOutputSchema
|
|
67
69
|
>;
|
|
68
70
|
export type GetUserFollowersOutput = z.infer<
|
|
69
|
-
|
|
71
|
+
typeof GetUserFollowersOutputSchema
|
|
70
72
|
>;
|
|
71
73
|
export type GetAuthenticatedUserOutput = z.infer<
|
|
72
|
-
|
|
74
|
+
typeof GetAuthenticatedUserOutputSchema
|
|
73
75
|
>;
|
|
74
76
|
export type GetAuthenticatedUserProfileOutput = z.infer<
|
|
75
|
-
|
|
77
|
+
typeof GetAuthenticatedUserProfileOutputSchema
|
|
76
78
|
>;
|
|
77
79
|
export type GetAuthenticatedUserWithProjectsOutput = z.infer<
|
|
78
|
-
|
|
80
|
+
typeof GetAuthenticatedUserWithProjectsOutputSchema
|
|
79
81
|
>;
|
|
80
82
|
export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
|
|
81
|
-
|
|
83
|
+
typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
|
|
82
84
|
>;
|
|
83
85
|
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
|
|
84
|
-
|
|
86
|
+
typeof GetAuthenticatedUserWithProjectLikesOutputSchema
|
|
85
87
|
>;
|
|
86
88
|
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
87
|
-
|
|
89
|
+
typeof GetAuthenticatedUserWithUserFollowingOutputSchema
|
|
88
90
|
>;
|
|
89
91
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
90
|
-
|
|
92
|
+
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
91
93
|
>;
|
|
92
94
|
|
|
93
95
|
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
@@ -98,4 +100,12 @@ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
|
|
98
100
|
export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
|
|
99
101
|
export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
|
|
100
102
|
|
|
101
|
-
export type UserWithJobBookmarksEntity = z.infer<
|
|
103
|
+
export type UserWithJobBookmarksEntity = z.infer<
|
|
104
|
+
typeof UserWithJobBookmarksEntitySchema
|
|
105
|
+
>;
|
|
106
|
+
export type UserWithJobBookmarksInput = z.infer<
|
|
107
|
+
typeof UserWithJobBookmarksInputSchema
|
|
108
|
+
>;
|
|
109
|
+
export type UserWithJobBookmarksOutput = z.infer<
|
|
110
|
+
typeof UserWithJobBookmarksOutputSchema
|
|
111
|
+
>;
|