@rentbase/common 1.0.13 → 1.0.15

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.
Files changed (35) hide show
  1. package/build/events/publishers/monetization-pricing-activated-publisher.d.ts +5 -0
  2. package/build/events/publishers/monetization-pricing-activated-publisher.js +20 -0
  3. package/build/events/publishers/monetization-pricing-deactivated-publisher.d.ts +5 -0
  4. package/build/events/publishers/monetization-pricing-deactivated-publisher.js +20 -0
  5. package/build/events/publishers/monetization-pricing-upserted-publisher.d.ts +5 -0
  6. package/build/events/publishers/monetization-pricing-upserted-publisher.js +20 -0
  7. package/build/events/publishers/property-enquiry-created-publisher.d.ts +5 -0
  8. package/build/events/publishers/property-enquiry-created-publisher.js +20 -0
  9. package/build/events/publishers/property-enquiry-status-changed-publisher.d.ts +5 -0
  10. package/build/events/publishers/property-enquiry-status-changed-publisher.js +20 -0
  11. package/build/events/publishers/property-listing-expired-publisher.d.ts +5 -0
  12. package/build/events/publishers/property-listing-expired-publisher.js +20 -0
  13. package/build/events/publishers/property-listing-fee-marked-paid-publisher.d.ts +5 -0
  14. package/build/events/publishers/property-listing-fee-marked-paid-publisher.js +20 -0
  15. package/build/events/publishers/property-listing-renewed-publisher.d.ts +5 -0
  16. package/build/events/publishers/property-listing-renewed-publisher.js +20 -0
  17. package/build/events/publishers/tenant-access-pass-consumed-publisher.d.ts +5 -0
  18. package/build/events/publishers/tenant-access-pass-consumed-publisher.js +20 -0
  19. package/build/events/publishers/tenant-access-pass-expired-publisher.d.ts +5 -0
  20. package/build/events/publishers/tenant-access-pass-expired-publisher.js +20 -0
  21. package/build/events/publishers/tenant-access-pass-purchased-publisher.d.ts +5 -0
  22. package/build/events/publishers/tenant-access-pass-purchased-publisher.js +20 -0
  23. package/build/events/types/chat-events.d.ts +32 -13
  24. package/build/events/types/index.d.ts +17 -1
  25. package/build/events/types/index.js +1 -0
  26. package/build/events/types/monetization-events.d.ts +53 -0
  27. package/build/events/types/monetization-events.js +6 -0
  28. package/build/events/types/monetization-settings-events.d.ts +33 -0
  29. package/build/events/types/monetization-settings-events.js +7 -0
  30. package/build/events/types/property-enquiry-events.d.ts +24 -0
  31. package/build/events/types/property-enquiry-events.js +6 -0
  32. package/build/events/types/property-events.d.ts +13 -0
  33. package/build/index.d.ts +13 -0
  34. package/build/index.js +16 -0
  35. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ import { MonetizationPricingActivatedEvent } from "../types/monetization-settings-events";
2
+ /**
3
+ * Publish monetization_pricing.activated event
4
+ */
5
+ export declare const publishMonetizationPricingActivated: (data: MonetizationPricingActivatedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishMonetizationPricingActivated = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish monetization_pricing.activated event
16
+ */
17
+ const publishMonetizationPricingActivated = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("monetization_pricing.activated", data);
19
+ });
20
+ exports.publishMonetizationPricingActivated = publishMonetizationPricingActivated;
@@ -0,0 +1,5 @@
1
+ import { MonetizationPricingDeactivatedEvent } from "../types/monetization-settings-events";
2
+ /**
3
+ * Publish monetization_pricing.deactivated event
4
+ */
5
+ export declare const publishMonetizationPricingDeactivated: (data: MonetizationPricingDeactivatedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishMonetizationPricingDeactivated = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish monetization_pricing.deactivated event
16
+ */
17
+ const publishMonetizationPricingDeactivated = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("monetization_pricing.deactivated", data);
19
+ });
20
+ exports.publishMonetizationPricingDeactivated = publishMonetizationPricingDeactivated;
@@ -0,0 +1,5 @@
1
+ import { MonetizationPricingUpsertedEvent } from "../types/monetization-settings-events";
2
+ /**
3
+ * Publish monetization_pricing.upserted event
4
+ */
5
+ export declare const publishMonetizationPricingUpserted: (data: MonetizationPricingUpsertedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishMonetizationPricingUpserted = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish monetization_pricing.upserted event
16
+ */
17
+ const publishMonetizationPricingUpserted = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("monetization_pricing.upserted", data);
19
+ });
20
+ exports.publishMonetizationPricingUpserted = publishMonetizationPricingUpserted;
@@ -0,0 +1,5 @@
1
+ import { PropertyEnquiryCreatedEvent } from "../types/property-enquiry-events";
2
+ /**
3
+ * Publish property.enquiry.created event
4
+ */
5
+ export declare const publishPropertyEnquiryCreated: (data: PropertyEnquiryCreatedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishPropertyEnquiryCreated = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish property.enquiry.created event
16
+ */
17
+ const publishPropertyEnquiryCreated = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("property.enquiry.created", data);
19
+ });
20
+ exports.publishPropertyEnquiryCreated = publishPropertyEnquiryCreated;
@@ -0,0 +1,5 @@
1
+ import { PropertyEnquiryStatusChangedEvent } from "../types/property-enquiry-events";
2
+ /**
3
+ * Publish property.enquiry.status.changed event
4
+ */
5
+ export declare const publishPropertyEnquiryStatusChanged: (data: PropertyEnquiryStatusChangedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishPropertyEnquiryStatusChanged = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish property.enquiry.status.changed event
16
+ */
17
+ const publishPropertyEnquiryStatusChanged = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("property.enquiry.status.changed", data);
19
+ });
20
+ exports.publishPropertyEnquiryStatusChanged = publishPropertyEnquiryStatusChanged;
@@ -0,0 +1,5 @@
1
+ import { PropertyListingExpiredEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish property_listing.expired event
4
+ */
5
+ export declare const publishPropertyListingExpired: (data: PropertyListingExpiredEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishPropertyListingExpired = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish property_listing.expired event
16
+ */
17
+ const publishPropertyListingExpired = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("property_listing.expired", data);
19
+ });
20
+ exports.publishPropertyListingExpired = publishPropertyListingExpired;
@@ -0,0 +1,5 @@
1
+ import { PropertyListingFeeMarkedPaidEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish property_listing.fee.marked_paid event
4
+ */
5
+ export declare const publishPropertyListingFeeMarkedPaid: (data: PropertyListingFeeMarkedPaidEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishPropertyListingFeeMarkedPaid = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish property_listing.fee.marked_paid event
16
+ */
17
+ const publishPropertyListingFeeMarkedPaid = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("property_listing.fee.marked_paid", data);
19
+ });
20
+ exports.publishPropertyListingFeeMarkedPaid = publishPropertyListingFeeMarkedPaid;
@@ -0,0 +1,5 @@
1
+ import { PropertyListingRenewedEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish property_listing.renewed event
4
+ */
5
+ export declare const publishPropertyListingRenewed: (data: PropertyListingRenewedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishPropertyListingRenewed = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish property_listing.renewed event
16
+ */
17
+ const publishPropertyListingRenewed = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("property_listing.renewed", data);
19
+ });
20
+ exports.publishPropertyListingRenewed = publishPropertyListingRenewed;
@@ -0,0 +1,5 @@
1
+ import { TenantAccessPassConsumedEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish tenant_access_pass.consumed event
4
+ */
5
+ export declare const publishTenantAccessPassConsumed: (data: TenantAccessPassConsumedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishTenantAccessPassConsumed = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish tenant_access_pass.consumed event
16
+ */
17
+ const publishTenantAccessPassConsumed = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("tenant_access_pass.consumed", data);
19
+ });
20
+ exports.publishTenantAccessPassConsumed = publishTenantAccessPassConsumed;
@@ -0,0 +1,5 @@
1
+ import { TenantAccessPassExpiredEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish tenant_access_pass.expired event
4
+ */
5
+ export declare const publishTenantAccessPassExpired: (data: TenantAccessPassExpiredEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishTenantAccessPassExpired = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish tenant_access_pass.expired event
16
+ */
17
+ const publishTenantAccessPassExpired = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("tenant_access_pass.expired", data);
19
+ });
20
+ exports.publishTenantAccessPassExpired = publishTenantAccessPassExpired;
@@ -0,0 +1,5 @@
1
+ import { TenantAccessPassPurchasedEvent } from "../types/monetization-events";
2
+ /**
3
+ * Publish tenant_access_pass.purchased event
4
+ */
5
+ export declare const publishTenantAccessPassPurchased: (data: TenantAccessPassPurchasedEvent) => Promise<void>;
@@ -0,0 +1,20 @@
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.publishTenantAccessPassPurchased = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish tenant_access_pass.purchased event
16
+ */
17
+ const publishTenantAccessPassPurchased = (data) => __awaiter(void 0, void 0, void 0, function* () {
18
+ yield (0, producer_1.publishEvent)("tenant_access_pass.purchased", data);
19
+ });
20
+ exports.publishTenantAccessPassPurchased = publishTenantAccessPassPurchased;
@@ -4,21 +4,16 @@
4
4
  */
5
5
  export interface ChatSessionCreatedEvent {
6
6
  session_id: string;
7
- session_type: "property" | "trip" | "support" | "system";
7
+ session_type: "property" | "support" | "system";
8
8
  property_id?: string;
9
- trip_id?: string;
10
- seat_booking_id?: string;
11
9
  tenant_auth_user_id?: string;
12
10
  landlord_auth_user_id?: string;
13
- rider_auth_user_id?: string;
14
- driver_auth_user_id?: string;
15
11
  participant_count: number;
16
12
  created_at: string;
17
13
  }
18
14
  export interface ChatSessionClosedEvent {
19
15
  session_id: string;
20
16
  property_id?: string;
21
- trip_id?: string;
22
17
  closed_by_auth_user_id?: string;
23
18
  reason?: string;
24
19
  total_messages: number;
@@ -29,7 +24,7 @@ export interface ChatParticipantMutedEvent {
29
24
  session_id: string;
30
25
  property_id?: string;
31
26
  auth_user_id: string;
32
- role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
27
+ role: "tenant" | "landlord" | "support_agent";
33
28
  muted: boolean;
34
29
  muted_at: string;
35
30
  }
@@ -37,9 +32,8 @@ export interface MessageSentEvent {
37
32
  message_id: string;
38
33
  session_id: string;
39
34
  property_id?: string;
40
- trip_id?: string;
41
35
  sender_auth_user_id: string;
42
- sender_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
36
+ sender_role: "tenant" | "landlord" | "support_agent";
43
37
  message_type: "text" | "image" | "audio" | "system";
44
38
  has_attachments: boolean;
45
39
  attachment_count: number;
@@ -47,6 +41,17 @@ export interface MessageSentEvent {
47
41
  system_event_key?: string;
48
42
  sent_at: string;
49
43
  }
44
+ /**
45
+ * ChatPushMessageCreatedEvent
46
+ * Push-friendly event emitted by chat-messaging-service.
47
+ * Includes explicit recipients so notifications-service can send push without extra DB lookups.
48
+ */
49
+ export interface ChatPushMessageCreatedEvent {
50
+ sessionId: string;
51
+ senderAuthUserId: string;
52
+ recipientAuthUserIds: string[];
53
+ previewText?: string;
54
+ }
50
55
  export interface MessageDeliveredEvent {
51
56
  message_id: string;
52
57
  session_id: string;
@@ -66,7 +71,6 @@ export interface SystemMessageAddedEvent {
66
71
  message_id: string;
67
72
  session_id: string;
68
73
  property_id?: string;
69
- trip_id?: string;
70
74
  system_event_key: string;
71
75
  message_text: string;
72
76
  added_at: string;
@@ -74,12 +78,11 @@ export interface SystemMessageAddedEvent {
74
78
  export interface CallInitiatedEvent {
75
79
  call_session_id: string;
76
80
  property_id?: string;
77
- trip_id?: string;
78
81
  chat_session_id?: string;
79
82
  caller_auth_user_id: string;
80
- caller_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
83
+ caller_role: "tenant" | "landlord" | "support_agent";
81
84
  callee_auth_user_id: string;
82
- callee_role: "tenant" | "landlord" | "rider" | "driver" | "support_agent";
85
+ callee_role: "tenant" | "landlord" | "support_agent";
83
86
  call_type: "audio" | "video";
84
87
  provider_name: string;
85
88
  provider_room_id: string;
@@ -87,6 +90,8 @@ export interface CallInitiatedEvent {
87
90
  }
88
91
  export interface CallRingingEvent {
89
92
  call_session_id: string;
93
+ chat_session_id?: string;
94
+ property_id?: string;
90
95
  caller_auth_user_id: string;
91
96
  callee_auth_user_id: string;
92
97
  call_type: "audio" | "video";
@@ -95,6 +100,8 @@ export interface CallRingingEvent {
95
100
  }
96
101
  export interface CallAnsweredEvent {
97
102
  call_session_id: string;
103
+ chat_session_id?: string;
104
+ property_id?: string;
98
105
  caller_auth_user_id: string;
99
106
  callee_auth_user_id: string;
100
107
  call_type: "audio" | "video";
@@ -103,6 +110,8 @@ export interface CallAnsweredEvent {
103
110
  }
104
111
  export interface CallRejectedEvent {
105
112
  call_session_id: string;
113
+ chat_session_id?: string;
114
+ property_id?: string;
106
115
  caller_auth_user_id: string;
107
116
  callee_auth_user_id: string;
108
117
  rejected_by_auth_user_id: string;
@@ -111,6 +120,8 @@ export interface CallRejectedEvent {
111
120
  }
112
121
  export interface CallMissedEvent {
113
122
  call_session_id: string;
123
+ chat_session_id?: string;
124
+ property_id?: string;
114
125
  caller_auth_user_id: string;
115
126
  callee_auth_user_id: string;
116
127
  ring_duration_seconds?: number;
@@ -118,6 +129,8 @@ export interface CallMissedEvent {
118
129
  }
119
130
  export interface CallEndedEvent {
120
131
  call_session_id: string;
132
+ chat_session_id?: string;
133
+ property_id?: string;
121
134
  caller_auth_user_id: string;
122
135
  callee_auth_user_id: string;
123
136
  call_type: "audio" | "video";
@@ -128,6 +141,8 @@ export interface CallEndedEvent {
128
141
  }
129
142
  export interface CallFailedEvent {
130
143
  call_session_id: string;
144
+ chat_session_id?: string;
145
+ property_id?: string;
131
146
  caller_auth_user_id: string;
132
147
  callee_auth_user_id: string;
133
148
  error_code?: string;
@@ -137,6 +152,8 @@ export interface CallFailedEvent {
137
152
  }
138
153
  export interface CallRatedEvent {
139
154
  call_session_id: string;
155
+ chat_session_id?: string;
156
+ property_id?: string;
140
157
  rated_by_auth_user_id: string;
141
158
  rated_as: "caller" | "callee";
142
159
  rating: number;
@@ -145,6 +162,8 @@ export interface CallRatedEvent {
145
162
  }
146
163
  export interface CallProviderStatusUpdateEvent {
147
164
  call_session_id: string;
165
+ chat_session_id?: string;
166
+ property_id?: string;
148
167
  provider_name: string;
149
168
  provider_status: string;
150
169
  previous_status: string;
@@ -5,7 +5,10 @@ import { PropertyCreatedEvent, PropertyUpdatedEvent, PropertyStatusChangedEvent,
5
5
  import { NotificationCreatedEvent, NotificationSentEvent, NotificationDeliveredEvent, NotificationFailedEvent, NotificationReadEvent, NotificationPreferencesUpdatedEvent, NotificationTemplateCreatedEvent, NotificationTemplateUpdatedEvent, NotificationBulkSendInitiatedEvent, NotificationBulkSendCompletedEvent } from "./notification-events";
6
6
  import { IncidentReportCreatedEvent, IncidentReportUpdatedEvent, IncidentReportResolvedEvent, SOSTriggeredEvent, SOSAcknowledgedEvent, SOSRespondingEvent, SOSResolvedEvent, DisciplinaryActionCreatedEvent, DisciplinaryActionActivatedEvent, DisciplinaryActionRevokedEvent, SafetyNoteCreatedEvent, SafetyAuditLogCreatedEvent } from "./safety-events";
7
7
  import { WalletCreatedEvent, WalletAdjustedEvent, WalletBalanceUpdatedEvent, WalletStatusChangedEvent, WalletTransactionCreatedEvent, TransactionStatusChangedEvent, PaymentIntentCreatedEvent, PaymentIntentSucceededEvent, PaymentIntentFailedEvent, PaymentIntentCancelledEvent, PaymentChargeRefundedEvent, PayoutRequestedEvent, PayoutApprovedEvent, PayoutProcessingEvent, PayoutSucceededEvent, PayoutFailedEvent, PayoutCancelledEvent, WebhookReceivedEvent, WebhookProcessedEvent } from "./payment-events";
8
- import { ChatSessionCreatedEvent, ChatSessionClosedEvent, ChatParticipantMutedEvent, MessageSentEvent, MessageDeliveredEvent, MessageReadEvent, SystemMessageAddedEvent, CallInitiatedEvent, CallRingingEvent, CallAnsweredEvent, CallRejectedEvent, CallMissedEvent, CallEndedEvent, CallFailedEvent, CallRatedEvent, CallProviderStatusUpdateEvent } from "./chat-events";
8
+ import { ChatSessionCreatedEvent, ChatSessionClosedEvent, ChatParticipantMutedEvent, ChatPushMessageCreatedEvent, MessageSentEvent, MessageDeliveredEvent, MessageReadEvent, SystemMessageAddedEvent, CallInitiatedEvent, CallRingingEvent, CallAnsweredEvent, CallRejectedEvent, CallMissedEvent, CallEndedEvent, CallFailedEvent, CallRatedEvent, CallProviderStatusUpdateEvent } from "./chat-events";
9
+ import { PropertyEnquiryCreatedEvent, PropertyEnquiryStatusChangedEvent } from "./property-enquiry-events";
10
+ import { TenantAccessPassPurchasedEvent, TenantAccessPassConsumedEvent, TenantAccessPassExpiredEvent, PropertyListingExpiredEvent, PropertyListingRenewedEvent, PropertyListingFeeMarkedPaidEvent } from "./monetization-events";
11
+ import { MonetizationPricingUpsertedEvent, MonetizationPricingActivatedEvent, MonetizationPricingDeactivatedEvent } from "./monetization-settings-events";
9
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";
10
13
  import { KycDocumentUploadedEvent, KycDocumentVerifiedEvent, KycDocumentRejectedEvent, KycDocumentDeletedEvent, LandlordApplicationCreatedEvent, LandlordApplicationSubmittedEvent, LandlordApplicationUnderReviewEvent, LandlordApplicationNeedsInfoEvent, LandlordApplicationApprovedEvent, LandlordApplicationRejectedEvent, LandlordApplicationUpdatedEvent } from "./kyc-events";
11
14
  export interface EventMap {
@@ -24,6 +27,8 @@ export interface EventMap {
24
27
  "property.status_changed": PropertyStatusChangedEvent;
25
28
  "property.deleted": PropertyDeletedEvent;
26
29
  "property.viewed": PropertyViewedEvent;
30
+ "property.enquiry.created": PropertyEnquiryCreatedEvent;
31
+ "property.enquiry.status.changed": PropertyEnquiryStatusChangedEvent;
27
32
  "property_offer.created": PropertyOfferCreatedEvent;
28
33
  "property_offer.updated": PropertyOfferUpdatedEvent;
29
34
  "property_offer.accepted": PropertyOfferAcceptedEvent;
@@ -35,6 +40,15 @@ export interface EventMap {
35
40
  "property_viewing.completed": PropertyViewingCompletedEvent;
36
41
  "property_viewing.cancelled": PropertyViewingCancelledEvent;
37
42
  "property_viewing.no_show": PropertyViewingNoShowEvent;
43
+ "tenant_access_pass.purchased": TenantAccessPassPurchasedEvent;
44
+ "tenant_access_pass.consumed": TenantAccessPassConsumedEvent;
45
+ "tenant_access_pass.expired": TenantAccessPassExpiredEvent;
46
+ "property_listing.expired": PropertyListingExpiredEvent;
47
+ "property_listing.renewed": PropertyListingRenewedEvent;
48
+ "property_listing.fee.marked_paid": PropertyListingFeeMarkedPaidEvent;
49
+ "monetization_pricing.upserted": MonetizationPricingUpsertedEvent;
50
+ "monetization_pricing.activated": MonetizationPricingActivatedEvent;
51
+ "monetization_pricing.deactivated": MonetizationPricingDeactivatedEvent;
38
52
  "rental_agreement.created": RentalAgreementCreatedEvent;
39
53
  "rental_agreement.signed": RentalAgreementSignedEvent;
40
54
  "rental_agreement.activated": RentalAgreementActivatedEvent;
@@ -89,6 +103,7 @@ export interface EventMap {
89
103
  "chat.session.created": ChatSessionCreatedEvent;
90
104
  "chat.session.closed": ChatSessionClosedEvent;
91
105
  "chat.participant.muted": ChatParticipantMutedEvent;
106
+ "chat.push.message.created": ChatPushMessageCreatedEvent;
92
107
  "message.sent": MessageSentEvent;
93
108
  "message.delivered": MessageDeliveredEvent;
94
109
  "message.read": MessageReadEvent;
@@ -139,6 +154,7 @@ export * from "./request-events";
139
154
  export * from "./geo-config-events";
140
155
  export * from "./user-events";
141
156
  export * from "./property-events";
157
+ export * from "./property-enquiry-events";
142
158
  export * from "./notification-events";
143
159
  export * from "./safety-events";
144
160
  export * from "./payment-events";
@@ -15,6 +15,7 @@ __exportStar(require("./request-events"), exports);
15
15
  __exportStar(require("./geo-config-events"), exports);
16
16
  __exportStar(require("./user-events"), exports);
17
17
  __exportStar(require("./property-events"), exports);
18
+ __exportStar(require("./property-enquiry-events"), exports);
18
19
  __exportStar(require("./notification-events"), exports);
19
20
  __exportStar(require("./safety-events"), exports);
20
21
  __exportStar(require("./payment-events"), exports);
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Monetization Events
3
+ * Standalone events for access passes and time-limited listings.
4
+ */
5
+ export interface TenantAccessPassPurchasedEvent {
6
+ passId: string;
7
+ tenantAuthUserId: string;
8
+ countryId?: string;
9
+ countryCode?: string;
10
+ currency: string;
11
+ priceAmount: number;
12
+ durationDays: number;
13
+ purchasedAt: string | Date;
14
+ expiresAt: string | Date;
15
+ transactionId?: string;
16
+ }
17
+ export interface TenantAccessPassConsumedEvent {
18
+ passId: string;
19
+ tenantAuthUserId: string;
20
+ consumedAt: string | Date;
21
+ consumedPropertyId?: string;
22
+ expiresAt?: string | Date;
23
+ }
24
+ export interface TenantAccessPassExpiredEvent {
25
+ passId: string;
26
+ tenantAuthUserId: string;
27
+ expiredAt: string | Date;
28
+ expiresAt: string | Date;
29
+ }
30
+ export interface PropertyListingExpiredEvent {
31
+ propertyId: string;
32
+ ownerAuthUserId?: string;
33
+ expiredAt: string | Date;
34
+ expiresAt?: string | Date;
35
+ publishedAt?: string | Date;
36
+ lastRenewedAt?: string | Date;
37
+ }
38
+ export interface PropertyListingRenewedEvent {
39
+ propertyId: string;
40
+ ownerAuthUserId?: string;
41
+ renewedAt: string | Date;
42
+ previousExpiresAt?: string | Date;
43
+ newExpiresAt?: string | Date;
44
+ }
45
+ export interface PropertyListingFeeMarkedPaidEvent {
46
+ propertyId: string;
47
+ ownerAuthUserId?: string;
48
+ amount?: number;
49
+ currency?: string;
50
+ paidAt: string | Date;
51
+ transactionId?: string;
52
+ markedByAuthUserId?: string;
53
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Monetization Events
4
+ * Standalone events for access passes and time-limited listings.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Monetization Settings Events
3
+ * Events emitted when admins update monetization configuration such as
4
+ * country/currency pricing rows for listing fees and access passes.
5
+ */
6
+ export interface MonetizationPricingUpsertedEvent {
7
+ pricingId: string;
8
+ countryId?: string;
9
+ countryCode?: string;
10
+ currency: string;
11
+ listingFeeAmount?: number;
12
+ accessPassPriceAmount?: number;
13
+ accessPassDurationDays?: number;
14
+ isActive?: boolean;
15
+ updatedAt: string | Date;
16
+ updatedByAuthUserId?: string;
17
+ }
18
+ export interface MonetizationPricingActivatedEvent {
19
+ pricingId: string;
20
+ countryId?: string;
21
+ countryCode?: string;
22
+ currency?: string;
23
+ activatedAt: string | Date;
24
+ activatedByAuthUserId?: string;
25
+ }
26
+ export interface MonetizationPricingDeactivatedEvent {
27
+ pricingId: string;
28
+ countryId?: string;
29
+ countryCode?: string;
30
+ currency?: string;
31
+ deactivatedAt: string | Date;
32
+ deactivatedByAuthUserId?: string;
33
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ /**
3
+ * Monetization Settings Events
4
+ * Events emitted when admins update monetization configuration such as
5
+ * country/currency pricing rows for listing fees and access passes.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Property Enquiry Events
3
+ * Custom events emitted by property-service for enquiry/request workflows.
4
+ */
5
+ export declare type PropertyEnquiryRequestType = "viewing" | "offer" | "get";
6
+ export declare type PropertyEnquiryStatus = "pending" | "accepted" | "declined" | "expired" | "cancelled_by_tenant" | "cancelled_by_landlord";
7
+ export interface PropertyEnquiryCreatedEvent {
8
+ enquiryId: string;
9
+ propertyId: string;
10
+ requestType: PropertyEnquiryRequestType;
11
+ tenantAuthUserId: string;
12
+ landlordAuthUserId: string;
13
+ tenantMessage?: string;
14
+ }
15
+ export interface PropertyEnquiryStatusChangedEvent {
16
+ enquiryId: string;
17
+ propertyId: string;
18
+ requestType: PropertyEnquiryRequestType;
19
+ tenantAuthUserId: string;
20
+ landlordAuthUserId: string;
21
+ fromStatus?: PropertyEnquiryStatus;
22
+ toStatus: PropertyEnquiryStatus;
23
+ actorAuthUserId?: string;
24
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Property Enquiry Events
4
+ * Custom events emitted by property-service for enquiry/request workflows.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -58,6 +58,17 @@ export interface PropertyPricing {
58
58
  negotiable?: boolean;
59
59
  minPrice?: number;
60
60
  }
61
+ export interface PropertyMonetization {
62
+ listingFeePaid?: boolean;
63
+ listingFeeAmount?: number;
64
+ listingFeeCurrency?: string;
65
+ listingFeePaidAt?: string | Date;
66
+ listingFeeTransactionId?: string;
67
+ publishedAt?: string | Date;
68
+ unlistedAt?: string | Date;
69
+ expiresAt?: string | Date;
70
+ lastRenewedAt?: string | Date;
71
+ }
61
72
  export interface PropertyLocation {
62
73
  address: string;
63
74
  city?: string;
@@ -132,6 +143,7 @@ export interface PropertyCreatedEvent {
132
143
  favoritesCount?: number;
133
144
  viewsCount?: number;
134
145
  verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
146
+ monetization?: PropertyMonetization;
135
147
  createdAt: string | Date;
136
148
  updatedAt: string | Date;
137
149
  }
@@ -171,6 +183,7 @@ export interface PropertyUpdatedEvent {
171
183
  favoritesCount?: number;
172
184
  viewsCount?: number;
173
185
  verificationStatus?: "unverified" | "pending" | "verified" | "rejected" | "needs_info";
186
+ monetization?: PropertyMonetization;
174
187
  updatedAt: string | Date;
175
188
  }
176
189
  export interface PropertyStatusChangedEvent {
package/build/index.d.ts CHANGED
@@ -21,6 +21,8 @@ export * from "./events/types/payment-events";
21
21
  export * from "./events/types/chat-events";
22
22
  export * from "./events/types/promotion-events";
23
23
  export * from "./events/types/kyc-events";
24
+ export * from "./events/types/monetization-events";
25
+ export * from "./events/types/monetization-settings-events";
24
26
  export * from "./events/types";
25
27
  export * from "./events/publishers/country-created-publisher";
26
28
  export * from "./events/publishers/country-updated-publisher";
@@ -46,6 +48,8 @@ export * from "./events/publishers/property-viewing-confirmed-publisher";
46
48
  export * from "./events/publishers/property-viewing-completed-publisher";
47
49
  export * from "./events/publishers/property-viewing-cancelled-publisher";
48
50
  export * from "./events/publishers/property-viewing-no-show-publisher";
51
+ export * from "./events/publishers/property-enquiry-created-publisher";
52
+ export * from "./events/publishers/property-enquiry-status-changed-publisher";
49
53
  export * from "./events/publishers/rental-agreement-created-publisher";
50
54
  export * from "./events/publishers/rental-agreement-signed-publisher";
51
55
  export * from "./events/publishers/rental-agreement-activated-publisher";
@@ -145,3 +149,12 @@ export * from "./events/publishers/landlord-application-needs-info-publisher";
145
149
  export * from "./events/publishers/landlord-application-approved-publisher";
146
150
  export * from "./events/publishers/landlord-application-rejected-publisher";
147
151
  export * from "./events/publishers/landlord-application-updated-publisher";
152
+ export * from "./events/publishers/tenant-access-pass-purchased-publisher";
153
+ export * from "./events/publishers/tenant-access-pass-consumed-publisher";
154
+ export * from "./events/publishers/tenant-access-pass-expired-publisher";
155
+ export * from "./events/publishers/property-listing-expired-publisher";
156
+ export * from "./events/publishers/property-listing-renewed-publisher";
157
+ export * from "./events/publishers/property-listing-fee-marked-paid-publisher";
158
+ export * from "./events/publishers/monetization-pricing-upserted-publisher";
159
+ export * from "./events/publishers/monetization-pricing-activated-publisher";
160
+ export * from "./events/publishers/monetization-pricing-deactivated-publisher";
package/build/index.js CHANGED
@@ -34,6 +34,8 @@ __exportStar(require("./events/types/payment-events"), exports);
34
34
  __exportStar(require("./events/types/chat-events"), exports);
35
35
  __exportStar(require("./events/types/promotion-events"), exports);
36
36
  __exportStar(require("./events/types/kyc-events"), exports);
37
+ __exportStar(require("./events/types/monetization-events"), exports);
38
+ __exportStar(require("./events/types/monetization-settings-events"), exports);
37
39
  __exportStar(require("./events/types"), exports);
38
40
  // Geo Config / Location event publishers
39
41
  __exportStar(require("./events/publishers/country-created-publisher"), exports);
@@ -64,6 +66,9 @@ __exportStar(require("./events/publishers/property-viewing-confirmed-publisher")
64
66
  __exportStar(require("./events/publishers/property-viewing-completed-publisher"), exports);
65
67
  __exportStar(require("./events/publishers/property-viewing-cancelled-publisher"), exports);
66
68
  __exportStar(require("./events/publishers/property-viewing-no-show-publisher"), exports);
69
+ // Property Enquiry event publishers
70
+ __exportStar(require("./events/publishers/property-enquiry-created-publisher"), exports);
71
+ __exportStar(require("./events/publishers/property-enquiry-status-changed-publisher"), exports);
67
72
  // Rental Agreement event publishers
68
73
  __exportStar(require("./events/publishers/rental-agreement-created-publisher"), exports);
69
74
  __exportStar(require("./events/publishers/rental-agreement-signed-publisher"), exports);
@@ -182,3 +187,14 @@ __exportStar(require("./events/publishers/landlord-application-needs-info-publis
182
187
  __exportStar(require("./events/publishers/landlord-application-approved-publisher"), exports);
183
188
  __exportStar(require("./events/publishers/landlord-application-rejected-publisher"), exports);
184
189
  __exportStar(require("./events/publishers/landlord-application-updated-publisher"), exports);
190
+ // Monetization event publishers
191
+ __exportStar(require("./events/publishers/tenant-access-pass-purchased-publisher"), exports);
192
+ __exportStar(require("./events/publishers/tenant-access-pass-consumed-publisher"), exports);
193
+ __exportStar(require("./events/publishers/tenant-access-pass-expired-publisher"), exports);
194
+ __exportStar(require("./events/publishers/property-listing-expired-publisher"), exports);
195
+ __exportStar(require("./events/publishers/property-listing-renewed-publisher"), exports);
196
+ __exportStar(require("./events/publishers/property-listing-fee-marked-paid-publisher"), exports);
197
+ // Monetization settings publishers
198
+ __exportStar(require("./events/publishers/monetization-pricing-upserted-publisher"), exports);
199
+ __exportStar(require("./events/publishers/monetization-pricing-activated-publisher"), exports);
200
+ __exportStar(require("./events/publishers/monetization-pricing-deactivated-publisher"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentbase/common",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "common library for rentbase",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",