beginnings of refactor
This commit is contained in:
parent
ac8f338d75
commit
3b5da6124f
63 changed files with 1697 additions and 2656 deletions
73
src/types.ts
73
src/types.ts
|
|
@ -1,76 +1,37 @@
|
|||
export interface RenderMessage {
|
||||
content: {
|
||||
text: boolean | string;
|
||||
audio: boolean | string;
|
||||
};
|
||||
context: string;
|
||||
modifier: string;
|
||||
interface Message {
|
||||
text: boolean | string;
|
||||
context: boolean | string;
|
||||
audio: boolean | string;
|
||||
type: 1 | 2 | 3;
|
||||
time: number;
|
||||
uid: string;
|
||||
isChild: string;
|
||||
}
|
||||
|
||||
interface ViewMessage extends Message {
|
||||
child: string;
|
||||
seen: boolean;
|
||||
newMessage: boolean;
|
||||
}
|
||||
|
||||
export interface ClientMessage {
|
||||
text: string;
|
||||
audio: boolean | string;
|
||||
uid: string;
|
||||
}
|
||||
|
||||
export interface ClientRequest {
|
||||
intent: string;
|
||||
params: object;
|
||||
epic: string | boolean;
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
export interface SessionState {
|
||||
key: string | boolean;
|
||||
newMessages: RenderMessage[];
|
||||
}
|
||||
|
||||
export interface WindowState {
|
||||
interface WindowState {
|
||||
width: number;
|
||||
height: number;
|
||||
x: number | null;
|
||||
y: number | null;
|
||||
}
|
||||
|
||||
export interface AuthRequest {
|
||||
key: boolean | string;
|
||||
usr: boolean | string;
|
||||
pwd: boolean | string;
|
||||
}
|
||||
|
||||
export interface Profile {
|
||||
interface Profile {
|
||||
crimataId: string;
|
||||
alias: string;
|
||||
initials: string;
|
||||
}
|
||||
|
||||
export interface AuthProtocol {
|
||||
token: null | string;
|
||||
profile: null | Profile;
|
||||
password?: string;
|
||||
email?: string;
|
||||
interface State {
|
||||
profile: Profile | null;
|
||||
messages
|
||||
}
|
||||
|
||||
export interface LogoutRequest {
|
||||
logout: boolean;
|
||||
}
|
||||
|
||||
export interface Annotation {
|
||||
text: string;
|
||||
context: string;
|
||||
uid: string;
|
||||
}
|
||||
|
||||
export interface StandardMessage {
|
||||
content: {
|
||||
text: boolean | string;
|
||||
audio: boolean | string;
|
||||
};
|
||||
context: string;
|
||||
modifier: string;
|
||||
interface LoginPayload {
|
||||
email: string;
|
||||
password: string;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue