mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
adjust storage apis
This commit is contained in:
parent
ef897695e9
commit
c0e7e588ed
@ -16,6 +16,7 @@ import { PasswordHintRequest } from '../models/request/passwordHintRequest';
|
||||
import { PasswordRequest } from '../models/request/passwordRequest';
|
||||
import { PasswordVerificationRequest } from '../models/request/passwordVerificationRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { StorageRequest } from '../models/request/storageRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
import { TwoFactorProviderRequest } from '../models/request/twoFactorProviderRequest';
|
||||
@ -67,6 +68,7 @@ export abstract class ApiService {
|
||||
postPremium: (data: FormData) => Promise<any>;
|
||||
postReinstatePremium: () => Promise<any>;
|
||||
postCancelPremium: () => Promise<any>;
|
||||
postAccountStorage: (request: StorageRequest) => Promise<any>;
|
||||
postFolder: (request: FolderRequest) => Promise<FolderResponse>;
|
||||
putFolder: (id: string, request: FolderRequest) => Promise<FolderResponse>;
|
||||
deleteFolder: (id: string) => Promise<any>;
|
||||
|
3
src/models/request/storageRequest.ts
Normal file
3
src/models/request/storageRequest.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export class StorageRequest {
|
||||
storageGbAdjustment: number;
|
||||
}
|
@ -22,6 +22,7 @@ import { PasswordHintRequest } from '../models/request/passwordHintRequest';
|
||||
import { PasswordRequest } from '../models/request/passwordRequest';
|
||||
import { PasswordVerificationRequest } from '../models/request/passwordVerificationRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { StorageRequest } from '../models/request/storageRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
import { TwoFactorProviderRequest } from '../models/request/twoFactorProviderRequest';
|
||||
@ -202,6 +203,10 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send('POST', '/accounts/cancel-premium', null, true, false);
|
||||
}
|
||||
|
||||
postAccountStorage(request: StorageRequest): Promise<any> {
|
||||
return this.send('POST', '/accounts/storage', request, true, false);
|
||||
}
|
||||
|
||||
// Folder APIs
|
||||
|
||||
async postFolder(request: FolderRequest): Promise<FolderResponse> {
|
||||
|
Loading…
Reference in New Issue
Block a user