hububb-models 1.0.39 → 1.0.41
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
import { Timestamp } from '@firebase/firestore-types';
|
2
|
-
import {
|
2
|
+
import { User } from '../user/user';
|
3
3
|
declare type SeenBy = Record<string, Timestamp>;
|
4
4
|
export interface ChatMessage {
|
5
5
|
id: string;
|
6
6
|
createdAt: Timestamp;
|
7
7
|
threadId: string;
|
8
8
|
authorId: string;
|
9
|
-
author
|
9
|
+
author?: User;
|
10
10
|
contentType: string;
|
11
11
|
body: string;
|
12
12
|
seen: SeenBy;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Timestamp } from '@firebase/firestore-types';
|
2
|
-
import {
|
2
|
+
import { User } from '../user/user';
|
3
3
|
|
4
4
|
declare type SeenBy = Record<string, Timestamp>;
|
5
5
|
|
@@ -8,7 +8,7 @@ export interface ChatMessage {
|
|
8
8
|
createdAt: Timestamp;
|
9
9
|
threadId: string;
|
10
10
|
authorId: string;
|
11
|
-
author
|
11
|
+
author?: User;
|
12
12
|
contentType: string;
|
13
13
|
body: string;
|
14
14
|
seen: SeenBy;
|
@@ -1,18 +1,13 @@
|
|
1
1
|
import { Timestamp } from '@firebase/firestore-types';
|
2
2
|
import { ChatMessage } from './message';
|
3
|
-
|
4
|
-
id: string;
|
5
|
-
avatar: string;
|
6
|
-
email?: string;
|
7
|
-
fullName: string;
|
8
|
-
}
|
3
|
+
import { User } from '../user/user';
|
9
4
|
export interface ChatThread {
|
10
5
|
id?: string;
|
11
6
|
createdAt: Timestamp;
|
12
7
|
updatedAt: Timestamp;
|
13
8
|
lastMessage?: ChatMessage;
|
14
9
|
participantIds: string[];
|
15
|
-
participants?:
|
10
|
+
participants?: User[];
|
16
11
|
messages: ChatMessage[];
|
17
12
|
type: 'ONE_TO_ONE' | 'GROUP';
|
18
13
|
unreadCount?: number;
|
@@ -1,12 +1,13 @@
|
|
1
1
|
import { Timestamp } from '@firebase/firestore-types';
|
2
2
|
import { ChatMessage } from './message';
|
3
|
+
import { User } from '../user/user';
|
3
4
|
|
4
|
-
export interface ChatMember {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
5
|
+
// export interface ChatMember {
|
6
|
+
// id: string;
|
7
|
+
// avatar: string;
|
8
|
+
// email?: string;
|
9
|
+
// fullName: string;
|
10
|
+
// }
|
10
11
|
|
11
12
|
export interface ChatThread {
|
12
13
|
id?: string;
|
@@ -14,7 +15,7 @@ export interface ChatThread {
|
|
14
15
|
updatedAt: Timestamp;
|
15
16
|
lastMessage?: ChatMessage;
|
16
17
|
participantIds: string[];
|
17
|
-
participants?:
|
18
|
+
participants?: User[];
|
18
19
|
messages: ChatMessage[];
|
19
20
|
type: 'ONE_TO_ONE' | 'GROUP';
|
20
21
|
unreadCount?: number;
|
package/src/models/user/user.ts
CHANGED
@@ -3,23 +3,23 @@ export interface User {
|
|
3
3
|
phoneNumber: string;
|
4
4
|
fullName: string;
|
5
5
|
email: string;
|
6
|
-
verified?:boolean;
|
7
|
-
kyc?:{
|
8
|
-
verified?:boolean
|
9
|
-
state?: 'processing'| 'success' |
|
10
|
-
declinedReason?:string
|
11
|
-
form:{
|
12
|
-
firstName?:string
|
13
|
-
lastName?:string
|
14
|
-
dob?:string
|
15
|
-
document?:string
|
16
|
-
face?:string
|
17
|
-
country?:{
|
18
|
-
code?:string;
|
19
|
-
name?:string;
|
20
|
-
}
|
21
|
-
documentType?:string
|
22
|
-
}
|
6
|
+
verified?: boolean;
|
7
|
+
kyc?: {
|
8
|
+
verified?: boolean;
|
9
|
+
state?: 'processing' | 'success' | 'declined';
|
10
|
+
declinedReason?: string;
|
11
|
+
form: {
|
12
|
+
firstName?: string;
|
13
|
+
lastName?: string;
|
14
|
+
dob?: string;
|
15
|
+
document?: string;
|
16
|
+
face?: string;
|
17
|
+
country?: {
|
18
|
+
code?: string;
|
19
|
+
name?: string;
|
20
|
+
};
|
21
|
+
documentType?: string;
|
22
|
+
};
|
23
23
|
};
|
24
24
|
klevioId?: string;
|
25
25
|
}
|