@zyacreatives/shared 2.1.51 → 2.1.53

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>;
@@ -323,6 +342,25 @@ export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
323
342
  actorUsername: z.ZodString;
324
343
  actorImageUrl: z.ZodOptional<z.ZodURL>;
325
344
  }, z.core.$strip>>;
345
+ }, z.core.$strip>;
346
+ export declare const GetPostWithBookmarksOutputSchema: z.ZodObject<{
347
+ id: z.ZodCUID2;
348
+ parentId: z.ZodOptional<z.ZodCUID2>;
349
+ content: z.ZodOptional<z.ZodString>;
350
+ bookmarks: z.ZodArray<z.ZodObject<{
351
+ id: z.ZodCUID2;
352
+ type: z.ZodEnum<{
353
+ readonly LIKE: "LIKE";
354
+ readonly UNLIKE: "UNLIKE";
355
+ readonly BOOKMARK: "BOOKMARK";
356
+ readonly UNBOOKMARK: "UNBOOKMARK";
357
+ readonly VIEW: "VIEW";
358
+ }>;
359
+ actorName: z.ZodString;
360
+ actorId: z.ZodString;
361
+ actorUsername: z.ZodString;
362
+ actorImageUrl: z.ZodOptional<z.ZodURL>;
363
+ }, z.core.$strip>>;
326
364
  totalFetched: z.ZodNumber;
327
365
  totalNo: z.ZodNumber;
328
366
  }, 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.GetPostWithBookmarksOutputSchema = 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({
@@ -163,11 +165,13 @@ exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
163
165
  });
164
166
  exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
165
167
  bookmarks: zod_openapi_1.z.array(activity_1.ActivitySchema),
166
- totalFetched: zod_openapi_1.z.number().int(),
167
- totalNo: zod_openapi_1.z.number().int(),
168
168
  }).openapi({
169
169
  title: "PostWithPostBookmarksEntity",
170
170
  });
171
+ exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema.extend({
172
+ totalFetched: zod_openapi_1.z.number().int(),
173
+ totalNo: zod_openapi_1.z.number().int(),
174
+ });
171
175
  exports.LinkPreviewInputSchema = zod_openapi_1.z.object({
172
176
  url: zod_openapi_1.z.string(),
173
177
  });
@@ -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, GetPostWithBookmarksOutputSchema, 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,5 @@ 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>;
21
+ export type GetPostWithBookmarksOutput = z.infer<typeof GetPostWithBookmarksOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.51",
3
+ "version": "2.1.53",
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({
@@ -186,12 +189,16 @@ export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
186
189
 
187
190
  export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
188
191
  bookmarks: z.array(ActivitySchema),
189
- totalFetched: z.number().int(),
190
- totalNo: z.number().int(),
191
192
  }).openapi({
192
193
  title: "PostWithPostBookmarksEntity",
193
194
  });
194
195
 
196
+ export const GetPostWithBookmarksOutputSchema =
197
+ PostWithBookmarksEntitySchema.extend({
198
+ totalFetched: z.number().int(),
199
+ totalNo: z.number().int(),
200
+ });
201
+
195
202
  export const LinkPreviewInputSchema = z.object({
196
203
  url: z.string(),
197
204
  });
package/src/types/post.ts CHANGED
@@ -6,6 +6,8 @@ import {
6
6
  GetFeedInputSchema,
7
7
  GetFeedOutputSchema,
8
8
  GetPostOutputSchema,
9
+ GetPostWithBookmarksOutputSchema,
10
+ GetPostWithLikesOutputSchema,
9
11
  LinkPreviewInputSchema,
10
12
  LinkPreviewOutputSchema,
11
13
  PostEntitySchema,
@@ -41,3 +43,10 @@ export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
41
43
 
42
44
  export type SearchPostInput = z.infer<typeof SearchPostInputSchema>;
43
45
  export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
46
+
47
+ export type GetPostWithLikesOutput = z.infer<
48
+ typeof GetPostWithLikesOutputSchema
49
+ >;
50
+ export type GetPostWithBookmarksOutput = z.infer<
51
+ typeof GetPostWithBookmarksOutputSchema
52
+ >;