Files
doneit-web/src/app/models/chatMethod.ts
T

390 lines
5.3 KiB
TypeScript
Raw Normal View History

2022-01-13 10:55:40 +01:00
interface Ts {
2022-01-13 10:52:03 +01:00
$date: any;
}
2022-01-13 10:55:40 +01:00
interface U {
2022-01-13 10:52:03 +01:00
_id: string;
username: string;
name: string;
}
interface UpdatedAt {
$date: any;
}
interface Attachment {
ts: Date;
title_link_download: boolean;
}
export interface File {
type: string;
guid: string;
image_url: string;
subject: string;
start_date?: Date;
end_date?: Date;
venue: string;
id: string;
}
interface EditedAt {
$date: number;
}
interface EditedBy {
_id: string;
username: string;
}
interface Ts2 {
$date: number;
}
interface U2 {
_id: string;
username: string;
name: string;
}
interface UpdatedAt2 {
$date: number;
}
interface FirstUnread {
_id: string;
rid: string;
msg: string;
ts: Ts2;
u: U2;
2022-02-02 20:16:12 +01:00
_updatedAt: string;
2022-01-13 10:52:03 +01:00
mentions: any[];
channels: any[];
}
export interface Message {
2022-01-13 21:24:43 +01:00
customFields:any;
2022-01-13 10:52:03 +01:00
_id: string;
2022-03-10 23:08:29 +01:00
id: null | string;
2022-01-13 10:52:03 +01:00
rid: string;
msg: string;
ts: Ts;
2022-12-26 17:04:20 +01:00
sendAttempt?: number
2022-01-13 10:52:03 +01:00
u: U;
2022-09-29 16:43:32 +01:00
from: 'Offline'|'History'|'stream'| 'send'
t: string;
2023-01-24 15:56:47 +01:00
origin: 'history' | 'stream' | 'local'
2022-02-02 20:16:12 +01:00
_updatedAt: '';
2022-01-13 10:52:03 +01:00
mentions: any[];
channels: any[];
attachments: Attachment[];
file: File;
editedAt: EditedAt;
editedBy: EditedBy;
urls: any[];
2022-02-07 15:51:21 +01:00
temporaryData: object
2022-03-03 22:57:33 +01:00
localReference?: string,
viewed: string[],
received: string[],
2022-03-15 15:49:59 +01:00
delate: boolean,
delateRequest: boolean
2023-06-29 16:04:44 +01:00
attachmentsModelData: {
fileBase64: string
}
hasFile: boolean
2023-08-20 00:26:24 +01:00
UploadAttachmentsTemp: number
2022-01-13 10:52:03 +01:00
}
2022-01-13 11:55:21 +01:00
export interface Lm {
$date: any;
}
export interface LastMessage {
_id: string;
rid: string;
msg: string;
ts: Ts;
u: U;
_updatedAt: UpdatedAt2;
mentions: any[];
channels: any[];
file: File;
attachments: Attachment[];
}
export interface CustomFields {
}
export interface Update {
_id: string;
t: string;
usernames: string[];
usersCount: number;
uids: string[];
default: boolean;
ro: boolean;
sysMes: boolean;
_updatedAt: UpdatedAt;
lm: Lm;
lastMessage: LastMessage;
name: string;
fname: string;
u: U2;
customFields: CustomFields;
}
export interface DeletedAt {
$date: any;
}
export interface Remove {
_id: string;
_deletedAt: DeletedAt;
}
export interface Result {
update: Update[];
remove: Remove[];
}
export interface Rooms {
msg: string;
id: string;
result: Result;
}
2022-01-13 10:52:03 +01:00
export interface ChatMessage {
msg: string;
id: string;
result: Message
}
export interface chatHistory {
msg: string;
id: string;
result: {
messages: Message[];
firstUnread: FirstUnread;
unreadNotLoaded: number;
};
}
2022-01-29 19:21:46 +01:00
interface Ts {
2022-03-03 22:57:33 +01:00
$date: any;
2022-01-29 19:21:46 +01:00
}
interface U {
2022-03-03 22:57:33 +01:00
_id: string;
username: string;
name: string;
2022-01-29 19:21:46 +01:00
}
interface UpdatedAt {
2022-03-03 22:57:33 +01:00
$date: any;
2022-01-29 19:21:46 +01:00
}
interface Attachment {
2022-03-03 22:57:33 +01:00
ts: Date;
title_link_download: boolean;
2022-01-29 19:21:46 +01:00
}
export interface File {
2022-03-03 22:57:33 +01:00
type: string;
guid: string;
image_url: string;
subject: string;
start_date?: Date;
end_date?: Date;
venue: string;
id: string;
2022-01-29 19:21:46 +01:00
}
interface EditedAt {
2022-03-03 22:57:33 +01:00
$date: number;
2022-01-29 19:21:46 +01:00
}
interface EditedBy {
2022-03-03 22:57:33 +01:00
_id: string;
username: string;
2022-01-29 19:21:46 +01:00
}
interface Ts2 {
2022-03-03 22:57:33 +01:00
$date: number;
2022-01-29 19:21:46 +01:00
}
interface U2 {
2022-03-03 22:57:33 +01:00
_id: string;
username: string;
name: string;
2022-01-29 19:21:46 +01:00
}
interface UpdatedAt2 {
2022-03-03 22:57:33 +01:00
$date: number;
2022-01-29 19:21:46 +01:00
}
interface FirstUnread {
2022-03-03 22:57:33 +01:00
_id: string;
rid: string;
msg: string;
ts: Ts2;
u: U2;
_updatedAt: string;
mentions: any[];
channels: any[];
2022-01-29 19:21:46 +01:00
}
export interface Message {
2022-03-03 22:57:33 +01:00
customFields:any;
_id: string;
rid: string;
msg: string;
ts: Ts;
u: U;
t: string;
_updatedAt: '';
mentions: any[];
channels: any[];
attachments: Attachment[];
file: File;
editedAt: EditedAt;
editedBy: EditedBy;
urls: any[];
2022-01-29 19:21:46 +01:00
}
export interface Lm {
2022-03-03 22:57:33 +01:00
$date: any;
2022-01-29 19:21:46 +01:00
}
export interface LastMessage {
2022-03-03 22:57:33 +01:00
_id: string;
rid: string;
msg: string;
ts: Ts;
u: U;
_updatedAt: UpdatedAt2;
mentions: any[];
channels: any[];
file: File;
attachments: Attachment[];
2022-01-29 19:21:46 +01:00
}
export interface CustomFields {
}
export interface Update {
2022-03-03 22:57:33 +01:00
_id: string;
t: string;
usernames: string[];
usersCount: number;
uids: string[];
default: boolean;
ro: boolean;
sysMes: boolean;
_updatedAt: UpdatedAt;
lm: Lm;
lastMessage: LastMessage;
name: string;
fname: string;
u: U2;
customFields: CustomFields;
2022-01-29 19:21:46 +01:00
}
export interface DeletedAt {
2022-03-03 22:57:33 +01:00
$date: any;
2022-01-29 19:21:46 +01:00
}
export interface Remove {
2022-03-03 22:57:33 +01:00
_id: string;
_deletedAt: DeletedAt;
2022-01-29 19:21:46 +01:00
}
export interface Result {
2022-03-03 22:57:33 +01:00
update: Update[];
remove: Remove[];
2022-01-29 19:21:46 +01:00
}
export interface Rooms {
2022-03-03 22:57:33 +01:00
msg: string;
id: string;
result: Result;
2022-01-29 19:21:46 +01:00
}
export interface ChatMessage {
2022-03-03 22:57:33 +01:00
msg: string;
id: string;
result: Message
2022-01-29 19:21:46 +01:00
}
export interface chatHistory {
2022-03-03 22:57:33 +01:00
msg: string;
id: string;
result: {
messages: Message[];
firstUnread: FirstUnread;
unreadNotLoaded: number;
};
2022-01-29 19:21:46 +01:00
}
export interface chatUser {
2022-03-03 22:57:33 +01:00
_id: string;
createdAt: Date;
emails: {
address: string;
verified: boolean;
}
type: string;
status: 'online' | 'offline' | 'away' | 'busy' ;
active: boolean;
_updatedAt: Date;
roles: string[];
name: string;
lastLogin: Date;
statusConnection: string;
utcOffset: number;
username: string;
__rooms: string[];
requirePasswordChange?: boolean;
settings: {
preferences: {
language: string;
};
};
nickname: string;
statusText: string;
banners: any;
statusDefault: string;
language: string;
avatarOrigin: string;
avatarETag?: any;
2022-01-29 19:21:46 +01:00
}