mirror of
https://github.com/bitwarden/browser
synced 2026-02-26 09:33:22 +00:00
Rename abstraction and implementation of VaultExportApiService
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { OrganizationExportResponse } from "@bitwarden/common/admin-console/models/response/organization-export.response";
|
||||
import { OrganizationId } from "@bitwarden/common/types/guid";
|
||||
|
||||
export abstract class VaultExportApiServiceAbstraction {
|
||||
export abstract class VaultExportApiService {
|
||||
/**
|
||||
* Retrieves the export data for a specific organization.
|
||||
* @param organizationId The ID of the organization to export.
|
||||
|
||||
@@ -3,7 +3,8 @@ import { mock, MockProxy } from "jest-mock-extended";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { OrganizationId } from "@bitwarden/common/types/guid";
|
||||
|
||||
import { VaultExportApiService } from "./vault-export-api.service";
|
||||
import { DefaultVaultExportApiService } from "./vault-export-api.service";
|
||||
import { VaultExportApiService } from "./vault-export-api.service.abstraction";
|
||||
|
||||
describe("VaultExportApiService", () => {
|
||||
let apiServiceMock: MockProxy<ApiService>;
|
||||
@@ -11,7 +12,7 @@ describe("VaultExportApiService", () => {
|
||||
|
||||
beforeEach(() => {
|
||||
apiServiceMock = mock<ApiService>();
|
||||
sut = new VaultExportApiService(apiServiceMock);
|
||||
sut = new DefaultVaultExportApiService(apiServiceMock);
|
||||
});
|
||||
|
||||
it("should call apiService.send with correct parameters", async () => {
|
||||
|
||||
@@ -2,13 +2,13 @@ import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
import { OrganizationExportResponse } from "@bitwarden/common/admin-console/models/response/organization-export.response";
|
||||
import { OrganizationId } from "@bitwarden/common/types/guid";
|
||||
|
||||
import { VaultExportApiServiceAbstraction } from "./vault-export-api.service.abstraction";
|
||||
import { VaultExportApiService } from "./vault-export-api.service.abstraction";
|
||||
|
||||
/**
|
||||
* Service for handling vault export API interactions.
|
||||
* @param apiService - An instance of {@link ApiService} used to make HTTP requests.
|
||||
*/
|
||||
export class VaultExportApiService implements VaultExportApiServiceAbstraction {
|
||||
export class DefaultVaultExportApiService implements VaultExportApiService {
|
||||
constructor(private apiService: ApiService) {}
|
||||
|
||||
async getOrganizationExport(organizationId: OrganizationId): Promise<OrganizationExportResponse> {
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
ExportedVaultAsString,
|
||||
} from "../types";
|
||||
|
||||
import { VaultExportApiServiceAbstraction } from "./api/vault-export-api.service.abstraction";
|
||||
import { VaultExportApiService } from "./api/vault-export-api.service.abstraction";
|
||||
import { BaseVaultExportService } from "./base-vault-export.service";
|
||||
import { ExportHelper } from "./export-helper";
|
||||
import { OrganizationVaultExportServiceAbstraction } from "./org-vault-export.service.abstraction";
|
||||
@@ -45,7 +45,7 @@ export class OrganizationVaultExportService
|
||||
{
|
||||
constructor(
|
||||
private cipherService: CipherService,
|
||||
private vaultExportApiService: VaultExportApiServiceAbstraction,
|
||||
private vaultExportApiService: VaultExportApiService,
|
||||
pinService: PinServiceAbstraction,
|
||||
private keyService: KeyService,
|
||||
encryptService: EncryptService,
|
||||
|
||||
Reference in New Issue
Block a user