@supernova-studio/client 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/client",
3
- "version": "0.54.4",
3
+ "version": "0.54.6",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -3,5 +3,6 @@ export * from "./data-source";
3
3
  export * from "./design-system";
4
4
  export * from "./elements-diff";
5
5
  export * from "./exporter-property";
6
+ export * from "./members";
6
7
  export * from "./version";
7
8
  export * from "./view";
@@ -0,0 +1,32 @@
1
+ import { z } from "zod";
2
+
3
+ //
4
+ // Read
5
+ //
6
+
7
+ export const DTODesignSystemMember = z.object({
8
+ userId: z.string(),
9
+ });
10
+
11
+ export const DTODesignSystemMemberListResponse = z.object({
12
+ members: DTODesignSystemMember.array(),
13
+ });
14
+
15
+ export const DTODesignSystemMembersUpdateResponse = z.object({
16
+ ok: z.literal(true),
17
+ });
18
+
19
+ export type DTODesignSystemMember = z.infer<typeof DTODesignSystemMember>;
20
+ export type DTODesignSystemMemberListResponse = z.infer<typeof DTODesignSystemMemberListResponse>;
21
+ export type DTODesignSystemMembersUpdateResponse = z.infer<typeof DTODesignSystemMembersUpdateResponse>;
22
+
23
+ //
24
+ // Write
25
+ //
26
+
27
+ export const DTODesignSystemMembersUpdatePayload = z.object({
28
+ inviteUserIds: z.string().array(),
29
+ removeUserIds: z.string().array(),
30
+ });
31
+
32
+ export type DTODesignSystemMembersUpdatePayload = z.infer<typeof DTODesignSystemMembersUpdatePayload>;
@@ -1 +1,2 @@
1
- export * from "./profile";
1
+ export * from "./update";
2
+ export * from "./user";
@@ -2,6 +2,7 @@ import { User } from "@supernova-studio/model";
2
2
  import { z } from "zod";
3
3
 
4
4
  export const DTOUserProfileUpdateResponse = z.object({
5
- user: User,
5
+ user: User,
6
6
  });
7
+
7
8
  export type DTOUserProfileUpdateResponse = z.infer<typeof DTOUserProfileUpdateResponse>;
@@ -0,0 +1,22 @@
1
+ import { z } from "zod";
2
+
3
+ /**
4
+ * Definition of a user profile as inspectable by other users (i.e. reduced version)
5
+ */
6
+ export const DTOUserProfile = z.object({
7
+ name: z.string(),
8
+ nickname: z.string().optional(),
9
+ avatar: z.string().optional(),
10
+ });
11
+
12
+ /**
13
+ * Definition of a user as inspectable by other users (i.e. reduced version)
14
+ */
15
+ export const DTOUser = z.object({
16
+ id: z.string(),
17
+ email: z.string(),
18
+ profile: DTOUserProfile,
19
+ });
20
+
21
+ export type DTOUserProfile = z.infer<typeof DTOUserProfile>;
22
+ export type DTOUser = z.infer<typeof DTOUser>;
@@ -1 +0,0 @@
1
- export * from "./update";