From 42638c544358d23a9993fa66ff75f6742aa91e50 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 24 Nov 2022 15:19:17 +0100 Subject: [PATCH] Deprecate the Api Service (#4099) --- libs/common/src/abstractions/api.service.ts | 5 +++++ libs/common/src/services/api.service.ts | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/libs/common/src/abstractions/api.service.ts b/libs/common/src/abstractions/api.service.ts index a8e2f45283c..d130f514134 100644 --- a/libs/common/src/abstractions/api.service.ts +++ b/libs/common/src/abstractions/api.service.ts @@ -163,6 +163,11 @@ import { TwoFactorYubiKeyResponse } from "../models/response/two-factor-yubi-key import { UserKeyResponse } from "../models/response/user-key.response"; import { SendAccessView } from "../models/view/send-access.view"; +/** + * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual + * api services. The `send` method is still allowed to be used within api services. For background + * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service. + */ export abstract class ApiService { send: ( method: "GET" | "POST" | "PUT" | "DELETE", diff --git a/libs/common/src/services/api.service.ts b/libs/common/src/services/api.service.ts index 6b660bb367e..d1bf0325b5c 100644 --- a/libs/common/src/services/api.service.ts +++ b/libs/common/src/services/api.service.ts @@ -172,6 +172,11 @@ import { TwoFactorYubiKeyResponse } from "../models/response/two-factor-yubi-key import { UserKeyResponse } from "../models/response/user-key.response"; import { SendAccessView } from "../models/view/send-access.view"; +/** + * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual + * api services. The `send` method is still allowed to be used within api services. For background + * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service. + */ export class ApiService implements ApiServiceAbstraction { private device: DeviceType; private deviceType: string;