@zyacreatives/shared 2.1.65 → 2.1.66
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 +36 -60
- package/dist/schemas/user.js +15 -7
- package/package.json +1 -1
- package/src/schemas/user.ts +20 -8
- package/src/types/user.ts +37 -37
package/dist/schemas/user.d.ts
CHANGED
|
@@ -348,6 +348,42 @@ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
|
|
|
348
348
|
followsYou: z.ZodOptional<z.ZodBoolean>;
|
|
349
349
|
}, z.core.$strip>>;
|
|
350
350
|
}, z.core.$strip>;
|
|
351
|
+
export declare const GetUserFollowersOutputSchema: z.ZodObject<{
|
|
352
|
+
nextCursor: z.ZodString;
|
|
353
|
+
followers: z.ZodArray<z.ZodObject<{
|
|
354
|
+
email: z.ZodEmail;
|
|
355
|
+
username: z.ZodOptional<z.ZodString>;
|
|
356
|
+
id: z.ZodCUID2;
|
|
357
|
+
name: z.ZodOptional<z.ZodString>;
|
|
358
|
+
image: z.ZodOptional<z.ZodString>;
|
|
359
|
+
role: z.ZodEnum<{
|
|
360
|
+
CREATIVE: "CREATIVE";
|
|
361
|
+
BRAND: "BRAND";
|
|
362
|
+
INVESTOR: "INVESTOR";
|
|
363
|
+
ADMIN: "ADMIN";
|
|
364
|
+
}>;
|
|
365
|
+
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
366
|
+
followsYou: z.ZodOptional<z.ZodBoolean>;
|
|
367
|
+
}, z.core.$strip>>;
|
|
368
|
+
}, z.core.$strip>;
|
|
369
|
+
export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
370
|
+
nextCursor: z.ZodString;
|
|
371
|
+
following: z.ZodArray<z.ZodObject<{
|
|
372
|
+
email: z.ZodEmail;
|
|
373
|
+
username: z.ZodOptional<z.ZodString>;
|
|
374
|
+
id: z.ZodCUID2;
|
|
375
|
+
name: z.ZodOptional<z.ZodString>;
|
|
376
|
+
image: z.ZodOptional<z.ZodString>;
|
|
377
|
+
role: z.ZodEnum<{
|
|
378
|
+
CREATIVE: "CREATIVE";
|
|
379
|
+
BRAND: "BRAND";
|
|
380
|
+
INVESTOR: "INVESTOR";
|
|
381
|
+
ADMIN: "ADMIN";
|
|
382
|
+
}>;
|
|
383
|
+
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
384
|
+
followsYou: z.ZodOptional<z.ZodBoolean>;
|
|
385
|
+
}, z.core.$strip>>;
|
|
386
|
+
}, z.core.$strip>;
|
|
351
387
|
export declare const UserWithPostsEntitySchema: z.ZodObject<{
|
|
352
388
|
userId: z.ZodCUID2;
|
|
353
389
|
posts: z.ZodArray<z.ZodObject<{
|
|
@@ -405,66 +441,6 @@ export declare const UserWithPostsEntitySchema: z.ZodObject<{
|
|
|
405
441
|
}, z.core.$strip>>>;
|
|
406
442
|
}, z.core.$strip>>;
|
|
407
443
|
}, z.core.$strip>;
|
|
408
|
-
export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
409
|
-
results: z.ZodObject<{
|
|
410
|
-
email: z.ZodEmail;
|
|
411
|
-
username: z.ZodOptional<z.ZodString>;
|
|
412
|
-
id: z.ZodCUID2;
|
|
413
|
-
name: z.ZodOptional<z.ZodString>;
|
|
414
|
-
image: z.ZodOptional<z.ZodString>;
|
|
415
|
-
role: z.ZodEnum<{
|
|
416
|
-
CREATIVE: "CREATIVE";
|
|
417
|
-
BRAND: "BRAND";
|
|
418
|
-
INVESTOR: "INVESTOR";
|
|
419
|
-
ADMIN: "ADMIN";
|
|
420
|
-
}>;
|
|
421
|
-
following: z.ZodArray<z.ZodObject<{
|
|
422
|
-
email: z.ZodEmail;
|
|
423
|
-
username: z.ZodOptional<z.ZodString>;
|
|
424
|
-
id: z.ZodCUID2;
|
|
425
|
-
name: z.ZodOptional<z.ZodString>;
|
|
426
|
-
image: z.ZodOptional<z.ZodString>;
|
|
427
|
-
role: z.ZodEnum<{
|
|
428
|
-
CREATIVE: "CREATIVE";
|
|
429
|
-
BRAND: "BRAND";
|
|
430
|
-
INVESTOR: "INVESTOR";
|
|
431
|
-
ADMIN: "ADMIN";
|
|
432
|
-
}>;
|
|
433
|
-
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
434
|
-
followsYou: z.ZodOptional<z.ZodBoolean>;
|
|
435
|
-
}, z.core.$strip>>;
|
|
436
|
-
}, z.core.$strip>;
|
|
437
|
-
}, z.core.$strip>;
|
|
438
|
-
export declare const GetUserFollowersOutputSchema: z.ZodObject<{
|
|
439
|
-
results: z.ZodObject<{
|
|
440
|
-
email: z.ZodEmail;
|
|
441
|
-
username: z.ZodOptional<z.ZodString>;
|
|
442
|
-
id: z.ZodCUID2;
|
|
443
|
-
name: z.ZodOptional<z.ZodString>;
|
|
444
|
-
image: z.ZodOptional<z.ZodString>;
|
|
445
|
-
role: z.ZodEnum<{
|
|
446
|
-
CREATIVE: "CREATIVE";
|
|
447
|
-
BRAND: "BRAND";
|
|
448
|
-
INVESTOR: "INVESTOR";
|
|
449
|
-
ADMIN: "ADMIN";
|
|
450
|
-
}>;
|
|
451
|
-
followers: z.ZodArray<z.ZodObject<{
|
|
452
|
-
email: z.ZodEmail;
|
|
453
|
-
username: z.ZodOptional<z.ZodString>;
|
|
454
|
-
id: z.ZodCUID2;
|
|
455
|
-
name: z.ZodOptional<z.ZodString>;
|
|
456
|
-
image: z.ZodOptional<z.ZodString>;
|
|
457
|
-
role: z.ZodEnum<{
|
|
458
|
-
CREATIVE: "CREATIVE";
|
|
459
|
-
BRAND: "BRAND";
|
|
460
|
-
INVESTOR: "INVESTOR";
|
|
461
|
-
ADMIN: "ADMIN";
|
|
462
|
-
}>;
|
|
463
|
-
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
464
|
-
followsYou: z.ZodOptional<z.ZodBoolean>;
|
|
465
|
-
}, z.core.$strip>>;
|
|
466
|
-
}, z.core.$strip>;
|
|
467
|
-
}, z.core.$strip>;
|
|
468
444
|
export declare const GetAuthenticatedUserOutputSchema: z.ZodObject<{
|
|
469
445
|
id: z.ZodCUID2;
|
|
470
446
|
email: z.ZodEmail;
|
package/dist/schemas/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.
|
|
3
|
+
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.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");
|
|
@@ -122,18 +122,26 @@ exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
|
|
|
122
122
|
}))
|
|
123
123
|
.openapi({ description: "List of users who follow this user." }),
|
|
124
124
|
}).openapi("UserWithFollowersEntity");
|
|
125
|
+
exports.GetUserFollowersOutputSchema = zod_openapi_1.z.object({
|
|
126
|
+
nextCursor: zod_openapi_1.z.string(),
|
|
127
|
+
followers: zod_openapi_1.z.array(exports.MinimalUserSchema.extend({
|
|
128
|
+
isFollowing: zod_openapi_1.z.boolean().optional(),
|
|
129
|
+
followsYou: zod_openapi_1.z.boolean().optional(),
|
|
130
|
+
})),
|
|
131
|
+
});
|
|
132
|
+
exports.GetUserFollowingOutputSchema = zod_openapi_1.z.object({
|
|
133
|
+
nextCursor: zod_openapi_1.z.string(),
|
|
134
|
+
following: zod_openapi_1.z.array(exports.MinimalUserSchema.extend({
|
|
135
|
+
isFollowing: zod_openapi_1.z.boolean().optional(),
|
|
136
|
+
followsYou: zod_openapi_1.z.boolean().optional(),
|
|
137
|
+
})),
|
|
138
|
+
});
|
|
125
139
|
exports.UserWithPostsEntitySchema = zod_openapi_1.z
|
|
126
140
|
.object({
|
|
127
141
|
userId: zod_openapi_1.z.cuid2(),
|
|
128
142
|
posts: zod_openapi_1.z.array(post_1.PostWithFilesEntitySchema),
|
|
129
143
|
})
|
|
130
144
|
.openapi("UserWithPostsEntity");
|
|
131
|
-
exports.GetUserFollowingOutputSchema = zod_openapi_1.z.object({
|
|
132
|
-
results: exports.UserWithFollowingEntitySchema,
|
|
133
|
-
});
|
|
134
|
-
exports.GetUserFollowersOutputSchema = zod_openapi_1.z.object({
|
|
135
|
-
results: exports.UserWithFollowersEntitySchema,
|
|
136
|
-
});
|
|
137
145
|
exports.GetAuthenticatedUserOutputSchema = exports.UserEntitySchema;
|
|
138
146
|
exports.GetAuthenticatedUserProfileOutputSchema = exports.UserProfileEntitySchema;
|
|
139
147
|
exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.UserWithProjectsEntitySchema;
|
package/package.json
CHANGED
package/src/schemas/user.ts
CHANGED
|
@@ -157,6 +157,26 @@ export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
|
|
|
157
157
|
.openapi({ description: "List of users who follow this user." }),
|
|
158
158
|
}).openapi("UserWithFollowersEntity");
|
|
159
159
|
|
|
160
|
+
export const GetUserFollowersOutputSchema = z.object({
|
|
161
|
+
nextCursor: z.string(),
|
|
162
|
+
followers: z.array(
|
|
163
|
+
MinimalUserSchema.extend({
|
|
164
|
+
isFollowing: z.boolean().optional(),
|
|
165
|
+
followsYou: z.boolean().optional(),
|
|
166
|
+
}),
|
|
167
|
+
),
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
export const GetUserFollowingOutputSchema = z.object({
|
|
171
|
+
nextCursor: z.string(),
|
|
172
|
+
following: z.array(
|
|
173
|
+
MinimalUserSchema.extend({
|
|
174
|
+
isFollowing: z.boolean().optional(),
|
|
175
|
+
followsYou: z.boolean().optional(),
|
|
176
|
+
}),
|
|
177
|
+
),
|
|
178
|
+
});
|
|
179
|
+
|
|
160
180
|
export const UserWithPostsEntitySchema = z
|
|
161
181
|
.object({
|
|
162
182
|
userId: z.cuid2(),
|
|
@@ -164,14 +184,6 @@ export const UserWithPostsEntitySchema = z
|
|
|
164
184
|
})
|
|
165
185
|
.openapi("UserWithPostsEntity");
|
|
166
186
|
|
|
167
|
-
export const GetUserFollowingOutputSchema = z.object({
|
|
168
|
-
results: UserWithFollowingEntitySchema,
|
|
169
|
-
});
|
|
170
|
-
|
|
171
|
-
export const GetUserFollowersOutputSchema = z.object({
|
|
172
|
-
results: UserWithFollowersEntitySchema,
|
|
173
|
-
});
|
|
174
|
-
|
|
175
187
|
export const GetAuthenticatedUserOutputSchema = UserEntitySchema;
|
|
176
188
|
|
|
177
189
|
export const GetAuthenticatedUserProfileOutputSchema = UserProfileEntitySchema;
|
package/src/types/user.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
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
|
-
|
|
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
|
+
UserWithProjectLikesEntitySchema,
|
|
20
|
+
GetAuthenticatedUserWithProjectLikesOutputSchema,
|
|
21
|
+
GetUserActivityInputSchema,
|
|
22
|
+
GetUserActivityOutputSchema,
|
|
23
|
+
UserStatsEntitySchema,
|
|
24
|
+
UserWithPostsEntitySchema,
|
|
25
25
|
} from "../schemas/user";
|
|
26
26
|
|
|
27
27
|
import { z } from "@hono/zod-openapi";
|
|
@@ -31,49 +31,49 @@ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
|
31
31
|
export type UserEntity = z.infer<typeof UserEntitySchema>;
|
|
32
32
|
export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
|
|
33
33
|
export type UserWithProjectsEntity = z.infer<
|
|
34
|
-
|
|
34
|
+
typeof UserWithProjectsEntitySchema
|
|
35
35
|
>;
|
|
36
36
|
export type UserWithProjectBookmarksEntity = z.infer<
|
|
37
|
-
|
|
37
|
+
typeof UserWithProjectBookmarksEntitySchema
|
|
38
38
|
>;
|
|
39
39
|
export type UserWithProjectLikesEntity = z.infer<
|
|
40
|
-
|
|
40
|
+
typeof UserWithProjectLikesEntitySchema
|
|
41
41
|
>;
|
|
42
42
|
export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
|
|
43
43
|
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
44
44
|
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
45
45
|
export type UserWithFollowingEntity = z.infer<
|
|
46
|
-
|
|
46
|
+
typeof UserWithFollowingEntitySchema
|
|
47
47
|
>;
|
|
48
48
|
export type UserWithFollowersEntity = z.infer<
|
|
49
|
-
|
|
49
|
+
typeof UserWithFollowersEntitySchema
|
|
50
50
|
>;
|
|
51
51
|
export type GetUserFollowingOutput = z.infer<
|
|
52
|
-
|
|
52
|
+
typeof GetUserFollowingOutputSchema
|
|
53
53
|
>;
|
|
54
54
|
export type GetUserFollowersOutput = z.infer<
|
|
55
|
-
|
|
55
|
+
typeof GetUserFollowersOutputSchema
|
|
56
56
|
>;
|
|
57
57
|
export type GetAuthenticatedUserOutput = z.infer<
|
|
58
|
-
|
|
58
|
+
typeof GetAuthenticatedUserOutputSchema
|
|
59
59
|
>;
|
|
60
60
|
export type GetAuthenticatedUserProfileOutput = z.infer<
|
|
61
|
-
|
|
61
|
+
typeof GetAuthenticatedUserProfileOutputSchema
|
|
62
62
|
>;
|
|
63
63
|
export type GetAuthenticatedUserWithProjectsOutput = z.infer<
|
|
64
|
-
|
|
64
|
+
typeof GetAuthenticatedUserWithProjectsOutputSchema
|
|
65
65
|
>;
|
|
66
66
|
export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
|
|
67
|
-
|
|
67
|
+
typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
|
|
68
68
|
>;
|
|
69
69
|
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
|
|
70
|
-
|
|
70
|
+
typeof GetAuthenticatedUserWithProjectLikesOutputSchema
|
|
71
71
|
>;
|
|
72
72
|
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
73
|
-
|
|
73
|
+
typeof GetAuthenticatedUserWithUserFollowingOutputSchema
|
|
74
74
|
>;
|
|
75
75
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
76
|
-
|
|
76
|
+
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
77
77
|
>;
|
|
78
78
|
|
|
79
79
|
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|