@rentbase/common 1.0.17 → 1.0.19
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/build/events/publishers/saved-search-digest-ready-publisher.d.ts +6 -0
- package/build/events/publishers/saved-search-digest-ready-publisher.js +21 -0
- package/build/events/types/index.d.ts +2 -0
- package/build/events/types/monetization-settings-events.d.ts +12 -4
- package/build/events/types/property-enquiry-events.d.ts +2 -0
- package/build/events/types/property-events.d.ts +28 -1
- package/build/events/types/property-events.js +0 -1
- package/build/events/types/saved-search-events.d.ts +21 -0
- package/build/events/types/saved-search-events.js +6 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SavedSearchDigestReadyEvent } from "../types/saved-search-events";
|
|
2
|
+
/**
|
|
3
|
+
* Publish saved_search.digest.ready event
|
|
4
|
+
* Emitted by property-service when a daily digest is ready for a user.
|
|
5
|
+
*/
|
|
6
|
+
export declare const publishSavedSearchDigestReady: (data: SavedSearchDigestReadyEvent) => Promise<void>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.publishSavedSearchDigestReady = void 0;
|
|
13
|
+
const producer_1 = require("../producer");
|
|
14
|
+
/**
|
|
15
|
+
* Publish saved_search.digest.ready event
|
|
16
|
+
* Emitted by property-service when a daily digest is ready for a user.
|
|
17
|
+
*/
|
|
18
|
+
const publishSavedSearchDigestReady = (data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
+
yield (0, producer_1.publishEvent)("saved_search.digest.ready", data);
|
|
20
|
+
});
|
|
21
|
+
exports.publishSavedSearchDigestReady = publishSavedSearchDigestReady;
|
|
@@ -11,6 +11,7 @@ import { TenantAccessPassPurchasedEvent, TenantAccessPassConsumedEvent, TenantAc
|
|
|
11
11
|
import { MonetizationPricingUpsertedEvent, MonetizationPricingActivatedEvent, MonetizationPricingDeactivatedEvent } from "./monetization-settings-events";
|
|
12
12
|
import { CampaignCreatedEvent, CampaignActivatedEvent, CampaignStatusChangedEvent, CampaignExpiredEvent, PromoCodeCreatedEvent, PromoCodeBulkCreatedEvent, PromoCodeAppliedEvent, PromoCodeStatusChangedEvent, ReferralCodeGeneratedEvent, ReferralClaimedEvent, ReferralQualifiedEvent, ReferralRewardsGrantedEvent, ReferralStatusChangedEvent, RewardCreditIssuedEvent, RewardCreditUsedEvent, RewardCreditExpiredEvent, RewardCreditCancelledEvent, DiscountCalculatedEvent, DiscountAppliedEvent, CampaignRedemptionEvent, ReferralConversionEvent } from "./promotion-events";
|
|
13
13
|
import { KycDocumentUploadedEvent, KycDocumentVerifiedEvent, KycDocumentRejectedEvent, KycDocumentDeletedEvent, LandlordApplicationCreatedEvent, LandlordApplicationSubmittedEvent, LandlordApplicationUnderReviewEvent, LandlordApplicationNeedsInfoEvent, LandlordApplicationApprovedEvent, LandlordApplicationRejectedEvent, LandlordApplicationUpdatedEvent } from "./kyc-events";
|
|
14
|
+
import { SavedSearchDigestReadyEvent } from "./saved-search-events";
|
|
14
15
|
export interface EventMap {
|
|
15
16
|
"request.created": RequestCreatedEvent;
|
|
16
17
|
"request.updated": RequestUpdatedEvent;
|
|
@@ -59,6 +60,7 @@ export interface EventMap {
|
|
|
59
60
|
"property_report.created": PropertyReportCreatedEvent;
|
|
60
61
|
"property_report.updated": PropertyReportUpdatedEvent;
|
|
61
62
|
"property_report.resolved": PropertyReportResolvedEvent;
|
|
63
|
+
"saved_search.digest.ready": SavedSearchDigestReadyEvent;
|
|
62
64
|
"notification.created": NotificationCreatedEvent;
|
|
63
65
|
"notification.sent": NotificationSentEvent;
|
|
64
66
|
"notification.delivered": NotificationDeliveredEvent;
|
|
@@ -3,15 +3,23 @@
|
|
|
3
3
|
* Events emitted when admins update monetization configuration such as
|
|
4
4
|
* country/currency pricing rows for listing fees and access passes.
|
|
5
5
|
*/
|
|
6
|
+
export interface MonetizationPricingTenantPassTier {
|
|
7
|
+
durationDays: number;
|
|
8
|
+
priceAmount: number;
|
|
9
|
+
}
|
|
10
|
+
export interface MonetizationPricingListingFees {
|
|
11
|
+
rentalAmount: number;
|
|
12
|
+
saleAmount: number;
|
|
13
|
+
durationDays: number;
|
|
14
|
+
}
|
|
6
15
|
export interface MonetizationPricingUpsertedEvent {
|
|
7
16
|
pricingId: string;
|
|
8
17
|
countryId?: string;
|
|
9
18
|
countryCode?: string;
|
|
10
19
|
currency: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
isActive?: boolean;
|
|
20
|
+
tenantPassTiers: MonetizationPricingTenantPassTier[];
|
|
21
|
+
listingFees: MonetizationPricingListingFees;
|
|
22
|
+
isActive: boolean;
|
|
15
23
|
updatedAt: string | Date;
|
|
16
24
|
updatedByAuthUserId?: string;
|
|
17
25
|
}
|
|
@@ -11,6 +11,8 @@ export interface PropertyEnquiryCreatedEvent {
|
|
|
11
11
|
tenantAuthUserId: string;
|
|
12
12
|
landlordAuthUserId: string;
|
|
13
13
|
tenantMessage?: string;
|
|
14
|
+
offeredAmount?: number;
|
|
15
|
+
offeredCurrency?: string;
|
|
14
16
|
}
|
|
15
17
|
export interface PropertyEnquiryStatusChangedEvent {
|
|
16
18
|
enquiryId: string;
|
|
@@ -10,7 +10,6 @@ export declare enum PropertyType {
|
|
|
10
10
|
SHORT_STAY = "short_stay",
|
|
11
11
|
RESIDENTIAL_STAND = "residential_stand",
|
|
12
12
|
COMMERCIAL_STAND = "commercial_stand",
|
|
13
|
-
HOUSE_FOR_SALE = "house_for_sale",
|
|
14
13
|
FARM = "farm",
|
|
15
14
|
PLOT = "plot",
|
|
16
15
|
INDUSTRIAL_PROPERTY = "industrial_property",
|
|
@@ -55,8 +54,27 @@ export interface PropertyPricing {
|
|
|
55
54
|
currency: string;
|
|
56
55
|
period?: "monthly" | "weekly" | "daily";
|
|
57
56
|
deposit?: number;
|
|
57
|
+
depositMonths?: number;
|
|
58
|
+
leaseDuration?: number;
|
|
59
|
+
minimumLeasePeriod?: number;
|
|
60
|
+
paymentFrequency?: string;
|
|
61
|
+
firstLastMonthRequired?: boolean;
|
|
62
|
+
rentalInsuranceRequired?: boolean;
|
|
63
|
+
acceptsBankGuarantee?: boolean;
|
|
58
64
|
negotiable?: boolean;
|
|
59
65
|
minPrice?: number;
|
|
66
|
+
taxValue?: number;
|
|
67
|
+
ratesAndTaxes?: number;
|
|
68
|
+
bodyCorporateFee?: number;
|
|
69
|
+
transferFeesIncluded?: boolean;
|
|
70
|
+
hoa?: boolean;
|
|
71
|
+
hoaFee?: number;
|
|
72
|
+
acceptsCrypto?: boolean;
|
|
73
|
+
acceptsInstallments?: boolean;
|
|
74
|
+
downPaymentPercentage?: number;
|
|
75
|
+
utilityIncluded?: boolean;
|
|
76
|
+
utilityCosts?: number;
|
|
77
|
+
maintenanceFee?: number;
|
|
60
78
|
}
|
|
61
79
|
export interface PropertyMonetization {
|
|
62
80
|
listingFeePaid?: boolean;
|
|
@@ -85,6 +103,7 @@ export interface PropertyLocation {
|
|
|
85
103
|
lng?: number;
|
|
86
104
|
neighbourhood?: string;
|
|
87
105
|
landmark?: string;
|
|
106
|
+
distanceFromCityCentreKm?: number;
|
|
88
107
|
}
|
|
89
108
|
export declare enum OfferStatus {
|
|
90
109
|
PENDING = "pending",
|
|
@@ -142,6 +161,10 @@ export interface PropertyCreatedEvent {
|
|
|
142
161
|
minimumOfferPrice?: number;
|
|
143
162
|
favoritesCount?: number;
|
|
144
163
|
viewsCount?: number;
|
|
164
|
+
inquiryCount?: number;
|
|
165
|
+
trustScore?: number;
|
|
166
|
+
virtualTourUrl?: string;
|
|
167
|
+
floorPlanUrl?: string;
|
|
145
168
|
verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
|
|
146
169
|
monetization?: PropertyMonetization;
|
|
147
170
|
createdAt: string | Date;
|
|
@@ -182,6 +205,10 @@ export interface PropertyUpdatedEvent {
|
|
|
182
205
|
minimumOfferPrice?: number;
|
|
183
206
|
favoritesCount?: number;
|
|
184
207
|
viewsCount?: number;
|
|
208
|
+
inquiryCount?: number;
|
|
209
|
+
trustScore?: number;
|
|
210
|
+
virtualTourUrl?: string;
|
|
211
|
+
floorPlanUrl?: string;
|
|
185
212
|
verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
|
|
186
213
|
monetization?: PropertyMonetization;
|
|
187
214
|
updatedAt: string | Date;
|
|
@@ -16,7 +16,6 @@ var PropertyType;
|
|
|
16
16
|
// Sales / Land
|
|
17
17
|
PropertyType["RESIDENTIAL_STAND"] = "residential_stand";
|
|
18
18
|
PropertyType["COMMERCIAL_STAND"] = "commercial_stand";
|
|
19
|
-
PropertyType["HOUSE_FOR_SALE"] = "house_for_sale";
|
|
20
19
|
PropertyType["FARM"] = "farm";
|
|
21
20
|
PropertyType["PLOT"] = "plot";
|
|
22
21
|
PropertyType["INDUSTRIAL_PROPERTY"] = "industrial_property";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Saved Search Events
|
|
3
|
+
* Events for recommendation/digest notifications based on saved searches.
|
|
4
|
+
*/
|
|
5
|
+
export interface SavedSearchDigestReadyEvent {
|
|
6
|
+
authUserId: string;
|
|
7
|
+
digestDate: string;
|
|
8
|
+
totalNewCount: number;
|
|
9
|
+
url?: string;
|
|
10
|
+
topSearch?: {
|
|
11
|
+
id: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
filters?: Record<string, any>;
|
|
14
|
+
newCount: number;
|
|
15
|
+
};
|
|
16
|
+
searches?: Array<{
|
|
17
|
+
id: string;
|
|
18
|
+
name?: string;
|
|
19
|
+
newCount: number;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from "./events/types/promotion-events";
|
|
|
23
23
|
export * from "./events/types/kyc-events";
|
|
24
24
|
export * from "./events/types/monetization-events";
|
|
25
25
|
export * from "./events/types/monetization-settings-events";
|
|
26
|
+
export * from "./events/types/saved-search-events";
|
|
26
27
|
export * from "./events/types";
|
|
27
28
|
export * from "./events/publishers/country-created-publisher";
|
|
28
29
|
export * from "./events/publishers/country-updated-publisher";
|
|
@@ -70,6 +71,7 @@ export * from "./events/publishers/notification-template-created-publisher";
|
|
|
70
71
|
export * from "./events/publishers/notification-template-updated-publisher";
|
|
71
72
|
export * from "./events/publishers/notification-bulk-send-initiated-publisher";
|
|
72
73
|
export * from "./events/publishers/notification-bulk-send-completed-publisher";
|
|
74
|
+
export * from "./events/publishers/saved-search-digest-ready-publisher";
|
|
73
75
|
export * from "./events/publishers/incident-created-publisher";
|
|
74
76
|
export * from "./events/publishers/incident-updated-publisher";
|
|
75
77
|
export * from "./events/publishers/incident-resolved-publisher";
|
package/build/index.js
CHANGED
|
@@ -36,6 +36,7 @@ __exportStar(require("./events/types/promotion-events"), exports);
|
|
|
36
36
|
__exportStar(require("./events/types/kyc-events"), exports);
|
|
37
37
|
__exportStar(require("./events/types/monetization-events"), exports);
|
|
38
38
|
__exportStar(require("./events/types/monetization-settings-events"), exports);
|
|
39
|
+
__exportStar(require("./events/types/saved-search-events"), exports);
|
|
39
40
|
__exportStar(require("./events/types"), exports);
|
|
40
41
|
// Geo Config / Location event publishers
|
|
41
42
|
__exportStar(require("./events/publishers/country-created-publisher"), exports);
|
|
@@ -93,6 +94,8 @@ __exportStar(require("./events/publishers/notification-template-created-publishe
|
|
|
93
94
|
__exportStar(require("./events/publishers/notification-template-updated-publisher"), exports);
|
|
94
95
|
__exportStar(require("./events/publishers/notification-bulk-send-initiated-publisher"), exports);
|
|
95
96
|
__exportStar(require("./events/publishers/notification-bulk-send-completed-publisher"), exports);
|
|
97
|
+
// Saved search digest event publishers
|
|
98
|
+
__exportStar(require("./events/publishers/saved-search-digest-ready-publisher"), exports);
|
|
96
99
|
// Safety & Reporting event publishers
|
|
97
100
|
__exportStar(require("./events/publishers/incident-created-publisher"), exports);
|
|
98
101
|
__exportStar(require("./events/publishers/incident-updated-publisher"), exports);
|