@helpio/common 1.0.3 → 1.0.4

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.
@@ -0,0 +1,36 @@
1
+ /**
2
+ * City (geo-config) Event Types
3
+ * Shape matches what services currently publish/consume.
4
+ */
5
+ export declare type CityCenter = {
6
+ lat: number;
7
+ lng: number;
8
+ };
9
+ export interface CityCreatedEvent {
10
+ id: string;
11
+ name: string;
12
+ countryId: string;
13
+ countryCode?: string;
14
+ slug?: string;
15
+ center?: CityCenter;
16
+ radiusKm?: number;
17
+ timezone?: string;
18
+ isLive: boolean;
19
+ tags?: string[];
20
+ }
21
+ export interface CityUpdatedEvent {
22
+ id: string;
23
+ name: string;
24
+ countryId: string;
25
+ countryCode?: string;
26
+ slug?: string;
27
+ center?: CityCenter;
28
+ radiusKm?: number;
29
+ timezone?: string;
30
+ isLive: boolean;
31
+ tags?: string[];
32
+ }
33
+ export interface CityStatusChangedEvent {
34
+ id: string;
35
+ isLive: boolean;
36
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * City (geo-config) Event Types
4
+ * Shape matches what services currently publish/consume.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,22 @@
1
1
  import { UserCreatedEvent, UserUpdatedEvent } from "./user-events";
2
2
  import { CountryCreatedEvent, CountryStatusChangedEvent, CountryUpdatedEvent } from "./country-events";
3
+ import { CityCreatedEvent, CityStatusChangedEvent, CityUpdatedEvent } from "./city-events";
4
+ import { KycDocumentDeletedEvent, KycDocumentRejectedEvent, KycDocumentUploadedEvent, KycDocumentVerifiedEvent } from "./kyc-document-events";
3
5
  export interface EventMap {
4
6
  "user.created": UserCreatedEvent;
5
7
  "user.updated": UserUpdatedEvent;
6
8
  "country.created": CountryCreatedEvent;
7
9
  "country.updated": CountryUpdatedEvent;
8
10
  "country.status.changed": CountryStatusChangedEvent;
11
+ "city.created": CityCreatedEvent;
12
+ "city.updated": CityUpdatedEvent;
13
+ "city.status.changed": CityStatusChangedEvent;
14
+ "kyc.document.uploaded": KycDocumentUploadedEvent;
15
+ "kyc.document.verified": KycDocumentVerifiedEvent;
16
+ "kyc.document.rejected": KycDocumentRejectedEvent;
17
+ "kyc.document.deleted": KycDocumentDeletedEvent;
9
18
  }
10
19
  export * from "./user-events";
11
20
  export * from "./country-events";
21
+ export * from "./city-events";
22
+ export * from "./kyc-document-events";
@@ -13,3 +13,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
13
  // Export all event types
14
14
  __exportStar(require("./user-events"), exports);
15
15
  __exportStar(require("./country-events"), exports);
16
+ __exportStar(require("./city-events"), exports);
17
+ __exportStar(require("./kyc-document-events"), exports);
@@ -0,0 +1,56 @@
1
+ /**
2
+ * KYC Document Event Types
3
+ * Published by kyc-doc-management-service.
4
+ */
5
+ export declare type KycDocumentStatus = "pending" | "verified" | "rejected" | "expired";
6
+ export declare type KycDocumentType = "national_id" | "passport" | "drivers_license" | "police_clearance" | "certificate" | "proof_of_address" | "selfie" | "other";
7
+ export interface KycDocumentUploadedEvent {
8
+ id: string;
9
+ userId: string;
10
+ userAccountNumber: number;
11
+ documentType: KycDocumentType | string;
12
+ documentNumber?: string;
13
+ fileUrl: string;
14
+ fileName: string;
15
+ fileSize: number;
16
+ mimeType: string;
17
+ issueDate?: Date;
18
+ expiryDate?: Date;
19
+ issuingCountry?: string;
20
+ issuingAuthority?: string;
21
+ status: KycDocumentStatus;
22
+ ipAddress?: string;
23
+ userAgent?: string;
24
+ createdAt: Date;
25
+ }
26
+ export interface KycDocumentVerifiedEvent {
27
+ id: string;
28
+ userId: string;
29
+ userAccountNumber: number;
30
+ documentType: KycDocumentType | string;
31
+ documentNumber?: string;
32
+ status: "verified";
33
+ verifiedAt: Date;
34
+ verifiedBy: string;
35
+ adminNotes?: string;
36
+ }
37
+ export interface KycDocumentRejectedEvent {
38
+ id: string;
39
+ userId: string;
40
+ userAccountNumber: number;
41
+ documentType: KycDocumentType | string;
42
+ documentNumber?: string;
43
+ status: "rejected";
44
+ rejectionReason: string;
45
+ rejectedAt: Date;
46
+ rejectedBy: string;
47
+ adminNotes?: string;
48
+ }
49
+ export interface KycDocumentDeletedEvent {
50
+ id: string;
51
+ userId: string;
52
+ userAccountNumber: number;
53
+ documentType: KycDocumentType | string;
54
+ fileUrl: string;
55
+ deletedAt: Date;
56
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * KYC Document Event Types
4
+ * Published by kyc-doc-management-service.
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helpio/common",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "common library for Helpio ",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",