@zyacreatives/shared 2.1.85 → 2.1.87
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/README.md +1 -1
- package/dist/constants.d.ts +5 -2
- package/dist/constants.js +5 -2
- package/package.json +1 -1
- package/src/constants.ts +487 -483
- package/src/index.ts +4 -4
- package/src/schemas/activity.ts +14 -14
- package/src/schemas/auth.ts +43 -43
- package/src/schemas/bookmark.ts +38 -38
- package/src/schemas/brand.ts +146 -146
- package/src/schemas/chat.ts +31 -31
- package/src/schemas/comment.ts +60 -60
- package/src/schemas/common.ts +22 -22
- package/src/schemas/creative.ts +222 -222
- package/src/schemas/discipline.ts +88 -88
- package/src/schemas/entity-stats.ts +43 -43
- package/src/schemas/feed.ts +11 -11
- package/src/schemas/file.ts +61 -61
- package/src/schemas/index.ts +21 -21
- package/src/schemas/investor.ts +211 -211
- package/src/schemas/job-application.ts +257 -257
- package/src/schemas/job.ts +364 -364
- package/src/schemas/like.ts +38 -38
- package/src/schemas/message.ts +112 -112
- package/src/schemas/notification.ts +71 -71
- package/src/schemas/post.ts +279 -279
- package/src/schemas/project.ts +298 -298
- package/src/schemas/user-strike.ts +21 -21
- package/src/schemas/user.ts +283 -283
- package/src/schemas/username.ts +11 -11
- package/src/schemas/view.ts +50 -50
- package/src/types/auth.ts +5 -5
- package/src/types/bookmark.ts +4 -4
- package/src/types/brand.ts +37 -37
- package/src/types/chat.ts +21 -21
- package/src/types/comment.ts +12 -12
- package/src/types/common.ts +9 -9
- package/src/types/creative.ts +33 -33
- package/src/types/discipline.ts +32 -32
- package/src/types/entity-stats.ts +4 -4
- package/src/types/feed.ts +5 -5
- package/src/types/file.ts +39 -39
- package/src/types/index.ts +22 -22
- package/src/types/investor.ts +34 -34
- package/src/types/job-application.ts +41 -41
- package/src/types/job.ts +71 -71
- package/src/types/like.ts +3 -3
- package/src/types/message.ts +23 -23
- package/src/types/notification.ts +34 -34
- package/src/types/post.ts +63 -63
- package/src/types/project.ts +65 -65
- package/src/types/user-strike.ts +10 -10
- package/src/types/user.ts +96 -96
- package/src/types/username.ts +4 -4
- package/src/utils/slugify.ts +10 -10
- package/tsconfig.json +13 -13
package/src/types/user.ts
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
import {
|
|
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
|
-
} from "../schemas/user";
|
|
30
|
-
|
|
31
|
-
import { z } from "@hono/zod-openapi";
|
|
32
|
-
|
|
33
|
-
export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
|
|
34
|
-
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
35
|
-
export type UserEntity = z.infer<typeof UserEntitySchema>;
|
|
36
|
-
export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
|
|
37
|
-
export type UserWithProjectsEntity = z.infer<
|
|
38
|
-
typeof UserWithProjectsEntitySchema
|
|
39
|
-
>;
|
|
40
|
-
export type UserWithProjectBookmarksEntity = z.infer<
|
|
41
|
-
typeof UserWithProjectBookmarksEntitySchema
|
|
42
|
-
>;
|
|
43
|
-
export type UserWithProjectLikesEntity = z.infer<
|
|
44
|
-
typeof UserWithProjectLikesEntitySchema
|
|
45
|
-
>;
|
|
46
|
-
|
|
47
|
-
export type UserWithPostBookmarksEntity = z.infer<
|
|
48
|
-
typeof UserWithPostBookmarksEntitySchema
|
|
49
|
-
>;
|
|
50
|
-
export type UserWithPostLikesEntity = z.infer<
|
|
51
|
-
typeof UserWithPostLikesEntitySchema
|
|
52
|
-
>;
|
|
53
|
-
|
|
54
|
-
export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
|
|
55
|
-
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
56
|
-
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
57
|
-
export type UserWithFollowingEntity = z.infer<
|
|
58
|
-
typeof UserWithFollowingEntitySchema
|
|
59
|
-
>;
|
|
60
|
-
export type UserWithFollowersEntity = z.infer<
|
|
61
|
-
typeof UserWithFollowersEntitySchema
|
|
62
|
-
>;
|
|
63
|
-
export type GetUserFollowingOutput = z.infer<
|
|
64
|
-
typeof GetUserFollowingOutputSchema
|
|
65
|
-
>;
|
|
66
|
-
export type GetUserFollowersOutput = z.infer<
|
|
67
|
-
typeof GetUserFollowersOutputSchema
|
|
68
|
-
>;
|
|
69
|
-
export type GetAuthenticatedUserOutput = z.infer<
|
|
70
|
-
typeof GetAuthenticatedUserOutputSchema
|
|
71
|
-
>;
|
|
72
|
-
export type GetAuthenticatedUserProfileOutput = z.infer<
|
|
73
|
-
typeof GetAuthenticatedUserProfileOutputSchema
|
|
74
|
-
>;
|
|
75
|
-
export type GetAuthenticatedUserWithProjectsOutput = z.infer<
|
|
76
|
-
typeof GetAuthenticatedUserWithProjectsOutputSchema
|
|
77
|
-
>;
|
|
78
|
-
export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
|
|
79
|
-
typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
|
|
80
|
-
>;
|
|
81
|
-
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
|
|
82
|
-
typeof GetAuthenticatedUserWithProjectLikesOutputSchema
|
|
83
|
-
>;
|
|
84
|
-
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
85
|
-
typeof GetAuthenticatedUserWithUserFollowingOutputSchema
|
|
86
|
-
>;
|
|
87
|
-
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
88
|
-
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
89
|
-
>;
|
|
90
|
-
|
|
91
|
-
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
92
|
-
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|
|
93
|
-
export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
|
|
94
|
-
|
|
95
|
-
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
|
96
|
-
export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
|
|
1
|
+
import {
|
|
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
|
+
} from "../schemas/user";
|
|
30
|
+
|
|
31
|
+
import { z } from "@hono/zod-openapi";
|
|
32
|
+
|
|
33
|
+
export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
|
|
34
|
+
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
35
|
+
export type UserEntity = z.infer<typeof UserEntitySchema>;
|
|
36
|
+
export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
|
|
37
|
+
export type UserWithProjectsEntity = z.infer<
|
|
38
|
+
typeof UserWithProjectsEntitySchema
|
|
39
|
+
>;
|
|
40
|
+
export type UserWithProjectBookmarksEntity = z.infer<
|
|
41
|
+
typeof UserWithProjectBookmarksEntitySchema
|
|
42
|
+
>;
|
|
43
|
+
export type UserWithProjectLikesEntity = z.infer<
|
|
44
|
+
typeof UserWithProjectLikesEntitySchema
|
|
45
|
+
>;
|
|
46
|
+
|
|
47
|
+
export type UserWithPostBookmarksEntity = z.infer<
|
|
48
|
+
typeof UserWithPostBookmarksEntitySchema
|
|
49
|
+
>;
|
|
50
|
+
export type UserWithPostLikesEntity = z.infer<
|
|
51
|
+
typeof UserWithPostLikesEntitySchema
|
|
52
|
+
>;
|
|
53
|
+
|
|
54
|
+
export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
|
|
55
|
+
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
56
|
+
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
57
|
+
export type UserWithFollowingEntity = z.infer<
|
|
58
|
+
typeof UserWithFollowingEntitySchema
|
|
59
|
+
>;
|
|
60
|
+
export type UserWithFollowersEntity = z.infer<
|
|
61
|
+
typeof UserWithFollowersEntitySchema
|
|
62
|
+
>;
|
|
63
|
+
export type GetUserFollowingOutput = z.infer<
|
|
64
|
+
typeof GetUserFollowingOutputSchema
|
|
65
|
+
>;
|
|
66
|
+
export type GetUserFollowersOutput = z.infer<
|
|
67
|
+
typeof GetUserFollowersOutputSchema
|
|
68
|
+
>;
|
|
69
|
+
export type GetAuthenticatedUserOutput = z.infer<
|
|
70
|
+
typeof GetAuthenticatedUserOutputSchema
|
|
71
|
+
>;
|
|
72
|
+
export type GetAuthenticatedUserProfileOutput = z.infer<
|
|
73
|
+
typeof GetAuthenticatedUserProfileOutputSchema
|
|
74
|
+
>;
|
|
75
|
+
export type GetAuthenticatedUserWithProjectsOutput = z.infer<
|
|
76
|
+
typeof GetAuthenticatedUserWithProjectsOutputSchema
|
|
77
|
+
>;
|
|
78
|
+
export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
|
|
79
|
+
typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
|
|
80
|
+
>;
|
|
81
|
+
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
|
|
82
|
+
typeof GetAuthenticatedUserWithProjectLikesOutputSchema
|
|
83
|
+
>;
|
|
84
|
+
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
85
|
+
typeof GetAuthenticatedUserWithUserFollowingOutputSchema
|
|
86
|
+
>;
|
|
87
|
+
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
88
|
+
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
89
|
+
>;
|
|
90
|
+
|
|
91
|
+
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
92
|
+
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|
|
93
|
+
export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
|
|
94
|
+
|
|
95
|
+
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
|
96
|
+
export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
|
package/src/types/username.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { UsernameSchema } from "../schemas";
|
|
3
|
-
|
|
4
|
-
export type UsernameInput = z.infer<typeof UsernameSchema>;
|
|
1
|
+
import { z } from "@hono/zod-openapi";
|
|
2
|
+
import { UsernameSchema } from "../schemas";
|
|
3
|
+
|
|
4
|
+
export type UsernameInput = z.infer<typeof UsernameSchema>;
|
package/src/utils/slugify.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export const slugify = ({ value }: { value: string }) => {
|
|
2
|
-
return value
|
|
3
|
-
.normalize("NFKD")
|
|
4
|
-
.replace(/[\u0300-\u036f]/g, "") // Remove diacritics
|
|
5
|
-
.toLowerCase()
|
|
6
|
-
.trim()
|
|
7
|
-
.replace(/[^a-z0-9]+/g, "_") // Replace non-alphanum with underscore
|
|
8
|
-
.replace(/^_+|_+$/g, "") // Trim leading/trailing underscores
|
|
9
|
-
.replace(/__+/g, "_"); // Collapse multiple underscores
|
|
10
|
-
};
|
|
1
|
+
export const slugify = ({ value }: { value: string }) => {
|
|
2
|
+
return value
|
|
3
|
+
.normalize("NFKD")
|
|
4
|
+
.replace(/[\u0300-\u036f]/g, "") // Remove diacritics
|
|
5
|
+
.toLowerCase()
|
|
6
|
+
.trim()
|
|
7
|
+
.replace(/[^a-z0-9]+/g, "_") // Replace non-alphanum with underscore
|
|
8
|
+
.replace(/^_+|_+$/g, "") // Trim leading/trailing underscores
|
|
9
|
+
.replace(/__+/g, "_"); // Collapse multiple underscores
|
|
10
|
+
};
|
package/tsconfig.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "NodeNext",
|
|
5
|
-
"moduleResolution": "NodeNext",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"outDir": "dist",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true
|
|
11
|
-
},
|
|
12
|
-
"include": ["src"]
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ESNext",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"outDir": "dist",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src"]
|
|
13
|
+
}
|