@zyacreatives/shared 2.5.44 → 2.5.46

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,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const ProfileVisibilitySettingsSchema: z.ZodObject<{
2
+ export declare const ProfileVisibilitySettingsSchema: z.ZodNullable<z.ZodObject<{
3
3
  privateAccount: z.ZodBoolean;
4
4
  showAboutMe: z.ZodBoolean;
5
5
  showLocation: z.ZodBoolean;
@@ -19,9 +19,9 @@ export declare const ProfileVisibilitySettingsSchema: z.ZodObject<{
19
19
  everyone: "everyone";
20
20
  nobody: "nobody";
21
21
  }>;
22
- }, z.core.$strip>;
22
+ }, z.core.$strip>>;
23
23
  export type ProfileVisibilitySettings = z.infer<typeof ProfileVisibilitySettingsSchema>;
24
- export declare const ExploreAndFeedSettingsSchema: z.ZodObject<{
24
+ export declare const ExploreAndFeedSettingsSchema: z.ZodNullable<z.ZodObject<{
25
25
  feedAlgorithm: z.ZodEnum<{
26
26
  following: "following";
27
27
  latest: "latest";
@@ -29,9 +29,9 @@ export declare const ExploreAndFeedSettingsSchema: z.ZodObject<{
29
29
  }>;
30
30
  filterSensitiveContent: z.ZodBoolean;
31
31
  enableFeedRecommendations: z.ZodBoolean;
32
- }, z.core.$strip>;
32
+ }, z.core.$strip>>;
33
33
  export type ExploreAndFeedSettings = z.infer<typeof ExploreAndFeedSettingsSchema>;
34
- export declare const NotificationsSettingsSchema: z.ZodObject<{
34
+ export declare const NotificationsSettingsSchema: z.ZodNullable<z.ZodObject<{
35
35
  enableNotifications: z.ZodBoolean;
36
36
  emailNotifications: z.ZodBoolean;
37
37
  allowMentionNotif: z.ZodBoolean;
@@ -45,10 +45,12 @@ export declare const NotificationsSettingsSchema: z.ZodObject<{
45
45
  zyaUpdatesNotif: z.ZodBoolean;
46
46
  platformAnnouncementsNotif: z.ZodBoolean;
47
47
  zyaDigestNotif: z.ZodBoolean;
48
- }, z.core.$strip>;
48
+ }, z.core.$strip>>;
49
49
  export type NotificationsSettings = z.infer<typeof NotificationsSettingsSchema>;
50
50
  export declare const UserSettingsSchema: z.ZodObject<{
51
- profileVisibilitySettings: z.ZodObject<{
51
+ id: z.ZodCUID2;
52
+ userId: z.ZodCUID2;
53
+ profileVisibilitySettings: z.ZodNullable<z.ZodObject<{
52
54
  privateAccount: z.ZodBoolean;
53
55
  showAboutMe: z.ZodBoolean;
54
56
  showLocation: z.ZodBoolean;
@@ -68,8 +70,8 @@ export declare const UserSettingsSchema: z.ZodObject<{
68
70
  everyone: "everyone";
69
71
  nobody: "nobody";
70
72
  }>;
71
- }, z.core.$strip>;
72
- exploreAndFeedSettings: z.ZodObject<{
73
+ }, z.core.$strip>>;
74
+ exploreAndFeedSettings: z.ZodNullable<z.ZodObject<{
73
75
  feedAlgorithm: z.ZodEnum<{
74
76
  following: "following";
75
77
  latest: "latest";
@@ -77,8 +79,8 @@ export declare const UserSettingsSchema: z.ZodObject<{
77
79
  }>;
78
80
  filterSensitiveContent: z.ZodBoolean;
79
81
  enableFeedRecommendations: z.ZodBoolean;
80
- }, z.core.$strip>;
81
- notificationSettings: z.ZodObject<{
82
+ }, z.core.$strip>>;
83
+ notificationSettings: z.ZodNullable<z.ZodObject<{
82
84
  enableNotifications: z.ZodBoolean;
83
85
  emailNotifications: z.ZodBoolean;
84
86
  allowMentionNotif: z.ZodBoolean;
@@ -92,6 +94,6 @@ export declare const UserSettingsSchema: z.ZodObject<{
92
94
  zyaUpdatesNotif: z.ZodBoolean;
93
95
  platformAnnouncementsNotif: z.ZodBoolean;
94
96
  zyaDigestNotif: z.ZodBoolean;
95
- }, z.core.$strip>;
97
+ }, z.core.$strip>>;
96
98
  }, z.core.$strip>;
97
99
  export type UserSettings = z.infer<typeof UserSettingsSchema>;
@@ -2,7 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UserSettingsSchema = exports.NotificationsSettingsSchema = exports.ExploreAndFeedSettingsSchema = exports.ProfileVisibilitySettingsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- exports.ProfileVisibilitySettingsSchema = zod_1.z.object({
5
+ exports.ProfileVisibilitySettingsSchema = zod_1.z
6
+ .object({
6
7
  privateAccount: zod_1.z.boolean(),
7
8
  showAboutMe: zod_1.z.boolean(),
8
9
  showLocation: zod_1.z.boolean(),
@@ -14,12 +15,13 @@ exports.ProfileVisibilitySettingsSchema = zod_1.z.object({
14
15
  enableCommentsOnPosts: zod_1.z.boolean(),
15
16
  enableCommentsOnProjects: zod_1.z.boolean(),
16
17
  whoCanMentionYou: zod_1.z.enum(["everyone", "followers", "nobody"]),
17
- });
18
+ })
19
+ .nullable();
18
20
  exports.ExploreAndFeedSettingsSchema = zod_1.z.object({
19
21
  feedAlgorithm: zod_1.z.enum(["latest", "recommended", "following"]),
20
22
  filterSensitiveContent: zod_1.z.boolean(),
21
23
  enableFeedRecommendations: zod_1.z.boolean(),
22
- });
24
+ }).nullable();
23
25
  exports.NotificationsSettingsSchema = zod_1.z.object({
24
26
  enableNotifications: zod_1.z.boolean(),
25
27
  emailNotifications: zod_1.z.boolean(),
@@ -34,8 +36,10 @@ exports.NotificationsSettingsSchema = zod_1.z.object({
34
36
  zyaUpdatesNotif: zod_1.z.boolean(),
35
37
  platformAnnouncementsNotif: zod_1.z.boolean(),
36
38
  zyaDigestNotif: zod_1.z.boolean(),
37
- });
39
+ }).nullable();
38
40
  exports.UserSettingsSchema = zod_1.z.object({
41
+ id: zod_1.z.cuid2(),
42
+ userId: zod_1.z.cuid2(),
39
43
  profileVisibilitySettings: exports.ProfileVisibilitySettingsSchema,
40
44
  exploreAndFeedSettings: exports.ExploreAndFeedSettingsSchema,
41
45
  notificationSettings: exports.NotificationsSettingsSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.44",
3
+ "version": "2.5.46",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,29 +1,34 @@
1
1
  import { z } from "zod";
2
2
 
3
-
4
- export const ProfileVisibilitySettingsSchema = z.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"]),
16
- });
17
-
18
- export type ProfileVisibilitySettings = z.infer<typeof ProfileVisibilitySettingsSchema>;
3
+ export const ProfileVisibilitySettingsSchema = z
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"]),
16
+ })
17
+ .nullable();
18
+
19
+ export type ProfileVisibilitySettings = z.infer<
20
+ typeof ProfileVisibilitySettingsSchema
21
+ >;
19
22
 
20
23
  export const ExploreAndFeedSettingsSchema = z.object({
21
24
  feedAlgorithm: z.enum(["latest", "recommended", "following"]),
22
25
  filterSensitiveContent: z.boolean(),
23
26
  enableFeedRecommendations: z.boolean(),
24
- });
27
+ }).nullable();
25
28
 
26
- export type ExploreAndFeedSettings = z.infer<typeof ExploreAndFeedSettingsSchema>;
29
+ export type ExploreAndFeedSettings = z.infer<
30
+ typeof ExploreAndFeedSettingsSchema
31
+ >;
27
32
 
28
33
  export const NotificationsSettingsSchema = z.object({
29
34
  enableNotifications: z.boolean(),
@@ -39,11 +44,13 @@ export const NotificationsSettingsSchema = z.object({
39
44
  zyaUpdatesNotif: z.boolean(),
40
45
  platformAnnouncementsNotif: z.boolean(),
41
46
  zyaDigestNotif: z.boolean(),
42
- });
47
+ }).nullable();
43
48
 
44
49
  export type NotificationsSettings = z.infer<typeof NotificationsSettingsSchema>;
45
50
 
46
51
  export const UserSettingsSchema = z.object({
52
+ id: z.cuid2(),
53
+ userId: z.cuid2(),
47
54
  profileVisibilitySettings: ProfileVisibilitySettingsSchema,
48
55
  exploreAndFeedSettings: ExploreAndFeedSettingsSchema,
49
56
  notificationSettings: NotificationsSettingsSchema,