diff --git a/libs/common/src/admin-console/models/response/organization.response.ts b/libs/common/src/admin-console/models/response/organization.response.ts index 2c056ee2875..b248c6d0df9 100644 --- a/libs/common/src/admin-console/models/response/organization.response.ts +++ b/libs/common/src/admin-console/models/response/organization.response.ts @@ -13,6 +13,7 @@ export class OrganizationResponse extends BaseResponse { businessTaxNumber: string; billingEmail: string; plan: PlanResponse; + secretsManagerPlan: PlanResponse; planType: PlanType; seats: number; maxAutoscaleSeats: number; @@ -27,6 +28,11 @@ export class OrganizationResponse extends BaseResponse { useResetPassword: boolean; useSecretsManager: boolean; hasPublicAndPrivateKeys: boolean; + usePasswordManager: boolean; + smSeats?: number; + smServiceAccounts?: number; + maxAutoscaleSmSeats?: number; + maxAutoscaleSmServiceAccounts?: number; constructor(response: any) { super(response); @@ -39,8 +45,14 @@ export class OrganizationResponse extends BaseResponse { this.businessCountry = this.getResponseProperty("BusinessCountry"); this.businessTaxNumber = this.getResponseProperty("BusinessTaxNumber"); this.billingEmail = this.getResponseProperty("BillingEmail"); + const plan = this.getResponseProperty("Plan"); this.plan = plan == null ? null : new PlanResponse(plan); + + const secretsManagerPlan = this.getResponseProperty("SecretsManagerPlan"); + this.secretsManagerPlan = + secretsManagerPlan == null ? null : new PlanResponse(secretsManagerPlan); + this.planType = this.getResponseProperty("PlanType"); this.seats = this.getResponseProperty("Seats"); this.maxAutoscaleSeats = this.getResponseProperty("MaxAutoscaleSeats"); @@ -55,5 +67,10 @@ export class OrganizationResponse extends BaseResponse { this.useResetPassword = this.getResponseProperty("UseResetPassword"); this.useSecretsManager = this.getResponseProperty("UseSecretsManager"); this.hasPublicAndPrivateKeys = this.getResponseProperty("HasPublicAndPrivateKeys"); + this.usePasswordManager = this.getResponseProperty("UsePasswordManager"); + this.smSeats = this.getResponseProperty("SmSeats"); + this.smServiceAccounts = this.getResponseProperty("SmServiceAccounts"); + this.maxAutoscaleSmSeats = this.getResponseProperty("MaxAutoscaleSmSeats"); + this.maxAutoscaleSmServiceAccounts = this.getResponseProperty("MaxAutoscaleSmServiceAccounts"); } } diff --git a/libs/common/src/billing/models/response/plan.response.ts b/libs/common/src/billing/models/response/plan.response.ts index 8368849b86d..fe6f9b68ecf 100644 --- a/libs/common/src/billing/models/response/plan.response.ts +++ b/libs/common/src/billing/models/response/plan.response.ts @@ -1,12 +1,14 @@ import { ProductType } from "../../../enums"; import { BaseResponse } from "../../../models/response/base.response"; import { PlanType } from "../../enums"; +import { BitwardenProductType } from "../../enums/bitwarden-product-type.enum"; export class PlanResponse extends BaseResponse { type: PlanType; product: ProductType; name: string; isAnnual: boolean; + bitwardenProduct: BitwardenProductType; nameLocalizationKey: string; descriptionLocalizationKey: string; canBeUsedByBusiness: boolean; @@ -48,6 +50,13 @@ export class PlanResponse extends BaseResponse { additionalStoragePricePerGb: number; premiumAccessOptionPrice: number; + // SM only + additionalPricePerServiceAccount: number; + baseServiceAccount: number; + maxServiceAccount: number; + hasAdditionalServiceAccountOption: boolean; + maxProjects: number; + constructor(response: any) { super(response); this.type = this.getResponseProperty("Type"); @@ -90,5 +99,15 @@ export class PlanResponse extends BaseResponse { this.seatPrice = this.getResponseProperty("SeatPrice"); this.additionalStoragePricePerGb = this.getResponseProperty("AdditionalStoragePricePerGb"); this.premiumAccessOptionPrice = this.getResponseProperty("PremiumAccessOptionPrice"); + this.bitwardenProduct = this.getResponseProperty("BitwardenProduct"); + this.additionalPricePerServiceAccount = this.getResponseProperty( + "AdditionalPricePerServiceAccount" + ); + this.baseServiceAccount = this.getResponseProperty("BaseServiceAccount"); + this.maxServiceAccount = this.getResponseProperty("MaxServiceAccount"); + this.hasAdditionalServiceAccountOption = this.getResponseProperty( + "HasAdditionalServiceAccountOption" + ); + this.maxProjects = this.getResponseProperty("MaxProjects"); } }