@zyacreatives/shared 2.5.46 → 2.5.48

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.
@@ -1,99 +1,101 @@
1
1
  import { z } from "zod";
2
2
  export declare const ProfileVisibilitySettingsSchema: z.ZodNullable<z.ZodObject<{
3
- privateAccount: z.ZodBoolean;
4
- showAboutMe: z.ZodBoolean;
5
- showLocation: z.ZodBoolean;
6
- showVerificationBadge: z.ZodBoolean;
7
- allowDirectMessaging: z.ZodBoolean;
8
- whoCanSendChatRequests: z.ZodEnum<{
3
+ privateAccount: z.ZodDefault<z.ZodBoolean>;
4
+ showAboutMe: z.ZodDefault<z.ZodBoolean>;
5
+ showLocation: z.ZodDefault<z.ZodBoolean>;
6
+ showVerificationBadge: z.ZodDefault<z.ZodBoolean>;
7
+ allowDirectMessaging: z.ZodDefault<z.ZodBoolean>;
8
+ whoCanSendChatRequests: z.ZodDefault<z.ZodEnum<{
9
9
  followers: "followers";
10
10
  everyone: "everyone";
11
11
  nobody: "nobody";
12
- }>;
13
- showPostsOnProfile: z.ZodBoolean;
14
- showProjectsOnProfile: z.ZodBoolean;
15
- enableCommentsOnPosts: z.ZodBoolean;
16
- enableCommentsOnProjects: z.ZodBoolean;
17
- whoCanMentionYou: z.ZodEnum<{
12
+ }>>;
13
+ showPostsOnProfile: z.ZodDefault<z.ZodBoolean>;
14
+ showProjectsOnProfile: z.ZodDefault<z.ZodBoolean>;
15
+ enableCommentsOnPosts: z.ZodDefault<z.ZodBoolean>;
16
+ enableCommentsOnProjects: z.ZodDefault<z.ZodBoolean>;
17
+ whoCanMentionYou: z.ZodDefault<z.ZodEnum<{
18
18
  followers: "followers";
19
19
  everyone: "everyone";
20
20
  nobody: "nobody";
21
- }>;
21
+ }>>;
22
22
  }, z.core.$strip>>;
23
23
  export type ProfileVisibilitySettings = z.infer<typeof ProfileVisibilitySettingsSchema>;
24
24
  export declare const ExploreAndFeedSettingsSchema: z.ZodNullable<z.ZodObject<{
25
- feedAlgorithm: z.ZodEnum<{
25
+ feedAlgorithm: z.ZodDefault<z.ZodEnum<{
26
26
  following: "following";
27
27
  latest: "latest";
28
28
  recommended: "recommended";
29
- }>;
30
- filterSensitiveContent: z.ZodBoolean;
31
- enableFeedRecommendations: z.ZodBoolean;
29
+ }>>;
30
+ filterSensitiveContent: z.ZodDefault<z.ZodBoolean>;
31
+ enableFeedRecommendations: z.ZodDefault<z.ZodBoolean>;
32
32
  }, z.core.$strip>>;
33
33
  export type ExploreAndFeedSettings = z.infer<typeof ExploreAndFeedSettingsSchema>;
34
34
  export declare const NotificationsSettingsSchema: z.ZodNullable<z.ZodObject<{
35
- enableNotifications: z.ZodBoolean;
36
- emailNotifications: z.ZodBoolean;
37
- allowMentionNotif: z.ZodBoolean;
38
- allowPostCommentNotif: z.ZodBoolean;
39
- allowProjectCommentNotif: z.ZodBoolean;
40
- allowLikeNotif: z.ZodBoolean;
41
- allowFollowNotif: z.ZodBoolean;
42
- allowOpportunityUpdateNotif: z.ZodBoolean;
43
- allowInvestmentSignalNotif: z.ZodBoolean;
44
- allowDirectMessageNotif: z.ZodBoolean;
45
- zyaUpdatesNotif: z.ZodBoolean;
46
- platformAnnouncementsNotif: z.ZodBoolean;
47
- zyaDigestNotif: z.ZodBoolean;
35
+ enableNotifications: z.ZodDefault<z.ZodBoolean>;
36
+ emailNotifications: z.ZodDefault<z.ZodBoolean>;
37
+ allowMentionNotif: z.ZodDefault<z.ZodBoolean>;
38
+ allowPostCommentNotif: z.ZodDefault<z.ZodBoolean>;
39
+ allowProjectCommentNotif: z.ZodDefault<z.ZodBoolean>;
40
+ allowLikeNotif: z.ZodDefault<z.ZodBoolean>;
41
+ allowFollowNotif: z.ZodDefault<z.ZodBoolean>;
42
+ allowOpportunityUpdateNotif: z.ZodDefault<z.ZodBoolean>;
43
+ allowInvestmentSignalNotif: z.ZodDefault<z.ZodBoolean>;
44
+ allowDirectMessageNotif: z.ZodDefault<z.ZodBoolean>;
45
+ zyaUpdatesNotif: z.ZodDefault<z.ZodBoolean>;
46
+ platformAnnouncementsNotif: z.ZodDefault<z.ZodBoolean>;
47
+ zyaDigestNotif: z.ZodDefault<z.ZodBoolean>;
48
48
  }, z.core.$strip>>;
49
49
  export type NotificationsSettings = z.infer<typeof NotificationsSettingsSchema>;
50
50
  export declare const UserSettingsSchema: z.ZodObject<{
51
51
  id: z.ZodCUID2;
52
52
  userId: z.ZodCUID2;
53
53
  profileVisibilitySettings: z.ZodNullable<z.ZodObject<{
54
- privateAccount: z.ZodBoolean;
55
- showAboutMe: z.ZodBoolean;
56
- showLocation: z.ZodBoolean;
57
- showVerificationBadge: z.ZodBoolean;
58
- allowDirectMessaging: z.ZodBoolean;
59
- whoCanSendChatRequests: z.ZodEnum<{
54
+ privateAccount: z.ZodDefault<z.ZodBoolean>;
55
+ showAboutMe: z.ZodDefault<z.ZodBoolean>;
56
+ showLocation: z.ZodDefault<z.ZodBoolean>;
57
+ showVerificationBadge: z.ZodDefault<z.ZodBoolean>;
58
+ allowDirectMessaging: z.ZodDefault<z.ZodBoolean>;
59
+ whoCanSendChatRequests: z.ZodDefault<z.ZodEnum<{
60
60
  followers: "followers";
61
61
  everyone: "everyone";
62
62
  nobody: "nobody";
63
- }>;
64
- showPostsOnProfile: z.ZodBoolean;
65
- showProjectsOnProfile: z.ZodBoolean;
66
- enableCommentsOnPosts: z.ZodBoolean;
67
- enableCommentsOnProjects: z.ZodBoolean;
68
- whoCanMentionYou: z.ZodEnum<{
63
+ }>>;
64
+ showPostsOnProfile: z.ZodDefault<z.ZodBoolean>;
65
+ showProjectsOnProfile: z.ZodDefault<z.ZodBoolean>;
66
+ enableCommentsOnPosts: z.ZodDefault<z.ZodBoolean>;
67
+ enableCommentsOnProjects: z.ZodDefault<z.ZodBoolean>;
68
+ whoCanMentionYou: z.ZodDefault<z.ZodEnum<{
69
69
  followers: "followers";
70
70
  everyone: "everyone";
71
71
  nobody: "nobody";
72
- }>;
72
+ }>>;
73
73
  }, z.core.$strip>>;
74
74
  exploreAndFeedSettings: z.ZodNullable<z.ZodObject<{
75
- feedAlgorithm: z.ZodEnum<{
75
+ feedAlgorithm: z.ZodDefault<z.ZodEnum<{
76
76
  following: "following";
77
77
  latest: "latest";
78
78
  recommended: "recommended";
79
- }>;
80
- filterSensitiveContent: z.ZodBoolean;
81
- enableFeedRecommendations: z.ZodBoolean;
79
+ }>>;
80
+ filterSensitiveContent: z.ZodDefault<z.ZodBoolean>;
81
+ enableFeedRecommendations: z.ZodDefault<z.ZodBoolean>;
82
82
  }, z.core.$strip>>;
83
83
  notificationSettings: z.ZodNullable<z.ZodObject<{
84
- enableNotifications: z.ZodBoolean;
85
- emailNotifications: z.ZodBoolean;
86
- allowMentionNotif: z.ZodBoolean;
87
- allowPostCommentNotif: z.ZodBoolean;
88
- allowProjectCommentNotif: z.ZodBoolean;
89
- allowLikeNotif: z.ZodBoolean;
90
- allowFollowNotif: z.ZodBoolean;
91
- allowOpportunityUpdateNotif: z.ZodBoolean;
92
- allowInvestmentSignalNotif: z.ZodBoolean;
93
- allowDirectMessageNotif: z.ZodBoolean;
94
- zyaUpdatesNotif: z.ZodBoolean;
95
- platformAnnouncementsNotif: z.ZodBoolean;
96
- zyaDigestNotif: z.ZodBoolean;
84
+ enableNotifications: z.ZodDefault<z.ZodBoolean>;
85
+ emailNotifications: z.ZodDefault<z.ZodBoolean>;
86
+ allowMentionNotif: z.ZodDefault<z.ZodBoolean>;
87
+ allowPostCommentNotif: z.ZodDefault<z.ZodBoolean>;
88
+ allowProjectCommentNotif: z.ZodDefault<z.ZodBoolean>;
89
+ allowLikeNotif: z.ZodDefault<z.ZodBoolean>;
90
+ allowFollowNotif: z.ZodDefault<z.ZodBoolean>;
91
+ allowOpportunityUpdateNotif: z.ZodDefault<z.ZodBoolean>;
92
+ allowInvestmentSignalNotif: z.ZodDefault<z.ZodBoolean>;
93
+ allowDirectMessageNotif: z.ZodDefault<z.ZodBoolean>;
94
+ zyaUpdatesNotif: z.ZodDefault<z.ZodBoolean>;
95
+ platformAnnouncementsNotif: z.ZodDefault<z.ZodBoolean>;
96
+ zyaDigestNotif: z.ZodDefault<z.ZodBoolean>;
97
97
  }, z.core.$strip>>;
98
+ createdAt: z.ZodCoercedDate<unknown>;
99
+ updatedAt: z.ZodCoercedDate<unknown>;
98
100
  }, z.core.$strip>;
99
101
  export type UserSettings = z.infer<typeof UserSettingsSchema>;
@@ -4,38 +4,38 @@ exports.UserSettingsSchema = exports.NotificationsSettingsSchema = exports.Explo
4
4
  const zod_1 = require("zod");
5
5
  exports.ProfileVisibilitySettingsSchema = zod_1.z
6
6
  .object({
7
- privateAccount: zod_1.z.boolean(),
8
- showAboutMe: zod_1.z.boolean(),
9
- showLocation: zod_1.z.boolean(),
10
- showVerificationBadge: zod_1.z.boolean(),
11
- allowDirectMessaging: zod_1.z.boolean(),
12
- whoCanSendChatRequests: zod_1.z.enum(["everyone", "followers", "nobody"]),
13
- showPostsOnProfile: zod_1.z.boolean(),
14
- showProjectsOnProfile: zod_1.z.boolean(),
15
- enableCommentsOnPosts: zod_1.z.boolean(),
16
- enableCommentsOnProjects: zod_1.z.boolean(),
17
- whoCanMentionYou: zod_1.z.enum(["everyone", "followers", "nobody"]),
7
+ privateAccount: zod_1.z.boolean().default(false),
8
+ showAboutMe: zod_1.z.boolean().default(true),
9
+ showLocation: zod_1.z.boolean().default(true),
10
+ showVerificationBadge: zod_1.z.boolean().default(true),
11
+ allowDirectMessaging: zod_1.z.boolean().default(true),
12
+ whoCanSendChatRequests: zod_1.z.enum(["everyone", "followers", "nobody"]).default("everyone"),
13
+ showPostsOnProfile: zod_1.z.boolean().default(true),
14
+ showProjectsOnProfile: zod_1.z.boolean().default(true),
15
+ enableCommentsOnPosts: zod_1.z.boolean().default(true),
16
+ enableCommentsOnProjects: zod_1.z.boolean().default(true),
17
+ whoCanMentionYou: zod_1.z.enum(["everyone", "followers", "nobody"]).default("everyone"),
18
18
  })
19
19
  .nullable();
20
20
  exports.ExploreAndFeedSettingsSchema = zod_1.z.object({
21
- feedAlgorithm: zod_1.z.enum(["latest", "recommended", "following"]),
22
- filterSensitiveContent: zod_1.z.boolean(),
23
- enableFeedRecommendations: zod_1.z.boolean(),
21
+ feedAlgorithm: zod_1.z.enum(["latest", "recommended", "following"]).default("recommended"),
22
+ filterSensitiveContent: zod_1.z.boolean().default(false),
23
+ enableFeedRecommendations: zod_1.z.boolean().default(true),
24
24
  }).nullable();
25
25
  exports.NotificationsSettingsSchema = zod_1.z.object({
26
- enableNotifications: zod_1.z.boolean(),
27
- emailNotifications: zod_1.z.boolean(),
28
- allowMentionNotif: zod_1.z.boolean(),
29
- allowPostCommentNotif: zod_1.z.boolean(),
30
- allowProjectCommentNotif: zod_1.z.boolean(),
31
- allowLikeNotif: zod_1.z.boolean(),
32
- allowFollowNotif: zod_1.z.boolean(),
33
- allowOpportunityUpdateNotif: zod_1.z.boolean(),
34
- allowInvestmentSignalNotif: zod_1.z.boolean(),
35
- allowDirectMessageNotif: zod_1.z.boolean(),
36
- zyaUpdatesNotif: zod_1.z.boolean(),
37
- platformAnnouncementsNotif: zod_1.z.boolean(),
38
- zyaDigestNotif: zod_1.z.boolean(),
26
+ enableNotifications: zod_1.z.boolean().default(true),
27
+ emailNotifications: zod_1.z.boolean().default(true),
28
+ allowMentionNotif: zod_1.z.boolean().default(true),
29
+ allowPostCommentNotif: zod_1.z.boolean().default(true),
30
+ allowProjectCommentNotif: zod_1.z.boolean().default(true),
31
+ allowLikeNotif: zod_1.z.boolean().default(true),
32
+ allowFollowNotif: zod_1.z.boolean().default(true),
33
+ allowOpportunityUpdateNotif: zod_1.z.boolean().default(true),
34
+ allowInvestmentSignalNotif: zod_1.z.boolean().default(true),
35
+ allowDirectMessageNotif: zod_1.z.boolean().default(true),
36
+ zyaUpdatesNotif: zod_1.z.boolean().default(true),
37
+ platformAnnouncementsNotif: zod_1.z.boolean().default(true),
38
+ zyaDigestNotif: zod_1.z.boolean().default(true),
39
39
  }).nullable();
40
40
  exports.UserSettingsSchema = zod_1.z.object({
41
41
  id: zod_1.z.cuid2(),
@@ -43,4 +43,6 @@ exports.UserSettingsSchema = zod_1.z.object({
43
43
  profileVisibilitySettings: exports.ProfileVisibilitySettingsSchema,
44
44
  exploreAndFeedSettings: exports.ExploreAndFeedSettingsSchema,
45
45
  notificationSettings: exports.NotificationsSettingsSchema,
46
+ createdAt: zod_1.z.coerce.date(),
47
+ updatedAt: zod_1.z.coerce.date(),
46
48
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.46",
3
+ "version": "2.5.48",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -2,17 +2,17 @@ import { z } from "zod";
2
2
 
3
3
  export const ProfileVisibilitySettingsSchema = z
4
4
  .object({
5
- privateAccount: z.boolean(),
6
- showAboutMe: z.boolean(),
7
- showLocation: z.boolean(),
8
- showVerificationBadge: z.boolean(),
9
- allowDirectMessaging: z.boolean(),
10
- whoCanSendChatRequests: z.enum(["everyone", "followers", "nobody"]),
11
- showPostsOnProfile: z.boolean(),
12
- showProjectsOnProfile: z.boolean(),
13
- enableCommentsOnPosts: z.boolean(),
14
- enableCommentsOnProjects: z.boolean(),
15
- whoCanMentionYou: z.enum(["everyone", "followers", "nobody"]),
5
+ privateAccount: z.boolean().default(false),
6
+ showAboutMe: z.boolean().default(true),
7
+ showLocation: z.boolean().default(true),
8
+ showVerificationBadge: z.boolean().default(true),
9
+ allowDirectMessaging: z.boolean().default(true),
10
+ whoCanSendChatRequests: z.enum(["everyone", "followers", "nobody"]).default("everyone"),
11
+ showPostsOnProfile: z.boolean().default(true),
12
+ showProjectsOnProfile: z.boolean().default(true),
13
+ enableCommentsOnPosts: z.boolean().default(true),
14
+ enableCommentsOnProjects: z.boolean().default(true),
15
+ whoCanMentionYou: z.enum(["everyone", "followers", "nobody"]).default("everyone"),
16
16
  })
17
17
  .nullable();
18
18
 
@@ -21,9 +21,9 @@ export type ProfileVisibilitySettings = z.infer<
21
21
  >;
22
22
 
23
23
  export const ExploreAndFeedSettingsSchema = z.object({
24
- feedAlgorithm: z.enum(["latest", "recommended", "following"]),
25
- filterSensitiveContent: z.boolean(),
26
- enableFeedRecommendations: z.boolean(),
24
+ feedAlgorithm: z.enum(["latest", "recommended", "following"]).default("recommended"),
25
+ filterSensitiveContent: z.boolean().default(false),
26
+ enableFeedRecommendations: z.boolean().default(true),
27
27
  }).nullable();
28
28
 
29
29
  export type ExploreAndFeedSettings = z.infer<
@@ -31,19 +31,19 @@ export type ExploreAndFeedSettings = z.infer<
31
31
  >;
32
32
 
33
33
  export const NotificationsSettingsSchema = z.object({
34
- enableNotifications: z.boolean(),
35
- emailNotifications: z.boolean(),
36
- allowMentionNotif: z.boolean(),
37
- allowPostCommentNotif: z.boolean(),
38
- allowProjectCommentNotif: z.boolean(),
39
- allowLikeNotif: z.boolean(),
40
- allowFollowNotif: z.boolean(),
41
- allowOpportunityUpdateNotif: z.boolean(),
42
- allowInvestmentSignalNotif: z.boolean(),
43
- allowDirectMessageNotif: z.boolean(),
44
- zyaUpdatesNotif: z.boolean(),
45
- platformAnnouncementsNotif: z.boolean(),
46
- zyaDigestNotif: z.boolean(),
34
+ enableNotifications: z.boolean().default(true),
35
+ emailNotifications: z.boolean().default(true),
36
+ allowMentionNotif: z.boolean().default(true),
37
+ allowPostCommentNotif: z.boolean().default(true),
38
+ allowProjectCommentNotif: z.boolean().default(true),
39
+ allowLikeNotif: z.boolean().default(true),
40
+ allowFollowNotif: z.boolean().default(true),
41
+ allowOpportunityUpdateNotif: z.boolean().default(true),
42
+ allowInvestmentSignalNotif: z.boolean().default(true),
43
+ allowDirectMessageNotif: z.boolean().default(true),
44
+ zyaUpdatesNotif: z.boolean().default(true),
45
+ platformAnnouncementsNotif: z.boolean().default(true),
46
+ zyaDigestNotif: z.boolean().default(true),
47
47
  }).nullable();
48
48
 
49
49
  export type NotificationsSettings = z.infer<typeof NotificationsSettingsSchema>;
@@ -54,6 +54,8 @@ export const UserSettingsSchema = z.object({
54
54
  profileVisibilitySettings: ProfileVisibilitySettingsSchema,
55
55
  exploreAndFeedSettings: ExploreAndFeedSettingsSchema,
56
56
  notificationSettings: NotificationsSettingsSchema,
57
+ createdAt: z.coerce.date(),
58
+ updatedAt: z.coerce.date(),
57
59
  });
58
60
 
59
61
  export type UserSettings = z.infer<typeof UserSettingsSchema>;