@supernova-studio/model 0.54.28 → 0.54.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.54.28",
3
+ "version": "0.54.30",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,5 @@
1
1
  export * from "./linked-integrations";
2
2
  export * from "./user-analytics-cleanup-schedule";
3
- export * from "./user-create";
4
3
  export * from "./user-identity";
5
4
  export * from "./user-minified";
6
5
  export * from "./user-notification-settings";
@@ -1,7 +1,6 @@
1
1
  import { z } from "zod";
2
2
 
3
3
  export const UserOnboardingDepartment = z.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
4
-
5
4
  export const UserOnboardingJobLevel = z.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
6
5
 
7
6
  export const UserOnboarding = z.object({
@@ -19,8 +18,6 @@ export const UserOnboarding = z.object({
19
18
  isApprovalsOnboardingFinished: z.boolean().optional(),
20
19
  });
21
20
 
22
- export type UserOnboarding = z.infer<typeof UserOnboarding>;
23
-
24
21
  export const UserProfile = z.object({
25
22
  name: z.string(),
26
23
  avatar: z.string().optional(),
@@ -28,10 +25,17 @@ export const UserProfile = z.object({
28
25
  onboarding: UserOnboarding.optional(),
29
26
  });
30
27
 
28
+ export type UserOnboardingDepartment = z.infer<typeof UserOnboardingDepartment>;
29
+ export type UserOnboardingJobLevel = z.infer<typeof UserOnboardingJobLevel>;
30
+ export type UserOnboarding = z.infer<typeof UserOnboarding>;
31
+ export type UserProfile = z.infer<typeof UserProfile>;
32
+
33
+ //
34
+ // TO DELETE
35
+ //
36
+
31
37
  export const UserProfileUpdate = UserProfile.partial().omit({
32
38
  avatar: true,
33
39
  });
34
40
 
35
41
  export type UserProfileUpdate = z.infer<typeof UserProfileUpdate>;
36
-
37
- export type UserProfile = z.infer<typeof UserProfile>;
package/src/users/user.ts CHANGED
@@ -2,6 +2,8 @@ import { z } from "zod";
2
2
  import { UserLinkedIntegrations } from "./linked-integrations";
3
3
  import { UserProfile } from "./user-profile";
4
4
 
5
+ export const UserSource = z.enum(["SignUp", "Invite", "SSO"]);
6
+
5
7
  export const User = z.object({
6
8
  id: z.string(),
7
9
  email: z.string(),
@@ -12,6 +14,8 @@ export const User = z.object({
12
14
  linkedIntegrations: UserLinkedIntegrations.optional(),
13
15
  loggedOutAt: z.coerce.date().optional(),
14
16
  isProtected: z.boolean(),
17
+ source: UserSource.optional(),
15
18
  });
16
19
 
20
+ export type UserSource = z.infer<typeof UserSource>;
17
21
  export type User = z.infer<typeof User>;
@@ -1,9 +0,0 @@
1
- import { z } from "zod";
2
-
3
- export const CreateUserInput = z.object({
4
- email: z.string(),
5
- name: z.string(),
6
- username: z.string(),
7
- });
8
-
9
- export type CreateUserInput = z.infer<typeof CreateUserInput>;