@@ -115,7 +115,7 @@ type Props = {
115115 organizationId : string ;
116116} ;
117117
118- export async function sendOrgSubscriptionEmail ( to : string , props : Props ) {
118+ export async function sendOrgSubscriptionEmail ( to : string , props : Props ) : Promise < SendResult > {
119119 const seats = `${ props . seatCount } seat${ props . seatCount === 1 ? '' : 's' } ` ;
120120 const organization_url = `${ NEXTAUTH_URL } /organizations/${ props . organizationId } ` ;
121121 const invoices_url = `${ NEXTAUTH_URL } /organizations/${ props . organizationId } /payment-details` ;
@@ -126,7 +126,7 @@ export async function sendOrgSubscriptionEmail(to: string, props: Props) {
126126 } ) ;
127127}
128128
129- export async function sendOrgRenewedEmail ( to : string , props : Props ) {
129+ export async function sendOrgRenewedEmail ( to : string , props : Props ) : Promise < SendResult > {
130130 const seats = `${ props . seatCount } seat${ props . seatCount === 1 ? '' : 's' } ` ;
131131 const invoices_url = `${ NEXTAUTH_URL } /organizations/${ props . organizationId } /payment-details` ;
132132 return send ( {
@@ -136,7 +136,10 @@ export async function sendOrgRenewedEmail(to: string, props: Props) {
136136 } ) ;
137137}
138138
139- export async function sendOrgCancelledEmail ( to : string , props : Omit < Props , 'seatCount' > ) {
139+ export async function sendOrgCancelledEmail (
140+ to : string ,
141+ props : Omit < Props , 'seatCount' >
142+ ) : Promise < SendResult > {
140143 const invoices_url = `${ NEXTAUTH_URL } /organizations/${ props . organizationId } /payment-details` ;
141144 return send ( {
142145 to,
@@ -148,7 +151,7 @@ export async function sendOrgCancelledEmail(to: string, props: Omit<Props, 'seat
148151export async function sendOrgSSOUserJoinedEmail (
149152 to : string ,
150153 props : Omit < Props , 'seatCount' > & { new_user_email : string }
151- ) {
154+ ) : Promise < SendResult > {
152155 const organization_url = `${ NEXTAUTH_URL } /organizations/${ props . organizationId } ` ;
153156 return send ( {
154157 to,
@@ -157,7 +160,9 @@ export async function sendOrgSSOUserJoinedEmail(
157160 } ) ;
158161}
159162
160- export async function sendOrganizationInviteEmail ( data : OrganizationInviteEmailData ) {
163+ export async function sendOrganizationInviteEmail (
164+ data : OrganizationInviteEmailData
165+ ) : Promise < SendResult > {
161166 return send ( {
162167 to : data . to ,
163168 templateName : 'orgInvitation' ,
@@ -172,7 +177,7 @@ export async function sendOrganizationInviteEmail(data: OrganizationInviteEmailD
172177export async function sendMagicLinkEmail (
173178 magicLink : MagicLinkTokenWithPlaintext ,
174179 callbackUrl ?: string
175- ) {
180+ ) : Promise < SendResult > {
176181 return send ( {
177182 to : magicLink . email ,
178183 templateName : 'magicLink' ,
@@ -189,7 +194,7 @@ export async function sendMagicLinkEmail(
189194export async function sendAutoTopUpFailedEmail (
190195 to : string ,
191196 props : { reason : string ; organizationId ?: string }
192- ) {
197+ ) : Promise < SendResult > {
193198 const credits_url = props . organizationId
194199 ? `${ NEXTAUTH_URL } /organizations/${ props . organizationId } /payment-details`
195200 : `${ NEXTAUTH_URL } /credits?show-auto-top-up` ;
@@ -207,7 +212,9 @@ type SendDeploymentFailedEmailProps = {
207212 repository : string ;
208213} ;
209214
210- export async function sendDeploymentFailedEmail ( props : SendDeploymentFailedEmailProps ) {
215+ export async function sendDeploymentFailedEmail (
216+ props : SendDeploymentFailedEmailProps
217+ ) : Promise < SendResult > {
211218 return send ( {
212219 to : props . to ,
213220 templateName : 'deployFailed' ,
@@ -225,7 +232,7 @@ type SendBalanceAlertEmailProps = {
225232 to : string [ ] ;
226233} ;
227234
228- export async function sendBalanceAlertEmail ( props : SendBalanceAlertEmailProps ) {
235+ export async function sendBalanceAlertEmail ( props : SendBalanceAlertEmailProps ) : Promise < void > {
229236 const { organizationId, minimum_balance, to } = props ;
230237
231238 if ( ! to || to . length === 0 ) {
@@ -270,7 +277,7 @@ type OssInviteEmailData = {
270277 monthlyCreditsUsd : number ;
271278} ;
272279
273- export async function sendOssInviteNewUserEmail ( data : OssInviteEmailData ) {
280+ export async function sendOssInviteNewUserEmail ( data : OssInviteEmailData ) : Promise < SendResult > {
274281 const integrations_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /integrations` ;
275282 const code_reviews_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /code-reviews` ;
276283 const tierConfig = ossTierConfig [ data . tier ] ;
@@ -292,7 +299,7 @@ export async function sendOssInviteNewUserEmail(data: OssInviteEmailData) {
292299
293300export async function sendOssInviteExistingUserEmail (
294301 data : Omit < OssInviteEmailData , 'acceptInviteUrl' | 'inviteCode' >
295- ) {
302+ ) : Promise < SendResult > {
296303 const organization_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } ` ;
297304 const integrations_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /integrations` ;
298305 const code_reviews_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /code-reviews` ;
@@ -321,7 +328,9 @@ type OssProvisionEmailData = {
321328 monthlyCreditsUsd : number ;
322329} ;
323330
324- export async function sendOssExistingOrgProvisionedEmail ( data : OssProvisionEmailData ) {
331+ export async function sendOssExistingOrgProvisionedEmail (
332+ data : OssProvisionEmailData
333+ ) : Promise < void > {
325334 const organization_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } ` ;
326335 const integrations_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /integrations` ;
327336 const code_reviews_url = `${ NEXTAUTH_URL } /organizations/${ data . organizationId } /code-reviews` ;
0 commit comments