mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-25 21:51:30 +01:00
remove model window assignments
This commit is contained in:
parent
e753becd33
commit
e157d5be6d
@ -1,6 +1,6 @@
|
||||
import { AttachmentResponse } from '../response/attachmentResponse';
|
||||
|
||||
class AttachmentData {
|
||||
export class AttachmentData {
|
||||
id: string;
|
||||
url: string;
|
||||
fileName: string;
|
||||
@ -15,6 +15,3 @@ class AttachmentData {
|
||||
this.sizeName = response.sizeName;
|
||||
}
|
||||
}
|
||||
|
||||
export { AttachmentData };
|
||||
(window as any).AttachmentData = AttachmentData;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class CardData {
|
||||
export class CardData {
|
||||
cardholderName: string;
|
||||
brand: string;
|
||||
number: string;
|
||||
@ -15,6 +15,3 @@ class CardData {
|
||||
this.code = data.Code;
|
||||
}
|
||||
}
|
||||
|
||||
export { CardData };
|
||||
(window as any).CardData = CardData;
|
||||
|
@ -9,7 +9,7 @@ import { SecureNoteData } from './secureNoteData';
|
||||
|
||||
import { CipherResponse } from '../response/cipherResponse';
|
||||
|
||||
class CipherData {
|
||||
export class CipherData {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
folderId: string;
|
||||
@ -82,6 +82,3 @@ class CipherData {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { CipherData };
|
||||
(window as any).CipherData = CipherData;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CollectionResponse } from '../response/collectionResponse';
|
||||
|
||||
class CollectionData {
|
||||
export class CollectionData {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
name: string;
|
||||
@ -11,6 +11,3 @@ class CollectionData {
|
||||
this.name = response.name;
|
||||
}
|
||||
}
|
||||
|
||||
export { CollectionData };
|
||||
(window as any).CollectionData = CollectionData;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FieldType } from '../../enums/fieldType';
|
||||
|
||||
class FieldData {
|
||||
export class FieldData {
|
||||
type: FieldType;
|
||||
name: string;
|
||||
value: string;
|
||||
@ -11,6 +11,3 @@ class FieldData {
|
||||
this.value = response.Value;
|
||||
}
|
||||
}
|
||||
|
||||
export { FieldData };
|
||||
(window as any).FieldData = FieldData;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FolderResponse } from '../response/folderResponse';
|
||||
|
||||
class FolderData {
|
||||
export class FolderData {
|
||||
id: string;
|
||||
userId: string;
|
||||
name: string;
|
||||
@ -13,6 +13,3 @@ class FolderData {
|
||||
this.revisionDate = response.revisionDate;
|
||||
}
|
||||
}
|
||||
|
||||
export { FolderData };
|
||||
(window as any).FolderData = FolderData;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class IdentityData {
|
||||
export class IdentityData {
|
||||
title: string;
|
||||
firstName: string;
|
||||
middleName: string;
|
||||
@ -39,6 +39,3 @@ class IdentityData {
|
||||
this.licenseNumber = data.LicenseNumber;
|
||||
}
|
||||
}
|
||||
|
||||
export { IdentityData };
|
||||
(window as any).IdentityData = IdentityData;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class LoginData {
|
||||
export class LoginData {
|
||||
uri: string;
|
||||
username: string;
|
||||
password: string;
|
||||
@ -11,6 +11,3 @@ class LoginData {
|
||||
this.totp = data.Totp;
|
||||
}
|
||||
}
|
||||
|
||||
export { LoginData };
|
||||
(window as any).LoginData = LoginData;
|
||||
|
@ -1,12 +1,9 @@
|
||||
import { SecureNoteType } from '../../enums/secureNoteType';
|
||||
|
||||
class SecureNoteData {
|
||||
export class SecureNoteData {
|
||||
type: SecureNoteType;
|
||||
|
||||
constructor(data: any) {
|
||||
this.type = data.Type;
|
||||
}
|
||||
}
|
||||
|
||||
export { SecureNoteData };
|
||||
(window as any).SecureNoteData = SecureNoteData;
|
||||
|
@ -3,7 +3,7 @@ import { AttachmentData } from '../data/attachmentData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Attachment extends Domain {
|
||||
export class Attachment extends Domain {
|
||||
id: string;
|
||||
url: string;
|
||||
size: number;
|
||||
@ -38,6 +38,3 @@ class Attachment extends Domain {
|
||||
}, orgId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Attachment };
|
||||
(window as any).Attachment = Attachment;
|
||||
|
@ -3,7 +3,7 @@ import { CardData } from '../data/cardData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Card extends Domain {
|
||||
export class Card extends Domain {
|
||||
cardholderName: CipherString;
|
||||
brand: CipherString;
|
||||
number: CipherString;
|
||||
@ -38,6 +38,3 @@ class Card extends Domain {
|
||||
}, orgId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Card };
|
||||
(window as any).Card = Card;
|
||||
|
@ -13,7 +13,7 @@ import { Identity } from './identity';
|
||||
import { Login } from './login';
|
||||
import { SecureNote } from './secureNote';
|
||||
|
||||
class Cipher extends Domain {
|
||||
export class Cipher extends Domain {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
folderId: string;
|
||||
@ -187,6 +187,3 @@ class Cipher extends Domain {
|
||||
return model;
|
||||
}
|
||||
}
|
||||
|
||||
export { Cipher };
|
||||
(window as any).Cipher = Cipher;
|
||||
|
@ -2,7 +2,7 @@ import { EncryptionType } from '../../enums/encryptionType';
|
||||
|
||||
import { CryptoService } from '../../abstractions/crypto.service';
|
||||
|
||||
class CipherString {
|
||||
export class CipherString {
|
||||
encryptedString?: string;
|
||||
encryptionType?: EncryptionType;
|
||||
decryptedValue?: string;
|
||||
@ -111,6 +111,3 @@ class CipherString {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export { CipherString };
|
||||
(window as any).CipherString = CipherString;
|
||||
|
@ -3,7 +3,7 @@ import { CollectionData } from '../data/collectionData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Collection extends Domain {
|
||||
export class Collection extends Domain {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
name: CipherString;
|
||||
@ -32,6 +32,3 @@ class Collection extends Domain {
|
||||
}, this.organizationId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Collection };
|
||||
(window as any).Collection = Collection;
|
||||
|
@ -5,7 +5,7 @@ import { FieldData } from '../data/fieldData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Field extends Domain {
|
||||
export class Field extends Domain {
|
||||
name: CipherString;
|
||||
vault: CipherString;
|
||||
type: FieldType;
|
||||
@ -34,6 +34,3 @@ class Field extends Domain {
|
||||
}, orgId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Field };
|
||||
(window as any).Field = Field;
|
||||
|
@ -3,7 +3,7 @@ import { FolderData } from '../data/folderData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Folder extends Domain {
|
||||
export class Folder extends Domain {
|
||||
id: string;
|
||||
name: CipherString;
|
||||
|
||||
@ -29,6 +29,3 @@ class Folder extends Domain {
|
||||
}, null);
|
||||
}
|
||||
}
|
||||
|
||||
export { Folder };
|
||||
(window as any).Folder = Folder;
|
||||
|
@ -3,7 +3,7 @@ import { IdentityData } from '../data/identityData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Identity extends Domain {
|
||||
export class Identity extends Domain {
|
||||
title: CipherString;
|
||||
firstName: CipherString;
|
||||
middleName: CipherString;
|
||||
@ -74,6 +74,3 @@ class Identity extends Domain {
|
||||
}, orgId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Identity };
|
||||
(window as any).Identity = Identity;
|
||||
|
@ -3,7 +3,7 @@ import { LoginData } from '../data/loginData';
|
||||
import { CipherString } from './cipherString';
|
||||
import Domain from './domain';
|
||||
|
||||
class Login extends Domain {
|
||||
export class Login extends Domain {
|
||||
uri: CipherString;
|
||||
username: CipherString;
|
||||
password: CipherString;
|
||||
@ -32,6 +32,3 @@ class Login extends Domain {
|
||||
}, orgId);
|
||||
}
|
||||
}
|
||||
|
||||
export { Login };
|
||||
(window as any).Login = Login;
|
||||
|
@ -4,7 +4,7 @@ import { SecureNoteData } from '../data/secureNoteData';
|
||||
|
||||
import Domain from './domain';
|
||||
|
||||
class SecureNote extends Domain {
|
||||
export class SecureNote extends Domain {
|
||||
type: SecureNoteType;
|
||||
|
||||
constructor(obj?: SecureNoteData, alreadyEncrypted: boolean = false) {
|
||||
@ -22,6 +22,3 @@ class SecureNote extends Domain {
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export { SecureNote };
|
||||
(window as any).SecureNote = SecureNote;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CipherType } from '../../enums/cipherType';
|
||||
|
||||
class CipherRequest {
|
||||
export class CipherRequest {
|
||||
type: CipherType;
|
||||
folderId: string;
|
||||
organizationId: string;
|
||||
@ -84,6 +84,3 @@ class CipherRequest {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { CipherRequest };
|
||||
(window as any).CipherRequest = CipherRequest;
|
||||
|
@ -2,7 +2,7 @@ import { DeviceType } from '../../enums/deviceType';
|
||||
|
||||
import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
|
||||
|
||||
class DeviceRequest {
|
||||
export class DeviceRequest {
|
||||
type: DeviceType;
|
||||
name: string;
|
||||
identifier: string;
|
||||
@ -15,6 +15,3 @@ class DeviceRequest {
|
||||
this.pushToken = null;
|
||||
}
|
||||
}
|
||||
|
||||
export { DeviceRequest };
|
||||
(window as any).DeviceRequest = DeviceRequest;
|
||||
|
@ -1,10 +1,7 @@
|
||||
class DeviceTokenRequest {
|
||||
export class DeviceTokenRequest {
|
||||
pushToken: string;
|
||||
|
||||
constructor() {
|
||||
this.pushToken = null;
|
||||
}
|
||||
}
|
||||
|
||||
export { DeviceTokenRequest };
|
||||
(window as any).DeviceTokenRequest = DeviceTokenRequest;
|
||||
|
@ -1,12 +1,9 @@
|
||||
import { Folder } from '../domain/folder';
|
||||
|
||||
class FolderRequest {
|
||||
export class FolderRequest {
|
||||
name: string;
|
||||
|
||||
constructor(folder: Folder) {
|
||||
this.name = folder.name ? folder.name.encryptedString : null;
|
||||
}
|
||||
}
|
||||
|
||||
export { FolderRequest };
|
||||
(window as any).FolderRequest = FolderRequest;
|
||||
|
@ -1,10 +1,7 @@
|
||||
class PasswordHintRequest {
|
||||
export class PasswordHintRequest {
|
||||
email: string;
|
||||
|
||||
constructor(email: string) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
||||
|
||||
export { PasswordHintRequest };
|
||||
(window as any).PasswordHintRequest = PasswordHintRequest;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class RegisterRequest {
|
||||
export class RegisterRequest {
|
||||
name: string;
|
||||
email: string;
|
||||
masterPasswordHash: string;
|
||||
@ -13,6 +13,3 @@ class RegisterRequest {
|
||||
this.key = key;
|
||||
}
|
||||
}
|
||||
|
||||
export { RegisterRequest };
|
||||
(window as any).RegisterRequest = RegisterRequest;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeviceRequest } from './deviceRequest';
|
||||
|
||||
class TokenRequest {
|
||||
export class TokenRequest {
|
||||
email: string;
|
||||
masterPasswordHash: string;
|
||||
token: string;
|
||||
@ -44,6 +44,3 @@ class TokenRequest {
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
|
||||
export { TokenRequest };
|
||||
(window as any).TokenRequest = TokenRequest;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class TwoFactorEmailRequest {
|
||||
export class TwoFactorEmailRequest {
|
||||
email: string;
|
||||
masterPasswordHash: string;
|
||||
|
||||
@ -7,6 +7,3 @@ class TwoFactorEmailRequest {
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
}
|
||||
}
|
||||
|
||||
export { TwoFactorEmailRequest };
|
||||
(window as any).TwoFactorEmailRequest = TwoFactorEmailRequest;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class AttachmentResponse {
|
||||
export class AttachmentResponse {
|
||||
id: string;
|
||||
url: string;
|
||||
fileName: string;
|
||||
@ -13,6 +13,3 @@ class AttachmentResponse {
|
||||
this.sizeName = response.SizeName;
|
||||
}
|
||||
}
|
||||
|
||||
export { AttachmentResponse };
|
||||
(window as any).AttachmentResponse = AttachmentResponse;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { AttachmentResponse } from './attachmentResponse';
|
||||
|
||||
class CipherResponse {
|
||||
export class CipherResponse {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
folderId: string;
|
||||
@ -39,6 +39,3 @@ class CipherResponse {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { CipherResponse };
|
||||
(window as any).CipherResponse = CipherResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class CollectionResponse {
|
||||
export class CollectionResponse {
|
||||
id: string;
|
||||
organizationId: string;
|
||||
name: string;
|
||||
@ -9,6 +9,3 @@ class CollectionResponse {
|
||||
this.name = response.Name;
|
||||
}
|
||||
}
|
||||
|
||||
export { CollectionResponse };
|
||||
(window as any).CollectionResponse = CollectionResponse;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { DeviceType } from '../../enums/deviceType';
|
||||
|
||||
class DeviceResponse {
|
||||
export class DeviceResponse {
|
||||
id: string;
|
||||
name: number;
|
||||
identifier: string;
|
||||
@ -15,6 +15,3 @@ class DeviceResponse {
|
||||
this.creationDate = response.CreationDate;
|
||||
}
|
||||
}
|
||||
|
||||
export { DeviceResponse };
|
||||
(window as any).DeviceResponse = DeviceResponse;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { GlobalDomainResponse } from './globalDomainResponse';
|
||||
|
||||
class DomainsResponse {
|
||||
export class DomainsResponse {
|
||||
equivalentDomains: string[][];
|
||||
globalEquivalentDomains: GlobalDomainResponse[] = [];
|
||||
|
||||
@ -15,6 +15,3 @@ class DomainsResponse {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { DomainsResponse };
|
||||
(window as any).DomainsResponse = DomainsResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class ErrorResponse {
|
||||
export class ErrorResponse {
|
||||
message: string;
|
||||
validationErrors: { [key: string]: string[]; };
|
||||
statusCode: number;
|
||||
@ -32,6 +32,3 @@ class ErrorResponse {
|
||||
return this.message;
|
||||
}
|
||||
}
|
||||
|
||||
export { ErrorResponse };
|
||||
(window as any).ErrorResponse = ErrorResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class FolderResponse {
|
||||
export class FolderResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
revisionDate: string;
|
||||
@ -9,6 +9,3 @@ class FolderResponse {
|
||||
this.revisionDate = response.RevisionDate;
|
||||
}
|
||||
}
|
||||
|
||||
export { FolderResponse };
|
||||
(window as any).FolderResponse = FolderResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class GlobalDomainResponse {
|
||||
export class GlobalDomainResponse {
|
||||
type: number;
|
||||
domains: string[];
|
||||
excluded: number[];
|
||||
@ -9,6 +9,3 @@ class GlobalDomainResponse {
|
||||
this.excluded = response.Excluded;
|
||||
}
|
||||
}
|
||||
|
||||
export { GlobalDomainResponse };
|
||||
(window as any).GlobalDomainResponse = GlobalDomainResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class IdentityTokenResponse {
|
||||
export class IdentityTokenResponse {
|
||||
accessToken: string;
|
||||
expiresIn: number;
|
||||
refreshToken: string;
|
||||
@ -19,6 +19,3 @@ class IdentityTokenResponse {
|
||||
this.twoFactorToken = response.TwoFactorToken;
|
||||
}
|
||||
}
|
||||
|
||||
export { IdentityTokenResponse };
|
||||
(window as any).IdentityTokenResponse = IdentityTokenResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class KeysResponse {
|
||||
export class KeysResponse {
|
||||
privateKey: string;
|
||||
publicKey: string;
|
||||
|
||||
@ -7,6 +7,3 @@ class KeysResponse {
|
||||
this.publicKey = response.PublicKey;
|
||||
}
|
||||
}
|
||||
|
||||
export { KeysResponse };
|
||||
(window as any).KeysResponse = KeysResponse;
|
||||
|
@ -1,10 +1,7 @@
|
||||
class ListResponse {
|
||||
export class ListResponse {
|
||||
data: any;
|
||||
|
||||
constructor(data: any) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
export { ListResponse };
|
||||
(window as any).ListResponse = ListResponse;
|
||||
|
@ -1,4 +1,4 @@
|
||||
class ProfileOrganizationResponse {
|
||||
export class ProfileOrganizationResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
useGroups: boolean;
|
||||
@ -25,6 +25,3 @@ class ProfileOrganizationResponse {
|
||||
this.type = response.Type;
|
||||
}
|
||||
}
|
||||
|
||||
export { ProfileOrganizationResponse };
|
||||
(window as any).ProfileOrganizationResponse = ProfileOrganizationResponse;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { ProfileOrganizationResponse } from './profileOrganizationResponse';
|
||||
|
||||
class ProfileResponse {
|
||||
export class ProfileResponse {
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
@ -34,6 +34,3 @@ class ProfileResponse {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { ProfileResponse };
|
||||
(window as any).ProfileResponse = ProfileResponse;
|
||||
|
@ -4,7 +4,7 @@ import { DomainsResponse } from './domainsResponse';
|
||||
import { FolderResponse } from './folderResponse';
|
||||
import { ProfileResponse } from './profileResponse';
|
||||
|
||||
class SyncResponse {
|
||||
export class SyncResponse {
|
||||
profile?: ProfileResponse;
|
||||
folders: FolderResponse[] = [];
|
||||
collections: CollectionResponse[] = [];
|
||||
@ -39,6 +39,3 @@ class SyncResponse {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export { SyncResponse };
|
||||
(window as any).SyncResponse = SyncResponse;
|
||||
|
Loading…
Reference in New Issue
Block a user