diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 2755d0db2b..83c7a1fd88 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -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; postReinstatePremium: () => Promise; postCancelPremium: () => Promise; + postAccountStorage: (request: StorageRequest) => Promise; postFolder: (request: FolderRequest) => Promise; putFolder: (id: string, request: FolderRequest) => Promise; deleteFolder: (id: string) => Promise; diff --git a/src/models/request/storageRequest.ts b/src/models/request/storageRequest.ts new file mode 100644 index 0000000000..f4b78559bc --- /dev/null +++ b/src/models/request/storageRequest.ts @@ -0,0 +1,3 @@ +export class StorageRequest { + storageGbAdjustment: number; +} diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 570ae4ddff..cf0d7b6bc4 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -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 { + return this.send('POST', '/accounts/storage', request, true, false); + } + // Folder APIs async postFolder(request: FolderRequest): Promise {