hububb-models 1.0.21 → 1.0.23

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.21",
3
+ "version": "1.0.23",
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,4 +1,5 @@
1
1
  export type { Listing, Picture, Address } from "./models/listing";
2
2
 
3
3
  export type { Reservation } from "./models/reservation";
4
- export type { User } from "./models/user";
4
+ export type { User } from "./models/user"
5
+ export type {Thread, Message} from "./models/thread"
package/src/index.ts CHANGED
@@ -2,3 +2,5 @@ export type { Listing, Picture, Address } from "./models/listing/listing";
2
2
 
3
3
  export type { Reservation } from "./models/reservation/reservation";
4
4
  export type { User } from "./models/user/user";
5
+ export type { Message } from "./models/thread/message";
6
+ export type { Thread } from "./models/thread/thread";
@@ -0,0 +1,10 @@
1
+ import { Timestamp } from "@firebase/firestore-types";
2
+
3
+ export interface Message {
4
+ id?:string,
5
+ attachments?:any,
6
+ authorId?:string,
7
+ body?:string,
8
+ contentType?:string,
9
+ createdAt?:Timestamp
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -0,0 +1,10 @@
1
+ import { Timestamp } from "@firebase/firestore-types";
2
+
3
+ export interface Message {
4
+ id?:string,
5
+ attachments?:any,
6
+ authorId?:string,
7
+ body?:string,
8
+ contentType?:string,
9
+ createdAt?:Timestamp
10
+ }
@@ -0,0 +1,15 @@
1
+ import { Timestamp } from "@firebase/firestore-types"
2
+
3
+ export interface Thread {
4
+ id?:string,
5
+ lastMessage?:LastMessage,
6
+ participantIds?:string[],
7
+ type: "ONE_TO_ONE",
8
+ unreadCount?:number
9
+ }
10
+ interface LastMessage{
11
+ authorId?:string,
12
+ body?:string,
13
+ contentType?:string,
14
+ createdAt?:Timestamp
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ exports.__esModule = true;
@@ -0,0 +1,15 @@
1
+ import { Timestamp } from "@firebase/firestore-types"
2
+
3
+ export interface Thread {
4
+ id?:string,
5
+ lastMessage?:LastMessage,
6
+ participantIds?:string[],
7
+ type: "ONE_TO_ONE",
8
+ unreadCount?:number
9
+ }
10
+ interface LastMessage{
11
+ authorId?:string,
12
+ body?:string,
13
+ contentType?:string,
14
+ createdAt?:Timestamp
15
+ }