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';
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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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;

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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;

View File

@ -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;

View File

@ -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;