Organization autoscaling (#487)
* Seat autoscaling api changes * Update all organization subscription aspects with one api call * Remove disable autoscale option * Remove autoscale request references * Remove autoscale update
This commit is contained in:
parent
83548a6753
commit
5cec31f871
|
@ -33,6 +33,7 @@ import { KeysRequest } from '../models/request/keysRequest';
|
|||
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
|
||||
import { OrganizationImportRequest } from '../models/request/organizationImportRequest';
|
||||
import { OrganizationKeysRequest } from '../models/request/organizationKeysRequest';
|
||||
import { OrganizationSubscriptionUpdateRequest } from '../models/request/organizationSubscriptionUpdateRequest';
|
||||
import { OrganizationTaxInfoUpdateRequest } from '../models/request/organizationTaxInfoUpdateRequest';
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
|
||||
|
@ -381,6 +382,7 @@ export abstract class ApiService {
|
|||
postOrganizationApiKey: (id: string, request: PasswordVerificationRequest) => Promise<ApiKeyResponse>;
|
||||
postOrganizationRotateApiKey: (id: string, request: PasswordVerificationRequest) => Promise<ApiKeyResponse>;
|
||||
postOrganizationUpgrade: (id: string, request: OrganizationUpgradeRequest) => Promise<PaymentResponse>;
|
||||
postOrganizationUpdateSubscription: (id: string, request: OrganizationSubscriptionUpdateRequest) => Promise<void>;
|
||||
postOrganizationSeat: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||
postOrganizationStorage: (id: string, request: StorageRequest) => Promise<any>;
|
||||
postOrganizationPayment: (id: string, request: PaymentRequest) => Promise<any>;
|
||||
|
|
|
@ -13,6 +13,7 @@ export class OrganizationCreateRequest {
|
|||
paymentMethodType: PaymentMethodType;
|
||||
paymentToken: string;
|
||||
additionalSeats: number;
|
||||
maxAutoscaleSeats: number;
|
||||
additionalStorageGb: number;
|
||||
premiumAccessAddon: boolean;
|
||||
collectionName: string;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
export class OrganizationSubscriptionUpdateRequest {
|
||||
constructor(public seatAdjustment: number, public maxAutoscaleSeats?: number) { }
|
||||
}
|
|
@ -17,6 +17,7 @@ export class OrganizationResponse extends BaseResponse {
|
|||
plan: PlanResponse;
|
||||
planType: PlanType;
|
||||
seats: number;
|
||||
maxAutoscaleSeats: number;
|
||||
maxCollections: number;
|
||||
maxStorageGb: number;
|
||||
useGroups: boolean;
|
||||
|
@ -44,6 +45,7 @@ export class OrganizationResponse extends BaseResponse {
|
|||
this.plan = plan == null ? null : new PlanResponse(plan);
|
||||
this.planType = this.getResponseProperty('PlanType');
|
||||
this.seats = this.getResponseProperty('Seats');
|
||||
this.maxAutoscaleSeats = this.getResponseProperty('MaxAutoscaleSeats');
|
||||
this.maxCollections = this.getResponseProperty('MaxCollections');
|
||||
this.maxStorageGb = this.getResponseProperty('MaxStorageGb');
|
||||
this.useGroups = this.getResponseProperty('UseGroups');
|
||||
|
|
|
@ -36,6 +36,7 @@ import { KeysRequest } from '../models/request/keysRequest';
|
|||
import { OrganizationCreateRequest } from '../models/request/organizationCreateRequest';
|
||||
import { OrganizationImportRequest } from '../models/request/organizationImportRequest';
|
||||
import { OrganizationKeysRequest } from '../models/request/organizationKeysRequest';
|
||||
import { OrganizationSubscriptionUpdateRequest } from '../models/request/organizationSubscriptionUpdateRequest';
|
||||
import { OrganizationTaxInfoUpdateRequest } from '../models/request/organizationTaxInfoUpdateRequest';
|
||||
import { OrganizationUpdateRequest } from '../models/request/organizationUpdateRequest';
|
||||
import { OrganizationUpgradeRequest } from '../models/request/organizationUpgradeRequest';
|
||||
|
@ -1192,6 +1193,10 @@ export class ApiService implements ApiServiceAbstraction {
|
|||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationUpdateSubscription(id: string, request: OrganizationSubscriptionUpdateRequest): Promise<void> {
|
||||
return this.send('POST', '/organizations/' + id + '/subscription', request, true, false);
|
||||
}
|
||||
|
||||
async postOrganizationSeat(id: string, request: SeatRequest): Promise<PaymentResponse> {
|
||||
const r = await this.send('POST', '/organizations/' + id + '/seat', request, true, true);
|
||||
return new PaymentResponse(r);
|
||||
|
|
Loading…
Reference in New Issue