This commit is contained in:
Kyle Spearrin 2018-08-27 19:55:05 -04:00
parent 00562d083b
commit ae54094fcd
4 changed files with 16 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
import { KeysRequest } from '../models/request/keysRequest';
import { KdfRequest } from '../models/request/kdfRequest';
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest';
@ -116,6 +117,7 @@ export abstract class ApiService {
postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise<any>;
postAccountRecoverDelete: (request: DeleteRecoverRequest) => Promise<any>;
postAccountRecoverDeleteToken: (request: VerifyDeleteRecoverRequest) => Promise<any>;
postAccountKdf: (request: KdfRequest) => Promise<any>;
getFolder: (id: string) => Promise<FolderResponse>;
postFolder: (request: FolderRequest) => Promise<FolderResponse>;

View File

@ -1,3 +1,3 @@
export enum KdfType {
PBKDF2 = 0,
PBKDF2_SHA256 = 0,
}

View File

@ -0,0 +1,8 @@
import { PasswordRequest } from './passwordRequest';
import { KdfType } from '../../enums/kdfType';
export class KdfRequest extends PasswordRequest {
kdf: KdfType;
kdfIterations: number;
}

View File

@ -21,6 +21,7 @@ import { GroupRequest } from '../models/request/groupRequest';
import { ImportCiphersRequest } from '../models/request/importCiphersRequest';
import { ImportDirectoryRequest } from '../models/request/importDirectoryRequest';
import { ImportOrganizationCiphersRequest } from '../models/request/importOrganizationCiphersRequest';
import { KdfRequest } from '../models/request/kdfRequest';
import { KeysRequest } from '../models/request/keysRequest';
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
@ -284,6 +285,10 @@ export class ApiService implements ApiServiceAbstraction {
return this.send('POST', '/accounts/delete-recover-token', request, false, false);
}
postAccountKdf(request: KdfRequest): Promise<any> {
return this.send('POST', '/accounts/kdf', request, true, false);
}
// Folder APIs
async getFolder(id: string): Promise<FolderResponse> {