@zyacreatives/shared 2.1.6 → 2.1.7

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.
@@ -347,7 +347,7 @@ 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<{
350
+ export declare const UserWithPostsEntitySchema: z.ZodObject<{
351
351
  userId: z.ZodCUID2;
352
352
  posts: z.ZodArray<z.ZodObject<{
353
353
  id: z.ZodCUID2;
@@ -391,6 +391,13 @@ export declare const UserWithUserPostsEntitySchema: z.ZodObject<{
391
391
  description: z.ZodOptional<z.ZodString>;
392
392
  image: z.ZodOptional<z.ZodURL>;
393
393
  }, z.core.$strip>>;
394
+ postFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
395
+ id: z.ZodString;
396
+ postId: z.ZodString;
397
+ fileId: z.ZodString;
398
+ order: z.ZodNumber;
399
+ url: z.ZodURL;
400
+ }, z.core.$strip>>>;
394
401
  }, z.core.$strip>>;
395
402
  }, z.core.$strip>;
396
403
  export declare const GetUserFollowingOutputSchema: z.ZodObject<{
@@ -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.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;
3
+ exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithPostsEntitySchema = 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");
@@ -112,10 +112,10 @@ exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
112
112
  .array(exports.MinimalUserSchema)
113
113
  .openapi({ description: "List of users who follow this user." }),
114
114
  }).openapi("UserWithFollowersEntity");
115
- exports.UserWithUserPostsEntitySchema = zod_openapi_1.z.object({
115
+ exports.UserWithPostsEntitySchema = zod_openapi_1.z.object({
116
116
  userId: zod_openapi_1.z.cuid2(),
117
- posts: zod_openapi_1.z.array(post_1.PostEntitySchema),
118
- }).openapi("UserWithUserPostsEntity");
117
+ posts: zod_openapi_1.z.array(post_1.PostWithFilesEntitySchema),
118
+ }).openapi("UserWithPostsEntity");
119
119
  exports.GetUserFollowingOutputSchema = zod_openapi_1.z.object({
120
120
  results: exports.UserWithFollowingEntitySchema,
121
121
  });
@@ -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, UserWithUserPostsEntitySchema } 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, UserWithPostsEntitySchema } 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,7 +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
+ export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
11
11
  export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
12
12
  export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
13
13
  export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +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
+ import { PostEntitySchema, PostWithFilesEntitySchema } from "./post";
24
24
 
25
25
  export const UserEntitySchema = z
26
26
  .object({
@@ -140,10 +140,10 @@ export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
140
140
  .openapi({ description: "List of users who follow this user." }),
141
141
  }).openapi("UserWithFollowersEntity");
142
142
 
143
- export const UserWithUserPostsEntitySchema = z.object({
143
+ export const UserWithPostsEntitySchema = z.object({
144
144
  userId: z.cuid2(),
145
- posts: z.array(PostEntitySchema),
146
- }).openapi("UserWithUserPostsEntity");
145
+ posts: z.array(PostWithFilesEntitySchema),
146
+ }).openapi("UserWithPostsEntity");
147
147
 
148
148
  export const GetUserFollowingOutputSchema = z.object({
149
149
  results: UserWithFollowingEntitySchema,
package/src/types/user.ts CHANGED
@@ -21,7 +21,7 @@ import {
21
21
  GetUserActivityInputSchema,
22
22
  GetUserActivityOutputSchema,
23
23
  UserStatsEntitySchema,
24
- UserWithUserPostsEntitySchema,
24
+ UserWithPostsEntitySchema,
25
25
  } from "../schemas/user";
26
26
 
27
27
  import { z } from "@hono/zod-openapi";
@@ -39,7 +39,7 @@ export type UserWithProjectBookmarksEntity = z.infer<
39
39
  export type UserWithProjectLikesEntity = z.infer<
40
40
  typeof UserWithProjectLikesEntitySchema
41
41
  >;
42
- export type UserWithUserPostsEntity = z.infer<typeof UserWithUserPostsEntitySchema>;
42
+ export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
43
43
  export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
44
44
  export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
45
45
  export type UserWithFollowingEntity = z.infer<