@zyacreatives/shared 2.1.52 → 2.1.54
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 +16 -3
- package/dist/schemas/post.js +8 -4
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +8 -3
- package/src/types/post.ts +4 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -279,9 +279,6 @@ export declare const PostWithLikesEntitySchema: z.ZodObject<{
|
|
|
279
279
|
}, z.core.$strip>>;
|
|
280
280
|
}, z.core.$strip>;
|
|
281
281
|
export declare const GetPostWithLikesOutputSchema: z.ZodObject<{
|
|
282
|
-
id: z.ZodCUID2;
|
|
283
|
-
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
284
|
-
content: z.ZodOptional<z.ZodString>;
|
|
285
282
|
likes: z.ZodArray<z.ZodObject<{
|
|
286
283
|
id: z.ZodCUID2;
|
|
287
284
|
type: z.ZodEnum<{
|
|
@@ -342,6 +339,22 @@ export declare const PostWithBookmarksEntitySchema: z.ZodObject<{
|
|
|
342
339
|
actorUsername: z.ZodString;
|
|
343
340
|
actorImageUrl: z.ZodOptional<z.ZodURL>;
|
|
344
341
|
}, z.core.$strip>>;
|
|
342
|
+
}, z.core.$strip>;
|
|
343
|
+
export declare const GetPostWithBookmarksOutputSchema: z.ZodObject<{
|
|
344
|
+
bookmarks: z.ZodArray<z.ZodObject<{
|
|
345
|
+
id: z.ZodCUID2;
|
|
346
|
+
type: z.ZodEnum<{
|
|
347
|
+
readonly LIKE: "LIKE";
|
|
348
|
+
readonly UNLIKE: "UNLIKE";
|
|
349
|
+
readonly BOOKMARK: "BOOKMARK";
|
|
350
|
+
readonly UNBOOKMARK: "UNBOOKMARK";
|
|
351
|
+
readonly VIEW: "VIEW";
|
|
352
|
+
}>;
|
|
353
|
+
actorName: z.ZodString;
|
|
354
|
+
actorId: z.ZodString;
|
|
355
|
+
actorUsername: z.ZodString;
|
|
356
|
+
actorImageUrl: z.ZodOptional<z.ZodURL>;
|
|
357
|
+
}, z.core.$strip>>;
|
|
345
358
|
totalFetched: z.ZodNumber;
|
|
346
359
|
totalNo: z.ZodNumber;
|
|
347
360
|
}, 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");
|
|
@@ -154,7 +154,8 @@ exports.PostWithLikesEntitySchema = exports.MinimalPostSchema.extend({
|
|
|
154
154
|
}).openapi({
|
|
155
155
|
title: "PostWithPostLikesEntity",
|
|
156
156
|
});
|
|
157
|
-
exports.GetPostWithLikesOutputSchema =
|
|
157
|
+
exports.GetPostWithLikesOutputSchema = zod_openapi_1.z.object({
|
|
158
|
+
likes: exports.PostWithLikesEntitySchema.shape.likes,
|
|
158
159
|
totalFetched: zod_openapi_1.z.number().int(),
|
|
159
160
|
totalNo: zod_openapi_1.z.number().int(),
|
|
160
161
|
});
|
|
@@ -165,11 +166,14 @@ exports.PostWithCommentsEntitySchema = exports.MinimalPostSchema.extend({
|
|
|
165
166
|
});
|
|
166
167
|
exports.PostWithBookmarksEntitySchema = exports.MinimalPostSchema.extend({
|
|
167
168
|
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
169
|
}).openapi({
|
|
171
170
|
title: "PostWithPostBookmarksEntity",
|
|
172
171
|
});
|
|
172
|
+
exports.GetPostWithBookmarksOutputSchema = zod_openapi_1.z.object({
|
|
173
|
+
bookmarks: exports.PostWithBookmarksEntitySchema.shape.bookmarks,
|
|
174
|
+
totalFetched: zod_openapi_1.z.number().int(),
|
|
175
|
+
totalNo: zod_openapi_1.z.number().int(),
|
|
176
|
+
});
|
|
173
177
|
exports.LinkPreviewInputSchema = zod_openapi_1.z.object({
|
|
174
178
|
url: zod_openapi_1.z.string(),
|
|
175
179
|
});
|
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
|
@@ -176,7 +176,8 @@ export const PostWithLikesEntitySchema = MinimalPostSchema.extend({
|
|
|
176
176
|
title: "PostWithPostLikesEntity",
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
export const GetPostWithLikesOutputSchema =
|
|
179
|
+
export const GetPostWithLikesOutputSchema = z.object({
|
|
180
|
+
likes: PostWithLikesEntitySchema.shape.likes,
|
|
180
181
|
totalFetched: z.number().int(),
|
|
181
182
|
totalNo: z.number().int(),
|
|
182
183
|
});
|
|
@@ -189,12 +190,16 @@ export const PostWithCommentsEntitySchema = MinimalPostSchema.extend({
|
|
|
189
190
|
|
|
190
191
|
export const PostWithBookmarksEntitySchema = MinimalPostSchema.extend({
|
|
191
192
|
bookmarks: z.array(ActivitySchema),
|
|
192
|
-
totalFetched: z.number().int(),
|
|
193
|
-
totalNo: z.number().int(),
|
|
194
193
|
}).openapi({
|
|
195
194
|
title: "PostWithPostBookmarksEntity",
|
|
196
195
|
});
|
|
197
196
|
|
|
197
|
+
export const GetPostWithBookmarksOutputSchema = z.object({
|
|
198
|
+
bookmarks: PostWithBookmarksEntitySchema.shape.bookmarks,
|
|
199
|
+
totalFetched: z.number().int(),
|
|
200
|
+
totalNo: z.number().int(),
|
|
201
|
+
});
|
|
202
|
+
|
|
198
203
|
export const LinkPreviewInputSchema = z.object({
|
|
199
204
|
url: z.string(),
|
|
200
205
|
});
|
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
|
+
>;
|