mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-20 11:25:37 +01:00
add missing types to models
This commit is contained in:
parent
bed28aebaa
commit
4664c783f2
@ -1,5 +1,7 @@
|
||||
import { FieldType } from '../../enums/fieldType.enum';
|
||||
|
||||
class FieldData {
|
||||
type: number; // TODO: enum
|
||||
type: FieldType;
|
||||
name: string;
|
||||
value: string;
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
import { SecureNoteType } from '../../enums/secureNoteType.enum';
|
||||
|
||||
class SecureNoteData {
|
||||
type: number; // TODO: enum
|
||||
type: SecureNoteType;
|
||||
|
||||
constructor(data: any) {
|
||||
this.type = data.Type;
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { Folder } from '../domain/folder';
|
||||
|
||||
class FolderRequest {
|
||||
name: string;
|
||||
|
||||
constructor(folder: any) { // TODO: folder type
|
||||
constructor(folder: Folder) {
|
||||
this.name = folder.name ? folder.name.encryptedString : null;
|
||||
}
|
||||
}
|
||||
|
@ -1,19 +1,21 @@
|
||||
import { DeviceRequest } from './deviceRequest';
|
||||
|
||||
class TokenRequest {
|
||||
email: string;
|
||||
masterPasswordHash: string;
|
||||
token: string;
|
||||
provider: number;
|
||||
remember: boolean;
|
||||
device?: any;
|
||||
device?: DeviceRequest;
|
||||
|
||||
constructor(email: string, masterPasswordHash: string, provider: number,
|
||||
token: string, remember: boolean, device?: any) {
|
||||
token: string, remember: boolean, device?: DeviceRequest) {
|
||||
this.email = email;
|
||||
this.masterPasswordHash = masterPasswordHash;
|
||||
this.token = token;
|
||||
this.provider = provider;
|
||||
this.remember = remember;
|
||||
this.device = device ? device : null;
|
||||
this.device = device != null ? device : null;
|
||||
}
|
||||
|
||||
toIdentityToken() {
|
||||
|
@ -1,8 +1,10 @@
|
||||
import { BrowserType } from '../../enums/browserType.enum';
|
||||
|
||||
class DeviceResponse {
|
||||
id: string;
|
||||
name: number;
|
||||
identifier: string;
|
||||
type: number; // TODO: Convert to enum
|
||||
type: BrowserType;
|
||||
creationDate: string;
|
||||
|
||||
constructor(response: any) {
|
||||
|
Loading…
Reference in New Issue
Block a user