@zyacreatives/shared 2.1.52 → 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.
- package/dist/schemas/post.d.ts +19 -0
- package/dist/schemas/post.js +5 -3
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +6 -2
- package/src/types/post.ts +4 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -342,6 +342,25 @@ export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
|
|
|
342
342
|
actorUsername: z.ZodString;
|
|
343
343
|
actorImageUrl: z.ZodOptional<z.ZodURL>;
|
|
344
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>>;
|
|
345
364
|
totalFetched: z.ZodNumber;
|
|
346
365
|
totalNo: z.ZodNumber;
|
|
347
366
|
}, z.core.$strip>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -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.GetPostWithLikesOutputSchema = 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");
|
|
@@ -165,11 +165,13 @@ exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
|
|
|
165
165
|
});
|
|
166
166
|
exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
|
|
167
167
|
bookmarks: zod_openapi_1.z.array(activity_1.ActivitySchema),
|
|
168
|
-
totalFetched: zod_openapi_1.z.number().int(),
|
|
169
|
-
totalNo: zod_openapi_1.z.number().int(),
|
|
170
168
|
}).openapi({
|
|
171
169
|
title: "PostWithPostBookmarksEntity",
|
|
172
170
|
});
|
|
171
|
+
exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema.extend({
|
|
172
|
+
totalFetched: zod_openapi_1.z.number().int(),
|
|
173
|
+
totalNo: zod_openapi_1.z.number().int(),
|
|
174
|
+
});
|
|
173
175
|
exports.LinkPreviewInputSchema = zod_openapi_1.z.object({
|
|
174
176
|
url: zod_openapi_1.z.string(),
|
|
175
177
|
});
|
package/dist/types/post.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetFeedOutputSchema, GetPostOutputSchema, GetPostWithLikesOutputSchema, 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>;
|
|
@@ -18,3 +18,4 @@ 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
20
|
export type GetPostWithLikesOutput = z.infer<typeof GetPostWithLikesOutputSchema>;
|
|
21
|
+
export type GetPostWithBookmarksOutput = z.infer<typeof GetPostWithBookmarksOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -189,12 +189,16 @@ export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
|
|
|
189
189
|
|
|
190
190
|
export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
|
|
191
191
|
bookmarks: z.array(ActivitySchema),
|
|
192
|
-
totalFetched: z.number().int(),
|
|
193
|
-
totalNo: z.number().int(),
|
|
194
192
|
}).openapi({
|
|
195
193
|
title: "PostWithPostBookmarksEntity",
|
|
196
194
|
});
|
|
197
195
|
|
|
196
|
+
export const GetPostWithBookmarksOutputSchema =
|
|
197
|
+
PostWithBookmarksEntitySchema.extend({
|
|
198
|
+
totalFetched: z.number().int(),
|
|
199
|
+
totalNo: z.number().int(),
|
|
200
|
+
});
|
|
201
|
+
|
|
198
202
|
export const LinkPreviewInputSchema = z.object({
|
|
199
203
|
url: z.string(),
|
|
200
204
|
});
|
package/src/types/post.ts
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
GetFeedInputSchema,
|
|
7
7
|
GetFeedOutputSchema,
|
|
8
8
|
GetPostOutputSchema,
|
|
9
|
+
GetPostWithBookmarksOutputSchema,
|
|
9
10
|
GetPostWithLikesOutputSchema,
|
|
10
11
|
LinkPreviewInputSchema,
|
|
11
12
|
LinkPreviewOutputSchema,
|
|
@@ -46,3 +47,6 @@ export type SearchPostOutput = z.infer<typeof SearchPostOutputSchema>;
|
|
|
46
47
|
export type GetPostWithLikesOutput = z.infer<
|
|
47
48
|
typeof GetPostWithLikesOutputSchema
|
|
48
49
|
>;
|
|
50
|
+
export type GetPostWithBookmarksOutput = z.infer<
|
|
51
|
+
typeof GetPostWithBookmarksOutputSchema
|
|
52
|
+
>;
|