@zyacreatives/shared 2.5.48 → 2.5.50

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.
@@ -99,3 +99,52 @@ export declare const UserSettingsSchema: z.ZodObject<{
99
99
  updatedAt: z.ZodCoercedDate<unknown>;
100
100
  }, z.core.$strip>;
101
101
  export type UserSettings = z.infer<typeof UserSettingsSchema>;
102
+ export declare const CreateUserSettingsInputSchema: z.ZodObject<{
103
+ userId: z.ZodCUID2;
104
+ profileVisibilitySettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
105
+ privateAccount: z.ZodDefault<z.ZodBoolean>;
106
+ showAboutMe: z.ZodDefault<z.ZodBoolean>;
107
+ showLocation: z.ZodDefault<z.ZodBoolean>;
108
+ showVerificationBadge: z.ZodDefault<z.ZodBoolean>;
109
+ allowDirectMessaging: z.ZodDefault<z.ZodBoolean>;
110
+ whoCanSendChatRequests: z.ZodDefault<z.ZodEnum<{
111
+ followers: "followers";
112
+ everyone: "everyone";
113
+ nobody: "nobody";
114
+ }>>;
115
+ showPostsOnProfile: z.ZodDefault<z.ZodBoolean>;
116
+ showProjectsOnProfile: z.ZodDefault<z.ZodBoolean>;
117
+ enableCommentsOnPosts: z.ZodDefault<z.ZodBoolean>;
118
+ enableCommentsOnProjects: z.ZodDefault<z.ZodBoolean>;
119
+ whoCanMentionYou: z.ZodDefault<z.ZodEnum<{
120
+ followers: "followers";
121
+ everyone: "everyone";
122
+ nobody: "nobody";
123
+ }>>;
124
+ }, z.core.$strip>>>;
125
+ exploreAndFeedSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
126
+ feedAlgorithm: z.ZodDefault<z.ZodEnum<{
127
+ following: "following";
128
+ latest: "latest";
129
+ recommended: "recommended";
130
+ }>>;
131
+ filterSensitiveContent: z.ZodDefault<z.ZodBoolean>;
132
+ enableFeedRecommendations: z.ZodDefault<z.ZodBoolean>;
133
+ }, z.core.$strip>>>;
134
+ notificationSettings: z.ZodOptional<z.ZodNullable<z.ZodObject<{
135
+ enableNotifications: z.ZodDefault<z.ZodBoolean>;
136
+ emailNotifications: z.ZodDefault<z.ZodBoolean>;
137
+ allowMentionNotif: z.ZodDefault<z.ZodBoolean>;
138
+ allowPostCommentNotif: z.ZodDefault<z.ZodBoolean>;
139
+ allowProjectCommentNotif: z.ZodDefault<z.ZodBoolean>;
140
+ allowLikeNotif: z.ZodDefault<z.ZodBoolean>;
141
+ allowFollowNotif: z.ZodDefault<z.ZodBoolean>;
142
+ allowOpportunityUpdateNotif: z.ZodDefault<z.ZodBoolean>;
143
+ allowInvestmentSignalNotif: z.ZodDefault<z.ZodBoolean>;
144
+ allowDirectMessageNotif: z.ZodDefault<z.ZodBoolean>;
145
+ zyaUpdatesNotif: z.ZodDefault<z.ZodBoolean>;
146
+ platformAnnouncementsNotif: z.ZodDefault<z.ZodBoolean>;
147
+ zyaDigestNotif: z.ZodDefault<z.ZodBoolean>;
148
+ }, z.core.$strip>>>;
149
+ }, z.core.$strip>;
150
+ export type CreateUserSettingsInput = z.infer<typeof CreateUserSettingsInputSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSettingsSchema = exports.NotificationsSettingsSchema = exports.ExploreAndFeedSettingsSchema = exports.ProfileVisibilitySettingsSchema = void 0;
3
+ exports.CreateUserSettingsInputSchema = exports.UserSettingsSchema = exports.NotificationsSettingsSchema = exports.ExploreAndFeedSettingsSchema = exports.ProfileVisibilitySettingsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.ProfileVisibilitySettingsSchema = zod_1.z
6
6
  .object({
@@ -9,20 +9,29 @@ exports.ProfileVisibilitySettingsSchema = zod_1.z
9
9
  showLocation: zod_1.z.boolean().default(true),
10
10
  showVerificationBadge: zod_1.z.boolean().default(true),
11
11
  allowDirectMessaging: zod_1.z.boolean().default(true),
12
- whoCanSendChatRequests: zod_1.z.enum(["everyone", "followers", "nobody"]).default("everyone"),
12
+ whoCanSendChatRequests: zod_1.z
13
+ .enum(["everyone", "followers", "nobody"])
14
+ .default("everyone"),
13
15
  showPostsOnProfile: zod_1.z.boolean().default(true),
14
16
  showProjectsOnProfile: zod_1.z.boolean().default(true),
15
17
  enableCommentsOnPosts: zod_1.z.boolean().default(true),
16
18
  enableCommentsOnProjects: zod_1.z.boolean().default(true),
17
- whoCanMentionYou: zod_1.z.enum(["everyone", "followers", "nobody"]).default("everyone"),
19
+ whoCanMentionYou: zod_1.z
20
+ .enum(["everyone", "followers", "nobody"])
21
+ .default("everyone"),
18
22
  })
19
23
  .nullable();
20
- exports.ExploreAndFeedSettingsSchema = zod_1.z.object({
21
- feedAlgorithm: zod_1.z.enum(["latest", "recommended", "following"]).default("recommended"),
24
+ exports.ExploreAndFeedSettingsSchema = zod_1.z
25
+ .object({
26
+ feedAlgorithm: zod_1.z
27
+ .enum(["latest", "recommended", "following"])
28
+ .default("recommended"),
22
29
  filterSensitiveContent: zod_1.z.boolean().default(false),
23
30
  enableFeedRecommendations: zod_1.z.boolean().default(true),
24
- }).nullable();
25
- exports.NotificationsSettingsSchema = zod_1.z.object({
31
+ })
32
+ .nullable();
33
+ exports.NotificationsSettingsSchema = zod_1.z
34
+ .object({
26
35
  enableNotifications: zod_1.z.boolean().default(true),
27
36
  emailNotifications: zod_1.z.boolean().default(true),
28
37
  allowMentionNotif: zod_1.z.boolean().default(true),
@@ -36,7 +45,8 @@ exports.NotificationsSettingsSchema = zod_1.z.object({
36
45
  zyaUpdatesNotif: zod_1.z.boolean().default(true),
37
46
  platformAnnouncementsNotif: zod_1.z.boolean().default(true),
38
47
  zyaDigestNotif: zod_1.z.boolean().default(true),
39
- }).nullable();
48
+ })
49
+ .nullable();
40
50
  exports.UserSettingsSchema = zod_1.z.object({
41
51
  id: zod_1.z.cuid2(),
42
52
  userId: zod_1.z.cuid2(),
@@ -46,3 +56,9 @@ exports.UserSettingsSchema = zod_1.z.object({
46
56
  createdAt: zod_1.z.coerce.date(),
47
57
  updatedAt: zod_1.z.coerce.date(),
48
58
  });
59
+ exports.CreateUserSettingsInputSchema = zod_1.z.object({
60
+ userId: zod_1.z.cuid2(),
61
+ profileVisibilitySettings: exports.ProfileVisibilitySettingsSchema.optional(),
62
+ exploreAndFeedSettings: exports.ExploreAndFeedSettingsSchema.optional(),
63
+ notificationSettings: exports.NotificationsSettingsSchema.optional(),
64
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.48",
3
+ "version": "2.5.50",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -7,12 +7,16 @@ export const ProfileVisibilitySettingsSchema = z
7
7
  showLocation: z.boolean().default(true),
8
8
  showVerificationBadge: z.boolean().default(true),
9
9
  allowDirectMessaging: z.boolean().default(true),
10
- whoCanSendChatRequests: z.enum(["everyone", "followers", "nobody"]).default("everyone"),
10
+ whoCanSendChatRequests: z
11
+ .enum(["everyone", "followers", "nobody"])
12
+ .default("everyone"),
11
13
  showPostsOnProfile: z.boolean().default(true),
12
14
  showProjectsOnProfile: z.boolean().default(true),
13
15
  enableCommentsOnPosts: z.boolean().default(true),
14
16
  enableCommentsOnProjects: z.boolean().default(true),
15
- whoCanMentionYou: z.enum(["everyone", "followers", "nobody"]).default("everyone"),
17
+ whoCanMentionYou: z
18
+ .enum(["everyone", "followers", "nobody"])
19
+ .default("everyone"),
16
20
  })
17
21
  .nullable();
18
22
 
@@ -20,31 +24,37 @@ export type ProfileVisibilitySettings = z.infer<
20
24
  typeof ProfileVisibilitySettingsSchema
21
25
  >;
22
26
 
23
- export const ExploreAndFeedSettingsSchema = z.object({
24
- feedAlgorithm: z.enum(["latest", "recommended", "following"]).default("recommended"),
25
- filterSensitiveContent: z.boolean().default(false),
26
- enableFeedRecommendations: z.boolean().default(true),
27
- }).nullable();
27
+ export const ExploreAndFeedSettingsSchema = z
28
+ .object({
29
+ feedAlgorithm: z
30
+ .enum(["latest", "recommended", "following"])
31
+ .default("recommended"),
32
+ filterSensitiveContent: z.boolean().default(false),
33
+ enableFeedRecommendations: z.boolean().default(true),
34
+ })
35
+ .nullable();
28
36
 
29
37
  export type ExploreAndFeedSettings = z.infer<
30
38
  typeof ExploreAndFeedSettingsSchema
31
39
  >;
32
40
 
33
- export const NotificationsSettingsSchema = z.object({
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
- }).nullable();
41
+ export const NotificationsSettingsSchema = z
42
+ .object({
43
+ enableNotifications: z.boolean().default(true),
44
+ emailNotifications: z.boolean().default(true),
45
+ allowMentionNotif: z.boolean().default(true),
46
+ allowPostCommentNotif: z.boolean().default(true),
47
+ allowProjectCommentNotif: z.boolean().default(true),
48
+ allowLikeNotif: z.boolean().default(true),
49
+ allowFollowNotif: z.boolean().default(true),
50
+ allowOpportunityUpdateNotif: z.boolean().default(true),
51
+ allowInvestmentSignalNotif: z.boolean().default(true),
52
+ allowDirectMessageNotif: z.boolean().default(true),
53
+ zyaUpdatesNotif: z.boolean().default(true),
54
+ platformAnnouncementsNotif: z.boolean().default(true),
55
+ zyaDigestNotif: z.boolean().default(true),
56
+ })
57
+ .nullable();
48
58
 
49
59
  export type NotificationsSettings = z.infer<typeof NotificationsSettingsSchema>;
50
60
 
@@ -59,3 +69,17 @@ export const UserSettingsSchema = z.object({
59
69
  });
60
70
 
61
71
  export type UserSettings = z.infer<typeof UserSettingsSchema>;
72
+
73
+ export const CreateUserSettingsInputSchema = z.object({
74
+ userId: z.cuid2(),
75
+
76
+ profileVisibilitySettings: ProfileVisibilitySettingsSchema.optional(),
77
+
78
+ exploreAndFeedSettings: ExploreAndFeedSettingsSchema.optional(),
79
+
80
+ notificationSettings: NotificationsSettingsSchema.optional(),
81
+ });
82
+
83
+ export type CreateUserSettingsInput = z.infer<
84
+ typeof CreateUserSettingsInputSchema
85
+ >;