@rentbase/common 1.0.5 → 1.0.7

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 (29) hide show
  1. package/build/events/publishers/kyc-document-deleted-publisher.d.ts +6 -0
  2. package/build/events/publishers/kyc-document-deleted-publisher.js +21 -0
  3. package/build/events/publishers/kyc-document-rejected-publisher.d.ts +6 -0
  4. package/build/events/publishers/kyc-document-rejected-publisher.js +21 -0
  5. package/build/events/publishers/kyc-document-uploaded-publisher.d.ts +6 -0
  6. package/build/events/publishers/kyc-document-uploaded-publisher.js +21 -0
  7. package/build/events/publishers/kyc-document-verified-publisher.d.ts +6 -0
  8. package/build/events/publishers/kyc-document-verified-publisher.js +21 -0
  9. package/build/events/publishers/landlord-application-approved-publisher.d.ts +6 -0
  10. package/build/events/publishers/landlord-application-approved-publisher.js +21 -0
  11. package/build/events/publishers/landlord-application-created-publisher.d.ts +6 -0
  12. package/build/events/publishers/landlord-application-created-publisher.js +21 -0
  13. package/build/events/publishers/landlord-application-needs-info-publisher.d.ts +6 -0
  14. package/build/events/publishers/landlord-application-needs-info-publisher.js +21 -0
  15. package/build/events/publishers/landlord-application-rejected-publisher.d.ts +6 -0
  16. package/build/events/publishers/landlord-application-rejected-publisher.js +21 -0
  17. package/build/events/publishers/landlord-application-submitted-publisher.d.ts +6 -0
  18. package/build/events/publishers/landlord-application-submitted-publisher.js +21 -0
  19. package/build/events/publishers/landlord-application-under-review-publisher.d.ts +6 -0
  20. package/build/events/publishers/landlord-application-under-review-publisher.js +21 -0
  21. package/build/events/publishers/landlord-application-updated-publisher.d.ts +6 -0
  22. package/build/events/publishers/landlord-application-updated-publisher.js +21 -0
  23. package/build/events/types/index.d.ts +13 -0
  24. package/build/events/types/index.js +1 -0
  25. package/build/events/types/kyc-events.d.ts +164 -0
  26. package/build/events/types/kyc-events.js +5 -0
  27. package/build/index.d.ts +12 -0
  28. package/build/index.js +14 -0
  29. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ import { KycDocumentDeletedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish kyc.document.deleted event
4
+ * Called when a user deletes a KYC document
5
+ */
6
+ export declare const publishKycDocumentDeleted: (data: KycDocumentDeletedEvent) => 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.publishKycDocumentDeleted = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish kyc.document.deleted event
16
+ * Called when a user deletes a KYC document
17
+ */
18
+ const publishKycDocumentDeleted = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("kyc.document.deleted", data);
20
+ });
21
+ exports.publishKycDocumentDeleted = publishKycDocumentDeleted;
@@ -0,0 +1,6 @@
1
+ import { KycDocumentRejectedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish kyc.document.rejected event
4
+ * Called when an admin rejects a KYC document
5
+ */
6
+ export declare const publishKycDocumentRejected: (data: KycDocumentRejectedEvent) => 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.publishKycDocumentRejected = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish kyc.document.rejected event
16
+ * Called when an admin rejects a KYC document
17
+ */
18
+ const publishKycDocumentRejected = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("kyc.document.rejected", data);
20
+ });
21
+ exports.publishKycDocumentRejected = publishKycDocumentRejected;
@@ -0,0 +1,6 @@
1
+ import { KycDocumentUploadedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish kyc.document.uploaded event
4
+ * Called when a user uploads a KYC document
5
+ */
6
+ export declare const publishKycDocumentUploaded: (data: KycDocumentUploadedEvent) => 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.publishKycDocumentUploaded = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish kyc.document.uploaded event
16
+ * Called when a user uploads a KYC document
17
+ */
18
+ const publishKycDocumentUploaded = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("kyc.document.uploaded", data);
20
+ });
21
+ exports.publishKycDocumentUploaded = publishKycDocumentUploaded;
@@ -0,0 +1,6 @@
1
+ import { KycDocumentVerifiedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish kyc.document.verified event
4
+ * Called when an admin verifies a KYC document
5
+ */
6
+ export declare const publishKycDocumentVerified: (data: KycDocumentVerifiedEvent) => 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.publishKycDocumentVerified = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish kyc.document.verified event
16
+ * Called when an admin verifies a KYC document
17
+ */
18
+ const publishKycDocumentVerified = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("kyc.document.verified", data);
20
+ });
21
+ exports.publishKycDocumentVerified = publishKycDocumentVerified;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationApprovedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.approved event
4
+ * Called when an admin approves a landlord application
5
+ */
6
+ export declare const publishLandlordApplicationApproved: (data: LandlordApplicationApprovedEvent) => 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.publishLandlordApplicationApproved = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.approved event
16
+ * Called when an admin approves a landlord application
17
+ */
18
+ const publishLandlordApplicationApproved = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.approved", data);
20
+ });
21
+ exports.publishLandlordApplicationApproved = publishLandlordApplicationApproved;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationCreatedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.created event
4
+ * Called when a landlord application is created
5
+ */
6
+ export declare const publishLandlordApplicationCreated: (data: LandlordApplicationCreatedEvent) => 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.publishLandlordApplicationCreated = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.created event
16
+ * Called when a landlord application is created
17
+ */
18
+ const publishLandlordApplicationCreated = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.created", data);
20
+ });
21
+ exports.publishLandlordApplicationCreated = publishLandlordApplicationCreated;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationNeedsInfoEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.needs_info event
4
+ * Called when an admin requests additional information for a landlord application
5
+ */
6
+ export declare const publishLandlordApplicationNeedsInfo: (data: LandlordApplicationNeedsInfoEvent) => 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.publishLandlordApplicationNeedsInfo = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.needs_info event
16
+ * Called when an admin requests additional information for a landlord application
17
+ */
18
+ const publishLandlordApplicationNeedsInfo = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.needs_info", data);
20
+ });
21
+ exports.publishLandlordApplicationNeedsInfo = publishLandlordApplicationNeedsInfo;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationRejectedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.rejected event
4
+ * Called when an admin rejects a landlord application
5
+ */
6
+ export declare const publishLandlordApplicationRejected: (data: LandlordApplicationRejectedEvent) => 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.publishLandlordApplicationRejected = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.rejected event
16
+ * Called when an admin rejects a landlord application
17
+ */
18
+ const publishLandlordApplicationRejected = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.rejected", data);
20
+ });
21
+ exports.publishLandlordApplicationRejected = publishLandlordApplicationRejected;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationSubmittedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.submitted event
4
+ * Called when a landlord application is submitted for review
5
+ */
6
+ export declare const publishLandlordApplicationSubmitted: (data: LandlordApplicationSubmittedEvent) => 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.publishLandlordApplicationSubmitted = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.submitted event
16
+ * Called when a landlord application is submitted for review
17
+ */
18
+ const publishLandlordApplicationSubmitted = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.submitted", data);
20
+ });
21
+ exports.publishLandlordApplicationSubmitted = publishLandlordApplicationSubmitted;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationUnderReviewEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.under_review event
4
+ * Called when an admin starts reviewing a landlord application
5
+ */
6
+ export declare const publishLandlordApplicationUnderReview: (data: LandlordApplicationUnderReviewEvent) => 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.publishLandlordApplicationUnderReview = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.under_review event
16
+ * Called when an admin starts reviewing a landlord application
17
+ */
18
+ const publishLandlordApplicationUnderReview = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.under_review", data);
20
+ });
21
+ exports.publishLandlordApplicationUnderReview = publishLandlordApplicationUnderReview;
@@ -0,0 +1,6 @@
1
+ import { LandlordApplicationUpdatedEvent } from "../types/kyc-events";
2
+ /**
3
+ * Publish landlord.application.updated event
4
+ * Called when a landlord application is updated
5
+ */
6
+ export declare const publishLandlordApplicationUpdated: (data: LandlordApplicationUpdatedEvent) => 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.publishLandlordApplicationUpdated = void 0;
13
+ const producer_1 = require("../producer");
14
+ /**
15
+ * Publish landlord.application.updated event
16
+ * Called when a landlord application is updated
17
+ */
18
+ const publishLandlordApplicationUpdated = (data) => __awaiter(void 0, void 0, void 0, function* () {
19
+ yield (0, producer_1.publishEvent)("landlord.application.updated", data);
20
+ });
21
+ exports.publishLandlordApplicationUpdated = publishLandlordApplicationUpdated;
@@ -7,6 +7,7 @@ import { IncidentReportCreatedEvent, IncidentReportUpdatedEvent, IncidentReportR
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
8
  import { ChatSessionCreatedEvent, ChatSessionClosedEvent, ChatParticipantMutedEvent, MessageSentEvent, MessageDeliveredEvent, MessageReadEvent, SystemMessageAddedEvent, CallInitiatedEvent, CallRingingEvent, CallAnsweredEvent, CallRejectedEvent, CallMissedEvent, CallEndedEvent, CallFailedEvent, CallRatedEvent, CallProviderStatusUpdateEvent } from "./chat-events";
9
9
  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
+ import { KycDocumentUploadedEvent, KycDocumentVerifiedEvent, KycDocumentRejectedEvent, KycDocumentDeletedEvent, LandlordApplicationCreatedEvent, LandlordApplicationSubmittedEvent, LandlordApplicationUnderReviewEvent, LandlordApplicationNeedsInfoEvent, LandlordApplicationApprovedEvent, LandlordApplicationRejectedEvent, LandlordApplicationUpdatedEvent } from "./kyc-events";
10
11
  export interface EventMap {
11
12
  "request.created": RequestCreatedEvent;
12
13
  "request.updated": RequestUpdatedEvent;
@@ -122,6 +123,17 @@ export interface EventMap {
122
123
  "discount.applied": DiscountAppliedEvent;
123
124
  "campaign.redemption": CampaignRedemptionEvent;
124
125
  "referral.conversion": ReferralConversionEvent;
126
+ "kyc.document.uploaded": KycDocumentUploadedEvent;
127
+ "kyc.document.verified": KycDocumentVerifiedEvent;
128
+ "kyc.document.rejected": KycDocumentRejectedEvent;
129
+ "kyc.document.deleted": KycDocumentDeletedEvent;
130
+ "landlord.application.created": LandlordApplicationCreatedEvent;
131
+ "landlord.application.submitted": LandlordApplicationSubmittedEvent;
132
+ "landlord.application.under_review": LandlordApplicationUnderReviewEvent;
133
+ "landlord.application.needs_info": LandlordApplicationNeedsInfoEvent;
134
+ "landlord.application.approved": LandlordApplicationApprovedEvent;
135
+ "landlord.application.rejected": LandlordApplicationRejectedEvent;
136
+ "landlord.application.updated": LandlordApplicationUpdatedEvent;
125
137
  }
126
138
  export * from "./request-events";
127
139
  export * from "./geo-config-events";
@@ -132,3 +144,4 @@ export * from "./safety-events";
132
144
  export * from "./payment-events";
133
145
  export * from "./chat-events";
134
146
  export * from "./promotion-events";
147
+ export * from "./kyc-events";
@@ -20,3 +20,4 @@ __exportStar(require("./safety-events"), exports);
20
20
  __exportStar(require("./payment-events"), exports);
21
21
  __exportStar(require("./chat-events"), exports);
22
22
  __exportStar(require("./promotion-events"), exports);
23
+ __exportStar(require("./kyc-events"), exports);
@@ -0,0 +1,164 @@
1
+ /**
2
+ * KYC Event Types for Document Management & Landlord Applications
3
+ */
4
+ export declare type DocumentType = "national_id" | "passport" | "drivers_license" | "selfie_with_id" | "proof_of_address" | "other";
5
+ export declare type DocumentStatus = "pending" | "verified" | "rejected" | "expired";
6
+ export declare type ApplicationStatus = "draft" | "submitted" | "under_review" | "needs_info" | "approved" | "rejected";
7
+ export interface LandlordDetails {
8
+ dateOfBirth?: Date;
9
+ fullAddress: string;
10
+ city: string;
11
+ country: string;
12
+ intendedPropertyLocations: string[];
13
+ estimatedNumberOfProperties?: number;
14
+ hasLandlordExperience: boolean;
15
+ yearsOfExperience?: number;
16
+ bankName?: string;
17
+ bankAccountNumber?: string;
18
+ bankAccountHolderName?: string;
19
+ emergencyContactName: string;
20
+ emergencyContactPhone: string;
21
+ emergencyContactRelationship?: string;
22
+ }
23
+ export interface KycDocumentUploadedEvent {
24
+ id: string;
25
+ userId: string;
26
+ userAccountNumber: number;
27
+ documentType: DocumentType;
28
+ documentNumber?: string;
29
+ fileUrl: string;
30
+ fileName: string;
31
+ fileSize: number;
32
+ mimeType: string;
33
+ issueDate?: Date;
34
+ expiryDate?: Date;
35
+ issuingCountry?: string;
36
+ issuingAuthority?: string;
37
+ status: DocumentStatus;
38
+ ipAddress?: string;
39
+ userAgent?: string;
40
+ createdAt: Date;
41
+ }
42
+ export interface KycDocumentVerifiedEvent {
43
+ id: string;
44
+ userId: string;
45
+ userAccountNumber: number;
46
+ documentType: DocumentType;
47
+ documentNumber?: string;
48
+ status: "verified";
49
+ verifiedAt: Date;
50
+ verifiedBy: string;
51
+ adminNotes?: string;
52
+ }
53
+ export interface KycDocumentRejectedEvent {
54
+ id: string;
55
+ userId: string;
56
+ userAccountNumber: number;
57
+ documentType: DocumentType;
58
+ documentNumber?: string;
59
+ status: "rejected";
60
+ rejectionReason: string;
61
+ rejectedAt: Date;
62
+ rejectedBy: string;
63
+ adminNotes?: string;
64
+ }
65
+ export interface KycDocumentDeletedEvent {
66
+ id: string;
67
+ userId: string;
68
+ userAccountNumber: number;
69
+ documentType: DocumentType;
70
+ fileUrl: string;
71
+ deletedAt: Date;
72
+ }
73
+ export interface LandlordApplicationCreatedEvent {
74
+ id: string;
75
+ applicationId: string;
76
+ userId: string;
77
+ userAccountNumber: number;
78
+ landlordDetails: LandlordDetails;
79
+ kycDocuments: {
80
+ idDocument?: string;
81
+ selfieWithId?: string;
82
+ proofOfAddress?: string;
83
+ };
84
+ status: ApplicationStatus;
85
+ statusMessage: string;
86
+ verificationScore?: number;
87
+ flaggedForManualReview: boolean;
88
+ ipAddress?: string;
89
+ deviceInfo?: string;
90
+ createdAt: Date;
91
+ }
92
+ export interface LandlordApplicationSubmittedEvent {
93
+ id: string;
94
+ applicationId: string;
95
+ userId: string;
96
+ userAccountNumber: number;
97
+ status: "submitted";
98
+ statusMessage: string;
99
+ verificationScore?: number;
100
+ submittedAt: Date;
101
+ }
102
+ export interface LandlordApplicationUnderReviewEvent {
103
+ id: string;
104
+ applicationId: string;
105
+ userId: string;
106
+ userAccountNumber: number;
107
+ status: "under_review";
108
+ statusMessage: string;
109
+ reviewedBy: string;
110
+ reviewedAt: Date;
111
+ }
112
+ export interface LandlordApplicationNeedsInfoEvent {
113
+ id: string;
114
+ applicationId: string;
115
+ userId: string;
116
+ userAccountNumber: number;
117
+ status: "needs_info";
118
+ statusMessage: string;
119
+ additionalInfoRequired: string[];
120
+ adminNotes?: string;
121
+ reviewedBy: string;
122
+ updatedAt: Date;
123
+ }
124
+ export interface LandlordApplicationApprovedEvent {
125
+ id: string;
126
+ applicationId: string;
127
+ userId: string;
128
+ userAccountNumber: number;
129
+ status: "approved";
130
+ statusMessage: string;
131
+ verificationScore?: number;
132
+ approvedAt: Date;
133
+ approvedBy: string;
134
+ adminNotes?: string;
135
+ }
136
+ export interface LandlordApplicationRejectedEvent {
137
+ id: string;
138
+ applicationId: string;
139
+ userId: string;
140
+ userAccountNumber: number;
141
+ status: "rejected";
142
+ statusMessage: string;
143
+ rejectionReason: string;
144
+ rejectedAt: Date;
145
+ rejectedBy: string;
146
+ adminNotes?: string;
147
+ }
148
+ export interface LandlordApplicationUpdatedEvent {
149
+ id: string;
150
+ applicationId: string;
151
+ userId: string;
152
+ userAccountNumber: number;
153
+ landlordDetails: LandlordDetails;
154
+ kycDocuments: {
155
+ idDocument?: string;
156
+ selfieWithId?: string;
157
+ proofOfAddress?: string;
158
+ };
159
+ status: ApplicationStatus;
160
+ statusMessage: string;
161
+ verificationScore?: number;
162
+ flaggedForManualReview: boolean;
163
+ updatedAt: Date;
164
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * KYC Event Types for Document Management & Landlord Applications
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
package/build/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export * from "./events/types/geo-config-events";
20
20
  export * from "./events/types/payment-events";
21
21
  export * from "./events/types/chat-events";
22
22
  export * from "./events/types/promotion-events";
23
+ export * from "./events/types/kyc-events";
23
24
  export * from "./events/types";
24
25
  export * from "./events/publishers/country-created-publisher";
25
26
  export * from "./events/publishers/country-updated-publisher";
@@ -131,3 +132,14 @@ export * from "./events/publishers/discount-calculated-publisher";
131
132
  export * from "./events/publishers/discount-applied-publisher";
132
133
  export * from "./events/publishers/campaign-redemption-publisher";
133
134
  export * from "./events/publishers/referral-conversion-publisher";
135
+ export * from "./events/publishers/kyc-document-uploaded-publisher";
136
+ export * from "./events/publishers/kyc-document-verified-publisher";
137
+ export * from "./events/publishers/kyc-document-rejected-publisher";
138
+ export * from "./events/publishers/kyc-document-deleted-publisher";
139
+ export * from "./events/publishers/landlord-application-created-publisher";
140
+ export * from "./events/publishers/landlord-application-submitted-publisher";
141
+ export * from "./events/publishers/landlord-application-under-review-publisher";
142
+ export * from "./events/publishers/landlord-application-needs-info-publisher";
143
+ export * from "./events/publishers/landlord-application-approved-publisher";
144
+ export * from "./events/publishers/landlord-application-rejected-publisher";
145
+ export * from "./events/publishers/landlord-application-updated-publisher";
package/build/index.js CHANGED
@@ -33,6 +33,7 @@ __exportStar(require("./events/types/geo-config-events"), exports);
33
33
  __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
+ __exportStar(require("./events/types/kyc-events"), exports);
36
37
  __exportStar(require("./events/types"), exports);
37
38
  // Geo Config / Location event publishers
38
39
  __exportStar(require("./events/publishers/country-created-publisher"), exports);
@@ -165,3 +166,16 @@ __exportStar(require("./events/publishers/discount-applied-publisher"), exports)
165
166
  // Campaign Analytics event publishers
166
167
  __exportStar(require("./events/publishers/campaign-redemption-publisher"), exports);
167
168
  __exportStar(require("./events/publishers/referral-conversion-publisher"), exports);
169
+ // KYC Document event publishers
170
+ __exportStar(require("./events/publishers/kyc-document-uploaded-publisher"), exports);
171
+ __exportStar(require("./events/publishers/kyc-document-verified-publisher"), exports);
172
+ __exportStar(require("./events/publishers/kyc-document-rejected-publisher"), exports);
173
+ __exportStar(require("./events/publishers/kyc-document-deleted-publisher"), exports);
174
+ // Landlord Application event publishers
175
+ __exportStar(require("./events/publishers/landlord-application-created-publisher"), exports);
176
+ __exportStar(require("./events/publishers/landlord-application-submitted-publisher"), exports);
177
+ __exportStar(require("./events/publishers/landlord-application-under-review-publisher"), exports);
178
+ __exportStar(require("./events/publishers/landlord-application-needs-info-publisher"), exports);
179
+ __exportStar(require("./events/publishers/landlord-application-approved-publisher"), exports);
180
+ __exportStar(require("./events/publishers/landlord-application-rejected-publisher"), exports);
181
+ __exportStar(require("./events/publishers/landlord-application-updated-publisher"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentbase/common",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "common library for rentbase",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",