@rentbase/common 1.0.11 → 1.0.13
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.
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export interface ChatSessionCreatedEvent {
|
|
6
6
|
session_id: string;
|
|
7
|
-
session_type: "trip" | "support" | "system";
|
|
7
|
+
session_type: "property" | "trip" | "support" | "system";
|
|
8
|
+
property_id?: string;
|
|
8
9
|
trip_id?: string;
|
|
9
10
|
seat_booking_id?: string;
|
|
11
|
+
tenant_auth_user_id?: string;
|
|
12
|
+
landlord_auth_user_id?: string;
|
|
10
13
|
rider_auth_user_id?: string;
|
|
11
14
|
driver_auth_user_id?: string;
|
|
12
15
|
participant_count: number;
|
|
@@ -14,6 +17,7 @@ export interface ChatSessionCreatedEvent {
|
|
|
14
17
|
}
|
|
15
18
|
export interface ChatSessionClosedEvent {
|
|
16
19
|
session_id: string;
|
|
20
|
+
property_id?: string;
|
|
17
21
|
trip_id?: string;
|
|
18
22
|
closed_by_auth_user_id?: string;
|
|
19
23
|
reason?: string;
|
|
@@ -23,17 +27,19 @@ export interface ChatSessionClosedEvent {
|
|
|
23
27
|
}
|
|
24
28
|
export interface ChatParticipantMutedEvent {
|
|
25
29
|
session_id: string;
|
|
30
|
+
property_id?: string;
|
|
26
31
|
auth_user_id: string;
|
|
27
|
-
role: "rider" | "driver" | "support_agent";
|
|
32
|
+
role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
|
|
28
33
|
muted: boolean;
|
|
29
34
|
muted_at: string;
|
|
30
35
|
}
|
|
31
36
|
export interface MessageSentEvent {
|
|
32
37
|
message_id: string;
|
|
33
38
|
session_id: string;
|
|
39
|
+
property_id?: string;
|
|
34
40
|
trip_id?: string;
|
|
35
41
|
sender_auth_user_id: string;
|
|
36
|
-
sender_role: "rider" | "driver" | "support_agent";
|
|
42
|
+
sender_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
|
|
37
43
|
message_type: "text" | "image" | "audio" | "system";
|
|
38
44
|
has_attachments: boolean;
|
|
39
45
|
attachment_count: number;
|
|
@@ -44,11 +50,13 @@ export interface MessageSentEvent {
|
|
|
44
50
|
export interface MessageDeliveredEvent {
|
|
45
51
|
message_id: string;
|
|
46
52
|
session_id: string;
|
|
53
|
+
property_id?: string;
|
|
47
54
|
recipient_auth_user_id: string;
|
|
48
55
|
delivered_at: string;
|
|
49
56
|
}
|
|
50
57
|
export interface MessageReadEvent {
|
|
51
58
|
session_id: string;
|
|
59
|
+
property_id?: string;
|
|
52
60
|
reader_auth_user_id: string;
|
|
53
61
|
last_read_message_id: string;
|
|
54
62
|
unread_count_before: number;
|
|
@@ -57,6 +65,7 @@ export interface MessageReadEvent {
|
|
|
57
65
|
export interface SystemMessageAddedEvent {
|
|
58
66
|
message_id: string;
|
|
59
67
|
session_id: string;
|
|
68
|
+
property_id?: string;
|
|
60
69
|
trip_id?: string;
|
|
61
70
|
system_event_key: string;
|
|
62
71
|
message_text: string;
|
|
@@ -64,12 +73,13 @@ export interface SystemMessageAddedEvent {
|
|
|
64
73
|
}
|
|
65
74
|
export interface CallInitiatedEvent {
|
|
66
75
|
call_session_id: string;
|
|
76
|
+
property_id?: string;
|
|
67
77
|
trip_id?: string;
|
|
68
78
|
chat_session_id?: string;
|
|
69
79
|
caller_auth_user_id: string;
|
|
70
|
-
caller_role: "rider" | "driver" | "support_agent";
|
|
80
|
+
caller_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
|
|
71
81
|
callee_auth_user_id: string;
|
|
72
|
-
callee_role: "rider" | "driver" | "support_agent";
|
|
82
|
+
callee_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
|
|
73
83
|
call_type: "audio" | "video";
|
|
74
84
|
provider_name: string;
|
|
75
85
|
provider_room_id: string;
|
|
@@ -2,7 +2,18 @@
|
|
|
2
2
|
* Property Event Types for Property Marketplace
|
|
3
3
|
*/
|
|
4
4
|
export declare enum PropertyType {
|
|
5
|
+
ROOM = "room",
|
|
6
|
+
BOARDING_ROOM = "boarding_room",
|
|
7
|
+
COTTAGE = "cottage",
|
|
8
|
+
FLAT = "flat",
|
|
5
9
|
HOUSE = "house",
|
|
10
|
+
SHORT_STAY = "short_stay",
|
|
11
|
+
RESIDENTIAL_STAND = "residential_stand",
|
|
12
|
+
COMMERCIAL_STAND = "commercial_stand",
|
|
13
|
+
HOUSE_FOR_SALE = "house_for_sale",
|
|
14
|
+
FARM = "farm",
|
|
15
|
+
PLOT = "plot",
|
|
16
|
+
INDUSTRIAL_PROPERTY = "industrial_property",
|
|
6
17
|
APARTMENT = "apartment",
|
|
7
18
|
CONDO = "condo",
|
|
8
19
|
TOWNHOUSE = "townhouse",
|
|
@@ -15,8 +26,19 @@ export declare enum PropertyType {
|
|
|
15
26
|
PARKING = "parking",
|
|
16
27
|
OTHER = "other"
|
|
17
28
|
}
|
|
29
|
+
export declare enum PropertyCategory {
|
|
30
|
+
RENTAL = "rental",
|
|
31
|
+
SALE = "sale"
|
|
32
|
+
}
|
|
18
33
|
export declare enum PropertyStatus {
|
|
19
34
|
DRAFT = "draft",
|
|
35
|
+
PENDING_VERIFICATION = "pending_verification",
|
|
36
|
+
PUBLISHED = "published",
|
|
37
|
+
RESERVED = "reserved",
|
|
38
|
+
OCCUPIED = "occupied",
|
|
39
|
+
UNLISTED = "unlisted",
|
|
40
|
+
REJECTED = "rejected",
|
|
41
|
+
EXPIRED = "expired",
|
|
20
42
|
ACTIVE = "active",
|
|
21
43
|
INACTIVE = "inactive",
|
|
22
44
|
RENTED = "rented",
|
|
@@ -28,6 +50,31 @@ export declare enum ListingType {
|
|
|
28
50
|
FOR_SALE = "for_sale",
|
|
29
51
|
BOTH = "both"
|
|
30
52
|
}
|
|
53
|
+
export interface PropertyPricing {
|
|
54
|
+
amount: number;
|
|
55
|
+
currency: string;
|
|
56
|
+
period?: "monthly" | "weekly" | "daily";
|
|
57
|
+
deposit?: number;
|
|
58
|
+
negotiable?: boolean;
|
|
59
|
+
minPrice?: number;
|
|
60
|
+
}
|
|
61
|
+
export interface PropertyLocation {
|
|
62
|
+
address: string;
|
|
63
|
+
city?: string;
|
|
64
|
+
cityId?: string;
|
|
65
|
+
cityName?: string;
|
|
66
|
+
country?: string;
|
|
67
|
+
countryId?: string;
|
|
68
|
+
countryCode: string;
|
|
69
|
+
coordinates?: {
|
|
70
|
+
lat: number;
|
|
71
|
+
lng: number;
|
|
72
|
+
};
|
|
73
|
+
lat?: number;
|
|
74
|
+
lng?: number;
|
|
75
|
+
neighbourhood?: string;
|
|
76
|
+
landmark?: string;
|
|
77
|
+
}
|
|
31
78
|
export declare enum OfferStatus {
|
|
32
79
|
PENDING = "pending",
|
|
33
80
|
ACCEPTED = "accepted",
|
|
@@ -51,90 +98,107 @@ export declare enum AgreementStatus {
|
|
|
51
98
|
}
|
|
52
99
|
export interface PropertyCreatedEvent {
|
|
53
100
|
id: string;
|
|
54
|
-
|
|
101
|
+
ownerAuthUserId?: string;
|
|
102
|
+
landlordId?: string;
|
|
55
103
|
title: string;
|
|
56
104
|
description: string;
|
|
57
105
|
propertyType: PropertyType;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
countryCode: string;
|
|
65
|
-
coordinates: {
|
|
66
|
-
lat: number;
|
|
67
|
-
lng: number;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
price: number;
|
|
71
|
-
currency: string;
|
|
106
|
+
category?: PropertyCategory;
|
|
107
|
+
listingType?: ListingType;
|
|
108
|
+
location: PropertyLocation;
|
|
109
|
+
pricing?: PropertyPricing;
|
|
110
|
+
price?: number;
|
|
111
|
+
currency?: string;
|
|
72
112
|
bedrooms?: number;
|
|
73
113
|
bathrooms?: number;
|
|
74
114
|
areaSize?: number;
|
|
75
115
|
areaUnit?: string;
|
|
76
116
|
images: string[];
|
|
117
|
+
imagesDetailed?: Array<{
|
|
118
|
+
url: string;
|
|
119
|
+
caption?: string;
|
|
120
|
+
isPrimary?: boolean;
|
|
121
|
+
order?: number;
|
|
122
|
+
category?: string;
|
|
123
|
+
width?: number;
|
|
124
|
+
height?: number;
|
|
125
|
+
fileSize?: number;
|
|
126
|
+
uploadedAt?: string | Date;
|
|
127
|
+
}>;
|
|
77
128
|
amenities: string[];
|
|
78
129
|
status: PropertyStatus;
|
|
79
130
|
allowNegotiation: boolean;
|
|
80
131
|
minimumOfferPrice?: number;
|
|
81
|
-
|
|
82
|
-
|
|
132
|
+
favoritesCount?: number;
|
|
133
|
+
viewsCount?: number;
|
|
134
|
+
verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
|
|
135
|
+
createdAt: string | Date;
|
|
136
|
+
updatedAt: string | Date;
|
|
83
137
|
}
|
|
84
138
|
export interface PropertyUpdatedEvent {
|
|
85
139
|
id: string;
|
|
86
|
-
|
|
140
|
+
ownerAuthUserId?: string;
|
|
141
|
+
landlordId?: string;
|
|
87
142
|
title: string;
|
|
88
143
|
description: string;
|
|
89
144
|
propertyType: PropertyType;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
countryCode: string;
|
|
97
|
-
coordinates: {
|
|
98
|
-
lat: number;
|
|
99
|
-
lng: number;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
price: number;
|
|
103
|
-
currency: string;
|
|
145
|
+
category?: PropertyCategory;
|
|
146
|
+
listingType?: ListingType;
|
|
147
|
+
location: PropertyLocation;
|
|
148
|
+
pricing?: PropertyPricing;
|
|
149
|
+
price?: number;
|
|
150
|
+
currency?: string;
|
|
104
151
|
bedrooms?: number;
|
|
105
152
|
bathrooms?: number;
|
|
106
153
|
areaSize?: number;
|
|
107
154
|
areaUnit?: string;
|
|
108
155
|
images: string[];
|
|
156
|
+
imagesDetailed?: Array<{
|
|
157
|
+
url: string;
|
|
158
|
+
caption?: string;
|
|
159
|
+
isPrimary?: boolean;
|
|
160
|
+
order?: number;
|
|
161
|
+
category?: string;
|
|
162
|
+
width?: number;
|
|
163
|
+
height?: number;
|
|
164
|
+
fileSize?: number;
|
|
165
|
+
uploadedAt?: string | Date;
|
|
166
|
+
}>;
|
|
109
167
|
amenities: string[];
|
|
110
168
|
status: PropertyStatus;
|
|
111
169
|
allowNegotiation: boolean;
|
|
112
170
|
minimumOfferPrice?: number;
|
|
113
|
-
|
|
171
|
+
favoritesCount?: number;
|
|
172
|
+
viewsCount?: number;
|
|
173
|
+
verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
|
|
174
|
+
updatedAt: string | Date;
|
|
114
175
|
}
|
|
115
176
|
export interface PropertyStatusChangedEvent {
|
|
116
177
|
id: string;
|
|
117
|
-
|
|
178
|
+
ownerAuthUserId?: string;
|
|
179
|
+
landlordId?: string;
|
|
118
180
|
title: string;
|
|
119
181
|
previousStatus: PropertyStatus;
|
|
120
182
|
newStatus: PropertyStatus;
|
|
121
183
|
reason?: string;
|
|
122
184
|
changedBy?: string;
|
|
123
|
-
changedAt: Date;
|
|
185
|
+
changedAt: string | Date;
|
|
124
186
|
}
|
|
125
187
|
export interface PropertyDeletedEvent {
|
|
126
188
|
id: string;
|
|
127
|
-
|
|
189
|
+
ownerAuthUserId?: string;
|
|
190
|
+
landlordId?: string;
|
|
128
191
|
title: string;
|
|
129
192
|
reason?: string;
|
|
130
193
|
deletedBy?: string;
|
|
131
|
-
deletedAt: Date;
|
|
194
|
+
deletedAt: string | Date;
|
|
132
195
|
}
|
|
133
196
|
export interface PropertyViewedEvent {
|
|
134
197
|
propertyId: string;
|
|
135
|
-
|
|
198
|
+
ownerAuthUserId?: string;
|
|
199
|
+
landlordId?: string;
|
|
136
200
|
tenantId: string;
|
|
137
|
-
viewedAt: Date;
|
|
201
|
+
viewedAt: string | Date;
|
|
138
202
|
}
|
|
139
203
|
export interface PropertyOfferCreatedEvent {
|
|
140
204
|
id: string;
|
|
@@ -3,10 +3,24 @@
|
|
|
3
3
|
* Property Event Types for Property Marketplace
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.AgreementStatus = exports.ViewingStatus = exports.OfferStatus = exports.ListingType = exports.PropertyStatus = exports.PropertyType = void 0;
|
|
6
|
+
exports.AgreementStatus = exports.ViewingStatus = exports.OfferStatus = exports.ListingType = exports.PropertyStatus = exports.PropertyCategory = exports.PropertyType = void 0;
|
|
7
7
|
var PropertyType;
|
|
8
8
|
(function (PropertyType) {
|
|
9
|
+
// Rentals
|
|
10
|
+
PropertyType["ROOM"] = "room";
|
|
11
|
+
PropertyType["BOARDING_ROOM"] = "boarding_room";
|
|
12
|
+
PropertyType["COTTAGE"] = "cottage";
|
|
13
|
+
PropertyType["FLAT"] = "flat";
|
|
9
14
|
PropertyType["HOUSE"] = "house";
|
|
15
|
+
PropertyType["SHORT_STAY"] = "short_stay";
|
|
16
|
+
// Sales / Land
|
|
17
|
+
PropertyType["RESIDENTIAL_STAND"] = "residential_stand";
|
|
18
|
+
PropertyType["COMMERCIAL_STAND"] = "commercial_stand";
|
|
19
|
+
PropertyType["HOUSE_FOR_SALE"] = "house_for_sale";
|
|
20
|
+
PropertyType["FARM"] = "farm";
|
|
21
|
+
PropertyType["PLOT"] = "plot";
|
|
22
|
+
PropertyType["INDUSTRIAL_PROPERTY"] = "industrial_property";
|
|
23
|
+
// Backwards-compatible/legacy
|
|
10
24
|
PropertyType["APARTMENT"] = "apartment";
|
|
11
25
|
PropertyType["CONDO"] = "condo";
|
|
12
26
|
PropertyType["TOWNHOUSE"] = "townhouse";
|
|
@@ -19,9 +33,22 @@ var PropertyType;
|
|
|
19
33
|
PropertyType["PARKING"] = "parking";
|
|
20
34
|
PropertyType["OTHER"] = "other";
|
|
21
35
|
})(PropertyType = exports.PropertyType || (exports.PropertyType = {}));
|
|
36
|
+
var PropertyCategory;
|
|
37
|
+
(function (PropertyCategory) {
|
|
38
|
+
PropertyCategory["RENTAL"] = "rental";
|
|
39
|
+
PropertyCategory["SALE"] = "sale";
|
|
40
|
+
})(PropertyCategory = exports.PropertyCategory || (exports.PropertyCategory = {}));
|
|
22
41
|
var PropertyStatus;
|
|
23
42
|
(function (PropertyStatus) {
|
|
24
43
|
PropertyStatus["DRAFT"] = "draft";
|
|
44
|
+
PropertyStatus["PENDING_VERIFICATION"] = "pending_verification";
|
|
45
|
+
PropertyStatus["PUBLISHED"] = "published";
|
|
46
|
+
PropertyStatus["RESERVED"] = "reserved";
|
|
47
|
+
PropertyStatus["OCCUPIED"] = "occupied";
|
|
48
|
+
PropertyStatus["UNLISTED"] = "unlisted";
|
|
49
|
+
PropertyStatus["REJECTED"] = "rejected";
|
|
50
|
+
PropertyStatus["EXPIRED"] = "expired";
|
|
51
|
+
// Backwards-compatible/legacy
|
|
25
52
|
PropertyStatus["ACTIVE"] = "active";
|
|
26
53
|
PropertyStatus["INACTIVE"] = "inactive";
|
|
27
54
|
PropertyStatus["RENTED"] = "rented";
|