@zyacreatives/shared 1.2.3 → 1.2.4

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.
@@ -78,7 +78,7 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
78
78
  noOfViews: zod_openapi_1.z.number().int().optional().openapi({ example: 1200 }),
79
79
  })
80
80
  .openapi("ProjectSocialGraphEntity");
81
- exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.merge(exports.ProjectSocialGraphEntitySchema)
81
+ exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.extend(exports.ProjectSocialGraphEntitySchema.shape)
82
82
  .extend({
83
83
  projectFiles: zod_openapi_1.z
84
84
  .array(exports.ProjectFileEntitySchema)
@@ -57,7 +57,7 @@ exports.MinimalUserSchema = exports.BaseUserEntitySchema.pick({
57
57
  username: true,
58
58
  role: true,
59
59
  }).openapi("MinimalUser");
60
- exports.UserEntitySchema = exports.BaseUserEntitySchema.merge(exports.UserSocialGraphEntitySchema).openapi("UserEntity");
60
+ exports.UserEntitySchema = exports.BaseUserEntitySchema.extend(exports.UserSocialGraphEntitySchema.shape).openapi("UserEntity");
61
61
  exports.UserProfileEntitySchema = exports.UserEntitySchema.extend({
62
62
  profileType: zod_openapi_1.z.enum(["creative", "brand", "investor"]).optional(),
63
63
  bio: zod_openapi_1.z.string().optional(),
@@ -1,10 +1,4 @@
1
- export type ProjectSocialGraphEntity = {
2
- noOfLikes?: number;
3
- noOfComments?: number;
4
- noOfBookmarks?: number;
5
- noOfViews?: number;
6
- };
7
- export type UserSocialGraphEntity = {
8
- followerCount?: number;
9
- followingCount?: number;
10
- };
1
+ import z from "zod";
2
+ import { ProjectSocialGraphEntitySchema, UserSocialGraphEntitySchema } from "../schemas";
3
+ export type ProjectSocialGraphEntity = z.infer<typeof ProjectSocialGraphEntitySchema>;
4
+ export type UserSocialGraphEntity = z.infer<typeof UserSocialGraphEntitySchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -79,8 +79,8 @@ export const ProjectSocialGraphEntitySchema = z
79
79
  })
80
80
  .openapi("ProjectSocialGraphEntity");
81
81
 
82
- export const ProjectWithFilesEntitySchema = ProjectEntitySchema.merge(
83
- ProjectSocialGraphEntitySchema
82
+ export const ProjectWithFilesEntitySchema = ProjectEntitySchema.extend(
83
+ ProjectSocialGraphEntitySchema.shape
84
84
  )
85
85
  .extend({
86
86
  projectFiles: z
@@ -62,8 +62,8 @@ export const MinimalUserSchema = BaseUserEntitySchema.pick({
62
62
  role: true,
63
63
  }).openapi("MinimalUser");
64
64
 
65
- export const UserEntitySchema = BaseUserEntitySchema.merge(
66
- UserSocialGraphEntitySchema
65
+ export const UserEntitySchema = BaseUserEntitySchema.extend(
66
+ UserSocialGraphEntitySchema.shape
67
67
  ).openapi("UserEntity");
68
68
 
69
69
  export const UserProfileEntitySchema = UserEntitySchema.extend({
@@ -1,11 +1,10 @@
1
- export type ProjectSocialGraphEntity = {
2
- noOfLikes?: number;
3
- noOfComments?: number;
4
- noOfBookmarks?: number;
5
- noOfViews?: number;
6
- };
1
+ import z from "zod";
2
+ import {
3
+ ProjectSocialGraphEntitySchema,
4
+ UserSocialGraphEntitySchema,
5
+ } from "../schemas";
7
6
 
8
- export type UserSocialGraphEntity = {
9
- followerCount?: number;
10
- followingCount?: number;
11
- };
7
+ export type ProjectSocialGraphEntity = z.infer<
8
+ typeof ProjectSocialGraphEntitySchema
9
+ >;
10
+ export type UserSocialGraphEntity = z.infer<typeof UserSocialGraphEntitySchema>;