1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-30 13:03:53 +01:00

verify email apis

This commit is contained in:
Kyle Spearrin 2018-07-12 11:35:04 -04:00
parent 152c44185b
commit 24d608d365
3 changed files with 21 additions and 0 deletions

View File

@ -38,6 +38,7 @@ import { UpdateTwoFactorDuoRequest } from '../models/request/updateTwoFactorDuoR
import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest';
import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest';
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
import { BillingResponse } from '../models/response/billingResponse';
import { CipherResponse } from '../models/response/cipherResponse';
@ -100,6 +101,8 @@ export abstract class ApiService {
postAccountPayment: (request: PaymentRequest) => Promise<any>;
postAccountLicense: (data: FormData) => Promise<any>;
postAccountKeys: (request: KeysRequest) => Promise<any>;
postAccountVerifyEmail: () => Promise<any>;
postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise<any>;
postFolder: (request: FolderRequest) => Promise<FolderResponse>;
putFolder: (id: string, request: FolderRequest) => Promise<FolderResponse>;

View File

@ -0,0 +1,9 @@
export class VerifyEmailRequest {
userId: string;
token: string;
constructor(userId: string, token: string) {
this.userId = userId;
this.token = token;
}
}

View File

@ -44,6 +44,7 @@ import { UpdateTwoFactorDuoRequest } from '../models/request/updateTwoFactorDuoR
import { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest';
import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest';
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
import { BillingResponse } from '../models/response/billingResponse';
import { CipherResponse } from '../models/response/cipherResponse';
@ -249,6 +250,14 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/keys', request, true, false);
}
postAccountVerifyEmail(): Promise<any> {
return this.send('POST', '/accounts/verify-email', null, true, false);
}
postAccountVerifyEmailToken(request: VerifyEmailRequest): Promise<any> {
return this.send('POST', '/accounts/verify-email-token', request, false, false);
}
// Folder APIs
async postFolder(request: FolderRequest): Promise<FolderResponse> {