From 9e8b2e813d3266bdeea92dadb380bd4866089634 Mon Sep 17 00:00:00 2001 From: Hinton Date: Thu, 19 Dec 2024 21:03:53 +0100 Subject: [PATCH] Remove api service --- apps/browser/src/background/main.background.ts | 1 - apps/cli/src/service-container/service-container.ts | 1 - libs/angular/src/services/jslib-services.module.ts | 1 - .../src/platform/services/sdk/default-sdk.service.spec.ts | 4 ---- libs/common/src/platform/services/sdk/default-sdk.service.ts | 2 -- 5 files changed, 9 deletions(-) diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts index 4115f00f539..747a05943a5 100644 --- a/apps/browser/src/background/main.background.ts +++ b/apps/browser/src/background/main.background.ts @@ -736,7 +736,6 @@ export default class MainBackground { this.accountService, this.kdfConfigService, this.keyService, - this.apiService, ); this.passwordStrengthService = new PasswordStrengthService(); diff --git a/apps/cli/src/service-container/service-container.ts b/apps/cli/src/service-container/service-container.ts index df5c853d7ab..2afbae0782f 100644 --- a/apps/cli/src/service-container/service-container.ts +++ b/apps/cli/src/service-container/service-container.ts @@ -550,7 +550,6 @@ export class ServiceContainer { this.accountService, this.kdfConfigService, this.keyService, - this.apiService, customUserAgent, ); diff --git a/libs/angular/src/services/jslib-services.module.ts b/libs/angular/src/services/jslib-services.module.ts index 0e50cec1b64..a8fc5a73ec5 100644 --- a/libs/angular/src/services/jslib-services.module.ts +++ b/libs/angular/src/services/jslib-services.module.ts @@ -1383,7 +1383,6 @@ const safeProviders: SafeProvider[] = [ AccountServiceAbstraction, KdfConfigService, KeyServiceAbstraction, - ApiServiceAbstraction, ], }), safeProvider({ diff --git a/libs/common/src/platform/services/sdk/default-sdk.service.spec.ts b/libs/common/src/platform/services/sdk/default-sdk.service.spec.ts index de8b079621a..6593095b325 100644 --- a/libs/common/src/platform/services/sdk/default-sdk.service.spec.ts +++ b/libs/common/src/platform/services/sdk/default-sdk.service.spec.ts @@ -4,7 +4,6 @@ import { BehaviorSubject, firstValueFrom, of } from "rxjs"; import { KdfConfigService, KeyService, PBKDF2KdfConfig } from "@bitwarden/key-management"; import { BitwardenClient } from "@bitwarden/sdk-internal"; -import { ApiService } from "../../../abstractions/api.service"; import { AccountInfo, AccountService } from "../../../auth/abstractions/account.service"; import { UserId } from "../../../types/guid"; import { UserKey } from "../../../types/key"; @@ -24,7 +23,6 @@ describe("DefaultSdkService", () => { let accountService!: MockProxy; let kdfConfigService!: MockProxy; let keyService!: MockProxy; - let apiService!: MockProxy; let service!: DefaultSdkService; let mockClient!: MockProxy; @@ -36,7 +34,6 @@ describe("DefaultSdkService", () => { accountService = mock(); kdfConfigService = mock(); keyService = mock(); - apiService = mock(); // Can't use `of(mock())` for some reason environmentService.environment$ = new BehaviorSubject(mock()); @@ -48,7 +45,6 @@ describe("DefaultSdkService", () => { accountService, kdfConfigService, keyService, - apiService, ); mockClient = mock(); diff --git a/libs/common/src/platform/services/sdk/default-sdk.service.ts b/libs/common/src/platform/services/sdk/default-sdk.service.ts index f192de436f0..bf593aecf7d 100644 --- a/libs/common/src/platform/services/sdk/default-sdk.service.ts +++ b/libs/common/src/platform/services/sdk/default-sdk.service.ts @@ -20,7 +20,6 @@ import { DeviceType as SdkDeviceType, } from "@bitwarden/sdk-internal"; -import { ApiService } from "../../../abstractions/api.service"; import { EncryptedOrganizationKeyData } from "../../../admin-console/models/data/encrypted-organization-key.data"; import { AccountInfo, AccountService } from "../../../auth/abstractions/account.service"; import { DeviceType } from "../../../enums/device-type.enum"; @@ -56,7 +55,6 @@ export class DefaultSdkService implements SdkService { private accountService: AccountService, private kdfConfigService: KdfConfigService, private keyService: KeyService, - private apiService: ApiService, // Yes we shouldn't import ApiService, but it's temporary private userAgent: string = null, ) {}