hububb-models 1.0.41 → 1.0.42
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/index.d.ts +5 -5
- package/src/index.ts +7 -5
- package/src/models/thread/thread.d.ts +13 -6
- package/src/models/thread/thread.ts +14 -13
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export type { Listing, Picture, Address } from
|
2
|
-
export type { Reservation } from
|
3
|
-
export type { User } from
|
4
|
-
export type { ChatMessage } from
|
5
|
-
export type { ChatThread } from
|
1
|
+
export type { Listing, Picture, Address } from "./models/listing/listing";
|
2
|
+
export type { Reservation } from "./models/reservation/reservation";
|
3
|
+
export type { User } from "./models/user/user";
|
4
|
+
export type { ChatMessage } from "./models/thread/message";
|
5
|
+
export type { ChatThread, UpdateChatThreadDTO } from "./models/thread/thread";
|
package/src/index.ts
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
export type { Listing, Picture, Address } from
|
1
|
+
export type { Listing, Picture, Address } from "./models/listing/listing";
|
2
2
|
|
3
|
-
export type { Reservation } from
|
4
|
-
|
5
|
-
export type {
|
6
|
-
|
3
|
+
export type { Reservation } from "./models/reservation/reservation";
|
4
|
+
|
5
|
+
export type { User } from "./models/user/user";
|
6
|
+
|
7
|
+
export type { ChatMessage } from "./models/thread/message";
|
8
|
+
export type { ChatThread, UpdateChatThreadDTO } from "./models/thread/thread";
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Timestamp } from
|
2
|
-
import { ChatMessage } from
|
3
|
-
import { User } from
|
1
|
+
import { Timestamp } from "@firebase/firestore-types";
|
2
|
+
import { ChatMessage } from "./message";
|
3
|
+
import { User } from "../user/user";
|
4
4
|
export interface ChatThread {
|
5
5
|
id?: string;
|
6
6
|
createdAt: Timestamp;
|
@@ -8,7 +8,14 @@ export interface ChatThread {
|
|
8
8
|
lastMessage?: ChatMessage;
|
9
9
|
participantIds: string[];
|
10
10
|
participants?: User[];
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
type: "ONE_TO_ONE" | "GROUP";
|
12
|
+
}
|
13
|
+
export interface UpdateChatThreadDTO {
|
14
|
+
id?: string;
|
15
|
+
createdAt: Timestamp;
|
16
|
+
updatedAt: Timestamp;
|
17
|
+
lastMessage?: Partial<ChatMessage>;
|
18
|
+
participantIds: string[];
|
19
|
+
participants?: User[];
|
20
|
+
type: "ONE_TO_ONE" | "GROUP";
|
14
21
|
}
|
@@ -1,13 +1,6 @@
|
|
1
|
-
import { Timestamp } from
|
2
|
-
import { ChatMessage } from
|
3
|
-
import { User } from
|
4
|
-
|
5
|
-
// export interface ChatMember {
|
6
|
-
// id: string;
|
7
|
-
// avatar: string;
|
8
|
-
// email?: string;
|
9
|
-
// fullName: string;
|
10
|
-
// }
|
1
|
+
import { Timestamp } from "@firebase/firestore-types";
|
2
|
+
import { ChatMessage } from "./message";
|
3
|
+
import { User } from "../user/user";
|
11
4
|
|
12
5
|
export interface ChatThread {
|
13
6
|
id?: string;
|
@@ -16,7 +9,15 @@ export interface ChatThread {
|
|
16
9
|
lastMessage?: ChatMessage;
|
17
10
|
participantIds: string[];
|
18
11
|
participants?: User[];
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
type: "ONE_TO_ONE" | "GROUP";
|
13
|
+
}
|
14
|
+
|
15
|
+
export interface UpdateChatThreadDTO {
|
16
|
+
id?: string;
|
17
|
+
createdAt: Timestamp;
|
18
|
+
updatedAt: Timestamp;
|
19
|
+
lastMessage?: Partial<ChatMessage>;
|
20
|
+
participantIds: string[];
|
21
|
+
participants?: User[];
|
22
|
+
type: "ONE_TO_ONE" | "GROUP";
|
22
23
|
}
|