diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 8b20fc0fd5..55a636a624 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -21,6 +21,7 @@ import { KdfRequest } from '../models/request/kdfRequest'; import { KeysRequest } from '../models/request/keysRequest'; import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest'; import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest'; +import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest'; import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest'; import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest'; import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest'; @@ -238,6 +239,7 @@ export abstract class ApiService { postOrganizationLicenseUpdate: (id: string, data: FormData) => Promise; postOrganizationApiKey: (id: string, request: PasswordVerificationRequest) => Promise; postOrganizationRotateApiKey: (id: string, request: PasswordVerificationRequest) => Promise; + postOrganizationUpgrade: (id: string, request: OrganizationUpgradeRequest) => Promise; postOrganizationSeat: (id: string, request: SeatRequest) => Promise; postOrganizationStorage: (id: string, request: StorageRequest) => Promise; postOrganizationPayment: (id: string, request: PaymentRequest) => Promise; diff --git a/src/models/request/organizationUpgradeRequest.ts b/src/models/request/organizationUpgradeRequest.ts new file mode 100644 index 0000000000..7f8793b2d1 --- /dev/null +++ b/src/models/request/organizationUpgradeRequest.ts @@ -0,0 +1,9 @@ +import { PlanType } from '../../enums/planType'; + +export class OrganizationUpgradeRequest { + businessName: string; + planType: PlanType; + additionalSeats: number; + additionalStorageGb: number; + premiumAccessAddon: boolean; +} diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 36622409a9..8b4acd2bd9 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -27,6 +27,7 @@ import { KdfRequest } from '../models/request/kdfRequest'; import { KeysRequest } from '../models/request/keysRequest'; import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest'; import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest'; +import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest'; import { OrganizationUserAcceptRequest } from '../models/request/organizationUserAcceptRequest'; import { OrganizationUserConfirmRequest } from '../models/request/organizationUserConfirmRequest'; import { OrganizationUserInviteRequest } from '../models/request/organizationUserInviteRequest'; @@ -778,6 +779,10 @@ export class ApiService implements ApiServiceAbstraction { return new ApiKeyResponse(r); } + postOrganizationUpgrade(id: string, request: OrganizationUpgradeRequest): Promise { + return this.send('POST', '/organizations/' + id + '/upgrade', request, true, false); + } + postOrganizationSeat(id: string, request: SeatRequest): Promise { return this.send('POST', '/organizations/' + id + '/seat', request, true, false); }