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 { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest';
import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest'; import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest';
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest'; import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
import { BillingResponse } from '../models/response/billingResponse'; import { BillingResponse } from '../models/response/billingResponse';
import { CipherResponse } from '../models/response/cipherResponse'; import { CipherResponse } from '../models/response/cipherResponse';
@ -100,6 +101,8 @@ export abstract class ApiService {
postAccountPayment: (request: PaymentRequest) => Promise<any>; postAccountPayment: (request: PaymentRequest) => Promise<any>;
postAccountLicense: (data: FormData) => Promise<any>; postAccountLicense: (data: FormData) => Promise<any>;
postAccountKeys: (request: KeysRequest) => Promise<any>; postAccountKeys: (request: KeysRequest) => Promise<any>;
postAccountVerifyEmail: () => Promise<any>;
postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise<any>;
postFolder: (request: FolderRequest) => Promise<FolderResponse>; postFolder: (request: FolderRequest) => Promise<FolderResponse>;
putFolder: (id: string, 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 { UpdateTwoFactorEmailRequest } from '../models/request/updateTwoFactorEmailRequest';
import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest'; import { UpdateTwoFactorU2fRequest } from '../models/request/updateTwoFactorU2fRequest';
import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest'; import { UpdateTwoFactorYubioOtpRequest } from '../models/request/updateTwoFactorYubioOtpRequest';
import { VerifyEmailRequest } from '../models/request/verifyEmailRequest';
import { BillingResponse } from '../models/response/billingResponse'; import { BillingResponse } from '../models/response/billingResponse';
import { CipherResponse } from '../models/response/cipherResponse'; import { CipherResponse } from '../models/response/cipherResponse';
@ -249,6 +250,14 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/keys', request, true, false); 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 // Folder APIs
async postFolder(request: FolderRequest): Promise<FolderResponse> { async postFolder(request: FolderRequest): Promise<FolderResponse> {