@zyacreatives/shared 2.2.78 → 2.2.79

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/src/types/user.ts CHANGED
@@ -1,75 +1,126 @@
1
+ import { z } from "@hono/zod-openapi";
2
+
1
3
  import {
2
- MinimalUserSchema,
3
4
  UserEntitySchema,
5
+ MinimalUserSchema,
4
6
  UserProfileEntitySchema,
7
+ UserStatsEntitySchema,
5
8
  UserWithProjectsEntitySchema,
9
+ UserWithPostsEntitySchema,
10
+ UserWithProjectLikesEntitySchema,
11
+ UserWithPostLikesEntitySchema,
12
+ UserWithJobBookmarksEntitySchema,
13
+ UserWithJobBookmarksInputSchema,
14
+ UserWithJobBookmarksOutputSchema,
6
15
  UserWithProjectBookmarksEntitySchema,
7
- GetUserFollowingInputSchema,
8
- GetUserFollowersInputSchema,
16
+ UserWithPostBookmarksEntitySchema,
17
+ GetUserWithProjectBookmarksInputSchema,
18
+ GetUserWithPostBookmarksInputSchema,
19
+ GetUserWithProjectBookmarksOutputSchema,
20
+ GetUserWithPostBookmarksOutputSchema,
9
21
  UserWithFollowingEntitySchema,
10
22
  UserWithFollowersEntitySchema,
23
+ GetUserFollowingInputSchema,
24
+ GetUserFollowersInputSchema,
11
25
  GetUserFollowingOutputSchema,
12
26
  GetUserFollowersOutputSchema,
13
27
  GetAuthenticatedUserOutputSchema,
14
28
  GetAuthenticatedUserProfileOutputSchema,
15
29
  GetAuthenticatedUserWithProjectsOutputSchema,
16
30
  GetAuthenticatedUserWithProjectBookmarksOutputSchema,
31
+ GetAuthenticatedUserWithProjectLikesOutputSchema,
17
32
  GetAuthenticatedUserWithUserFollowingOutputSchema,
18
33
  GetAuthenticatedUserWithUserFollowersOutputSchema,
19
- SearchUsersInputSchema,
20
- UserWithProjectLikesEntitySchema,
21
- GetAuthenticatedUserWithProjectLikesOutputSchema,
22
34
  GetUserActivityInputSchema,
23
35
  GetUserActivityOutputSchema,
24
- UserStatsEntitySchema,
25
- UserWithPostsEntitySchema,
36
+ SearchUsersInputSchema,
26
37
  SearchUsersOutputSchema,
27
- UserWithPostBookmarksEntitySchema,
28
- UserWithPostLikesEntitySchema,
29
38
  UserSearchDocumentSchema,
30
- UserWithJobBookmarksEntitySchema,
31
- UserWithJobBookmarksInputSchema,
32
- UserWithJobBookmarksOutputSchema,
33
39
  } from "../schemas/user";
34
40
 
35
- import { z } from "@hono/zod-openapi";
36
-
41
+ // ==========================================
42
+ // 1. CORE USER ENTITIES
43
+ // ==========================================
37
44
  export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
38
- export type MinimalUser = z.infer<typeof MinimalUserSchema>;
39
45
  export type UserEntity = z.infer<typeof UserEntitySchema>;
46
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
40
47
  export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
48
+ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
49
+
50
+ // ==========================================
51
+ // 2. CONTENT ASSOCIATIONS (Projects, Posts)
52
+ // ==========================================
41
53
  export type UserWithProjectsEntity = z.infer<
42
54
  typeof UserWithProjectsEntitySchema
43
55
  >;
44
- export type UserWithProjectBookmarksEntity = z.infer<
45
- typeof UserWithProjectBookmarksEntitySchema
46
- >;
56
+ export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
57
+
58
+ // ==========================================
59
+ // 3. LIKES
60
+ // ==========================================
47
61
  export type UserWithProjectLikesEntity = z.infer<
48
62
  typeof UserWithProjectLikesEntitySchema
49
63
  >;
64
+ export type UserWithPostLikesEntity = z.infer<
65
+ typeof UserWithPostLikesEntitySchema
66
+ >;
67
+
68
+ // ==========================================
69
+ // 4. BOOKMARKS
70
+ // ==========================================
71
+ export type UserWithJobBookmarksEntity = z.infer<
72
+ typeof UserWithJobBookmarksEntitySchema
73
+ >;
74
+ export type UserWithJobBookmarksInput = z.infer<
75
+ typeof UserWithJobBookmarksInputSchema
76
+ >;
77
+ export type UserWithJobBookmarksOutput = z.infer<
78
+ typeof UserWithJobBookmarksOutputSchema
79
+ >;
50
80
 
81
+ export type UserWithProjectBookmarksEntity = z.infer<
82
+ typeof UserWithProjectBookmarksEntitySchema
83
+ >;
51
84
  export type UserWithPostBookmarksEntity = z.infer<
52
85
  typeof UserWithPostBookmarksEntitySchema
53
86
  >;
54
- export type UserWithPostLikesEntity = z.infer<
55
- typeof UserWithPostLikesEntitySchema
87
+
88
+ export type GetUserWithProjectBookmarksInput = z.infer<
89
+ typeof GetUserWithProjectBookmarksInputSchema
90
+ >;
91
+ export type GetUserWithPostBookmarksInput = z.infer<
92
+ typeof GetUserWithPostBookmarksInputSchema
93
+ >;
94
+ export type GetUserWithProjectBookmarksOutput = z.infer<
95
+ typeof GetUserWithProjectBookmarksOutputSchema
96
+ >;
97
+ export type GetUserWithPostBookmarksOutput = z.infer<
98
+ typeof GetUserWithPostBookmarksOutputSchema
56
99
  >;
57
100
 
58
- export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
59
- export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
60
- export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
101
+ // ==========================================
102
+ // 5. FOLLOWERS & FOLLOWING
103
+ // ==========================================
61
104
  export type UserWithFollowingEntity = z.infer<
62
105
  typeof UserWithFollowingEntitySchema
63
106
  >;
64
107
  export type UserWithFollowersEntity = z.infer<
65
108
  typeof UserWithFollowersEntitySchema
66
109
  >;
110
+
111
+ export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
112
+ export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
113
+
67
114
  export type GetUserFollowingOutput = z.infer<
68
115
  typeof GetUserFollowingOutputSchema
69
116
  >;
70
117
  export type GetUserFollowersOutput = z.infer<
71
118
  typeof GetUserFollowersOutputSchema
72
119
  >;
120
+
121
+ // ==========================================
122
+ // 6. AUTHENTICATED USER OUTPUTS
123
+ // ==========================================
73
124
  export type GetAuthenticatedUserOutput = z.infer<
74
125
  typeof GetAuthenticatedUserOutputSchema
75
126
  >;
@@ -92,20 +143,15 @@ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
92
143
  typeof GetAuthenticatedUserWithUserFollowersOutputSchema
93
144
  >;
94
145
 
146
+ // ==========================================
147
+ // 7. ACTIVITY
148
+ // ==========================================
95
149
  export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
96
150
  export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
97
- export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
98
151
 
152
+ // ==========================================
153
+ // 8. SEARCH
154
+ // ==========================================
99
155
  export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
100
156
  export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
101
157
  export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
102
-
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
- >;