@supernova-studio/model 0.47.1 → 0.47.6

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.47.1",
3
+ "version": "0.47.6",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,20 @@
1
+ import { z } from "zod";
2
+ import { DbCreateInputOmit } from "../helpers";
3
+
4
+ const AssetDeleteScheduleStatus = z.enum(["InProgress", "Pending"]);
5
+ export type AssetDeleteScheduleStatus = z.infer<typeof AssetDeleteScheduleStatus>;
6
+
7
+
8
+ export const AssetDeleteSchedule = z.object({
9
+ id: z.string(),
10
+ path: z.string(),
11
+ createdAt: z.date(),
12
+ deleteAt: z.date(),
13
+ isFolder: z.boolean(),
14
+ status: AssetDeleteScheduleStatus,
15
+ });
16
+
17
+ export type AssetDeleteSchedule = z.infer<typeof AssetDeleteSchedule>;
18
+
19
+ export type AssetDeleteScheduleDbInput = DbCreateInputOmit<AssetDeleteSchedule>;
20
+
@@ -0,0 +1 @@
1
+ export * from "./asset-delete-schedule";
@@ -40,6 +40,7 @@ export const PageBlockDefinitionBehavior = z.object({
40
40
  .object({
41
41
  numberOfItems: z.number(),
42
42
  allowLinks: z.boolean(),
43
+ newItemLabel: z.string().optional(),
43
44
  })
44
45
  .optional(),
45
46
  entities: z
@@ -71,6 +71,22 @@ export const PageBlockDefinitionSingleSelectPropertyStyle = z.enum([
71
71
  "Select",
72
72
  "Checkbox",
73
73
  ]);
74
+ export const PageBlockDefinitionSingleSelectPropertyColor = z.enum([
75
+ "Green",
76
+ "Red",
77
+ "Yellow",
78
+ "Blue",
79
+ "Purple",
80
+ "Orange",
81
+ "Pink",
82
+ "Teal",
83
+ "Brown",
84
+ "Grey",
85
+ "LightGrey",
86
+ "Cyan",
87
+ "Fuchsia",
88
+ ]);
89
+
74
90
  export const PageBlockDefinitionMultiSelectPropertyStyle = z.enum(["SegmentedControl", "Select", "Checkbox"]);
75
91
 
76
92
  export const PageBlockDefinitionImageAspectRatio = z.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
@@ -98,6 +114,7 @@ export const PageBlockDefinitionSelectChoice = z.object({
98
114
  value: z.string(),
99
115
  name: z.string(),
100
116
  icon: z.string().optional(),
117
+ color: PageBlockDefinitionSingleSelectPropertyColor.optional(),
101
118
  });
102
119
 
103
120
  export type PageBlockDefinitionSelectChoice = z.infer<typeof PageBlockDefinitionSelectChoice>;
@@ -5,3 +5,4 @@ export * from "./page-anchor";
5
5
  export * from "./page-content-backup";
6
6
  export * from "./page-content";
7
7
  export * from "./page";
8
+ export * from "./thread";
@@ -0,0 +1,35 @@
1
+ import { z } from "zod";
2
+
3
+ export const DocumentationComment = z.object({
4
+ id: z.string(),
5
+
6
+ authorId: z.string(),
7
+ threadId: z.string(),
8
+ roomId: z.string(),
9
+
10
+ createdAt: z.coerce.date(),
11
+ editedAt: z.coerce.date().optional(),
12
+ deletedAt: z.coerce.date().optional(),
13
+
14
+ body: z.string(),
15
+ });
16
+
17
+ export const DocumentationCommentThread = z.object({
18
+ id: z.string(),
19
+
20
+ roomId: z.string(),
21
+
22
+ pagePersistentId: z.string(),
23
+ brandId: z.string(),
24
+ designSystemVersionId: z.string(),
25
+ designSystemId: z.string(),
26
+
27
+ blockId: z.string().optional(),
28
+ resolved: z.boolean(),
29
+
30
+ createdAt: z.coerce.date(),
31
+ updatedAt: z.coerce.date(),
32
+ });
33
+
34
+ export type DocumentationComment = z.infer<typeof DocumentationComment>;
35
+ export type DocumentationCommentThread = z.infer<typeof DocumentationCommentThread>;
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./asset-delete-schedule";
1
2
  export * from "./auth";
2
3
  export * from "./billing";
3
4
  export * from "./common";
@@ -0,0 +1,29 @@
1
+ import { z } from "zod";
2
+
3
+ export const GitOrganization = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ url: z.string(),
7
+ });
8
+ export type GitOrganization = z.infer<typeof GitOrganization>;
9
+
10
+ export const GitProject = z.object({
11
+ id: z.string(),
12
+ name: z.string(),
13
+ url: z.string(),
14
+ });
15
+ export type GitProject = z.infer<typeof GitProject>;
16
+
17
+ export const GitRepository = z.object({
18
+ id: z.string(),
19
+ name: z.string(),
20
+ url: z.string(),
21
+ defaultBranch: z.string(),
22
+ });
23
+ export type GitRepository = z.infer<typeof GitRepository>;
24
+
25
+ export const GitBranch = z.object({
26
+ name: z.string(),
27
+ lastCommitId: z.string(),
28
+ });
29
+ export type GitBranch = z.infer<typeof GitBranch>;
@@ -1,4 +1,5 @@
1
1
  export * from "./external-oauth-request";
2
+ export * from "./git";
2
3
  export * from "./integration";
3
4
  export * from "./oauth-providers";
4
5
  export * from "./oauth-token";
@@ -17,7 +17,10 @@ export const IntegrationCredentialsProfile = z.object({
17
17
  id: z.string(),
18
18
  email: z.string().optional(),
19
19
  handle: z.string().optional(),
20
+ type: z.string().optional(),
20
21
  avatarUrl: z.string().optional(),
22
+ organization: z.string().optional(),
23
+ installation: z.string().optional(),
21
24
  });
22
25
 
23
26
  export type IntegrationCredentialsProfile = z.infer<typeof IntegrationCredentialsProfile>;
@@ -12,6 +12,7 @@ export const UserOnboarding = z.object({
12
12
  jobTitle: z.string().optional(),
13
13
  phase: z.string().optional(),
14
14
  jobLevel: UserOnboardingJobLevel.optional(),
15
+ designSystemName: z.string().optional(),
15
16
  });
16
17
 
17
18
  export type UserOnboarding = z.infer<typeof UserOnboarding>;
@@ -23,4 +24,10 @@ export const UserProfile = z.object({
23
24
  onboarding: UserOnboarding.optional(),
24
25
  });
25
26
 
27
+ export const UserProfileUpdate = UserProfile.partial().omit({
28
+ avatar: true,
29
+ });
30
+
31
+ export type UserProfileUpdate = z.infer<typeof UserProfileUpdate>;
32
+
26
33
  export type UserProfile = z.infer<typeof UserProfile>;
@@ -1,6 +1,7 @@
1
1
  export * from "./npm-registry-settings";
2
2
  export * from "./sso-provider";
3
3
  export * from "./user-invite";
4
+ export * from "./workspace-configuration";
4
5
  export * from "./workspace-context";
5
6
  export * from "./workspace-create";
6
7
  export * from "./workspace-invitations";
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ import { SsoProvider } from "./sso-provider";
3
+ import { WorkspaceIpSettings, WorkspaceProfileUpdate } from "./workspace";
4
+ import { NpmRegistryConfig } from "./npm-registry-settings";
5
+
6
+ export const WorkspaceConfigurationUpdate = z.object({
7
+ id: z.string(),
8
+ ipWhitelist: WorkspaceIpSettings.optional(),
9
+ sso: SsoProvider.optional(),
10
+ npmRegistrySettings: NpmRegistryConfig.optional(),
11
+ profile: WorkspaceProfileUpdate.optional(),
12
+ });
13
+
14
+ export type WorkspaceConfigurationUpdate = z.infer<typeof WorkspaceConfigurationUpdate>;
@@ -33,6 +33,12 @@ export const WorkspaceProfile = z.object({
33
33
  billingDetails: nullishToOptional(BillingDetails),
34
34
  });
35
35
 
36
+ export const WorkspaceProfileUpdate = WorkspaceProfile.omit({
37
+ avatar: true,
38
+ });
39
+
40
+ export type WorkspaceProfileUpdate = z.infer<typeof WorkspaceProfileUpdate>;
41
+
36
42
  export const Workspace = z.object({
37
43
  id: z.string(),
38
44
  profile: WorkspaceProfile,