@rentbase/common 1.0.10 → 1.0.12
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* KYC Event Types for Document Management & Landlord Applications
|
|
3
3
|
*/
|
|
4
|
-
export declare type DocumentType = "national_id" | "passport" | "drivers_license" | "
|
|
4
|
+
export declare type DocumentType = "national_id" | "passport" | "drivers_license" | "selfie" | "proof_of_address" | "other";
|
|
5
5
|
export declare type DocumentStatus = "pending" | "verified" | "rejected" | "expired";
|
|
6
6
|
export declare type ApplicationStatus = "draft" | "submitted" | "under_review" | "needs_info" | "approved" | "rejected";
|
|
7
7
|
export interface LandlordDetails {
|
|
@@ -78,7 +78,7 @@ export interface LandlordApplicationCreatedEvent {
|
|
|
78
78
|
landlordDetails: LandlordDetails;
|
|
79
79
|
kycDocuments: {
|
|
80
80
|
idDocument?: string;
|
|
81
|
-
|
|
81
|
+
selfie?: string;
|
|
82
82
|
proofOfAddress?: string;
|
|
83
83
|
};
|
|
84
84
|
status: ApplicationStatus;
|
|
@@ -132,6 +132,7 @@ export interface LandlordApplicationApprovedEvent {
|
|
|
132
132
|
approvedAt: Date;
|
|
133
133
|
approvedBy: string;
|
|
134
134
|
adminNotes?: string;
|
|
135
|
+
selfieUrl?: string;
|
|
135
136
|
}
|
|
136
137
|
export interface LandlordApplicationRejectedEvent {
|
|
137
138
|
id: string;
|
|
@@ -153,7 +154,7 @@ export interface LandlordApplicationUpdatedEvent {
|
|
|
153
154
|
landlordDetails: LandlordDetails;
|
|
154
155
|
kycDocuments: {
|
|
155
156
|
idDocument?: string;
|
|
156
|
-
|
|
157
|
+
selfie?: string;
|
|
157
158
|
proofOfAddress?: string;
|
|
158
159
|
};
|
|
159
160
|
status: ApplicationStatus;
|
|
@@ -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";
|