mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Delete SendService
This commit is contained in:
@@ -24,7 +24,6 @@ import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@/jslib
|
||||
import { PolicyService as PolicyServiceAbstraction } from "@/jslib/common/src/abstractions/policy.service";
|
||||
import { ProviderService as ProviderServiceAbstraction } from "@/jslib/common/src/abstractions/provider.service";
|
||||
import { SearchService as SearchServiceAbstraction } from "@/jslib/common/src/abstractions/search.service";
|
||||
import { SendService as SendServiceAbstraction } from "@/jslib/common/src/abstractions/send.service";
|
||||
import { SettingsService as SettingsServiceAbstraction } from "@/jslib/common/src/abstractions/settings.service";
|
||||
import { StateService as StateServiceAbstraction } from "@/jslib/common/src/abstractions/state.service";
|
||||
import { StateMigrationService as StateMigrationServiceAbstraction } from "@/jslib/common/src/abstractions/stateMigration.service";
|
||||
@@ -55,7 +54,6 @@ import { PasswordGenerationService } from "@/jslib/common/src/services/passwordG
|
||||
import { PolicyService } from "@/jslib/common/src/services/policy.service";
|
||||
import { ProviderService } from "@/jslib/common/src/services/provider.service";
|
||||
import { SearchService } from "@/jslib/common/src/services/search.service";
|
||||
import { SendService } from "@/jslib/common/src/services/send.service";
|
||||
import { SettingsService } from "@/jslib/common/src/services/settings.service";
|
||||
import { StateService } from "@/jslib/common/src/services/state.service";
|
||||
import { StateMigrationService } from "@/jslib/common/src/services/stateMigration.service";
|
||||
@@ -208,7 +206,7 @@ import { ValidationService } from "./validation.service";
|
||||
{
|
||||
provide: FileUploadServiceAbstraction,
|
||||
useClass: FileUploadService,
|
||||
deps: [LogService, ApiServiceAbstraction],
|
||||
deps: [LogServiceAbstraction, ApiServiceAbstraction],
|
||||
},
|
||||
{
|
||||
provide: SyncServiceAbstraction,
|
||||
@@ -221,7 +219,6 @@ import { ValidationService } from "./validation.service";
|
||||
collectionService: CollectionServiceAbstraction,
|
||||
messagingService: MessagingServiceAbstraction,
|
||||
policyService: PolicyServiceAbstraction,
|
||||
sendService: SendServiceAbstraction,
|
||||
logService: LogService,
|
||||
keyConnectorService: KeyConnectorServiceAbstraction,
|
||||
stateService: StateServiceAbstraction,
|
||||
@@ -237,7 +234,6 @@ import { ValidationService } from "./validation.service";
|
||||
collectionService,
|
||||
messagingService,
|
||||
policyService,
|
||||
sendService,
|
||||
logService,
|
||||
keyConnectorService,
|
||||
stateService,
|
||||
@@ -254,7 +250,6 @@ import { ValidationService } from "./validation.service";
|
||||
CollectionServiceAbstraction,
|
||||
MessagingServiceAbstraction,
|
||||
PolicyServiceAbstraction,
|
||||
SendServiceAbstraction,
|
||||
LogService,
|
||||
KeyConnectorServiceAbstraction,
|
||||
StateServiceAbstraction,
|
||||
@@ -402,18 +397,6 @@ import { ValidationService } from "./validation.service";
|
||||
useClass: PolicyService,
|
||||
deps: [StateServiceAbstraction, OrganizationServiceAbstraction, ApiServiceAbstraction],
|
||||
},
|
||||
{
|
||||
provide: SendServiceAbstraction,
|
||||
useClass: SendService,
|
||||
deps: [
|
||||
CryptoServiceAbstraction,
|
||||
ApiServiceAbstraction,
|
||||
FileUploadServiceAbstraction,
|
||||
I18nServiceAbstraction,
|
||||
CryptoFunctionServiceAbstraction,
|
||||
StateServiceAbstraction,
|
||||
],
|
||||
},
|
||||
{
|
||||
provide: KeyConnectorServiceAbstraction,
|
||||
useClass: KeyConnectorService,
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
import { SendData } from "../models/data/sendData";
|
||||
import { EncArrayBuffer } from "../models/domain/encArrayBuffer";
|
||||
import { Send } from "../models/domain/send";
|
||||
import { SymmetricCryptoKey } from "../models/domain/symmetricCryptoKey";
|
||||
import { SendView } from "../models/view/sendView";
|
||||
|
||||
export abstract class SendService {
|
||||
clearCache: () => Promise<void>;
|
||||
encrypt: (
|
||||
model: SendView,
|
||||
file: File | ArrayBuffer,
|
||||
password: string,
|
||||
key?: SymmetricCryptoKey,
|
||||
) => Promise<[Send, EncArrayBuffer]>;
|
||||
get: (id: string) => Promise<Send>;
|
||||
getAll: () => Promise<Send[]>;
|
||||
getAllDecrypted: () => Promise<SendView[]>;
|
||||
saveWithServer: (sendData: [Send, EncArrayBuffer]) => Promise<any>;
|
||||
upsert: (send: SendData | SendData[]) => Promise<any>;
|
||||
replace: (sends: { [id: string]: SendData }) => Promise<any>;
|
||||
clear: (userId: string) => Promise<any>;
|
||||
delete: (id: string | string[]) => Promise<any>;
|
||||
deleteWithServer: (id: string) => Promise<any>;
|
||||
removePasswordWithServer: (id: string) => Promise<any>;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
import {
|
||||
SyncCipherNotification,
|
||||
SyncFolderNotification,
|
||||
SyncSendNotification,
|
||||
} from "../models/response/notificationResponse";
|
||||
|
||||
export abstract class SyncService {
|
||||
@@ -14,6 +13,4 @@ export abstract class SyncService {
|
||||
syncDeleteFolder: (notification: SyncFolderNotification) => Promise<boolean>;
|
||||
syncUpsertCipher: (notification: SyncCipherNotification, isEdit: boolean) => Promise<boolean>;
|
||||
syncDeleteCipher: (notification: SyncFolderNotification) => Promise<boolean>;
|
||||
syncUpsertSend: (notification: SyncSendNotification, isEdit: boolean) => Promise<boolean>;
|
||||
syncDeleteSend: (notification: SyncSendNotification) => Promise<boolean>;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import {
|
||||
NotificationResponse,
|
||||
SyncCipherNotification,
|
||||
SyncFolderNotification,
|
||||
SyncSendNotification,
|
||||
} from "../models/response/notificationResponse";
|
||||
|
||||
export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
@@ -172,16 +171,6 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
this.logoutCallback();
|
||||
}
|
||||
break;
|
||||
case NotificationType.SyncSendCreate:
|
||||
case NotificationType.SyncSendUpdate:
|
||||
await this.syncService.syncUpsertSend(
|
||||
notification.payload as SyncSendNotification,
|
||||
notification.type === NotificationType.SyncSendUpdate,
|
||||
);
|
||||
break;
|
||||
case NotificationType.SyncSendDelete:
|
||||
await this.syncService.syncDeleteSend(notification.payload as SyncSendNotification);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,297 +0,0 @@
|
||||
import { ApiService } from "../abstractions/api.service";
|
||||
import { CryptoService } from "../abstractions/crypto.service";
|
||||
import { CryptoFunctionService } from "../abstractions/cryptoFunction.service";
|
||||
import { FileUploadService } from "../abstractions/fileUpload.service";
|
||||
import { I18nService } from "../abstractions/i18n.service";
|
||||
import { SendService as SendServiceAbstraction } from "../abstractions/send.service";
|
||||
import { StateService } from "../abstractions/state.service";
|
||||
import { SEND_KDF_ITERATIONS } from "../enums/kdfType";
|
||||
import { SendType } from "../enums/sendType";
|
||||
import { Utils } from "../misc/utils";
|
||||
import { SendData } from "../models/data/sendData";
|
||||
import { EncArrayBuffer } from "../models/domain/encArrayBuffer";
|
||||
import { EncString } from "../models/domain/encString";
|
||||
import { Send } from "../models/domain/send";
|
||||
import { SendFile } from "../models/domain/sendFile";
|
||||
import { SendText } from "../models/domain/sendText";
|
||||
import { SymmetricCryptoKey } from "../models/domain/symmetricCryptoKey";
|
||||
import { SendRequest } from "../models/request/sendRequest";
|
||||
import { ErrorResponse } from "../models/response/errorResponse";
|
||||
import { SendResponse } from "../models/response/sendResponse";
|
||||
import { SendView } from "../models/view/sendView";
|
||||
|
||||
export class SendService implements SendServiceAbstraction {
|
||||
constructor(
|
||||
private cryptoService: CryptoService,
|
||||
private apiService: ApiService,
|
||||
private fileUploadService: FileUploadService,
|
||||
private i18nService: I18nService,
|
||||
private cryptoFunctionService: CryptoFunctionService,
|
||||
private stateService: StateService,
|
||||
) {}
|
||||
|
||||
async clearCache(): Promise<void> {
|
||||
await this.stateService.setDecryptedSends(null);
|
||||
}
|
||||
|
||||
async encrypt(
|
||||
model: SendView,
|
||||
file: File | ArrayBuffer,
|
||||
password: string,
|
||||
key?: SymmetricCryptoKey,
|
||||
): Promise<[Send, EncArrayBuffer]> {
|
||||
let fileData: EncArrayBuffer = null;
|
||||
const send = new Send();
|
||||
send.id = model.id;
|
||||
send.type = model.type;
|
||||
send.disabled = model.disabled;
|
||||
send.hideEmail = model.hideEmail;
|
||||
send.maxAccessCount = model.maxAccessCount;
|
||||
if (model.key == null) {
|
||||
model.key = await this.cryptoFunctionService.randomBytes(16);
|
||||
model.cryptoKey = await this.cryptoService.makeSendKey(model.key);
|
||||
}
|
||||
if (password != null) {
|
||||
const passwordHash = await this.cryptoFunctionService.pbkdf2(
|
||||
password,
|
||||
model.key,
|
||||
"sha256",
|
||||
SEND_KDF_ITERATIONS,
|
||||
);
|
||||
send.password = Utils.fromBufferToB64(passwordHash);
|
||||
}
|
||||
send.key = await this.cryptoService.encrypt(model.key, key);
|
||||
send.name = await this.cryptoService.encrypt(model.name, model.cryptoKey);
|
||||
send.notes = await this.cryptoService.encrypt(model.notes, model.cryptoKey);
|
||||
if (send.type === SendType.Text) {
|
||||
send.text = new SendText();
|
||||
send.text.text = await this.cryptoService.encrypt(model.text.text, model.cryptoKey);
|
||||
send.text.hidden = model.text.hidden;
|
||||
} else if (send.type === SendType.File) {
|
||||
send.file = new SendFile();
|
||||
if (file != null) {
|
||||
if (file instanceof ArrayBuffer) {
|
||||
const [name, data] = await this.encryptFileData(
|
||||
model.file.fileName,
|
||||
file,
|
||||
model.cryptoKey,
|
||||
);
|
||||
send.file.fileName = name;
|
||||
fileData = data;
|
||||
} else {
|
||||
fileData = await this.parseFile(send, file, model.cryptoKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return [send, fileData];
|
||||
}
|
||||
|
||||
async get(id: string): Promise<Send> {
|
||||
const sends = await this.stateService.getEncryptedSends();
|
||||
// eslint-disable-next-line
|
||||
if (sends == null || !sends.hasOwnProperty(id)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new Send(sends[id]);
|
||||
}
|
||||
|
||||
async getAll(): Promise<Send[]> {
|
||||
const sends = await this.stateService.getEncryptedSends();
|
||||
const response: Send[] = [];
|
||||
for (const id in sends) {
|
||||
// eslint-disable-next-line
|
||||
if (sends.hasOwnProperty(id)) {
|
||||
response.push(new Send(sends[id]));
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
async getAllDecrypted(): Promise<SendView[]> {
|
||||
let decSends = await this.stateService.getDecryptedSends();
|
||||
if (decSends != null) {
|
||||
return decSends;
|
||||
}
|
||||
|
||||
decSends = [];
|
||||
const hasKey = await this.cryptoService.hasKey();
|
||||
if (!hasKey) {
|
||||
throw new Error("No key.");
|
||||
}
|
||||
|
||||
const promises: Promise<any>[] = [];
|
||||
const sends = await this.getAll();
|
||||
sends.forEach((send) => {
|
||||
promises.push(send.decrypt().then((f) => decSends.push(f)));
|
||||
});
|
||||
|
||||
await Promise.all(promises);
|
||||
decSends.sort(Utils.getSortFunction(this.i18nService, "name"));
|
||||
|
||||
await this.stateService.setDecryptedSends(decSends);
|
||||
return decSends;
|
||||
}
|
||||
|
||||
async saveWithServer(sendData: [Send, EncArrayBuffer]): Promise<any> {
|
||||
const request = new SendRequest(sendData[0], sendData[1]?.buffer.byteLength);
|
||||
let response: SendResponse;
|
||||
if (sendData[0].id == null) {
|
||||
if (sendData[0].type === SendType.Text) {
|
||||
response = await this.apiService.postSend(request);
|
||||
} else {
|
||||
try {
|
||||
const uploadDataResponse = await this.apiService.postFileTypeSend(request);
|
||||
response = uploadDataResponse.sendResponse;
|
||||
|
||||
await this.fileUploadService.uploadSendFile(
|
||||
uploadDataResponse,
|
||||
sendData[0].file.fileName,
|
||||
sendData[1],
|
||||
);
|
||||
} catch (e) {
|
||||
if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {
|
||||
response = await this.legacyServerSendFileUpload(sendData, request);
|
||||
} else if (e instanceof ErrorResponse) {
|
||||
throw new Error((e as ErrorResponse).getSingleMessage());
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
sendData[0].id = response.id;
|
||||
sendData[0].accessId = response.accessId;
|
||||
} else {
|
||||
response = await this.apiService.putSend(sendData[0].id, request);
|
||||
}
|
||||
|
||||
const userId = await this.stateService.getUserId();
|
||||
const data = new SendData(response, userId);
|
||||
await this.upsert(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.
|
||||
* This method still exists for backward compatibility with old server versions.
|
||||
*/
|
||||
async legacyServerSendFileUpload(
|
||||
sendData: [Send, EncArrayBuffer],
|
||||
request: SendRequest,
|
||||
): Promise<SendResponse> {
|
||||
const fd = new FormData();
|
||||
try {
|
||||
const blob = new Blob([sendData[1].buffer], { type: "application/octet-stream" });
|
||||
fd.append("model", JSON.stringify(request));
|
||||
fd.append("data", blob, sendData[0].file.fileName.encryptedString);
|
||||
} catch (e) {
|
||||
if (Utils.isNode && !Utils.isBrowser) {
|
||||
fd.append("model", JSON.stringify(request));
|
||||
fd.append(
|
||||
"data",
|
||||
Buffer.from(sendData[1].buffer) as any,
|
||||
{
|
||||
filepath: sendData[0].file.fileName.encryptedString,
|
||||
contentType: "application/octet-stream",
|
||||
} as any,
|
||||
);
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
return await this.apiService.postSendFileLegacy(fd);
|
||||
}
|
||||
|
||||
async upsert(send: SendData | SendData[]): Promise<any> {
|
||||
let sends = await this.stateService.getEncryptedSends();
|
||||
if (sends == null) {
|
||||
sends = {};
|
||||
}
|
||||
|
||||
if (send instanceof SendData) {
|
||||
const s = send as SendData;
|
||||
sends[s.id] = s;
|
||||
} else {
|
||||
(send as SendData[]).forEach((s) => {
|
||||
sends[s.id] = s;
|
||||
});
|
||||
}
|
||||
|
||||
await this.replace(sends);
|
||||
}
|
||||
|
||||
async replace(sends: { [id: string]: SendData }): Promise<any> {
|
||||
await this.stateService.setDecryptedSends(null);
|
||||
await this.stateService.setEncryptedSends(sends);
|
||||
}
|
||||
|
||||
async clear(): Promise<any> {
|
||||
await this.stateService.setDecryptedSends(null);
|
||||
await this.stateService.setEncryptedSends(null);
|
||||
}
|
||||
|
||||
async delete(id: string | string[]): Promise<any> {
|
||||
const sends = await this.stateService.getEncryptedSends();
|
||||
if (sends == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof id === "string") {
|
||||
if (sends[id] == null) {
|
||||
return;
|
||||
}
|
||||
delete sends[id];
|
||||
} else {
|
||||
(id as string[]).forEach((i) => {
|
||||
delete sends[i];
|
||||
});
|
||||
}
|
||||
|
||||
await this.replace(sends);
|
||||
}
|
||||
|
||||
async deleteWithServer(id: string): Promise<any> {
|
||||
await this.apiService.deleteSend(id);
|
||||
await this.delete(id);
|
||||
}
|
||||
|
||||
async removePasswordWithServer(id: string): Promise<any> {
|
||||
const response = await this.apiService.putSendRemovePassword(id);
|
||||
const userId = await this.stateService.getUserId();
|
||||
const data = new SendData(response, userId);
|
||||
await this.upsert(data);
|
||||
}
|
||||
|
||||
private parseFile(send: Send, file: File, key: SymmetricCryptoKey): Promise<EncArrayBuffer> {
|
||||
return new Promise((resolve, reject) => {
|
||||
const reader = new FileReader();
|
||||
reader.readAsArrayBuffer(file);
|
||||
reader.onload = async (evt) => {
|
||||
try {
|
||||
const [name, data] = await this.encryptFileData(
|
||||
file.name,
|
||||
evt.target.result as ArrayBuffer,
|
||||
key,
|
||||
);
|
||||
send.file.fileName = name;
|
||||
resolve(data);
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
}
|
||||
};
|
||||
reader.onerror = () => {
|
||||
reject("Error reading file.");
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
private async encryptFileData(
|
||||
fileName: string,
|
||||
data: ArrayBuffer,
|
||||
key: SymmetricCryptoKey,
|
||||
): Promise<[EncString, EncArrayBuffer]> {
|
||||
const encFileName = await this.cryptoService.encrypt(fileName, key);
|
||||
const encFileData = await this.cryptoService.encryptToBytes(data, key);
|
||||
return [encFileName, encFileData];
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import { MessagingService } from "../abstractions/messaging.service";
|
||||
import { OrganizationService } from "../abstractions/organization.service";
|
||||
import { PolicyService } from "../abstractions/policy.service";
|
||||
import { ProviderService } from "../abstractions/provider.service";
|
||||
import { SendService } from "../abstractions/send.service";
|
||||
import { SettingsService } from "../abstractions/settings.service";
|
||||
import { StateService } from "../abstractions/state.service";
|
||||
import { SyncService as SyncServiceAbstraction } from "../abstractions/sync.service";
|
||||
@@ -20,7 +19,6 @@ import { FolderData } from "../models/data/folderData";
|
||||
import { OrganizationData } from "../models/data/organizationData";
|
||||
import { PolicyData } from "../models/data/policyData";
|
||||
import { ProviderData } from "../models/data/providerData";
|
||||
import { SendData } from "../models/data/sendData";
|
||||
import { CipherResponse } from "../models/response/cipherResponse";
|
||||
import { CollectionDetailsResponse } from "../models/response/collectionResponse";
|
||||
import { DomainsResponse } from "../models/response/domainsResponse";
|
||||
@@ -28,11 +26,9 @@ import { FolderResponse } from "../models/response/folderResponse";
|
||||
import {
|
||||
SyncCipherNotification,
|
||||
SyncFolderNotification,
|
||||
SyncSendNotification,
|
||||
} from "../models/response/notificationResponse";
|
||||
import { PolicyResponse } from "../models/response/policyResponse";
|
||||
import { ProfileResponse } from "../models/response/profileResponse";
|
||||
import { SendResponse } from "../models/response/sendResponse";
|
||||
|
||||
export class SyncService implements SyncServiceAbstraction {
|
||||
syncInProgress = false;
|
||||
@@ -46,7 +42,6 @@ export class SyncService implements SyncServiceAbstraction {
|
||||
private collectionService: CollectionService,
|
||||
private messagingService: MessagingService,
|
||||
private policyService: PolicyService,
|
||||
private sendService: SendService,
|
||||
private logService: LogService,
|
||||
private keyConnectorService: KeyConnectorService,
|
||||
private stateService: StateService,
|
||||
@@ -104,7 +99,6 @@ export class SyncService implements SyncServiceAbstraction {
|
||||
await this.syncFolders(userId, response.folders);
|
||||
await this.syncCollections(response.collections);
|
||||
await this.syncCiphers(userId, response.ciphers);
|
||||
await this.syncSends(userId, response.sends);
|
||||
await this.syncSettings(response.domains);
|
||||
await this.syncPolicies(response.policies);
|
||||
|
||||
@@ -227,41 +221,6 @@ export class SyncService implements SyncServiceAbstraction {
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncUpsertSend(notification: SyncSendNotification, isEdit: boolean): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
try {
|
||||
const localSend = await this.sendService.get(notification.id);
|
||||
if (
|
||||
(!isEdit && localSend == null) ||
|
||||
(isEdit && localSend != null && localSend.revisionDate < notification.revisionDate)
|
||||
) {
|
||||
const remoteSend = await this.apiService.getSend(notification.id);
|
||||
if (remoteSend != null) {
|
||||
const userId = await this.stateService.getUserId();
|
||||
await this.sendService.upsert(new SendData(remoteSend, userId));
|
||||
this.messagingService.send("syncedUpsertedSend", { sendId: notification.id });
|
||||
return this.syncCompleted(true);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
this.logService.error(e);
|
||||
}
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
async syncDeleteSend(notification: SyncSendNotification): Promise<boolean> {
|
||||
this.syncStarted();
|
||||
if (await this.stateService.getIsAuthenticated()) {
|
||||
await this.sendService.delete(notification.id);
|
||||
this.messagingService.send("syncedDeletedSend", { sendId: notification.id });
|
||||
this.syncCompleted(true);
|
||||
return true;
|
||||
}
|
||||
return this.syncCompleted(false);
|
||||
}
|
||||
|
||||
// Helpers
|
||||
|
||||
private syncStarted() {
|
||||
@@ -363,14 +322,6 @@ export class SyncService implements SyncServiceAbstraction {
|
||||
return await this.cipherService.replace(ciphers);
|
||||
}
|
||||
|
||||
private async syncSends(userId: string, response: SendResponse[]) {
|
||||
const sends: { [id: string]: SendData } = {};
|
||||
response.forEach((s) => {
|
||||
sends[s.id] = new SendData(s, userId);
|
||||
});
|
||||
return await this.sendService.replace(sends);
|
||||
}
|
||||
|
||||
private async syncSettings(response: DomainsResponse) {
|
||||
let eqDomains: string[][] = [];
|
||||
if (response != null && response.equivalentDomains != null) {
|
||||
|
||||
@@ -9,7 +9,6 @@ import { CryptoService as CryptoServiceAbstraction } from "@/jslib/common/src/ab
|
||||
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from "@/jslib/common/src/abstractions/cryptoFunction.service";
|
||||
import { EnvironmentService as EnvironmentServiceAbstraction } from "@/jslib/common/src/abstractions/environment.service";
|
||||
import { I18nService as I18nServiceAbstraction } from "@/jslib/common/src/abstractions/i18n.service";
|
||||
import { KeyConnectorService as KeyConnectorServiceAbstraction } from "@/jslib/common/src/abstractions/keyConnector.service";
|
||||
import { LogService as LogServiceAbstraction } from "@/jslib/common/src/abstractions/log.service";
|
||||
import { MessagingService as MessagingServiceAbstraction } from "@/jslib/common/src/abstractions/messaging.service";
|
||||
import { PlatformUtilsService as PlatformUtilsServiceAbstraction } from "@/jslib/common/src/abstractions/platformUtils.service";
|
||||
@@ -153,7 +152,6 @@ export function initFactory(
|
||||
PlatformUtilsServiceAbstraction,
|
||||
MessagingServiceAbstraction,
|
||||
LogServiceAbstraction,
|
||||
KeyConnectorServiceAbstraction,
|
||||
EnvironmentServiceAbstraction,
|
||||
StateServiceAbstraction,
|
||||
TwoFactorServiceAbstraction,
|
||||
|
||||
11
src/bwdc.ts
11
src/bwdc.ts
@@ -22,7 +22,6 @@ import { PasswordGenerationService } from "@/jslib/common/src/services/passwordG
|
||||
import { PolicyService } from "@/jslib/common/src/services/policy.service";
|
||||
import { ProviderService } from "@/jslib/common/src/services/provider.service";
|
||||
import { SearchService } from "@/jslib/common/src/services/search.service";
|
||||
import { SendService } from "@/jslib/common/src/services/send.service";
|
||||
import { SettingsService } from "@/jslib/common/src/services/settings.service";
|
||||
import { TokenService } from "@/jslib/common/src/services/token.service";
|
||||
import { CliPlatformUtilsService } from "@/jslib/node/src/cli/services/cliPlatformUtils.service";
|
||||
@@ -66,7 +65,6 @@ export class Main {
|
||||
fileUploadService: FileUploadService;
|
||||
folderService: FolderService;
|
||||
searchService: SearchService;
|
||||
sendService: SendService;
|
||||
settingsService: SettingsService;
|
||||
syncService: SyncService;
|
||||
passwordGenerationService: PasswordGenerationService;
|
||||
@@ -247,15 +245,6 @@ export class Main {
|
||||
this.stateService,
|
||||
);
|
||||
|
||||
this.sendService = new SendService(
|
||||
this.cryptoService,
|
||||
this.apiService,
|
||||
this.fileUploadService,
|
||||
this.i18nService,
|
||||
this.cryptoFunctionService,
|
||||
this.stateService,
|
||||
);
|
||||
|
||||
this.providerService = new ProviderService(this.stateService);
|
||||
|
||||
this.program = new Program(this);
|
||||
|
||||
Reference in New Issue
Block a user