@zyacreatives/shared 2.1.51 → 2.1.52

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.
@@ -277,6 +277,25 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
277
277
  actorUsername: z.ZodString;
278
278
  actorImageUrl: z.ZodOptional<z.ZodURL>;
279
279
  }, z.core.$strip>>;
280
+ }, z.core.$strip>;
281
+ export declare const GetPostWithLikesOutputSchema: z.ZodObject<{
282
+ id: z.ZodCUID2;
283
+ parentId: z.ZodOptional<z.ZodCUID2>;
284
+ content: z.ZodOptional<z.ZodString>;
285
+ likes: z.ZodArray<z.ZodObject<{
286
+ id: z.ZodCUID2;
287
+ type: z.ZodEnum<{
288
+ readonly LIKE: "LIKE";
289
+ readonly UNLIKE: "UNLIKE";
290
+ readonly BOOKMARK: "BOOKMARK";
291
+ readonly UNBOOKMARK: "UNBOOKMARK";
292
+ readonly VIEW: "VIEW";
293
+ }>;
294
+ actorName: z.ZodString;
295
+ actorId: z.ZodString;
296
+ actorUsername: z.ZodString;
297
+ actorImageUrl: z.ZodOptional<z.ZodURL>;
298
+ }, z.core.$strip>>;
280
299
  totalFetched: z.ZodNumber;
281
300
  totalNo: z.ZodNumber;
282
301
  }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
3
+ exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.PostWithBookmarksEntitySchema = exports.PostWithCommentsEntitySchema = exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema = exports.MinimalPostSchema = exports.PostIdSchema = exports.GetPostOutputSchema = exports.CreatePostOutputSchema = exports.CreatePostInputSchema = exports.PostWithFilesEntitySchema = exports.PostFileEntitySchema = exports.PostEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
@@ -151,11 +151,13 @@ exports.MinimalPostSchema = exports.PostEntitySchema.pick({
151
151
  });
152
152
  exports.PostWithLikesEntitySchema = exports.MinimalPostSchema.extend({
153
153
  likes: zod_openapi_1.z.array(activity_1.ActivitySchema),
154
- totalFetched: zod_openapi_1.z.number().int(),
155
- totalNo: zod_openapi_1.z.number().int(),
156
154
  }).openapi({
157
155
  title: "PostWithPostLikesEntity",
158
156
  });
157
+ exports.GetPostWithLikesOutputSchema = exports.PostWithLikesEntitySchema.extend({
158
+ totalFetched: zod_openapi_1.z.number().int(),
159
+ totalNo: zod_openapi_1.z.number().int(),
160
+ });
159
161
  exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
160
162
  comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema),
161
163
  }).openapi({
@@ -1,5 +1,5 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetFeedOutputSchema, GetPostOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema, SearchPostInputSchema, SearchPostOutputSchema } from "../schemas/post";
2
+ import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetFeedOutputSchema, GetPostOutputSchema, GetPostWithLikesOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema, SearchPostInputSchema, SearchPostOutputSchema } from "../schemas/post";
3
3
  export type PostEntity = z.infer<typeof PostEntitySchema>;
4
4
  export type PostFileEntity = z.infer<typeof PostFileEntitySchema>;
5
5
  export type PostWithFilesEntity = z.infer<typeof PostWithFilesEntitySchema>;
@@ -17,3 +17,4 @@ export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
17
17
  export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
18
18
  export type SearchPostInput = z.infer<typeof SearchPostInputSchema>;
19
19
  export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
20
+ export type GetPostWithLikesOutput = z.infer<typeof GetPostWithLikesOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.51",
3
+ "version": "2.1.52",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -172,12 +172,15 @@ export const MinimalPostSchema = PostEntitySchema.pick({
172
172
 
173
173
  export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
174
174
  likes: z.array(ActivitySchema),
175
- totalFetched: z.number().int(),
176
- totalNo: z.number().int(),
177
175
  }).openapi({
178
176
  title: "PostWithPostLikesEntity",
179
177
  });
180
178
 
179
+ export const GetPostWithLikesOutputSchema = PostWithLikesEntitySchema.extend({
180
+ totalFetched: z.number().int(),
181
+ totalNo: z.number().int(),
182
+ });
183
+
181
184
  export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
182
185
  comments: z.array(CommentEntitySchema),
183
186
  }).openapi({
package/src/types/post.ts CHANGED
@@ -6,6 +6,7 @@ import {
6
6
  GetFeedInputSchema,
7
7
  GetFeedOutputSchema,
8
8
  GetPostOutputSchema,
9
+ GetPostWithLikesOutputSchema,
9
10
  LinkPreviewInputSchema,
10
11
  LinkPreviewOutputSchema,
11
12
  PostEntitySchema,
@@ -41,3 +42,7 @@ export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
41
42
 
42
43
  export type SearchPostInput = z.infer<typeof SearchPostInputSchema>;
43
44
  export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
45
+
46
+ export type GetPostWithLikesOutput = z.infer<
47
+ typeof GetPostWithLikesOutputSchema
48
+ >;