mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-23 11:56:00 +01:00
reference barrels
This commit is contained in:
parent
36315dae19
commit
2d9f53fbed
@ -1,17 +1,21 @@
|
||||
import { EnvironmentUrls } from '../models/domain/environmentUrls';
|
||||
import { EnvironmentUrls } from '../models/domain';
|
||||
|
||||
import { CipherRequest } from '../models/request/cipherRequest';
|
||||
import { FolderRequest } from '../models/request/folderRequest';
|
||||
import { PasswordHintRequest } from '../models/request/passwordHintRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
import {
|
||||
CipherRequest,
|
||||
FolderRequest,
|
||||
PasswordHintRequest,
|
||||
RegisterRequest,
|
||||
TokenRequest,
|
||||
TwoFactorEmailRequest,
|
||||
} from '../models/request';
|
||||
|
||||
import { CipherResponse } from '../models/response/cipherResponse';
|
||||
import { FolderResponse } from '../models/response/folderResponse';
|
||||
import { IdentityTokenResponse } from '../models/response/identityTokenResponse';
|
||||
import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorResponse';
|
||||
import { SyncResponse } from '../models/response/syncResponse';
|
||||
import {
|
||||
CipherResponse,
|
||||
FolderResponse,
|
||||
IdentityTokenResponse,
|
||||
IdentityTwoFactorResponse,
|
||||
SyncResponse,
|
||||
} from '../models/response';
|
||||
|
||||
export abstract class ApiService {
|
||||
urlsSet: boolean;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { TwoFactorProviderType } from '../enums/twoFactorProviderType';
|
||||
import { TwoFactorProviderType } from '../enums';
|
||||
|
||||
import { AuthResult } from '../models/domain/authResult';
|
||||
import { AuthResult } from '../models/domain';
|
||||
|
||||
export abstract class AuthService {
|
||||
email: string;
|
||||
|
@ -1,11 +1,15 @@
|
||||
import { CipherData } from '../models/data/cipherData';
|
||||
import { CipherData } from '../models/data';
|
||||
|
||||
import { Cipher } from '../models/domain/cipher';
|
||||
import { Field } from '../models/domain/field';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
import {
|
||||
Cipher,
|
||||
Field,
|
||||
SymmetricCryptoKey,
|
||||
} from '../models/domain';
|
||||
|
||||
import { CipherView } from '../models/view/cipherView';
|
||||
import { FieldView } from '../models/view/fieldView';
|
||||
import {
|
||||
CipherView,
|
||||
FieldView,
|
||||
} from '../models/view';
|
||||
|
||||
export abstract class CipherService {
|
||||
decryptedCipherCache: CipherView[];
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { CollectionData } from '../models/data/collectionData';
|
||||
import { CollectionData } from '../models/data';
|
||||
|
||||
import { Collection } from '../models/domain/collection';
|
||||
import { Collection } from '../models/domain';
|
||||
|
||||
import { CollectionView } from '../models/view/collectionView';
|
||||
import { CollectionView } from '../models/view';
|
||||
|
||||
export abstract class CollectionService {
|
||||
decryptedCollectionCache: CollectionView[];
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { CipherString } from '../models/domain/cipherString';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
import {
|
||||
CipherString,
|
||||
SymmetricCryptoKey,
|
||||
} from '../models/domain';
|
||||
|
||||
import { ProfileOrganizationResponse } from '../models/response/profileOrganizationResponse';
|
||||
import { ProfileOrganizationResponse } from '../models/response';
|
||||
|
||||
export abstract class CryptoService {
|
||||
setKey: (key: SymmetricCryptoKey) => Promise<any>;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FolderData } from '../models/data/folderData';
|
||||
import { FolderData } from '../models/data';
|
||||
|
||||
import { Folder } from '../models/domain/folder';
|
||||
import { Folder } from '../models/domain';
|
||||
|
||||
import { FolderView } from '../models/view/folderView';
|
||||
import { FolderView } from '../models/view';
|
||||
|
||||
export abstract class FolderService {
|
||||
decryptedFolderCache: FolderView[];
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PasswordHistory } from '../models/domain/passwordHistory';
|
||||
import { PasswordHistory } from '../models/domain';
|
||||
|
||||
export abstract class PasswordGenerationService {
|
||||
generatePassword: (options: any) => string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DeviceType } from '../enums/deviceType';
|
||||
import { DeviceType } from '../enums';
|
||||
|
||||
export abstract class PlatformUtilsService {
|
||||
getDevice: () => DeviceType;
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { AppIdService } from '../abstractions/appId.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import {
|
||||
AppIdService,
|
||||
PlatformUtilsService,
|
||||
StorageService,
|
||||
} from '../abstractions';
|
||||
|
||||
import { ConstantsService } from '../services/constants.service';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { AttachmentResponse } from '../response/attachmentResponse';
|
||||
import { AttachmentResponse } from '../response';
|
||||
|
||||
export class AttachmentData {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CipherType } from '../../enums/cipherType';
|
||||
import { CipherType } from '../../enums';
|
||||
|
||||
import { AttachmentData } from './attachmentData';
|
||||
import { CardData } from './cardData';
|
||||
@ -7,7 +7,7 @@ import { IdentityData } from './identityData';
|
||||
import { LoginData } from './loginData';
|
||||
import { SecureNoteData } from './secureNoteData';
|
||||
|
||||
import { CipherResponse } from '../response/cipherResponse';
|
||||
import { CipherResponse } from '../response';
|
||||
|
||||
export class CipherData {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CollectionResponse } from '../response/collectionResponse';
|
||||
import { CollectionResponse } from '../response';
|
||||
|
||||
export class CollectionData {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FieldType } from '../../enums/fieldType';
|
||||
import { FieldType } from '../../enums';
|
||||
|
||||
export class FieldData {
|
||||
type: FieldType;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FolderResponse } from '../response/folderResponse';
|
||||
import { FolderResponse } from '../response';
|
||||
|
||||
export class FolderData {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { SecureNoteType } from '../../enums/secureNoteType';
|
||||
import { SecureNoteType } from '../../enums';
|
||||
|
||||
export class SecureNoteData {
|
||||
type: SecureNoteType;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { AttachmentData } from '../data/attachmentData';
|
||||
import { AttachmentData } from '../data';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
import { AttachmentView } from '../view/attachmentView';
|
||||
import { AttachmentView } from '../view';
|
||||
|
||||
export class Attachment extends Domain {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { TwoFactorProviderType } from '../../enums/twoFactorProviderType';
|
||||
import { TwoFactorProviderType } from '../../enums';
|
||||
|
||||
export class AuthResult {
|
||||
twoFactor: boolean = false;
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { CardData } from '../data/cardData';
|
||||
import { CardData } from '../data';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
import { CardView } from '../view/cardView';
|
||||
import { CardView } from '../view';
|
||||
|
||||
export class Card extends Domain {
|
||||
cardholderName: CipherString;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { CipherType } from '../../enums/cipherType';
|
||||
import { CipherType } from '../../enums';
|
||||
|
||||
import { CipherData } from '../data/cipherData';
|
||||
import { CipherData } from '../data';
|
||||
|
||||
import { CipherView } from '../view/cipherView';
|
||||
import { CipherView } from '../view';
|
||||
|
||||
import { Attachment } from './attachment';
|
||||
import { Card } from './card';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { EncryptionType } from '../../enums/encryptionType';
|
||||
import { EncryptionType } from '../../enums';
|
||||
|
||||
import { CryptoService } from '../../abstractions/crypto.service';
|
||||
import { CryptoService } from '../../abstractions';
|
||||
|
||||
export class CipherString {
|
||||
encryptedString?: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CollectionData } from '../data/collectionData';
|
||||
import { CollectionData } from '../data';
|
||||
|
||||
import { CollectionView } from '../view/collectionView';
|
||||
import { CollectionView } from '../view';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CipherString } from '../domain/cipherString';
|
||||
import { CipherString } from './cipherString';
|
||||
|
||||
import { View } from '../view/view';
|
||||
import { View } from '../view';
|
||||
|
||||
export default abstract class Domain {
|
||||
protected buildDomainModel<D extends Domain>(domain: D, dataObj: any, map: any,
|
||||
|
@ -1,11 +1,11 @@
|
||||
import { FieldType } from '../../enums/fieldType';
|
||||
import { FieldType } from '../../enums';
|
||||
|
||||
import { FieldData } from '../data/fieldData';
|
||||
import { FieldData } from '../data';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
import { FieldView } from '../view/fieldView';
|
||||
import { FieldView } from '../view';
|
||||
|
||||
export class Field extends Domain {
|
||||
name: CipherString;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FolderData } from '../data/folderData';
|
||||
import { FolderData } from '../data';
|
||||
|
||||
import { FolderView } from '../view/folderView';
|
||||
import { FolderView } from '../view';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { IdentityData } from '../data/identityData';
|
||||
import { IdentityData } from '../data';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
import { IdentityView } from '../view/identityView';
|
||||
import { IdentityView } from '../view';
|
||||
|
||||
export class Identity extends Domain {
|
||||
title: CipherString;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { LoginData } from '../data/loginData';
|
||||
import { LoginData } from '../data';
|
||||
|
||||
import { LoginView } from '../view/loginView';
|
||||
import { LoginView } from '../view';
|
||||
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { SecureNoteType } from '../../enums/secureNoteType';
|
||||
import { SecureNoteType } from '../../enums';
|
||||
|
||||
import { SecureNoteData } from '../data/secureNoteData';
|
||||
import { SecureNoteData } from '../data';
|
||||
|
||||
import Domain from './domain';
|
||||
|
||||
import { SecureNoteView } from '../view/secureNoteView';
|
||||
import { SecureNoteView } from '../view';
|
||||
|
||||
export class SecureNote extends Domain {
|
||||
type: SecureNoteType;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as forge from 'node-forge';
|
||||
|
||||
import { EncryptionType } from '../../enums/encryptionType';
|
||||
import { EncryptionType } from '../../enums';
|
||||
|
||||
import { SymmetricCryptoKeyBuffers } from './symmetricCryptoKeyBuffers';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { CipherType } from '../../enums/cipherType';
|
||||
import { CipherType } from '../../enums';
|
||||
|
||||
export class CipherRequest {
|
||||
type: CipherType;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeviceType } from '../../enums/deviceType';
|
||||
import { DeviceType } from '../../enums';
|
||||
|
||||
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
import { PlatformUtilsService } from '../../abstractions';
|
||||
|
||||
export class DeviceRequest {
|
||||
type: DeviceType;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Folder } from '../domain/folder';
|
||||
import { Folder } from '../domain';
|
||||
|
||||
export class FolderRequest {
|
||||
name: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DeviceType } from '../../enums/deviceType';
|
||||
import { DeviceType } from '../../enums';
|
||||
|
||||
export class DeviceResponse {
|
||||
id: string;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { TwoFactorProviderType } from '../../enums/twoFactorProviderType';
|
||||
import { TwoFactorProviderType } from '../../enums';
|
||||
|
||||
export class IdentityTwoFactorResponse {
|
||||
twoFactorProviders: TwoFactorProviderType[];
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Attachment } from '../domain/attachment';
|
||||
import { Attachment } from '../domain';
|
||||
|
||||
export class AttachmentView implements View {
|
||||
id: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Card } from '../domain/card';
|
||||
import { Card } from '../domain';
|
||||
|
||||
export class CardView implements View {
|
||||
cardholderName: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CipherType } from '../../enums/cipherType';
|
||||
import { CipherType } from '../../enums';
|
||||
|
||||
import { Cipher } from '../domain/cipher';
|
||||
import { Cipher } from '../domain';
|
||||
|
||||
import { AttachmentView } from './attachmentView';
|
||||
import { CardView } from './cardView';
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Collection } from '../domain/collection';
|
||||
import { Collection } from '../domain';
|
||||
|
||||
export class CollectionView implements View {
|
||||
id: string;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { FieldType } from '../../enums/fieldType';
|
||||
import { FieldType } from '../../enums';
|
||||
|
||||
import { View } from './view';
|
||||
|
||||
import { Field } from '../domain/field';
|
||||
import { Field } from '../domain';
|
||||
|
||||
export class FieldView implements View {
|
||||
name: string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Folder } from '../domain/folder';
|
||||
import { Folder } from '../domain';
|
||||
|
||||
export class FolderView implements View {
|
||||
id: string = null;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Identity } from '../domain/identity';
|
||||
import { Identity } from '../domain';
|
||||
|
||||
export class IdentityView implements View {
|
||||
title: string = null;
|
||||
|
@ -1,7 +1,9 @@
|
||||
export { AttachmentView } from './attachmentView';
|
||||
export { CardView } from './cardView';
|
||||
export { CipherView } from './cipherView';
|
||||
export { CollectionView } from './collectionView';
|
||||
export { FieldView } from './fieldView';
|
||||
export { FolderView } from './folderView';
|
||||
export { IdentityView } from './identityView';
|
||||
export { LoginView } from './loginView';
|
||||
export { SecureNoteView } from './secureNoteView';
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { View } from './view';
|
||||
|
||||
import { Login } from '../domain/login';
|
||||
import { Login } from '../domain';
|
||||
|
||||
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
import { PlatformUtilsService } from '../../abstractions';
|
||||
|
||||
export class LoginView implements View {
|
||||
username: string;
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { SecureNoteType } from '../../enums/secureNoteType';
|
||||
import { SecureNoteType } from '../../enums';
|
||||
|
||||
import { View } from './view';
|
||||
|
||||
import { SecureNote } from '../domain/secureNote';
|
||||
import { SecureNote } from '../domain';
|
||||
|
||||
export class SecureNoteView implements View {
|
||||
type: SecureNoteType;
|
||||
|
@ -1,24 +1,30 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { ApiService as ApiServiceAbstraction } from '../abstractions/api.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { TokenService } from '../abstractions/token.service';
|
||||
import {
|
||||
ApiService as ApiServiceAbstraction,
|
||||
PlatformUtilsService,
|
||||
TokenService,
|
||||
} from '../abstractions';
|
||||
|
||||
import { EnvironmentUrls } from '../models/domain/environmentUrls';
|
||||
import { EnvironmentUrls } from '../models/domain';
|
||||
|
||||
import { CipherRequest } from '../models/request/cipherRequest';
|
||||
import { FolderRequest } from '../models/request/folderRequest';
|
||||
import { PasswordHintRequest } from '../models/request/passwordHintRequest';
|
||||
import { RegisterRequest } from '../models/request/registerRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import { TwoFactorEmailRequest } from '../models/request/twoFactorEmailRequest';
|
||||
import {
|
||||
CipherRequest,
|
||||
FolderRequest,
|
||||
PasswordHintRequest,
|
||||
RegisterRequest,
|
||||
TokenRequest,
|
||||
TwoFactorEmailRequest,
|
||||
} from '../models/request';
|
||||
|
||||
import { CipherResponse } from '../models/response/cipherResponse';
|
||||
import { ErrorResponse } from '../models/response/errorResponse';
|
||||
import { FolderResponse } from '../models/response/folderResponse';
|
||||
import { IdentityTokenResponse } from '../models/response/identityTokenResponse';
|
||||
import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorResponse';
|
||||
import { SyncResponse } from '../models/response/syncResponse';
|
||||
import {
|
||||
CipherResponse,
|
||||
ErrorResponse,
|
||||
FolderResponse,
|
||||
IdentityTokenResponse,
|
||||
IdentityTwoFactorResponse,
|
||||
SyncResponse,
|
||||
} from '../models/response';
|
||||
|
||||
export class ApiService implements ApiServiceAbstraction {
|
||||
urlsSet: boolean = false;
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { UtilsService } from './utils.service';
|
||||
|
||||
import { AppIdService as AppIdServiceInterface } from '../abstractions/appId.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import {
|
||||
AppIdService as AppIdServiceInterface,
|
||||
StorageService,
|
||||
} from '../abstractions';
|
||||
|
||||
export class AppIdService implements AppIdServiceInterface {
|
||||
constructor(private storageService: StorageService) {
|
||||
|
@ -1,24 +1,32 @@
|
||||
import { TwoFactorProviderType } from '../enums/twoFactorProviderType';
|
||||
import { TwoFactorProviderType } from '../enums';
|
||||
|
||||
import { AuthResult } from '../models/domain/authResult';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
import {
|
||||
AuthResult,
|
||||
SymmetricCryptoKey,
|
||||
} from '../models/domain';
|
||||
|
||||
import { DeviceRequest } from '../models/request/deviceRequest';
|
||||
import { TokenRequest } from '../models/request/tokenRequest';
|
||||
import {
|
||||
DeviceRequest,
|
||||
TokenRequest,
|
||||
} from '../models/request';
|
||||
|
||||
import { IdentityTokenResponse } from '../models/response/identityTokenResponse';
|
||||
import { IdentityTwoFactorResponse } from '../models/response/identityTwoFactorResponse';
|
||||
import {
|
||||
IdentityTokenResponse,
|
||||
IdentityTwoFactorResponse,
|
||||
} from '../models/response';
|
||||
|
||||
import { ConstantsService } from '../services/constants.service';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { AppIdService } from '../abstractions/appId.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { I18nService } from '../abstractions/i18n.service';
|
||||
import { MessagingService } from '../abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { TokenService } from '../abstractions/token.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
ApiService,
|
||||
AppIdService,
|
||||
CryptoService,
|
||||
I18nService,
|
||||
MessagingService,
|
||||
PlatformUtilsService,
|
||||
TokenService,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
export const TwoFactorProviders = {
|
||||
[TwoFactorProviderType.Authenticator]: {
|
||||
|
@ -1,38 +1,47 @@
|
||||
import { CipherType } from '../enums/cipherType';
|
||||
import { CipherType } from '../enums';
|
||||
|
||||
import { CipherData } from '../models/data/cipherData';
|
||||
import { CipherData } from '../models/data';
|
||||
|
||||
import {
|
||||
Card,
|
||||
Cipher,
|
||||
CipherString,
|
||||
Field,
|
||||
Identity,
|
||||
Login,
|
||||
SecureNote,
|
||||
SymmetricCryptoKey,
|
||||
} from '../models/domain';
|
||||
|
||||
import { Card } from '../models/domain/card';
|
||||
import { Cipher } from '../models/domain/cipher';
|
||||
import { CipherString } from '../models/domain/cipherString';
|
||||
import Domain from '../models/domain/domain';
|
||||
import { Field } from '../models/domain/field';
|
||||
import { Identity } from '../models/domain/identity';
|
||||
import { Login } from '../models/domain/login';
|
||||
import { SecureNote } from '../models/domain/secureNote';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
|
||||
import { CipherRequest } from '../models/request/cipherRequest';
|
||||
import { CipherRequest } from '../models/request';
|
||||
|
||||
import { CipherResponse } from '../models/response/cipherResponse';
|
||||
import { ErrorResponse } from '../models/response/errorResponse';
|
||||
import {
|
||||
CipherResponse,
|
||||
ErrorResponse,
|
||||
} from '../models/response';
|
||||
|
||||
import { CardView } from '../models/view/cardView';
|
||||
import { CipherView } from '../models/view/cipherView';
|
||||
import { FieldView } from '../models/view/fieldView';
|
||||
import { IdentityView } from '../models/view/identityView';
|
||||
import { LoginView } from '../models/view/loginView';
|
||||
import { View } from '../models/view/view';
|
||||
import {
|
||||
CardView,
|
||||
CipherView,
|
||||
FieldView,
|
||||
IdentityView,
|
||||
LoginView,
|
||||
View,
|
||||
} from '../models/view';
|
||||
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { CipherService as CipherServiceAbstraction } from '../abstractions/cipher.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { I18nService } from '../abstractions/i18n.service';
|
||||
import { SettingsService } from '../abstractions/settings.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
ApiService,
|
||||
CipherService as CipherServiceAbstraction,
|
||||
CryptoService,
|
||||
I18nService,
|
||||
SettingsService,
|
||||
StorageService,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
ciphersPrefix: 'ciphers_',
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { CollectionData } from '../models/data/collectionData';
|
||||
import { CollectionData } from '../models/data';
|
||||
|
||||
import { Collection } from '../models/domain';
|
||||
|
||||
import { CollectionView } from '../models/view/collectionView';
|
||||
import { CollectionView } from '../models/view';
|
||||
|
||||
import { CollectionService as CollectionServiceAbstraction } from '../abstractions/collection.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { I18nService } from '../abstractions/i18n.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
CollectionService as CollectionServiceAbstraction,
|
||||
CryptoService,
|
||||
I18nService,
|
||||
StorageService,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
collectionsPrefix: 'collections_',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { PlatformUtilsService } from '../abstractions';
|
||||
|
||||
export class ConstantsService {
|
||||
static readonly environmentUrlsKey: string = 'environmentUrls';
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import {
|
||||
CryptoService,
|
||||
PlatformUtilsService,
|
||||
} from '../abstractions';
|
||||
|
||||
export class ContainerService {
|
||||
constructor(private cryptoService: CryptoService,
|
||||
|
@ -1,14 +1,19 @@
|
||||
import * as forge from 'node-forge';
|
||||
|
||||
import { EncryptionType } from '../enums/encryptionType';
|
||||
import { EncryptionType } from '../enums';
|
||||
|
||||
import { CipherString } from '../models/domain/cipherString';
|
||||
import { EncryptedObject } from '../models/domain/encryptedObject';
|
||||
import { SymmetricCryptoKey } from '../models/domain/symmetricCryptoKey';
|
||||
import { ProfileOrganizationResponse } from '../models/response/profileOrganizationResponse';
|
||||
import {
|
||||
CipherString,
|
||||
EncryptedObject,
|
||||
SymmetricCryptoKey,
|
||||
} from '../models/domain';
|
||||
|
||||
import { CryptoService as CryptoServiceAbstraction } from '../abstractions/crypto.service';
|
||||
import { StorageService as StorageServiceInterface } from '../abstractions/storage.service';
|
||||
import { ProfileOrganizationResponse } from '../models/response';
|
||||
|
||||
import {
|
||||
CryptoService as CryptoServiceAbstraction,
|
||||
StorageService as StorageServiceAbstraction,
|
||||
} from '../abstractions';
|
||||
|
||||
import { ConstantsService } from './constants.service';
|
||||
import { UtilsService } from './utils.service';
|
||||
@ -41,8 +46,8 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
private privateKey: ArrayBuffer;
|
||||
private orgKeys: Map<string, SymmetricCryptoKey>;
|
||||
|
||||
constructor(private storageService: StorageServiceInterface,
|
||||
private secureStorageService: StorageServiceInterface) {
|
||||
constructor(private storageService: StorageServiceAbstraction,
|
||||
private secureStorageService: StorageServiceAbstraction) {
|
||||
}
|
||||
|
||||
async setKey(key: SymmetricCryptoKey): Promise<any> {
|
||||
|
@ -1,10 +1,12 @@
|
||||
import { EnvironmentUrls } from '../models/domain/environmentUrls';
|
||||
import { EnvironmentUrls } from '../models/domain';
|
||||
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { EnvironmentService as EnvironmentServiceAbstraction } from '../abstractions/environment.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import {
|
||||
ApiService,
|
||||
EnvironmentService as EnvironmentServiceAbstraction,
|
||||
StorageService,
|
||||
} from '../abstractions';
|
||||
|
||||
export class EnvironmentService implements EnvironmentServiceAbstraction {
|
||||
baseUrl: string;
|
||||
|
@ -1,19 +1,21 @@
|
||||
import { FolderData } from '../models/data/folderData';
|
||||
import { FolderData } from '../models/data';
|
||||
|
||||
import { Folder } from '../models/domain/folder';
|
||||
import { Folder } from '../models/domain';
|
||||
|
||||
import { FolderRequest } from '../models/request/folderRequest';
|
||||
import { FolderRequest } from '../models/request';
|
||||
|
||||
import { FolderResponse } from '../models/response/folderResponse';
|
||||
import { FolderResponse } from '../models/response';
|
||||
|
||||
import { FolderView } from '../models/view/folderView';
|
||||
import { FolderView } from '../models/view';
|
||||
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { FolderService as FolderServiceAbstraction } from '../abstractions/folder.service';
|
||||
import { I18nService } from '../abstractions/i18n.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
ApiService,
|
||||
CryptoService,
|
||||
FolderService as FolderServiceAbstraction,
|
||||
I18nService,
|
||||
StorageService,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
foldersPrefix: 'folders_',
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { CipherService } from '../abstractions/cipher.service';
|
||||
import { CollectionService } from '../abstractions/collection.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { FolderService } from '../abstractions/folder.service';
|
||||
import { LockService as LockServiceAbstraction } from '../abstractions/lock.service';
|
||||
import { MessagingService } from '../abstractions/messaging.service';
|
||||
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import {
|
||||
CipherService,
|
||||
CollectionService,
|
||||
CryptoService,
|
||||
FolderService,
|
||||
LockService as LockServiceAbstraction,
|
||||
MessagingService,
|
||||
PlatformUtilsService,
|
||||
StorageService,
|
||||
} from '../abstractions';
|
||||
|
||||
export class LockService implements LockServiceAbstraction {
|
||||
constructor(private cipherService: CipherService, private folderService: FolderService,
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { CipherString } from '../models/domain/cipherString';
|
||||
import { PasswordHistory } from '../models/domain/passwordHistory';
|
||||
import {
|
||||
CipherString,
|
||||
PasswordHistory,
|
||||
} from '../models/domain';
|
||||
|
||||
import { UtilsService } from './utils.service';
|
||||
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import {
|
||||
CryptoService,
|
||||
PasswordGenerationService as PasswordGenerationServiceAbstraction,
|
||||
} from '../abstractions/passwordGeneration.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
StorageService,
|
||||
} from '../abstractions';
|
||||
|
||||
const DefaultOptions = {
|
||||
length: 14,
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { SettingsService as SettingsServiceAbstraction } from '../abstractions/settings.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
SettingsService as SettingsServiceAbstraction,
|
||||
StorageService,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
settingsPrefix: 'settings_',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { StateService as StateServiceAbstraction } from '../abstractions/state.service';
|
||||
import { StateService as StateServiceAbstraction } from '../abstractions';
|
||||
|
||||
export class StateService implements StateServiceAbstraction {
|
||||
private state: any = {};
|
||||
|
@ -1,23 +1,29 @@
|
||||
import { ApiService } from '../abstractions/api.service';
|
||||
import { CipherService } from '../abstractions/cipher.service';
|
||||
import { CollectionService } from '../abstractions/collection.service';
|
||||
import { CryptoService } from '../abstractions/crypto.service';
|
||||
import { FolderService } from '../abstractions/folder.service';
|
||||
import { MessagingService } from '../abstractions/messaging.service';
|
||||
import { SettingsService } from '../abstractions/settings.service';
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { SyncService as SyncServiceAbstraction } from '../abstractions/sync.service';
|
||||
import { UserService } from '../abstractions/user.service';
|
||||
import {
|
||||
ApiService,
|
||||
CipherService,
|
||||
CollectionService,
|
||||
CryptoService,
|
||||
FolderService,
|
||||
MessagingService,
|
||||
SettingsService,
|
||||
StorageService,
|
||||
SyncService as SyncServiceAbstraction,
|
||||
UserService,
|
||||
} from '../abstractions';
|
||||
|
||||
import { CipherData } from '../models/data/cipherData';
|
||||
import { CollectionData } from '../models/data/collectionData';
|
||||
import { FolderData } from '../models/data/folderData';
|
||||
import {
|
||||
CipherData,
|
||||
CollectionData,
|
||||
FolderData,
|
||||
} from '../models/data';
|
||||
|
||||
import { CipherResponse } from '../models/response/cipherResponse';
|
||||
import { CollectionResponse } from '../models/response/collectionResponse';
|
||||
import { DomainsResponse } from '../models/response/domainsResponse';
|
||||
import { FolderResponse } from '../models/response/folderResponse';
|
||||
import { ProfileResponse } from '../models/response/profileResponse';
|
||||
import {
|
||||
CipherResponse,
|
||||
CollectionResponse,
|
||||
DomainsResponse,
|
||||
FolderResponse,
|
||||
ProfileResponse,
|
||||
} from '../models/response';
|
||||
|
||||
const Keys = {
|
||||
lastSyncPrefix: 'lastSync_',
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
import { UtilsService } from './utils.service';
|
||||
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { TokenService as TokenServiceAbstraction } from '../abstractions/token.service';
|
||||
import {
|
||||
StorageService,
|
||||
TokenService as TokenServiceAbstraction,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
accessToken: 'accessToken',
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { TotpService as TotpServiceAbstraction } from '../abstractions/totp.service';
|
||||
import {
|
||||
StorageService,
|
||||
TotpService as TotpServiceAbstraction,
|
||||
} from '../abstractions';
|
||||
|
||||
const b32Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567';
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { TokenService } from '../abstractions/token.service';
|
||||
import { UserService as UserServiceAbsrtaction } from '../abstractions/user.service';
|
||||
import {
|
||||
StorageService,
|
||||
TokenService,
|
||||
UserService as UserServiceAbsrtaction,
|
||||
} from '../abstractions';
|
||||
|
||||
const Keys = {
|
||||
userId: 'userId',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { UtilsService as UtilsServiceAbstraction } from '../abstractions/utils.service';
|
||||
import { UtilsService as UtilsServiceAbstraction } from '../abstractions';
|
||||
|
||||
export class UtilsService implements UtilsServiceAbstraction {
|
||||
static copyToClipboard(text: string, doc?: Document): void {
|
||||
|
Loading…
Reference in New Issue
Block a user