@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.
- package/dist/schemas/project.js +1 -1
- package/dist/schemas/user.js +1 -1
- package/dist/types/common.d.ts +4 -10
- package/package.json +1 -1
- package/src/schemas/project.ts +2 -2
- package/src/schemas/user.ts +2 -2
- package/src/types/common.ts +9 -10
package/dist/schemas/project.js
CHANGED
|
@@ -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.
|
|
81
|
+
exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.extend(exports.ProjectSocialGraphEntitySchema.shape)
|
|
82
82
|
.extend({
|
|
83
83
|
projectFiles: zod_openapi_1.z
|
|
84
84
|
.array(exports.ProjectFileEntitySchema)
|
package/dist/schemas/user.js
CHANGED
|
@@ -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.
|
|
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(),
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
package/src/schemas/project.ts
CHANGED
|
@@ -79,8 +79,8 @@ export const ProjectSocialGraphEntitySchema = z
|
|
|
79
79
|
})
|
|
80
80
|
.openapi("ProjectSocialGraphEntity");
|
|
81
81
|
|
|
82
|
-
export const ProjectWithFilesEntitySchema = ProjectEntitySchema.
|
|
83
|
-
ProjectSocialGraphEntitySchema
|
|
82
|
+
export const ProjectWithFilesEntitySchema = ProjectEntitySchema.extend(
|
|
83
|
+
ProjectSocialGraphEntitySchema.shape
|
|
84
84
|
)
|
|
85
85
|
.extend({
|
|
86
86
|
projectFiles: z
|
package/src/schemas/user.ts
CHANGED
|
@@ -62,8 +62,8 @@ export const MinimalUserSchema = BaseUserEntitySchema.pick({
|
|
|
62
62
|
role: true,
|
|
63
63
|
}).openapi("MinimalUser");
|
|
64
64
|
|
|
65
|
-
export const UserEntitySchema = BaseUserEntitySchema.
|
|
66
|
-
UserSocialGraphEntitySchema
|
|
65
|
+
export const UserEntitySchema = BaseUserEntitySchema.extend(
|
|
66
|
+
UserSocialGraphEntitySchema.shape
|
|
67
67
|
).openapi("UserEntity");
|
|
68
68
|
|
|
69
69
|
export const UserProfileEntitySchema = UserEntitySchema.extend({
|
package/src/types/common.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import {
|
|
3
|
+
ProjectSocialGraphEntitySchema,
|
|
4
|
+
UserSocialGraphEntitySchema,
|
|
5
|
+
} from "../schemas";
|
|
7
6
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export type ProjectSocialGraphEntity = z.infer<
|
|
8
|
+
typeof ProjectSocialGraphEntitySchema
|
|
9
|
+
>;
|
|
10
|
+
export type UserSocialGraphEntity = z.infer<typeof UserSocialGraphEntitySchema>;
|