@zyacreatives/shared 2.0.33 → 2.0.35
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/post.d.ts +4 -0
- package/dist/schemas/post.js +2 -0
- package/dist/schemas/user.d.ts +16 -0
- package/dist/schemas/user.js +8 -1
- package/dist/types/user.d.ts +3 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +2 -0
- package/src/schemas/user.ts +32 -2
- package/src/types/user.ts +5 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -322,6 +322,8 @@ export declare const FeedPostEntitySchema: z.ZodObject<{
|
|
|
322
322
|
commentsCount: z.ZodNumber;
|
|
323
323
|
}, z.core.$strip>;
|
|
324
324
|
score: z.ZodNumber;
|
|
325
|
+
isLiked: z.ZodOptional<z.ZodBoolean>;
|
|
326
|
+
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
325
327
|
}, z.core.$strip>;
|
|
326
328
|
export declare const GetFeedInputSchema: z.ZodObject<{
|
|
327
329
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
@@ -383,4 +385,6 @@ export declare const GetFeedOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
383
385
|
commentsCount: z.ZodNumber;
|
|
384
386
|
}, z.core.$strip>;
|
|
385
387
|
score: z.ZodNumber;
|
|
388
|
+
isLiked: z.ZodOptional<z.ZodBoolean>;
|
|
389
|
+
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
386
390
|
}, z.core.$strip>>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -154,6 +154,8 @@ exports.LinkPreviewOutputSchema = zod_openapi_1.z.object({
|
|
|
154
154
|
exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
|
|
155
155
|
stats: entity_stats_1.EntityStatsSchema,
|
|
156
156
|
score: zod_openapi_1.z.number(),
|
|
157
|
+
isLiked: zod_openapi_1.z.boolean().optional(),
|
|
158
|
+
isBookmarked: zod_openapi_1.z.boolean().optional()
|
|
157
159
|
});
|
|
158
160
|
exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
159
161
|
limit: zod_openapi_1.z.number().optional(),
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -687,3 +687,19 @@ export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObje
|
|
|
687
687
|
}, z.core.$strip>;
|
|
688
688
|
}, z.core.$strip>>;
|
|
689
689
|
}, z.core.$strip>;
|
|
690
|
+
export declare const GetUserActivityInputSchema: z.ZodObject<{
|
|
691
|
+
activityType: z.ZodEnum<{
|
|
692
|
+
LIKE: "LIKE";
|
|
693
|
+
UNLIKE: "UNLIKE";
|
|
694
|
+
BOOKMARK: "BOOKMARK";
|
|
695
|
+
UNBOOKMARK: "UNBOOKMARK";
|
|
696
|
+
VIEW: "VIEW";
|
|
697
|
+
}>;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
700
|
+
parentId: z.ZodString;
|
|
701
|
+
parentType: z.ZodEnum<{
|
|
702
|
+
PROJECT: "PROJECT";
|
|
703
|
+
POST: "POST";
|
|
704
|
+
}>;
|
|
705
|
+
}, z.core.$strip>>;
|
package/dist/schemas/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = exports.UserSocialGraphEntitySchema = void 0;
|
|
3
|
+
exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = exports.UserSocialGraphEntitySchema = 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");
|
|
@@ -136,3 +136,10 @@ exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.UserWithP
|
|
|
136
136
|
exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.UserWithFollowingEntitySchema;
|
|
137
137
|
exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema;
|
|
138
138
|
exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.UserWithProjectLikesEntitySchema;
|
|
139
|
+
exports.GetUserActivityInputSchema = zod_openapi_1.z.object({
|
|
140
|
+
activityType: zod_openapi_1.z.enum(Object.values(constants_1.ACTIVITY_TYPES)),
|
|
141
|
+
});
|
|
142
|
+
exports.GetUserActivityOutputSchema = zod_openapi_1.z.array(zod_openapi_1.z.object({
|
|
143
|
+
parentId: zod_openapi_1.z.string(),
|
|
144
|
+
parentType: zod_openapi_1.z.enum(Object.values(constants_1.ACTIVITY_PARENT_TYPES)),
|
|
145
|
+
}));
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseUserEntitySchema, MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema } from "../schemas/user";
|
|
1
|
+
import { BaseUserEntitySchema, MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema } from "../schemas/user";
|
|
2
2
|
import { z } from "@hono/zod-openapi";
|
|
3
3
|
export type BaseUserEntity = z.infer<typeof BaseUserEntitySchema>;
|
|
4
4
|
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
@@ -20,3 +20,5 @@ export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<typeof GetA
|
|
|
20
20
|
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<typeof GetAuthenticatedUserWithProjectLikesOutputSchema>;
|
|
21
21
|
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowingOutputSchema>;
|
|
22
22
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowersOutputSchema>;
|
|
23
|
+
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
24
|
+
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -169,6 +169,8 @@ export const LinkPreviewOutputSchema = z.object({
|
|
|
169
169
|
export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
|
|
170
170
|
stats: EntityStatsSchema,
|
|
171
171
|
score: z.number(),
|
|
172
|
+
isLiked: z.boolean().optional(),
|
|
173
|
+
isBookmarked: z.boolean().optional()
|
|
172
174
|
});
|
|
173
175
|
|
|
174
176
|
export const GetFeedInputSchema = z.object({
|
package/src/schemas/user.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
ROLES,
|
|
5
|
+
USER_STATUSES,
|
|
6
|
+
ONBOARDING_PAGES,
|
|
7
|
+
ACTIVITY_TYPES,
|
|
8
|
+
ACTIVITY_PARENT_TYPES,
|
|
9
|
+
} from "../constants";
|
|
10
|
+
import type {
|
|
11
|
+
Role,
|
|
12
|
+
UserStatus,
|
|
13
|
+
OnboardingPage,
|
|
14
|
+
ActivityType,
|
|
15
|
+
ActivityParentType,
|
|
16
|
+
} from "../constants";
|
|
5
17
|
import { ProjectEntitySchema } from "./project";
|
|
6
18
|
import { BookmarkEntitySchema } from "./bookmark";
|
|
7
19
|
import { LikeEntitySchema } from "./like";
|
|
@@ -168,3 +180,21 @@ export const GetAuthenticatedUserWithUserFollowersOutputSchema =
|
|
|
168
180
|
|
|
169
181
|
export const GetAuthenticatedUserWithProjectLikesOutputSchema =
|
|
170
182
|
UserWithProjectLikesEntitySchema;
|
|
183
|
+
|
|
184
|
+
export const GetUserActivityInputSchema = z.object({
|
|
185
|
+
activityType: z.enum(
|
|
186
|
+
Object.values(ACTIVITY_TYPES) as [ActivityType, ...ActivityType[]]
|
|
187
|
+
),
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
export const GetUserActivityOutputSchema = z.array(
|
|
191
|
+
z.object({
|
|
192
|
+
parentId: z.string(),
|
|
193
|
+
parentType: z.enum(
|
|
194
|
+
Object.values(ACTIVITY_PARENT_TYPES) as [
|
|
195
|
+
ActivityParentType,
|
|
196
|
+
...ActivityParentType[]
|
|
197
|
+
]
|
|
198
|
+
),
|
|
199
|
+
})
|
|
200
|
+
);
|
package/src/types/user.ts
CHANGED
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
GetAuthenticatedUserWithUserFollowersOutputSchema,
|
|
20
20
|
UserWithProjectLikesEntitySchema,
|
|
21
21
|
GetAuthenticatedUserWithProjectLikesOutputSchema,
|
|
22
|
+
GetUserActivityInputSchema,
|
|
23
|
+
GetUserActivityOutputSchema,
|
|
22
24
|
} from "../schemas/user";
|
|
23
25
|
|
|
24
26
|
import { z } from "@hono/zod-openapi";
|
|
@@ -71,3 +73,6 @@ export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
|
71
73
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
72
74
|
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
73
75
|
>;
|
|
76
|
+
|
|
77
|
+
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
78
|
+
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|