@supernova-studio/model 0.54.34 → 0.55.0
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 +727 -1
- package/dist/index.d.ts +727 -1
- package/dist/index.js +15 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +173 -159
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/emails/design-system-invite.ts +29 -0
- package/src/emails/index.ts +1 -0
- package/src/index.ts +1 -0
- package/src/workspace/workspace-invitations.ts +8 -1
package/package.json
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DesignSystem } from "../dsm/design-system";
|
|
3
|
+
import { User } from "../users/user";
|
|
4
|
+
import { WorkspaceRoleSchema } from "../workspace/workspace-role";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Object describing who is going to receive the email.
|
|
8
|
+
*
|
|
9
|
+
* Normally recepient is just an email, however in some cases email can be tailored
|
|
10
|
+
* for who receives it. In this case the email has cutomization based on the role of the
|
|
11
|
+
* recepient in the workspace (or design design system).
|
|
12
|
+
*/
|
|
13
|
+
export const DesignSystemInviteEmailRecipient = z.object({
|
|
14
|
+
email: z.string(),
|
|
15
|
+
role: WorkspaceRoleSchema,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Object describing the necessary data to send an email notifying a user that
|
|
20
|
+
* they've been added to a design system.
|
|
21
|
+
*/
|
|
22
|
+
export const DesignSystemInviteEmailData = z.object({
|
|
23
|
+
designSystem: DesignSystem,
|
|
24
|
+
invitedBy: User,
|
|
25
|
+
documentationDomain: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type DesignSystemInviteEmailRecipient = z.infer<typeof DesignSystemInviteEmailRecipient>;
|
|
29
|
+
export type DesignSystemInviteEmailData = z.infer<typeof DesignSystemInviteEmailData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./design-system-invite";
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { WorkspaceRole } from "./workspace-role";
|
|
2
1
|
import { z } from "zod";
|
|
2
|
+
import { DbUpdate } from "../helpers";
|
|
3
|
+
import { OmitStrict } from "../utils";
|
|
4
|
+
import { WorkspaceRole } from "./workspace-role";
|
|
3
5
|
|
|
4
6
|
export const WorkspaceInvitation = z.object({
|
|
5
7
|
id: z.string(),
|
|
@@ -12,3 +14,8 @@ export const WorkspaceInvitation = z.object({
|
|
|
12
14
|
});
|
|
13
15
|
|
|
14
16
|
export type WorkspaceInvitation = z.infer<typeof WorkspaceInvitation>;
|
|
17
|
+
|
|
18
|
+
export type UpdateWorkspaceInvitation = OmitStrict<
|
|
19
|
+
DbUpdate<WorkspaceInvitation>,
|
|
20
|
+
"email" | "invitedBy" | "workspaceId"
|
|
21
|
+
>;
|