@zyacreatives/shared 2.0.29 → 2.0.31
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 +57 -0
- package/dist/schemas/post.js +3 -2
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +4 -2
- package/src/types/post.ts +2 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -327,3 +327,60 @@ export declare const GetFeedInputSchema: z.ZodObject<{
|
|
|
327
327
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
328
328
|
cursor: z.ZodOptional<z.ZodString>;
|
|
329
329
|
}, z.core.$strip>;
|
|
330
|
+
export declare const GetFeedOutputSchema: z.ZodArray<z.ZodObject<{
|
|
331
|
+
id: z.ZodCUID2;
|
|
332
|
+
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
333
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
334
|
+
badge: z.ZodOptional<z.ZodEnum<{
|
|
335
|
+
readonly NETWORKING: "Networking";
|
|
336
|
+
readonly FUNDING: "Funding";
|
|
337
|
+
readonly COLLABORATION: "Collaboration";
|
|
338
|
+
readonly OPPORTUNITIES: "Opportunities";
|
|
339
|
+
readonly SHOWCASE: "Showcase";
|
|
340
|
+
readonly LEARNING: "Learning";
|
|
341
|
+
readonly DISCUSSION: "Discussion";
|
|
342
|
+
readonly MENTORSHIP: "Mentorship";
|
|
343
|
+
}>>;
|
|
344
|
+
userId: z.ZodCUID2;
|
|
345
|
+
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
346
|
+
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
347
|
+
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
348
|
+
content: z.ZodOptional<z.ZodString>;
|
|
349
|
+
postType: z.ZodEnum<{
|
|
350
|
+
readonly MARKETPLACE: "MARKETPLACE";
|
|
351
|
+
readonly PROJECT: "PROJECT";
|
|
352
|
+
readonly JOB_OPENING: "JOB_OPENING";
|
|
353
|
+
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
354
|
+
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
355
|
+
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
356
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
357
|
+
}>;
|
|
358
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
359
|
+
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
360
|
+
url: z.ZodURL;
|
|
361
|
+
title: z.ZodOptional<z.ZodString>;
|
|
362
|
+
description: z.ZodOptional<z.ZodString>;
|
|
363
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
364
|
+
}, z.core.$strip>>;
|
|
365
|
+
postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
366
|
+
id: z.ZodString;
|
|
367
|
+
postId: z.ZodString;
|
|
368
|
+
fileId: z.ZodString;
|
|
369
|
+
order: z.ZodNumber;
|
|
370
|
+
url: z.ZodURL;
|
|
371
|
+
}, z.core.$strip>>>;
|
|
372
|
+
stats: {
|
|
373
|
+
updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
374
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
375
|
+
parentId: z.ZodCUID2;
|
|
376
|
+
parentType: z.ZodEnum<{
|
|
377
|
+
readonly PROJECT: "PROJECT";
|
|
378
|
+
readonly POST: "POST";
|
|
379
|
+
}>;
|
|
380
|
+
likesCount: z.ZodNumber;
|
|
381
|
+
bookmarksCount: z.ZodNumber;
|
|
382
|
+
viewsCount: z.ZodNumber;
|
|
383
|
+
commentsCount: z.ZodNumber;
|
|
384
|
+
};
|
|
385
|
+
score: z.ZodNumber;
|
|
386
|
+
}, 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.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.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;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const file_1 = require("./file");
|
|
@@ -157,5 +157,6 @@ exports.FeedPostEntitySchema = exports.PostWithFilesEntitySchema.extend({
|
|
|
157
157
|
});
|
|
158
158
|
exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
159
159
|
limit: zod_openapi_1.z.number().optional(),
|
|
160
|
-
cursor: zod_openapi_1.z.string().optional()
|
|
160
|
+
cursor: zod_openapi_1.z.string().optional(),
|
|
161
161
|
});
|
|
162
|
+
exports.GetFeedOutputSchema = zod_openapi_1.z.array(exports.FeedPostEntitySchema);
|
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, GetPostOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema } from "../schemas/post";
|
|
2
|
+
import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetFeedOutputSchema, 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>;
|
|
@@ -14,3 +14,4 @@ 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
16
|
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|
|
17
|
+
export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -173,5 +173,7 @@ export const FeedPostEntitySchema = PostWithFilesEntitySchema.extend({
|
|
|
173
173
|
|
|
174
174
|
export const GetFeedInputSchema = z.object({
|
|
175
175
|
limit: z.number().optional(),
|
|
176
|
-
cursor: z.string().optional()
|
|
177
|
-
})
|
|
176
|
+
cursor: z.string().optional(),
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export const GetFeedOutputSchema = z.array(FeedPostEntitySchema)
|
package/src/types/post.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
CreatePostOutputSchema,
|
|
5
5
|
FeedPostEntitySchema,
|
|
6
6
|
GetFeedInputSchema,
|
|
7
|
+
GetFeedOutputSchema,
|
|
7
8
|
GetPostOutputSchema,
|
|
8
9
|
LinkPreviewInputSchema,
|
|
9
10
|
LinkPreviewOutputSchema,
|
|
@@ -34,3 +35,4 @@ export type LinkPreviewInput = z.infer<typeof LinkPreviewInputSchema>;
|
|
|
34
35
|
export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
|
|
35
36
|
export type FeedPostEntity = z.infer<typeof FeedPostEntitySchema>;
|
|
36
37
|
export type GetFeedInput = z.infer<typeof GetFeedInputSchema>;
|
|
38
|
+
export type GetFeedOutput = z.infer<typeof GetFeedOutputSchema>;
|