mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[PS-1093] Move Organization Api Calls (#3243)
* Move organization api calls into seperate service * Remove unneeded unknown * Address PR feedback
This commit is contained in:
@@ -5,6 +5,7 @@ import * as program from "commander";
|
||||
import * as jsdom from "jsdom";
|
||||
|
||||
import { InternalFolderService } from "@bitwarden/common/abstractions/folder/folder.service.abstraction";
|
||||
import { OrganizationApiServiceAbstraction } from "@bitwarden/common/abstractions/organization/organization-api.service.abstraction";
|
||||
import { ClientType } from "@bitwarden/common/enums/clientType";
|
||||
import { KeySuffixOptions } from "@bitwarden/common/enums/keySuffixOptions";
|
||||
import { LogLevelType } from "@bitwarden/common/enums/logLevelType";
|
||||
@@ -30,6 +31,7 @@ import { KeyConnectorService } from "@bitwarden/common/services/keyConnector.ser
|
||||
import { MemoryStorageService } from "@bitwarden/common/services/memoryStorage.service";
|
||||
import { NoopMessagingService } from "@bitwarden/common/services/noopMessaging.service";
|
||||
import { OrganizationService } from "@bitwarden/common/services/organization.service";
|
||||
import { OrganizationApiService } from "@bitwarden/common/services/organization/organization-api.service";
|
||||
import { PasswordGenerationService } from "@bitwarden/common/services/passwordGeneration.service";
|
||||
import { PolicyService } from "@bitwarden/common/services/policy/policy.service";
|
||||
import { ProviderService } from "@bitwarden/common/services/provider.service";
|
||||
@@ -58,7 +60,7 @@ import { NodeEnvSecureStorageService } from "./services/nodeEnvSecureStorage.ser
|
||||
import { VaultProgram } from "./vault.program";
|
||||
|
||||
// Polyfills
|
||||
(global as any).DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
global.DOMParser = new jsdom.JSDOM().window.DOMParser;
|
||||
|
||||
// eslint-disable-next-line
|
||||
const packageJson = require("../package.json");
|
||||
@@ -108,6 +110,7 @@ export class Main {
|
||||
broadcasterService: BroadcasterService;
|
||||
folderApiService: FolderApiService;
|
||||
userVerificationApiService: UserVerificationApiService;
|
||||
organizationApiService: OrganizationApiServiceAbstraction;
|
||||
|
||||
constructor() {
|
||||
let p = null;
|
||||
@@ -185,6 +188,9 @@ export class Main {
|
||||
async (expired: boolean) => await this.logout(),
|
||||
customUserAgent
|
||||
);
|
||||
|
||||
this.organizationApiService = new OrganizationApiService(this.apiService);
|
||||
|
||||
this.containerService = new ContainerService(this.cryptoService);
|
||||
|
||||
this.settingsService = new SettingsService(this.stateService);
|
||||
|
||||
Reference in New Issue
Block a user