@supernova-studio/model 0.54.4 → 0.54.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.54.4",
3
+ "version": "0.54.6",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,16 @@
1
1
  import { z } from "zod";
2
2
  import { nullishToOptional } from "../helpers";
3
- import { Workspace } from "../workspace/workspace";
3
+
4
+ //
5
+ // Enums
6
+ //
7
+
8
+ export const DesignSystemAccessMode = z.enum(["Open", "InviteOnly"]);
9
+ export type DesignSystemAccessMode = z.infer<typeof DesignSystemAccessMode>;
10
+
11
+ //
12
+ // Model
13
+ //
4
14
 
5
15
  export const DesignSystemSwitcher = z.object({
6
16
  isEnabled: z.boolean(),
@@ -23,15 +33,10 @@ export const DesignSystem = z.object({
23
33
  designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
24
34
  isApprovalFeatureEnabled: z.boolean(),
25
35
  approvalRequiredForPublishing: z.boolean(),
36
+ accessMode: DesignSystemAccessMode,
26
37
  createdAt: z.coerce.date(),
27
38
  updatedAt: z.coerce.date(),
28
39
  });
29
40
 
30
- export const DesignSystemWithWorkspace = z.object({
31
- designSystem: DesignSystem,
32
- workspace: Workspace,
33
- });
34
-
35
41
  export type DesignSystemSwitcher = z.infer<typeof DesignSystemSwitcher>;
36
42
  export type DesignSystem = z.infer<typeof DesignSystem>;
37
- export type DesignSystemWithWorkspace = z.infer<typeof DesignSystemWithWorkspace>;
package/src/dsm/index.ts CHANGED
@@ -5,6 +5,7 @@ export * from "./documentation";
5
5
  export * from "./element-snapshots";
6
6
  export * from "./elements";
7
7
  export * from "./import";
8
+ export * from "./membership";
8
9
  export * from "./properties";
9
10
  export * from "./views";
10
11
  export * from "./brand";
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+
3
+ export const DesignSystemMembership = z.object({
4
+ id: z.string(),
5
+ userId: z.string(),
6
+ designSystemId: z.string(),
7
+ workspaceMembershipId: z.string(),
8
+ });
9
+
10
+ export type DesignSystemMembership = z.infer<typeof DesignSystemMembership>;
@@ -0,0 +1 @@
1
+ export * from "./design-system-membership";