@zyacreatives/shared 2.1.4 → 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/brand.d.ts +1 -1
- package/dist/schemas/brand.js +1 -1
- package/dist/schemas/creative.d.ts +1 -1
- package/dist/schemas/creative.js +1 -1
- package/dist/schemas/post.d.ts +2 -2
- package/dist/schemas/post.js +2 -2
- 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/brand.ts +1 -1
- package/src/schemas/creative.ts +1 -1
- package/src/schemas/post.ts +2 -2
- package/src/schemas/user.ts +6 -0
- package/src/types/user.ts +2 -0
package/dist/schemas/brand.d.ts
CHANGED
package/dist/schemas/brand.js
CHANGED
|
@@ -183,5 +183,5 @@ exports.SearchBrandInputSchema = zod_openapi_1.z.object({
|
|
|
183
183
|
});
|
|
184
184
|
exports.SearchBrandOutputSchema = zod_openapi_1.z.object({
|
|
185
185
|
brands: zod_openapi_1.z.array(exports.BrandWithUserEntitySchema),
|
|
186
|
-
nextCursor: zod_openapi_1.z.string().optional(),
|
|
186
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
187
187
|
});
|
package/dist/schemas/creative.js
CHANGED
|
@@ -243,5 +243,5 @@ exports.SearchCreativeInputSchema = zod_openapi_1.z.object({
|
|
|
243
243
|
});
|
|
244
244
|
exports.SearchCreativeOutputSchema = zod_openapi_1.z.object({
|
|
245
245
|
creatives: zod_openapi_1.z.array(exports.CreativeWithUserEntitySchema),
|
|
246
|
-
nextCursor: zod_openapi_1.z.string().optional(),
|
|
246
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
247
247
|
});
|
package/dist/schemas/post.d.ts
CHANGED
|
@@ -438,7 +438,7 @@ export declare const GetFeedOutputSchema: z.ZodObject<{
|
|
|
438
438
|
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
439
439
|
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
440
440
|
}, z.core.$strip>>;
|
|
441
|
-
nextCursor: z.ZodOptional<z.ZodString
|
|
441
|
+
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
442
442
|
}, z.core.$strip>;
|
|
443
443
|
export declare const SearchPostInputSchema: z.ZodObject<{
|
|
444
444
|
queryString: z.ZodString;
|
|
@@ -512,5 +512,5 @@ export declare const SearchPostOutputSchema: z.ZodObject<{
|
|
|
512
512
|
isFollowing: z.ZodOptional<z.ZodBoolean>;
|
|
513
513
|
isBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
514
514
|
}, z.core.$strip>>;
|
|
515
|
-
nextCursor: z.ZodOptional<z.ZodString
|
|
515
|
+
nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
516
516
|
}, z.core.$strip>;
|
package/dist/schemas/post.js
CHANGED
|
@@ -187,7 +187,7 @@ exports.GetFeedInputSchema = zod_openapi_1.z.object({
|
|
|
187
187
|
});
|
|
188
188
|
exports.GetFeedOutputSchema = zod_openapi_1.z.object({
|
|
189
189
|
feed: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
|
|
190
|
-
nextCursor: zod_openapi_1.z.string().optional(),
|
|
190
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
191
191
|
});
|
|
192
192
|
exports.SearchPostInputSchema = zod_openapi_1.z.object({
|
|
193
193
|
queryString: zod_openapi_1.z
|
|
@@ -198,5 +198,5 @@ exports.SearchPostInputSchema = zod_openapi_1.z.object({
|
|
|
198
198
|
});
|
|
199
199
|
exports.SearchPostOutputSchema = zod_openapi_1.z.object({
|
|
200
200
|
posts: zod_openapi_1.z.array(exports.FeedPostEntitySchema),
|
|
201
|
-
nextCursor: zod_openapi_1.z.string().optional(),
|
|
201
|
+
nextCursor: zod_openapi_1.z.string().optional().nullable(),
|
|
202
202
|
});
|
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/brand.ts
CHANGED
package/src/schemas/creative.ts
CHANGED
|
@@ -283,5 +283,5 @@ export const SearchCreativeInputSchema = z.object({
|
|
|
283
283
|
|
|
284
284
|
export const SearchCreativeOutputSchema = z.object({
|
|
285
285
|
creatives: z.array(CreativeWithUserEntitySchema),
|
|
286
|
-
nextCursor: z.string().optional(),
|
|
286
|
+
nextCursor: z.string().optional().nullable(),
|
|
287
287
|
});
|
package/src/schemas/post.ts
CHANGED
|
@@ -213,7 +213,7 @@ export const GetFeedInputSchema = z.object({
|
|
|
213
213
|
|
|
214
214
|
export const GetFeedOutputSchema = z.object({
|
|
215
215
|
feed: z.array(FeedPostEntitySchema),
|
|
216
|
-
nextCursor: z.string().optional(),
|
|
216
|
+
nextCursor: z.string().optional().nullable(),
|
|
217
217
|
});
|
|
218
218
|
|
|
219
219
|
export const SearchPostInputSchema = z.object({
|
|
@@ -226,5 +226,5 @@ export const SearchPostInputSchema = z.object({
|
|
|
226
226
|
|
|
227
227
|
export const SearchPostOutputSchema = z.object({
|
|
228
228
|
posts: z.array(FeedPostEntitySchema),
|
|
229
|
-
nextCursor: z.string().optional(),
|
|
229
|
+
nextCursor: z.string().optional().nullable(),
|
|
230
230
|
});
|
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<
|