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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Models for Hububb application",
5
5
  "main": "index.js",
6
6
  "types": "./src/index.d.ts",
package/src/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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 } from './models/thread/thread';
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 './models/listing/listing';
1
+ export type { Listing, Picture, Address } from "./models/listing/listing";
2
2
 
3
- export type { Reservation } from './models/reservation/reservation';
4
- export type { User } from './models/user/user';
5
- export type { ChatMessage } from './models/thread/message';
6
- export type { ChatThread } from './models/thread/thread';
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 '@firebase/firestore-types';
2
- import { ChatMessage } from './message';
3
- import { User } from '../user/user';
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
- messages: ChatMessage[];
12
- type: 'ONE_TO_ONE' | 'GROUP';
13
- unreadCount?: number;
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 '@firebase/firestore-types';
2
- import { ChatMessage } from './message';
3
- import { User } from '../user/user';
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
- messages: ChatMessage[];
20
- type: 'ONE_TO_ONE' | 'GROUP';
21
- unreadCount?: number;
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
  }