( input: SendWorkspaceAddedEmailInput )
| 297 | * the workspace and has no acceptance step. |
| 298 | */ |
| 299 | export async function sendWorkspaceAddedEmail( |
| 300 | input: SendWorkspaceAddedEmailInput |
| 301 | ): Promise<SendInvitationEmailResult> { |
| 302 | const workspaceLink = `${getBaseUrl()}/workspace/${input.workspaceId}/home` |
| 303 | const emailHtml = await renderWorkspaceAddedEmail( |
| 304 | input.inviterName, |
| 305 | input.workspaceName, |
| 306 | workspaceLink |
| 307 | ) |
| 308 | |
| 309 | const result = await sendEmail({ |
| 310 | to: input.email, |
| 311 | subject: getEmailSubject('workspace-added'), |
| 312 | html: emailHtml, |
| 313 | from: getFromEmailAddress(), |
| 314 | emailType: 'transactional', |
| 315 | }) |
| 316 | if (!result.success) { |
| 317 | return { success: false, error: result.message } |
| 318 | } |
| 319 | return { success: true } |
| 320 | } |
| 321 | |
| 322 | export async function prepareInvitationResend(params: { |
| 323 | invitationId: string |
no test coverage detected