From c0e7e588ed59832a6f579ff63d85bfcdfb400d78 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 29 Jun 2018 23:40:10 -0400 Subject: [PATCH] adjust storage apis --- src/abstractions/api.service.ts | 2 ++ src/models/request/storageRequest.ts | 3 +++ src/services/api.service.ts | 5 +++++ 3 files changed, 10 insertions(+) create mode 100644 src/models/request/storageRequest.ts 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 {