hububb-models 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hububb-models",
3
- "version": "1.0.25",
3
+ "version": "1.0.27",
4
4
  "description": "Models for Hububb application",
5
5
  "main": "index.js",
6
6
  "types": "./src/index.d.ts",
@@ -80,6 +80,7 @@ export interface Listing {
80
80
  mainDoor?: string;
81
81
  noAptKey?: boolean;
82
82
  aptKey?: boolean;
83
+ keyMethod?: "unlock" | "open"
83
84
  }
84
85
  export interface Address {
85
86
  full: string;
@@ -80,6 +80,7 @@ export interface Listing {
80
80
  mainDoor?: string;
81
81
  noAptKey?: boolean;
82
82
  aptKey?: boolean;
83
+ keyMethod?: "unlock" | "open"
83
84
  }
84
85
  export interface Address {
85
86
  full: string;
@@ -1,10 +1,14 @@
1
1
  import { Timestamp } from "@firebase/firestore-types";
2
-
2
+ interface Attachment {
3
+ id: string;
4
+ url: string;
5
+ }
6
+
3
7
  export interface Message {
4
- id?:string,
5
- attachments?:any,
6
- authorId?:string,
7
- body?:string,
8
- contentType?:string,
9
- createdAt?:Timestamp
10
- }
8
+ id: string;
9
+ attachments: Attachment[];
10
+ body: string;
11
+ contentType: string;
12
+ createdAt: Timestamp;
13
+ authorId: string;
14
+ }
@@ -1,10 +1,15 @@
1
1
  import { Timestamp } from "@firebase/firestore-types";
2
2
 
3
- export interface Message {
4
- id?:string,
5
- attachments?:any,
6
- authorId?:string,
7
- body?:string,
8
- contentType?:string,
9
- createdAt?:Timestamp
10
- }
3
+ interface Attachment {
4
+ id: string;
5
+ url: string;
6
+ }
7
+
8
+ export interface Message {
9
+ id: string;
10
+ attachments: Attachment[];
11
+ body: string;
12
+ contentType: string;
13
+ createdAt: Timestamp;
14
+ authorId: string;
15
+ }
@@ -1,15 +1,18 @@
1
1
  import { Timestamp } from "@firebase/firestore-types"
2
+ import { Message } from "./message";
2
3
 
3
- export interface Thread {
4
- id?:string,
5
- lastMessage?:LastMessage,
6
- participantIds?:string[],
7
- type: "ONE_TO_ONE",
8
- unreadCount?:number
4
+ export interface Contact {
5
+ id: string;
6
+ avatar: string;
7
+ lastActivity?: number;
8
+ fullName: string;
9
9
  }
10
- interface LastMessage{
11
- authorId?:string,
12
- body?:string,
13
- contentType?:string,
14
- createdAt?:Timestamp
10
+ export interface Thread {
11
+ id?: string;
12
+ messages: Message[];
13
+ lastMessage?: Message;
14
+ participantIds: string[];
15
+ participants?: Contact[];
16
+ type: "ONE_TO_ONE" | "GROUP";
17
+ unreadCount?: number;
15
18
  }
@@ -1,15 +1,20 @@
1
1
  import { Timestamp } from "@firebase/firestore-types"
2
+ import { Message } from "./message";
2
3
 
3
- export interface Thread {
4
- id?:string,
5
- lastMessage?:LastMessage,
6
- participantIds?:string[],
7
- type: "ONE_TO_ONE",
8
- unreadCount?:number
4
+
5
+
6
+ export interface Contact {
7
+ id: string;
8
+ avatar: string;
9
+ lastActivity?: number;
10
+ fullName: string;
9
11
  }
10
- interface LastMessage{
11
- authorId?:string,
12
- body?:string,
13
- contentType?:string,
14
- createdAt?:Timestamp
12
+ export interface Thread {
13
+ id?: string;
14
+ messages: Message[];
15
+ lastMessage?: Message;
16
+ participantIds: string[];
17
+ participants?: Contact[];
18
+ type: "ONE_TO_ONE" | "GROUP";
19
+ unreadCount?: number;
15
20
  }