hububb-models 1.0.34 → 1.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -2
- package/src/index.d.ts +5 -5
- package/src/models/listing/listing.d.ts +91 -95
- package/src/models/reservation/reservation.d.ts +32 -33
- package/src/models/thread/message.d.ts +6 -11
- package/src/models/thread/message.ts +3 -6
- package/src/models/thread/thread.d.ts +15 -17
- package/src/models/thread/thread.ts +6 -5
- package/src/models/user/user.d.ts +23 -23
package/package.json
CHANGED
@@ -1,11 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"name": "hububb-models",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.36",
|
4
4
|
"description": "Models for Hububb application",
|
5
5
|
"main": "index.js",
|
6
6
|
"types": "./src/index.d.ts",
|
7
7
|
"scripts": {
|
8
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
9
|
+
"prepublishOnly": "tsc src/index.ts -d",
|
10
|
+
"build": "tsc src/index.ts -d"
|
9
11
|
},
|
10
12
|
"author": "Exelerate",
|
11
13
|
"license": "ISC",
|
package/src/index.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
export type { Listing, Picture, Address } from
|
2
|
-
|
3
|
-
export type {
|
4
|
-
export type {
|
5
|
-
export type {
|
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,107 +1,103 @@
|
|
1
1
|
import { Timestamp } from "@firebase/firestore-types";
|
2
|
-
|
3
2
|
export interface Listing {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
commissionTaxPrecentage?: string;
|
56
|
-
|
57
|
-
paymentProcessing?: {
|
58
|
-
active: boolean;
|
59
|
-
paymentProviders: {
|
60
|
-
stripe: {
|
3
|
+
id?: string;
|
4
|
+
guestyId?: string;
|
5
|
+
accountId?: string;
|
6
|
+
createdAt: Timestamp;
|
7
|
+
isVirtual?: boolean;
|
8
|
+
isListed: boolean;
|
9
|
+
title?: string;
|
10
|
+
propertyType?: string;
|
11
|
+
roomType?: string;
|
12
|
+
bedType?: string;
|
13
|
+
accommodates?: number;
|
14
|
+
bedrooms?: number;
|
15
|
+
bathrooms?: number;
|
16
|
+
beds?: number;
|
17
|
+
areaSquareFeet?: number;
|
18
|
+
address: Address;
|
19
|
+
publishedAddress?: {
|
20
|
+
full: string;
|
21
|
+
lng: number;
|
22
|
+
lat: number;
|
23
|
+
street: string;
|
24
|
+
city: string;
|
25
|
+
country: string;
|
26
|
+
};
|
27
|
+
timezone?: string;
|
28
|
+
defaultCheckInTime?: string;
|
29
|
+
defaultCheckOutTime?: string;
|
30
|
+
picture?: Picture;
|
31
|
+
pictures: Picture[];
|
32
|
+
amenities: string[];
|
33
|
+
terms: {
|
34
|
+
minNights: number;
|
35
|
+
maxNights: number;
|
36
|
+
cancellation: string;
|
37
|
+
};
|
38
|
+
prices: {
|
39
|
+
guestsIncludedInRegularFee: number;
|
40
|
+
extraPersonFee: number;
|
41
|
+
basePrice: number;
|
42
|
+
basePriceUSD: number;
|
43
|
+
monthlyPriceFactor: number;
|
44
|
+
weeklyPriceFactor: number;
|
45
|
+
weeendBasePrice: number;
|
46
|
+
securityDepositFee: number;
|
47
|
+
currency: string;
|
48
|
+
cleaningFee: number;
|
49
|
+
};
|
50
|
+
netIncomeFormula?: string;
|
51
|
+
commissionFormula?: string;
|
52
|
+
commissionTaxPrecentage?: string;
|
53
|
+
paymentProcessing?: {
|
61
54
|
active: boolean;
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
55
|
+
paymentProviders: {
|
56
|
+
stripe: {
|
57
|
+
active: boolean;
|
58
|
+
status: string;
|
59
|
+
accountName: string;
|
60
|
+
defaultCurrency: string;
|
61
|
+
syncedAt: Timestamp;
|
62
|
+
payload: {
|
63
|
+
id: string;
|
64
|
+
livemode: boolean;
|
65
|
+
token_type: string;
|
66
|
+
stripe_publishable_key: string;
|
67
|
+
stripe_user_id: string;
|
68
|
+
scope: string;
|
69
|
+
};
|
70
|
+
};
|
73
71
|
};
|
74
|
-
};
|
75
72
|
};
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
externalId?: string;
|
73
|
+
active: boolean;
|
74
|
+
publicDescription: any;
|
75
|
+
frontDoor?: Door;
|
76
|
+
mainDoor?: Door;
|
77
|
+
noAptKey?: boolean;
|
78
|
+
aptKey?: string;
|
79
|
+
keyMethod?: "unlock" | "open";
|
80
|
+
externalId?: string;
|
85
81
|
}
|
86
82
|
export interface Door {
|
87
|
-
|
88
|
-
|
83
|
+
id?: string;
|
84
|
+
method?: "unlock" | "open";
|
89
85
|
}
|
90
86
|
export interface Address {
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
87
|
+
full: string;
|
88
|
+
lng: number;
|
89
|
+
lat: number;
|
90
|
+
street: string;
|
91
|
+
city: string;
|
92
|
+
country: string;
|
97
93
|
}
|
98
94
|
export interface Picture {
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
95
|
+
regular?: string;
|
96
|
+
thumbnail?: string;
|
97
|
+
large?: string;
|
98
|
+
caption?: string;
|
99
|
+
original?: string;
|
100
|
+
height?: number;
|
101
|
+
size?: number;
|
102
|
+
width?: number;
|
107
103
|
}
|
@@ -1,37 +1,36 @@
|
|
1
1
|
import { Timestamp } from "@firebase/firestore-types";
|
2
|
-
|
3
2
|
export interface Reservation {
|
4
|
-
|
5
|
-
externalId?: string;
|
6
|
-
checkIn?: Timestamp;
|
7
|
-
checkOut?: Timestamp;
|
8
|
-
status?: string;
|
9
|
-
statusDescription?: string;
|
10
|
-
guest?: {
|
11
|
-
id?: string;
|
3
|
+
id: string;
|
12
4
|
externalId?: string;
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
5
|
+
checkIn?: Timestamp;
|
6
|
+
checkOut?: Timestamp;
|
7
|
+
status?: string;
|
8
|
+
statusDescription?: string;
|
9
|
+
guest?: {
|
10
|
+
id?: string;
|
11
|
+
externalId?: string;
|
12
|
+
fullName?: string;
|
13
|
+
email?: string;
|
14
|
+
};
|
15
|
+
listing?: {
|
16
|
+
id?: string;
|
17
|
+
externalId?: string;
|
18
|
+
title?: string;
|
19
|
+
};
|
20
|
+
klevio?: {
|
21
|
+
keyId?: string;
|
22
|
+
from?: Timestamp;
|
23
|
+
to?: Timestamp;
|
24
|
+
keyholderId?: string;
|
25
|
+
keyholderEmail?: string;
|
26
|
+
propertyId?: string;
|
27
|
+
};
|
28
|
+
refNumber?: string;
|
29
|
+
money?: any;
|
30
|
+
source?: string;
|
31
|
+
total?: number;
|
32
|
+
guests?: number;
|
33
|
+
adults?: number;
|
34
|
+
children?: number;
|
35
|
+
inboxId?: number;
|
37
36
|
}
|
@@ -1,14 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
interface
|
1
|
+
import { ChatMember } from './thread';
|
2
|
+
export interface ChatMessage {
|
3
3
|
id: string;
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
export interface Message {
|
8
|
-
id: string;
|
9
|
-
attachments: Attachment[];
|
4
|
+
threadId: string;
|
5
|
+
authorId: string;
|
6
|
+
author: ChatMember;
|
10
7
|
body: string;
|
11
8
|
contentType: string;
|
12
|
-
|
13
|
-
authorId: string;
|
14
|
-
}
|
9
|
+
}
|
@@ -1,13 +1,10 @@
|
|
1
1
|
import { ChatMember } from './thread';
|
2
2
|
|
3
|
-
type SeenBy = Record<string, number>;
|
4
|
-
|
5
3
|
export interface ChatMessage {
|
6
4
|
id: string;
|
7
5
|
threadId: string;
|
6
|
+
authorId: string;
|
8
7
|
author: ChatMember;
|
9
|
-
|
10
|
-
|
11
|
-
lastSeen?: number;
|
12
|
-
createdAt: number;
|
8
|
+
body: string;
|
9
|
+
contentType: string;
|
13
10
|
}
|
@@ -1,18 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
import { ChatMessage } from './message';
|
2
|
+
export interface ChatMember {
|
3
|
+
id: string;
|
4
|
+
avatar: string;
|
5
|
+
email?: string;
|
6
|
+
fullName: string;
|
7
|
+
}
|
8
|
+
export interface ChatThread {
|
9
|
+
id?: string;
|
10
|
+
messages: ChatMessage[];
|
11
|
+
lastMessage?: ChatMessage;
|
12
|
+
participantIds: string[];
|
13
|
+
participants?: ChatMember[];
|
14
|
+
type: 'ONE_TO_ONE' | 'GROUP';
|
15
|
+
unreadCount?: number;
|
9
16
|
}
|
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;
|
18
|
-
}
|
@@ -8,10 +8,11 @@ export interface ChatMember {
|
|
8
8
|
}
|
9
9
|
|
10
10
|
export interface ChatThread {
|
11
|
-
id
|
12
|
-
|
11
|
+
id?: string;
|
12
|
+
messages: ChatMessage[];
|
13
13
|
lastMessage?: ChatMessage;
|
14
|
-
|
15
|
-
|
16
|
-
|
14
|
+
participantIds: string[];
|
15
|
+
participants?: ChatMember[];
|
16
|
+
type: 'ONE_TO_ONE' | 'GROUP';
|
17
|
+
unreadCount?: number;
|
17
18
|
}
|
@@ -1,25 +1,25 @@
|
|
1
1
|
export interface User {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
2
|
+
id: string;
|
3
|
+
phoneNumber: string;
|
4
|
+
fullName: string;
|
5
|
+
email: string;
|
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
|
+
};
|
24
|
+
klevioId?: string;
|
25
25
|
}
|