@zyacreatives/shared 2.1.5 → 2.1.6
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/user.d.ts +46 -0
- package/dist/schemas/user.js +6 -1
- package/dist/types/user.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/user.ts +6 -0
- package/src/types/user.ts +2 -0
package/dist/schemas/user.d.ts
CHANGED
|
@@ -347,6 +347,52 @@ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
|
|
|
347
347
|
}>;
|
|
348
348
|
}, z.core.$strip>>;
|
|
349
349
|
}, z.core.$strip>;
|
|
350
|
+
export declare const UserWithUserPostsEntitySchema: z.ZodObject<{
|
|
351
|
+
userId: z.ZodCUID2;
|
|
352
|
+
posts: z.ZodArray<z.ZodObject<{
|
|
353
|
+
id: z.ZodCUID2;
|
|
354
|
+
parentId: z.ZodOptional<z.ZodCUID2>;
|
|
355
|
+
parentType: z.ZodDefault<z.ZodEnum<{
|
|
356
|
+
readonly PROJECT: "PROJECT";
|
|
357
|
+
readonly POST: "POST";
|
|
358
|
+
}>>;
|
|
359
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
360
|
+
name: z.ZodString;
|
|
361
|
+
id: z.ZodInt;
|
|
362
|
+
}, z.core.$strip>>>;
|
|
363
|
+
badge: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
readonly NETWORKING: "Networking";
|
|
365
|
+
readonly FUNDING: "Funding";
|
|
366
|
+
readonly COLLABORATION: "Collaboration";
|
|
367
|
+
readonly OPPORTUNITIES: "Opportunities";
|
|
368
|
+
readonly SHOWCASE: "Showcase";
|
|
369
|
+
readonly LEARNING: "Learning";
|
|
370
|
+
readonly DISCUSSION: "Discussion";
|
|
371
|
+
readonly MENTORSHIP: "Mentorship";
|
|
372
|
+
}>>;
|
|
373
|
+
userId: z.ZodCUID2;
|
|
374
|
+
creatorUsername: z.ZodOptional<z.ZodString>;
|
|
375
|
+
creatorFullName: z.ZodOptional<z.ZodString>;
|
|
376
|
+
creatorImageUrl: z.ZodOptional<z.ZodCUID2>;
|
|
377
|
+
content: z.ZodOptional<z.ZodString>;
|
|
378
|
+
postType: z.ZodEnum<{
|
|
379
|
+
readonly MARKETPLACE: "MARKETPLACE";
|
|
380
|
+
readonly PROJECT: "PROJECT";
|
|
381
|
+
readonly JOB_OPENING: "JOB_OPENING";
|
|
382
|
+
readonly DEFAULT_POST: "DEFAULT_POST";
|
|
383
|
+
readonly POST_WITH_LINKS: "POST_WITH_LINKS";
|
|
384
|
+
readonly POST_WITH_MEDIA: "POST_WITH_MEDIA";
|
|
385
|
+
readonly POST_WITH_MEDIA_AND_LINKS: "POST_WITH_MEDIA_AND_LINKS";
|
|
386
|
+
}>;
|
|
387
|
+
createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
388
|
+
linkMeta: z.ZodOptional<z.ZodObject<{
|
|
389
|
+
url: z.ZodURL;
|
|
390
|
+
title: z.ZodOptional<z.ZodString>;
|
|
391
|
+
description: z.ZodOptional<z.ZodString>;
|
|
392
|
+
image: z.ZodOptional<z.ZodURL>;
|
|
393
|
+
}, z.core.$strip>>;
|
|
394
|
+
}, z.core.$strip>>;
|
|
395
|
+
}, z.core.$strip>;
|
|
350
396
|
export declare const GetUserFollowingOutputSchema: z.ZodObject<{
|
|
351
397
|
results: z.ZodObject<{
|
|
352
398
|
id: z.ZodCUID2;
|
package/dist/schemas/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
|
|
3
|
+
exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithUserPostsEntitySchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
|
|
4
4
|
const zod_openapi_1 = require("@hono/zod-openapi");
|
|
5
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const project_1 = require("./project");
|
|
@@ -9,6 +9,7 @@ const like_1 = require("./like");
|
|
|
9
9
|
const brand_1 = require("./brand");
|
|
10
10
|
const creative_1 = require("./creative");
|
|
11
11
|
const investor_1 = require("./investor");
|
|
12
|
+
const post_1 = require("./post");
|
|
12
13
|
exports.UserEntitySchema = zod_openapi_1.z
|
|
13
14
|
.object({
|
|
14
15
|
id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
|
|
@@ -111,6 +112,10 @@ exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
|
|
|
111
112
|
.array(exports.MinimalUserSchema)
|
|
112
113
|
.openapi({ description: "List of users who follow this user." }),
|
|
113
114
|
}).openapi("UserWithFollowersEntity");
|
|
115
|
+
exports.UserWithUserPostsEntitySchema = zod_openapi_1.z.object({
|
|
116
|
+
userId: zod_openapi_1.z.cuid2(),
|
|
117
|
+
posts: zod_openapi_1.z.array(post_1.PostEntitySchema),
|
|
118
|
+
}).openapi("UserWithUserPostsEntity");
|
|
114
119
|
exports.GetUserFollowingOutputSchema = zod_openapi_1.z.object({
|
|
115
120
|
results: exports.UserWithFollowingEntitySchema,
|
|
116
121
|
});
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema } from "../schemas/user";
|
|
1
|
+
import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema, UserWithUserPostsEntitySchema } from "../schemas/user";
|
|
2
2
|
import { z } from "@hono/zod-openapi";
|
|
3
3
|
export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
|
|
4
4
|
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
@@ -7,6 +7,7 @@ export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
|
|
|
7
7
|
export type UserWithProjectsEntity = z.infer<typeof UserWithProjectsEntitySchema>;
|
|
8
8
|
export type UserWithProjectBookmarksEntity = z.infer<typeof UserWithProjectBookmarksEntitySchema>;
|
|
9
9
|
export type UserWithProjectLikesEntity = z.infer<typeof UserWithProjectLikesEntitySchema>;
|
|
10
|
+
export type UserWithUserPostsEntity = z.infer<typeof UserWithUserPostsEntitySchema>;
|
|
10
11
|
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
11
12
|
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
12
13
|
export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
|
package/package.json
CHANGED
package/src/schemas/user.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { LikeEntitySchema } from "./like";
|
|
|
20
20
|
import { BrandEntitySchema } from "./brand";
|
|
21
21
|
import { CreativeEntitySchema } from "./creative";
|
|
22
22
|
import { InvestorEntitySchema } from "./investor";
|
|
23
|
+
import { PostEntitySchema } from "./post";
|
|
23
24
|
|
|
24
25
|
export const UserEntitySchema = z
|
|
25
26
|
.object({
|
|
@@ -139,6 +140,11 @@ export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
|
|
|
139
140
|
.openapi({ description: "List of users who follow this user." }),
|
|
140
141
|
}).openapi("UserWithFollowersEntity");
|
|
141
142
|
|
|
143
|
+
export const UserWithUserPostsEntitySchema = z.object({
|
|
144
|
+
userId: z.cuid2(),
|
|
145
|
+
posts: z.array(PostEntitySchema),
|
|
146
|
+
}).openapi("UserWithUserPostsEntity");
|
|
147
|
+
|
|
142
148
|
export const GetUserFollowingOutputSchema = z.object({
|
|
143
149
|
results: UserWithFollowingEntitySchema,
|
|
144
150
|
});
|
package/src/types/user.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
GetUserActivityInputSchema,
|
|
22
22
|
GetUserActivityOutputSchema,
|
|
23
23
|
UserStatsEntitySchema,
|
|
24
|
+
UserWithUserPostsEntitySchema,
|
|
24
25
|
} from "../schemas/user";
|
|
25
26
|
|
|
26
27
|
import { z } from "@hono/zod-openapi";
|
|
@@ -38,6 +39,7 @@ export type UserWithProjectBookmarksEntity = z.infer<
|
|
|
38
39
|
export type UserWithProjectLikesEntity = z.infer<
|
|
39
40
|
typeof UserWithProjectLikesEntitySchema
|
|
40
41
|
>;
|
|
42
|
+
export type UserWithUserPostsEntity = z.infer<typeof UserWithUserPostsEntitySchema>;
|
|
41
43
|
export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
|
|
42
44
|
export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
|
|
43
45
|
export type UserWithFollowingEntity = z.infer<
|