@zyacreatives/shared 2.0.26 → 2.0.28
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 +5 -0
- package/dist/schemas/post.js +6 -1
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +6 -0
- package/src/types/post.ts +2 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -321,4 +321,9 @@ export declare const FeedPostEntitySchema: z.ZodObject<{
|
|
|
321
321
|
viewsCount: z.ZodNumber;
|
|
322
322
|
commentsCount: z.ZodNumber;
|
|
323
323
|
};
|
|
324
|
+
score: z.ZodNumber;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
export declare const GetFeedInputSchema: z.ZodObject<{
|
|
327
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
328
|
+
query: z.ZodOptional<z.ZodString>;
|
|
324
329
|
}, 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.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.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;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const file_1 = require("./file");
|
|
@@ -153,4 +153,9 @@ exports.LinkPreviewOutputSchema = zod_openapi_1.z.object({
|
|
|
153
153
|
});
|
|
154
154
|
exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
|
|
155
155
|
stats: entity_stats_1.EntityStatsSchema.shape,
|
|
156
|
+
score: zod_openapi_1.z.number(),
|
|
157
|
+
});
|
|
158
|
+
exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
159
|
+
limit: zod_openapi_1.z.number().optional(),
|
|
160
|
+
query: zod_openapi_1.z.string().optional()
|
|
156
161
|
});
|
package/dist/types/post.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
|
-
import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetPostOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
2
|
+
import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetPostOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } 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>;
|
|
@@ -13,3 +13,4 @@ export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
|
13
13
|
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
14
14
|
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
|
15
15
|
export type FeedPostEntity = z.infer<typeof FeedPostEntitySchema>;
|
|
16
|
+
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -168,4 +168,10 @@ export const LinkPreviewOutputSchema = z.object({
|
|
|
168
168
|
|
|
169
169
|
export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
|
|
170
170
|
stats: EntityStatsSchema.shape,
|
|
171
|
+
score: z.number(),
|
|
171
172
|
});
|
|
173
|
+
|
|
174
|
+
export const GetFeedInputSchema = z.object({
|
|
175
|
+
limit: z.number().optional(),
|
|
176
|
+
query: z.string().optional()
|
|
177
|
+
})
|
package/src/types/post.ts
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CreatePostInputSchema,
|
|
4
4
|
CreatePostOutputSchema,
|
|
5
5
|
FeedPostEntitySchema,
|
|
6
|
+
GetFeedInputSchema,
|
|
6
7
|
GetPostOutputSchema,
|
|
7
8
|
LinkPreviewInputSchema,
|
|
8
9
|
LinkPreviewOutputSchema,
|
|
@@ -32,3 +33,4 @@ export type GetPostOutput = z.infer<typeof GetPostOutputSchema>;
|
|
|
32
33
|
export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
33
34
|
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
|
34
35
|
export type FeedPostEntity = z.infer<typeof FeedPostEntitySchema>;
|
|
36
|
+
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|