@zyacreatives/shared 2.1.83 → 2.1.85
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 +26 -0
- package/dist/schemas/post.js +24 -1
- package/dist/types/post.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/post.ts +24 -0
- package/src/types/post.ts +3 -0
package/dist/schemas/post.d.ts
CHANGED
|
@@ -647,3 +647,29 @@ export declare const SearchPostOutputSchema: z.ZodObject<{
|
|
|
647
647
|
export declare const ReportPostInputSchema: z.ZodObject<{
|
|
648
648
|
complaint: z.ZodString;
|
|
649
649
|
}, z.core.$strip>;
|
|
650
|
+
export declare const PostAnalyticsOutputSchema: z.ZodObject<{
|
|
651
|
+
awareness: z.ZodObject<{
|
|
652
|
+
reach: z.ZodNumber;
|
|
653
|
+
impressions: z.ZodNumber;
|
|
654
|
+
newFollowers: z.ZodNumber;
|
|
655
|
+
}, z.core.$strip>;
|
|
656
|
+
engagement: z.ZodObject<{
|
|
657
|
+
rate: z.ZodNumber;
|
|
658
|
+
likes: z.ZodNumber;
|
|
659
|
+
comments: z.ZodNumber;
|
|
660
|
+
bookmarks: z.ZodNumber;
|
|
661
|
+
}, z.core.$strip>;
|
|
662
|
+
behavior: z.ZodObject<{
|
|
663
|
+
viralityScore: z.ZodNumber;
|
|
664
|
+
frictionRatio: z.ZodNumber;
|
|
665
|
+
consumptionDepth: z.ZodNumber;
|
|
666
|
+
sentiment: z.ZodObject<{
|
|
667
|
+
positive: z.ZodNumber;
|
|
668
|
+
negative: z.ZodNumber;
|
|
669
|
+
status: z.ZodEnum<{
|
|
670
|
+
Healthy: "Healthy";
|
|
671
|
+
Polarizing: "Polarizing";
|
|
672
|
+
}>;
|
|
673
|
+
}, z.core.$strip>;
|
|
674
|
+
}, z.core.$strip>;
|
|
675
|
+
}, 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.ReportPostInputSchema = exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema = exports.GetPostWithCommentsOutputSchema = 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.PostAnalyticsOutputSchema = exports.ReportPostInputSchema = exports.SearchPostOutputSchema = exports.SearchPostInputSchema = exports.GetFeedOutputSchema = exports.GetFeedInputSchema = exports.FeedPostEntitySchema = exports.LinkPreviewOutputSchema = exports.LinkPreviewInputSchema = exports.GetPostWithBookmarksOutputSchema = exports.PostWithBookmarksEntitySchema = exports.GetPostWithCommentsOutputSchema = 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");
|
|
@@ -217,3 +217,26 @@ exports.ReportPostInputSchema = zod_openapi_1.z.object({
|
|
|
217
217
|
.string()
|
|
218
218
|
.max(200, { error: "Complaint cannot be longer than 200 characters" }),
|
|
219
219
|
});
|
|
220
|
+
exports.PostAnalyticsOutputSchema = zod_openapi_1.z.object({
|
|
221
|
+
awareness: zod_openapi_1.z.object({
|
|
222
|
+
reach: zod_openapi_1.z.number(),
|
|
223
|
+
impressions: zod_openapi_1.z.number(),
|
|
224
|
+
newFollowers: zod_openapi_1.z.number(),
|
|
225
|
+
}),
|
|
226
|
+
engagement: zod_openapi_1.z.object({
|
|
227
|
+
rate: zod_openapi_1.z.number(),
|
|
228
|
+
likes: zod_openapi_1.z.number(),
|
|
229
|
+
comments: zod_openapi_1.z.number(),
|
|
230
|
+
bookmarks: zod_openapi_1.z.number(),
|
|
231
|
+
}),
|
|
232
|
+
behavior: zod_openapi_1.z.object({
|
|
233
|
+
viralityScore: zod_openapi_1.z.number(),
|
|
234
|
+
frictionRatio: zod_openapi_1.z.number(),
|
|
235
|
+
consumptionDepth: zod_openapi_1.z.number(),
|
|
236
|
+
sentiment: zod_openapi_1.z.object({
|
|
237
|
+
positive: zod_openapi_1.z.number(),
|
|
238
|
+
negative: zod_openapi_1.z.number(),
|
|
239
|
+
status: zod_openapi_1.z.enum(["Healthy", "Polarizing"]),
|
|
240
|
+
}),
|
|
241
|
+
}),
|
|
242
|
+
});
|
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, GetPostWithBookmarksOutputSchema, GetPostWithCommentsOutputSchema, GetPostWithLikesOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema, ReportPostInputSchema, SearchPostInputSchema, SearchPostOutputSchema } from "../schemas/post";
|
|
2
|
+
import { CreatePostInputSchema, CreatePostOutputSchema, FeedPostEntitySchema, GetFeedInputSchema, GetFeedOutputSchema, GetPostOutputSchema, GetPostWithBookmarksOutputSchema, GetPostWithCommentsOutputSchema, GetPostWithLikesOutputSchema, LinkPreviewInputSchema, LinkPreviewOutputSchema, PostAnalyticsOutputSchema, PostEntitySchema, PostFileEntitySchema, PostIdSchema, PostWithBookmarksEntitySchema, PostWithCommentsEntitySchema, PostWithFilesEntitySchema, PostWithLikesEntitySchema, ReportPostInputSchema, 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>;
|
|
@@ -21,3 +21,4 @@ export type GetPostWithLikesOutput = z.infer<typeof GetPostWithLikesOutputSchema
|
|
|
21
21
|
export type GetPostWithCommentsOutput = z.infer<typeof GetPostWithCommentsOutputSchema>;
|
|
22
22
|
export type GetPostWithBookmarksOutput = z.infer<typeof GetPostWithBookmarksOutputSchema>;
|
|
23
23
|
export type ReportPostInput = z.infer<typeof ReportPostInputSchema>;
|
|
24
|
+
export type PostAnalyticsOutput = z.infer<typeof PostAnalyticsOutputSchema>;
|
package/package.json
CHANGED
package/src/schemas/post.ts
CHANGED
|
@@ -253,3 +253,27 @@ export const ReportPostInputSchema = z.object({
|
|
|
253
253
|
.string()
|
|
254
254
|
.max(200, { error: "Complaint cannot be longer than 200 characters" }),
|
|
255
255
|
});
|
|
256
|
+
|
|
257
|
+
export const PostAnalyticsOutputSchema = z.object({
|
|
258
|
+
awareness: z.object({
|
|
259
|
+
reach: z.number(),
|
|
260
|
+
impressions: z.number(),
|
|
261
|
+
newFollowers: z.number(),
|
|
262
|
+
}),
|
|
263
|
+
engagement: z.object({
|
|
264
|
+
rate: z.number(),
|
|
265
|
+
likes: z.number(),
|
|
266
|
+
comments: z.number(),
|
|
267
|
+
bookmarks: z.number(),
|
|
268
|
+
}),
|
|
269
|
+
behavior: z.object({
|
|
270
|
+
viralityScore: z.number(),
|
|
271
|
+
frictionRatio: z.number(),
|
|
272
|
+
consumptionDepth: z.number(),
|
|
273
|
+
sentiment: z.object({
|
|
274
|
+
positive: z.number(),
|
|
275
|
+
negative: z.number(),
|
|
276
|
+
status: z.enum(["Healthy", "Polarizing"]),
|
|
277
|
+
}),
|
|
278
|
+
}),
|
|
279
|
+
});
|
package/src/types/post.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
GetPostWithLikesOutputSchema,
|
|
12
12
|
LinkPreviewInputSchema,
|
|
13
13
|
LinkPreviewOutputSchema,
|
|
14
|
+
PostAnalyticsOutputSchema,
|
|
14
15
|
PostEntitySchema,
|
|
15
16
|
PostFileEntitySchema,
|
|
16
17
|
PostIdSchema,
|
|
@@ -58,3 +59,5 @@ export type GetPostWithBookmarksOutput = z.infer<
|
|
|
58
59
|
typeof GetPostWithBookmarksOutputSchema
|
|
59
60
|
>;
|
|
60
61
|
export type ReportPostInput = z.infer<typeof ReportPostInputSchema>;
|
|
62
|
+
|
|
63
|
+
export type PostAnalyticsOutput = z.infer<typeof PostAnalyticsOutputSchema>;
|