mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[PS-2320] Import API service refactor (#4529)
* Extract import methods from ApiService Removed methods from ApiService impl and abstraction Create import-api.service impl and abstraction Moved import.service into abstractions/import/import.service.abstraction Moved import.service into services/import/import.service Change imports to use new services * Fix import for tests * Fix imports for CLI * Fix imports for web * Fix ModuleImports and dependencies * Mark ImportApiService methods as async
This commit is contained in:
committed by
GitHub
parent
4584583691
commit
b7d38f0f72
@@ -35,8 +35,6 @@ import { PasswordTokenRequest } from "../models/request/identity-token/password-
|
||||
import { SsoTokenRequest } from "../models/request/identity-token/sso-token.request";
|
||||
import { TokenTwoFactorRequest } from "../models/request/identity-token/token-two-factor.request";
|
||||
import { UserApiTokenRequest } from "../models/request/identity-token/user-api-token.request";
|
||||
import { ImportCiphersRequest } from "../models/request/import-ciphers.request";
|
||||
import { ImportOrganizationCiphersRequest } from "../models/request/import-organization-ciphers.request";
|
||||
import { KdfRequest } from "../models/request/kdf.request";
|
||||
import { KeyConnectorUserKeyRequest } from "../models/request/key-connector-user-key.request";
|
||||
import { KeysRequest } from "../models/request/keys.request";
|
||||
@@ -662,23 +660,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send("POST", path, request, true, false);
|
||||
}
|
||||
|
||||
postImportCiphers(request: ImportCiphersRequest): Promise<any> {
|
||||
return this.send("POST", "/ciphers/import", request, true, false);
|
||||
}
|
||||
|
||||
postImportOrganizationCiphers(
|
||||
organizationId: string,
|
||||
request: ImportOrganizationCiphersRequest
|
||||
): Promise<any> {
|
||||
return this.send(
|
||||
"POST",
|
||||
"/ciphers/import-organization?organizationId=" + organizationId,
|
||||
request,
|
||||
true,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
putDeleteCipher(id: string): Promise<any> {
|
||||
return this.send("PUT", "/ciphers/" + id + "/delete", null, true, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user