add missing types to models

This commit is contained in:
Kyle Spearrin 2017-11-13 16:21:45 -05:00
parent bed28aebaa
commit 4664c783f2
5 changed files with 17 additions and 7 deletions

View File

@ -1,5 +1,7 @@
import { FieldType } from '../../enums/fieldType.enum';
class FieldData { class FieldData {
type: number; // TODO: enum type: FieldType;
name: string; name: string;
value: string; value: string;

View File

@ -1,5 +1,7 @@
import { SecureNoteType } from '../../enums/secureNoteType.enum';
class SecureNoteData { class SecureNoteData {
type: number; // TODO: enum type: SecureNoteType;
constructor(data: any) { constructor(data: any) {
this.type = data.Type; this.type = data.Type;

View File

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

View File

@ -1,19 +1,21 @@
import { DeviceRequest } from './deviceRequest';
class TokenRequest { class TokenRequest {
email: string; email: string;
masterPasswordHash: string; masterPasswordHash: string;
token: string; token: string;
provider: number; provider: number;
remember: boolean; remember: boolean;
device?: any; device?: DeviceRequest;
constructor(email: string, masterPasswordHash: string, provider: number, constructor(email: string, masterPasswordHash: string, provider: number,
token: string, remember: boolean, device?: any) { token: string, remember: boolean, device?: DeviceRequest) {
this.email = email; this.email = email;
this.masterPasswordHash = masterPasswordHash; this.masterPasswordHash = masterPasswordHash;
this.token = token; this.token = token;
this.provider = provider; this.provider = provider;
this.remember = remember; this.remember = remember;
this.device = device ? device : null; this.device = device != null ? device : null;
} }
toIdentityToken() { toIdentityToken() {

View File

@ -1,8 +1,10 @@
import { BrowserType } from '../../enums/browserType.enum';
class DeviceResponse { class DeviceResponse {
id: string; id: string;
name: number; name: number;
identifier: string; identifier: string;
type: number; // TODO: Convert to enum type: BrowserType;
creationDate: string; creationDate: string;
constructor(response: any) { constructor(response: any) {