@rentbase/common 1.0.18 → 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/property-enquiry-events.d.ts +2 -0
- package/build/events/types/property-events.d.ts +0 -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;
|
|
@@ -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",
|
|
@@ -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);
|