From 4f71542a38e066e5e23ab0211d841e83e7f3fbc8 Mon Sep 17 00:00:00 2001 From: Shane Melton Date: Tue, 27 Jun 2023 16:34:23 -0700 Subject: [PATCH] [AC-1418] Add new service method to update SM subscription --- .../organization-api.service.abstraction.ts | 5 +++++ .../organization/organization-api.service.ts | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts b/libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts index c6ce62f232..b6778cf61e 100644 --- a/libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts +++ b/libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts @@ -3,6 +3,7 @@ import { OrganizationSsoRequest } from "../../../auth/models/request/organizatio import { SecretVerificationRequest } from "../../../auth/models/request/secret-verification.request"; import { ApiKeyResponse } from "../../../auth/models/response/api-key.response"; import { OrganizationSsoResponse } from "../../../auth/models/response/organization-sso.response"; +import { OrganizationSmSubscriptionUpdateRequest } from "../../../billing/models/request/organization-sm-subscription-update.request"; import { OrganizationSubscriptionUpdateRequest } from "../../../billing/models/request/organization-subscription-update.request"; import { OrganizationTaxInfoUpdateRequest } from "../../../billing/models/request/organization-tax-info-update.request"; import { PaymentRequest } from "../../../billing/models/request/payment.request"; @@ -41,6 +42,10 @@ export class OrganizationApiServiceAbstraction { id: string, request: OrganizationSubscriptionUpdateRequest ) => Promise; + updateSecretsManagerSubscription: ( + id: string, + request: OrganizationSmSubscriptionUpdateRequest + ) => Promise; updateSeats: (id: string, request: SeatRequest) => Promise; updateStorage: (id: string, request: StorageRequest) => Promise; verifyBank: (id: string, request: VerifyBankRequest) => Promise; diff --git a/libs/common/src/admin-console/services/organization/organization-api.service.ts b/libs/common/src/admin-console/services/organization/organization-api.service.ts index 503aeb3820..c235b4b8ee 100644 --- a/libs/common/src/admin-console/services/organization/organization-api.service.ts +++ b/libs/common/src/admin-console/services/organization/organization-api.service.ts @@ -4,6 +4,7 @@ import { OrganizationSsoRequest } from "../../../auth/models/request/organizatio import { SecretVerificationRequest } from "../../../auth/models/request/secret-verification.request"; import { ApiKeyResponse } from "../../../auth/models/response/api-key.response"; import { OrganizationSsoResponse } from "../../../auth/models/response/organization-sso.response"; +import { OrganizationSmSubscriptionUpdateRequest } from "../../../billing/models/request/organization-sm-subscription-update.request"; import { OrganizationSubscriptionUpdateRequest } from "../../../billing/models/request/organization-subscription-update.request"; import { OrganizationTaxInfoUpdateRequest } from "../../../billing/models/request/organization-tax-info-update.request"; import { PaymentRequest } from "../../../billing/models/request/payment.request"; @@ -133,6 +134,19 @@ export class OrganizationApiService implements OrganizationApiServiceAbstraction ); } + async updateSecretsManagerSubscription( + id: string, + request: OrganizationSmSubscriptionUpdateRequest + ): Promise { + return this.apiService.send( + "POST", + "/organizations/" + id + "/sm-subscription", + request, + true, + false + ); + } + async updateSeats(id: string, request: SeatRequest): Promise { const r = await this.apiService.send( "POST",