@supernova-studio/model 0.54.31 → 0.54.33
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/dist/index.d.mts +330 -176
- package/dist/index.d.ts +330 -176
- package/dist/index.js +392 -357
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +822 -787
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/design-system.ts +1 -1
- package/src/dsm/membership/design-system-membership.ts +35 -0
- package/src/dsm/membership/index.ts +1 -0
- package/src/dsm/membership/invitations.ts +11 -0
package/package.json
CHANGED
package/src/dsm/design-system.ts
CHANGED
|
@@ -28,7 +28,7 @@ export const DesignSystem = z.object({
|
|
|
28
28
|
docUserSlug: nullishToOptional(z.string()),
|
|
29
29
|
docSlugDeprecated: z.string(),
|
|
30
30
|
isPublic: z.boolean(),
|
|
31
|
-
|
|
31
|
+
isMultibrand: z.boolean(),
|
|
32
32
|
docViewUrl: nullishToOptional(z.string()),
|
|
33
33
|
basePrefixes: z.array(z.string()),
|
|
34
34
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { DbCreateInputOmit } from "../../helpers";
|
|
3
|
+
import { WorkspaceRoleSchema } from "../../workspace";
|
|
4
|
+
import { DesignSystemInvitation } from "./invitations";
|
|
3
5
|
|
|
4
6
|
export const DesignSystemMembership = z.object({
|
|
5
7
|
id: z.string(),
|
|
@@ -11,3 +13,36 @@ export const DesignSystemMembership = z.object({
|
|
|
11
13
|
export type DesignSystemMembership = z.infer<typeof DesignSystemMembership>;
|
|
12
14
|
|
|
13
15
|
export type CreateDesignSystemMembership = DbCreateInputOmit<DesignSystemMembership>;
|
|
16
|
+
|
|
17
|
+
export const DesignSystemMembers = z.object({
|
|
18
|
+
members: DesignSystemMembership.array(),
|
|
19
|
+
invitations: DesignSystemInvitation.array(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const DesignSystemPendingMemberInvitation = z.object({
|
|
23
|
+
inviteId: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const DesignSystemUserInvitation = z.object({
|
|
27
|
+
userId: z.string(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const DesignSystemInvite = z.object({
|
|
31
|
+
email: z.string(),
|
|
32
|
+
workspaceRole: WorkspaceRoleSchema,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const DesignSystemMembershipUpdates = z.object({
|
|
36
|
+
usersToInvite: DesignSystemUserInvitation.array().optional(),
|
|
37
|
+
invitesToInvite: DesignSystemPendingMemberInvitation.array().optional(),
|
|
38
|
+
emailsToInvite: DesignSystemInvite.array().optional(),
|
|
39
|
+
|
|
40
|
+
removeUserIds: z.string().array().optional(),
|
|
41
|
+
deleteInvitationIds: z.string().array().optional(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export type DesignSystemMembers = z.infer<typeof DesignSystemMembers>;
|
|
45
|
+
export type DesignSystemInvite = z.infer<typeof DesignSystemInvite>;
|
|
46
|
+
export type DesignSystemPendingMemberInvite = z.infer<typeof DesignSystemPendingMemberInvitation>;
|
|
47
|
+
export type DesignSystemUserInvitation = z.infer<typeof DesignSystemUserInvitation>;
|
|
48
|
+
export type DesignSystemMembershipUpdates = z.infer<typeof DesignSystemMembershipUpdates>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DbCreateInputOmit } from "../../helpers";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
export const DesignSystemInvitation = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
designSystemId: z.string(),
|
|
7
|
+
workspaceInvitationId: z.string(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export type DesignSystemInvitation = z.infer<typeof DesignSystemInvitation>;
|
|
11
|
+
export type CreateDesignSystemInvitation = DbCreateInputOmit<DesignSystemInvitation>;
|