1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +00:00

remove model window assignments

This commit is contained in:
Kyle Spearrin
2018-01-20 14:12:18 -05:00
parent e753becd33
commit e157d5be6d
41 changed files with 41 additions and 164 deletions

View File

@@ -1,6 +1,6 @@
import { AttachmentResponse } from '../response/attachmentResponse'; import { AttachmentResponse } from '../response/attachmentResponse';
class AttachmentData { export class AttachmentData {
id: string; id: string;
url: string; url: string;
fileName: string; fileName: string;
@@ -15,6 +15,3 @@ class AttachmentData {
this.sizeName = response.sizeName; this.sizeName = response.sizeName;
} }
} }
export { AttachmentData };
(window as any).AttachmentData = AttachmentData;

View File

@@ -1,4 +1,4 @@
class CardData { export class CardData {
cardholderName: string; cardholderName: string;
brand: string; brand: string;
number: string; number: string;
@@ -15,6 +15,3 @@ class CardData {
this.code = data.Code; this.code = data.Code;
} }
} }
export { CardData };
(window as any).CardData = CardData;

View File

@@ -9,7 +9,7 @@ import { SecureNoteData } from './secureNoteData';
import { CipherResponse } from '../response/cipherResponse'; import { CipherResponse } from '../response/cipherResponse';
class CipherData { export class CipherData {
id: string; id: string;
organizationId: string; organizationId: string;
folderId: string; folderId: string;
@@ -82,6 +82,3 @@ class CipherData {
} }
} }
} }
export { CipherData };
(window as any).CipherData = CipherData;

View File

@@ -1,6 +1,6 @@
import { CollectionResponse } from '../response/collectionResponse'; import { CollectionResponse } from '../response/collectionResponse';
class CollectionData { export class CollectionData {
id: string; id: string;
organizationId: string; organizationId: string;
name: string; name: string;
@@ -11,6 +11,3 @@ class CollectionData {
this.name = response.name; this.name = response.name;
} }
} }
export { CollectionData };
(window as any).CollectionData = CollectionData;

View File

@@ -1,6 +1,6 @@
import { FieldType } from '../../enums/fieldType'; import { FieldType } from '../../enums/fieldType';
class FieldData { export class FieldData {
type: FieldType; type: FieldType;
name: string; name: string;
value: string; value: string;
@@ -11,6 +11,3 @@ class FieldData {
this.value = response.Value; this.value = response.Value;
} }
} }
export { FieldData };
(window as any).FieldData = FieldData;

View File

@@ -1,6 +1,6 @@
import { FolderResponse } from '../response/folderResponse'; import { FolderResponse } from '../response/folderResponse';
class FolderData { export class FolderData {
id: string; id: string;
userId: string; userId: string;
name: string; name: string;
@@ -13,6 +13,3 @@ class FolderData {
this.revisionDate = response.revisionDate; this.revisionDate = response.revisionDate;
} }
} }
export { FolderData };
(window as any).FolderData = FolderData;

View File

@@ -1,4 +1,4 @@
class IdentityData { export class IdentityData {
title: string; title: string;
firstName: string; firstName: string;
middleName: string; middleName: string;
@@ -39,6 +39,3 @@ class IdentityData {
this.licenseNumber = data.LicenseNumber; this.licenseNumber = data.LicenseNumber;
} }
} }
export { IdentityData };
(window as any).IdentityData = IdentityData;

View File

@@ -1,4 +1,4 @@
class LoginData { export class LoginData {
uri: string; uri: string;
username: string; username: string;
password: string; password: string;
@@ -11,6 +11,3 @@ class LoginData {
this.totp = data.Totp; this.totp = data.Totp;
} }
} }
export { LoginData };
(window as any).LoginData = LoginData;

View File

@@ -1,12 +1,9 @@
import { SecureNoteType } from '../../enums/secureNoteType'; import { SecureNoteType } from '../../enums/secureNoteType';
class SecureNoteData { export class SecureNoteData {
type: SecureNoteType; type: SecureNoteType;
constructor(data: any) { constructor(data: any) {
this.type = data.Type; this.type = data.Type;
} }
} }
export { SecureNoteData };
(window as any).SecureNoteData = SecureNoteData;

View File

@@ -3,7 +3,7 @@ import { AttachmentData } from '../data/attachmentData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Attachment extends Domain { export class Attachment extends Domain {
id: string; id: string;
url: string; url: string;
size: number; size: number;
@@ -38,6 +38,3 @@ class Attachment extends Domain {
}, orgId); }, orgId);
} }
} }
export { Attachment };
(window as any).Attachment = Attachment;

View File

@@ -3,7 +3,7 @@ import { CardData } from '../data/cardData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Card extends Domain { export class Card extends Domain {
cardholderName: CipherString; cardholderName: CipherString;
brand: CipherString; brand: CipherString;
number: CipherString; number: CipherString;
@@ -38,6 +38,3 @@ class Card extends Domain {
}, orgId); }, orgId);
} }
} }
export { Card };
(window as any).Card = Card;

View File

@@ -13,7 +13,7 @@ import { Identity } from './identity';
import { Login } from './login'; import { Login } from './login';
import { SecureNote } from './secureNote'; import { SecureNote } from './secureNote';
class Cipher extends Domain { export class Cipher extends Domain {
id: string; id: string;
organizationId: string; organizationId: string;
folderId: string; folderId: string;
@@ -187,6 +187,3 @@ class Cipher extends Domain {
return model; return model;
} }
} }
export { Cipher };
(window as any).Cipher = Cipher;

View File

@@ -2,7 +2,7 @@ import { EncryptionType } from '../../enums/encryptionType';
import { CryptoService } from '../../abstractions/crypto.service'; import { CryptoService } from '../../abstractions/crypto.service';
class CipherString { export class CipherString {
encryptedString?: string; encryptedString?: string;
encryptionType?: EncryptionType; encryptionType?: EncryptionType;
decryptedValue?: string; decryptedValue?: string;
@@ -111,6 +111,3 @@ class CipherString {
}); });
} }
} }
export { CipherString };
(window as any).CipherString = CipherString;

View File

@@ -3,7 +3,7 @@ import { CollectionData } from '../data/collectionData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Collection extends Domain { export class Collection extends Domain {
id: string; id: string;
organizationId: string; organizationId: string;
name: CipherString; name: CipherString;
@@ -32,6 +32,3 @@ class Collection extends Domain {
}, this.organizationId); }, this.organizationId);
} }
} }
export { Collection };
(window as any).Collection = Collection;

View File

@@ -5,7 +5,7 @@ import { FieldData } from '../data/fieldData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Field extends Domain { export class Field extends Domain {
name: CipherString; name: CipherString;
vault: CipherString; vault: CipherString;
type: FieldType; type: FieldType;
@@ -34,6 +34,3 @@ class Field extends Domain {
}, orgId); }, orgId);
} }
} }
export { Field };
(window as any).Field = Field;

View File

@@ -3,7 +3,7 @@ import { FolderData } from '../data/folderData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Folder extends Domain { export class Folder extends Domain {
id: string; id: string;
name: CipherString; name: CipherString;
@@ -29,6 +29,3 @@ class Folder extends Domain {
}, null); }, null);
} }
} }
export { Folder };
(window as any).Folder = Folder;

View File

@@ -3,7 +3,7 @@ import { IdentityData } from '../data/identityData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Identity extends Domain { export class Identity extends Domain {
title: CipherString; title: CipherString;
firstName: CipherString; firstName: CipherString;
middleName: CipherString; middleName: CipherString;
@@ -74,6 +74,3 @@ class Identity extends Domain {
}, orgId); }, orgId);
} }
} }
export { Identity };
(window as any).Identity = Identity;

View File

@@ -3,7 +3,7 @@ import { LoginData } from '../data/loginData';
import { CipherString } from './cipherString'; import { CipherString } from './cipherString';
import Domain from './domain'; import Domain from './domain';
class Login extends Domain { export class Login extends Domain {
uri: CipherString; uri: CipherString;
username: CipherString; username: CipherString;
password: CipherString; password: CipherString;
@@ -32,6 +32,3 @@ class Login extends Domain {
}, orgId); }, orgId);
} }
} }
export { Login };
(window as any).Login = Login;

View File

@@ -4,7 +4,7 @@ import { SecureNoteData } from '../data/secureNoteData';
import Domain from './domain'; import Domain from './domain';
class SecureNote extends Domain { export class SecureNote extends Domain {
type: SecureNoteType; type: SecureNoteType;
constructor(obj?: SecureNoteData, alreadyEncrypted: boolean = false) { constructor(obj?: SecureNoteData, alreadyEncrypted: boolean = false) {
@@ -22,6 +22,3 @@ class SecureNote extends Domain {
}; };
} }
} }
export { SecureNote };
(window as any).SecureNote = SecureNote;

View File

@@ -1,6 +1,6 @@
import { CipherType } from '../../enums/cipherType'; import { CipherType } from '../../enums/cipherType';
class CipherRequest { export class CipherRequest {
type: CipherType; type: CipherType;
folderId: string; folderId: string;
organizationId: string; organizationId: string;
@@ -84,6 +84,3 @@ class CipherRequest {
} }
} }
} }
export { CipherRequest };
(window as any).CipherRequest = CipherRequest;

View File

@@ -2,7 +2,7 @@ import { DeviceType } from '../../enums/deviceType';
import { PlatformUtilsService } from '../../abstractions/platformUtils.service'; import { PlatformUtilsService } from '../../abstractions/platformUtils.service';
class DeviceRequest { export class DeviceRequest {
type: DeviceType; type: DeviceType;
name: string; name: string;
identifier: string; identifier: string;
@@ -15,6 +15,3 @@ class DeviceRequest {
this.pushToken = null; this.pushToken = null;
} }
} }
export { DeviceRequest };
(window as any).DeviceRequest = DeviceRequest;

View File

@@ -1,10 +1,7 @@
class DeviceTokenRequest { export class DeviceTokenRequest {
pushToken: string; pushToken: string;
constructor() { constructor() {
this.pushToken = null; this.pushToken = null;
} }
} }
export { DeviceTokenRequest };
(window as any).DeviceTokenRequest = DeviceTokenRequest;

View File

@@ -1,12 +1,9 @@
import { Folder } from '../domain/folder'; import { Folder } from '../domain/folder';
class FolderRequest { export class FolderRequest {
name: string; name: string;
constructor(folder: Folder) { constructor(folder: Folder) {
this.name = folder.name ? folder.name.encryptedString : null; this.name = folder.name ? folder.name.encryptedString : null;
} }
} }
export { FolderRequest };
(window as any).FolderRequest = FolderRequest;

View File

@@ -1,10 +1,7 @@
class PasswordHintRequest { export class PasswordHintRequest {
email: string; email: string;
constructor(email: string) { constructor(email: string) {
this.email = email; this.email = email;
} }
} }
export { PasswordHintRequest };
(window as any).PasswordHintRequest = PasswordHintRequest;

View File

@@ -1,4 +1,4 @@
class RegisterRequest { export class RegisterRequest {
name: string; name: string;
email: string; email: string;
masterPasswordHash: string; masterPasswordHash: string;
@@ -13,6 +13,3 @@ class RegisterRequest {
this.key = key; this.key = key;
} }
} }
export { RegisterRequest };
(window as any).RegisterRequest = RegisterRequest;

View File

@@ -1,6 +1,6 @@
import { DeviceRequest } from './deviceRequest'; import { DeviceRequest } from './deviceRequest';
class TokenRequest { export class TokenRequest {
email: string; email: string;
masterPasswordHash: string; masterPasswordHash: string;
token: string; token: string;
@@ -44,6 +44,3 @@ class TokenRequest {
return obj; return obj;
} }
} }
export { TokenRequest };
(window as any).TokenRequest = TokenRequest;

View File

@@ -1,4 +1,4 @@
class TwoFactorEmailRequest { export class TwoFactorEmailRequest {
email: string; email: string;
masterPasswordHash: string; masterPasswordHash: string;
@@ -7,6 +7,3 @@ class TwoFactorEmailRequest {
this.masterPasswordHash = masterPasswordHash; this.masterPasswordHash = masterPasswordHash;
} }
} }
export { TwoFactorEmailRequest };
(window as any).TwoFactorEmailRequest = TwoFactorEmailRequest;

View File

@@ -1,4 +1,4 @@
class AttachmentResponse { export class AttachmentResponse {
id: string; id: string;
url: string; url: string;
fileName: string; fileName: string;
@@ -13,6 +13,3 @@ class AttachmentResponse {
this.sizeName = response.SizeName; this.sizeName = response.SizeName;
} }
} }
export { AttachmentResponse };
(window as any).AttachmentResponse = AttachmentResponse;

View File

@@ -1,6 +1,6 @@
import { AttachmentResponse } from './attachmentResponse'; import { AttachmentResponse } from './attachmentResponse';
class CipherResponse { export class CipherResponse {
id: string; id: string;
organizationId: string; organizationId: string;
folderId: string; folderId: string;
@@ -39,6 +39,3 @@ class CipherResponse {
} }
} }
} }
export { CipherResponse };
(window as any).CipherResponse = CipherResponse;

View File

@@ -1,4 +1,4 @@
class CollectionResponse { export class CollectionResponse {
id: string; id: string;
organizationId: string; organizationId: string;
name: string; name: string;
@@ -9,6 +9,3 @@ class CollectionResponse {
this.name = response.Name; this.name = response.Name;
} }
} }
export { CollectionResponse };
(window as any).CollectionResponse = CollectionResponse;

View File

@@ -1,6 +1,6 @@
import { DeviceType } from '../../enums/deviceType'; import { DeviceType } from '../../enums/deviceType';
class DeviceResponse { export class DeviceResponse {
id: string; id: string;
name: number; name: number;
identifier: string; identifier: string;
@@ -15,6 +15,3 @@ class DeviceResponse {
this.creationDate = response.CreationDate; this.creationDate = response.CreationDate;
} }
} }
export { DeviceResponse };
(window as any).DeviceResponse = DeviceResponse;

View File

@@ -1,6 +1,6 @@
import { GlobalDomainResponse } from './globalDomainResponse'; import { GlobalDomainResponse } from './globalDomainResponse';
class DomainsResponse { export class DomainsResponse {
equivalentDomains: string[][]; equivalentDomains: string[][];
globalEquivalentDomains: GlobalDomainResponse[] = []; globalEquivalentDomains: GlobalDomainResponse[] = [];
@@ -15,6 +15,3 @@ class DomainsResponse {
} }
} }
} }
export { DomainsResponse };
(window as any).DomainsResponse = DomainsResponse;

View File

@@ -1,4 +1,4 @@
class ErrorResponse { export class ErrorResponse {
message: string; message: string;
validationErrors: { [key: string]: string[]; }; validationErrors: { [key: string]: string[]; };
statusCode: number; statusCode: number;
@@ -32,6 +32,3 @@ class ErrorResponse {
return this.message; return this.message;
} }
} }
export { ErrorResponse };
(window as any).ErrorResponse = ErrorResponse;

View File

@@ -1,4 +1,4 @@
class FolderResponse { export class FolderResponse {
id: string; id: string;
name: string; name: string;
revisionDate: string; revisionDate: string;
@@ -9,6 +9,3 @@ class FolderResponse {
this.revisionDate = response.RevisionDate; this.revisionDate = response.RevisionDate;
} }
} }
export { FolderResponse };
(window as any).FolderResponse = FolderResponse;

View File

@@ -1,4 +1,4 @@
class GlobalDomainResponse { export class GlobalDomainResponse {
type: number; type: number;
domains: string[]; domains: string[];
excluded: number[]; excluded: number[];
@@ -9,6 +9,3 @@ class GlobalDomainResponse {
this.excluded = response.Excluded; this.excluded = response.Excluded;
} }
} }
export { GlobalDomainResponse };
(window as any).GlobalDomainResponse = GlobalDomainResponse;

View File

@@ -1,4 +1,4 @@
class IdentityTokenResponse { export class IdentityTokenResponse {
accessToken: string; accessToken: string;
expiresIn: number; expiresIn: number;
refreshToken: string; refreshToken: string;
@@ -19,6 +19,3 @@ class IdentityTokenResponse {
this.twoFactorToken = response.TwoFactorToken; this.twoFactorToken = response.TwoFactorToken;
} }
} }
export { IdentityTokenResponse };
(window as any).IdentityTokenResponse = IdentityTokenResponse;

View File

@@ -1,4 +1,4 @@
class KeysResponse { export class KeysResponse {
privateKey: string; privateKey: string;
publicKey: string; publicKey: string;
@@ -7,6 +7,3 @@ class KeysResponse {
this.publicKey = response.PublicKey; this.publicKey = response.PublicKey;
} }
} }
export { KeysResponse };
(window as any).KeysResponse = KeysResponse;

View File

@@ -1,10 +1,7 @@
class ListResponse { export class ListResponse {
data: any; data: any;
constructor(data: any) { constructor(data: any) {
this.data = data; this.data = data;
} }
} }
export { ListResponse };
(window as any).ListResponse = ListResponse;

View File

@@ -1,4 +1,4 @@
class ProfileOrganizationResponse { export class ProfileOrganizationResponse {
id: string; id: string;
name: string; name: string;
useGroups: boolean; useGroups: boolean;
@@ -25,6 +25,3 @@ class ProfileOrganizationResponse {
this.type = response.Type; this.type = response.Type;
} }
} }
export { ProfileOrganizationResponse };
(window as any).ProfileOrganizationResponse = ProfileOrganizationResponse;

View File

@@ -1,6 +1,6 @@
import { ProfileOrganizationResponse } from './profileOrganizationResponse'; import { ProfileOrganizationResponse } from './profileOrganizationResponse';
class ProfileResponse { export class ProfileResponse {
id: string; id: string;
name: string; name: string;
email: string; email: string;
@@ -34,6 +34,3 @@ class ProfileResponse {
} }
} }
} }
export { ProfileResponse };
(window as any).ProfileResponse = ProfileResponse;

View File

@@ -4,7 +4,7 @@ import { DomainsResponse } from './domainsResponse';
import { FolderResponse } from './folderResponse'; import { FolderResponse } from './folderResponse';
import { ProfileResponse } from './profileResponse'; import { ProfileResponse } from './profileResponse';
class SyncResponse { export class SyncResponse {
profile?: ProfileResponse; profile?: ProfileResponse;
folders: FolderResponse[] = []; folders: FolderResponse[] = [];
collections: CollectionResponse[] = []; collections: CollectionResponse[] = [];
@@ -39,6 +39,3 @@ class SyncResponse {
} }
} }
} }
export { SyncResponse };
(window as any).SyncResponse = SyncResponse;