vesant-sdk 1.1.0 → 1.2.0

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 (53) hide show
  1. package/dist/{types-DgNbBnEH.d.ts → client-BIfLMfuC.d.mts} +274 -2
  2. package/dist/{types-DGbuL8c0.d.mts → client-BWp5FI3x.d.ts} +274 -2
  3. package/dist/compliance/index.d.mts +9 -4
  4. package/dist/compliance/index.d.ts +9 -4
  5. package/dist/compliance/index.js +297 -2
  6. package/dist/compliance/index.js.map +1 -1
  7. package/dist/compliance/index.mjs +297 -2
  8. package/dist/compliance/index.mjs.map +1 -1
  9. package/dist/geolocation/index.d.mts +3 -5
  10. package/dist/geolocation/index.d.ts +3 -5
  11. package/dist/geolocation/index.js +310 -250
  12. package/dist/geolocation/index.js.map +1 -1
  13. package/dist/geolocation/index.mjs +310 -250
  14. package/dist/geolocation/index.mjs.map +1 -1
  15. package/dist/index.d.mts +5 -7
  16. package/dist/index.d.ts +5 -7
  17. package/dist/index.js +322 -251
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +322 -251
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/kyc/core.d.mts +2 -3
  22. package/dist/kyc/core.d.ts +2 -3
  23. package/dist/kyc/core.js +1 -1
  24. package/dist/kyc/core.js.map +1 -1
  25. package/dist/kyc/core.mjs +1 -1
  26. package/dist/kyc/core.mjs.map +1 -1
  27. package/dist/kyc/index.d.mts +2 -3
  28. package/dist/kyc/index.d.ts +2 -3
  29. package/dist/kyc/index.js +1 -1
  30. package/dist/kyc/index.js.map +1 -1
  31. package/dist/kyc/index.mjs +1 -1
  32. package/dist/kyc/index.mjs.map +1 -1
  33. package/dist/react.d.mts +3 -5
  34. package/dist/react.d.ts +3 -5
  35. package/dist/react.js +29 -3
  36. package/dist/react.js.map +1 -1
  37. package/dist/react.mjs +29 -3
  38. package/dist/react.mjs.map +1 -1
  39. package/dist/risk-profile/index.d.mts +4 -5
  40. package/dist/risk-profile/index.d.ts +4 -5
  41. package/dist/risk-profile/index.js +1 -1
  42. package/dist/risk-profile/index.js.map +1 -1
  43. package/dist/risk-profile/index.mjs +1 -1
  44. package/dist/risk-profile/index.mjs.map +1 -1
  45. package/dist/{types-DBGM-bFB.d.mts → types-BpKxSXGF.d.mts} +50 -1
  46. package/dist/{types-DBGM-bFB.d.ts → types-BpKxSXGF.d.ts} +50 -1
  47. package/dist/{types-BQTkTvNp.d.mts → types-DKCQN4C5.d.mts} +1 -1
  48. package/dist/{types-BF8mYH2W.d.ts → types-DfHLp_tz.d.ts} +1 -1
  49. package/package.json +1 -1
  50. package/dist/client-B7YzKVEm.d.mts +0 -52
  51. package/dist/client-BaNLT2Df.d.ts +0 -52
  52. package/dist/client-VKJg2GGT.d.mts +0 -253
  53. package/dist/client-hXdrPhA4.d.ts +0 -253
@@ -1,4 +1,4 @@
1
- import { L as Logger, P as PaginationParams } from './types-DBGM-bFB.js';
1
+ import { b as Logger, P as PaginationParams, B as BaseClient, R as RequestOptions } from './types-BpKxSXGF.mjs';
2
2
 
3
3
  interface DeviceFingerprintRequest {
4
4
  device_id: string;
@@ -73,6 +73,10 @@ type CipherTextReason = 'registration' | 'login' | 'transaction' | 'interval_che
73
73
  interface CipherTextOptions {
74
74
  /** Reason for collection (required) */
75
75
  reason: CipherTextReason;
76
+ /** Public signing key (pk_) for HMAC signing (produces v02 signed cipherText) */
77
+ signingKey?: string;
78
+ /** @deprecated Use signingKey instead. API key for HMAC signing (backward compat) */
79
+ apiKey?: string;
76
80
  /** Request GPS location (default: false) */
77
81
  requestLocation?: boolean;
78
82
  /** GPS timeout in milliseconds (default: 10000) */
@@ -449,6 +453,8 @@ interface GeolocationConfigResponse {
449
453
  registration: boolean;
450
454
  transaction: boolean;
451
455
  };
456
+ /** Public signing key (pk_) for client-side HMAC signing */
457
+ signing_key?: string;
452
458
  }
453
459
  interface GeolocationClientConfig {
454
460
  /** Base URL of the API Gateway (e.g., "https://api.example.com") */
@@ -718,4 +724,270 @@ interface UseLocationCaptureResult {
718
724
  captureAndSubmitGPS: () => Promise<LocationCaptureResponse>;
719
725
  }
720
726
 
721
- export type { UseLocationRequestsResult as $, AlertStatus as A, DashboardMetrics as B, ComplianceCheckResponse as C, DeviceFingerprintRequest as D, CreateJurisdictionRequest as E, GeofenceRuleType as F, GeolocationClientConfig as G, GeofenceAction as H, GeofenceRule as I, JurisdictionConfig as J, CreateGeofenceRuleRequest as K, LocationVerification as L, UpdateGeofenceRuleRequest as M, UpdateDeviceTrustRequest as N, GeolocationRecord as O, APIError as P, UseGeolocationOptions as Q, ResendLocationRequestRequest as R, UseGeolocationResult as S, UseAlertsOptions as T, UpdateJurisdictionRequest as U, VerifyIPRequest as V, UseAlertsResult as W, LocationRequestStatus as X, LocationRequestChannel as Y, WiFiNetwork as Z, UseLocationRequestsOptions as _, GeolocationConfigResponse as a, UseLocationCaptureOptions as a0, UseLocationCaptureResult as a1, CipherTextReason as b, CipherTextCustomerData as c, ValidateCipherTextResponse as d, CreateLocationRequestRequest as e, LocationRequestResult as f, LocationRequest as g, LocationRequestFilters as h, LocationRequestListResponse as i, LocationShareInfo as j, LocationCaptureRequest as k, LocationCaptureResponse as l, CipherTextPayload as m, CipherTextOptions as n, CipherTextResult as o, DecryptedCipherText as p, ValidateCipherTextRequest as q, GeoIPResult as r, GeofenceEvaluation as s, DeviceFingerprint as t, DeviceTrustResult as u, AlertSeverity as v, AlertType as w, GeolocationAlert as x, AlertFilters as y, AlertListResponse as z };
727
+ /**
728
+ * GeolocationClient - TypeScript SDK for CGS Geolocation & Compliance Service
729
+ *
730
+ * Provides type-safe methods to interact with the geolocation service API.
731
+ * Extends BaseClient for consistent retry logic, timeout handling, and error management.
732
+ */
733
+
734
+ /**
735
+ * GeolocationClient extends BaseClient for:
736
+ * - Consistent retry logic with exponential backoff
737
+ * - Unified error handling (CGSError, NetworkError, TimeoutError, etc.)
738
+ * - Automatic timeout management
739
+ * - Debug logging
740
+ *
741
+ * All geolocation verification calls use requestWithRetry() to handle
742
+ * transient failures gracefully.
743
+ */
744
+ declare class GeolocationClient extends BaseClient {
745
+ private cachedSigningKey?;
746
+ constructor(config: GeolocationClientConfig);
747
+ /**
748
+ * Verify an IP address and check compliance
749
+ *
750
+ * Uses requestWithRetry() for automatic retry on transient failures.
751
+ *
752
+ * @param request - Verification request with IP, user ID, event type, and optional device fingerprint
753
+ * @returns Location verification result with risk assessment
754
+ *
755
+ * @example
756
+ * ```typescript
757
+ * const result = await client.verifyIP({
758
+ * ip_address: "8.8.8.8",
759
+ * user_id: "user_123",
760
+ * event_type: "login",
761
+ * device_fingerprint: {
762
+ * device_id: "device_abc",
763
+ * user_agent: navigator.userAgent,
764
+ * platform: "web"
765
+ * }
766
+ * });
767
+ *
768
+ * if (result.is_blocked) {
769
+ * console.log("Access blocked:", result.risk_reasons);
770
+ * }
771
+ * ```
772
+ */
773
+ verifyIP(request: VerifyIPRequest, requestOptions?: RequestOptions): Promise<LocationVerification>;
774
+ /**
775
+ * Check compliance for a specific country
776
+ *
777
+ * @param countryISO - ISO 3166-1 alpha-2 country code (e.g., "US", "GB")
778
+ * @returns Jurisdiction configuration and compliance status
779
+ *
780
+ * @example
781
+ * ```typescript
782
+ * const compliance = await client.checkCompliance("KP"); // North Korea
783
+ * if (!compliance.is_compliant) {
784
+ * console.log("Country is not allowed:", compliance.jurisdiction?.status);
785
+ * }
786
+ * ```
787
+ */
788
+ checkCompliance(countryISO: string, requestOptions?: RequestOptions): Promise<ComplianceCheckResponse>;
789
+ /**
790
+ * Get the tenant's GPS requirement configuration
791
+ *
792
+ * Returns which event types require GPS location to be collected.
793
+ * Use this to auto-enable GPS collection in generateCipherText when required.
794
+ *
795
+ * @returns GPS requirement config per event type
796
+ *
797
+ * @example
798
+ * ```typescript
799
+ * const config = await client.getGPSConfig();
800
+ * if (config.require_gps.login) {
801
+ * // GPS is required for login — auto-enable location
802
+ * }
803
+ * ```
804
+ */
805
+ getGPSConfig(requestOptions?: RequestOptions): Promise<GeolocationConfigResponse>;
806
+ /**
807
+ * Validate a cipherText generated by the frontend SDK
808
+ *
809
+ * The cipherText contains encrypted device fingerprint and optional location data.
810
+ * This method decrypts and validates the data, returning device info, location,
811
+ * and risk assessment.
812
+ *
813
+ * @param cipherText - The encrypted cipherText string from generateCipherText()
814
+ * @param userId - User ID associated with this verification
815
+ * @param eventType - Reason for verification (login, registration, etc.)
816
+ * @param expectedIP - Optional expected IP address for additional validation
817
+ * @param customerData - Optional customer data for risk profile creation (used when user is blocked)
818
+ * @returns Validation result with device info, location, and risk assessment
819
+ *
820
+ * @example
821
+ * ```typescript
822
+ * // Validate cipherText during registration with customer data
823
+ * const result = await client.validateCipherText(
824
+ * cipherText,
825
+ * "user_123",
826
+ * "registration",
827
+ * clientIP,
828
+ * {
829
+ * full_name: "John Doe",
830
+ * email: "john@example.com",
831
+ * country: "US",
832
+ * state: "CA"
833
+ * }
834
+ * );
835
+ *
836
+ * if (!result.valid) {
837
+ * console.log("CipherText validation failed:", result.errors);
838
+ * return;
839
+ * }
840
+ *
841
+ * if (result.risk.is_blocked) {
842
+ * console.log("Access blocked:", result.risk.block_reasons);
843
+ * // A risk profile with full customer data has been created for the alert
844
+ * }
845
+ * ```
846
+ */
847
+ validateCipherText(cipherText: string, userId: string, eventType: CipherTextReason, expectedIP?: string, customerData?: CipherTextCustomerData, requestOptions?: RequestOptions): Promise<ValidateCipherTextResponse>;
848
+ /**
849
+ * Validate cipherText and verify IP in a single call
850
+ *
851
+ * Combines cipherText validation with IP verification for complete
852
+ * location and device verification in one request.
853
+ *
854
+ * @param cipherText - The encrypted cipherText string
855
+ * @param ipAddress - Client IP address
856
+ * @param userId - User ID
857
+ * @param eventType - Event type (login, registration, etc.)
858
+ * @returns Combined validation and verification result
859
+ *
860
+ * @example
861
+ * ```typescript
862
+ * const result = await client.validateAndVerify(
863
+ * cipherText,
864
+ * clientIP,
865
+ * "user_123",
866
+ * "registration"
867
+ * );
868
+ *
869
+ * if (!result.ciphertext_valid) {
870
+ * throw new Error("Device verification failed");
871
+ * }
872
+ *
873
+ * if (result.location.is_blocked) {
874
+ * throw new Error("Location not allowed");
875
+ * }
876
+ * ```
877
+ */
878
+ validateAndVerify(cipherText: string, ipAddress: string, userId: string, eventType: CipherTextReason, requestOptions?: RequestOptions): Promise<{
879
+ ciphertext_valid: boolean;
880
+ ciphertext_result: ValidateCipherTextResponse;
881
+ location: LocationVerification;
882
+ }>;
883
+ /**
884
+ * Create a location request to get customer's live location
885
+ *
886
+ * @param request - Location request details
887
+ * @returns Location request result with share link
888
+ *
889
+ * @example
890
+ * ```typescript
891
+ * const result = await client.createLocationRequest({
892
+ * user_id: "customer_123",
893
+ * channel: "sms",
894
+ * phone: "+1234567890",
895
+ * reason: "Verification for high-value transaction"
896
+ * });
897
+ *
898
+ * console.log(`Share link sent: ${result.share_link}`);
899
+ * console.log(`Expires at: ${result.token_expiry}`);
900
+ * ```
901
+ */
902
+ createLocationRequest(request: CreateLocationRequestRequest, requestOptions?: RequestOptions): Promise<LocationRequestResult>;
903
+ /**
904
+ * Get a location request by ID
905
+ *
906
+ * @param requestId - Location request ID
907
+ * @returns Location request details
908
+ */
909
+ getLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<LocationRequest>;
910
+ /**
911
+ * List location requests with filters and pagination
912
+ *
913
+ * @param filters - Optional filters
914
+ * @param pagination - Optional pagination
915
+ * @returns Paginated list of location requests
916
+ *
917
+ * @example
918
+ * ```typescript
919
+ * const requests = await client.listLocationRequests(
920
+ * { status: "completed", user_id: "customer_123" },
921
+ * { page: 1, limit: 20 }
922
+ * );
923
+ * ```
924
+ */
925
+ listLocationRequests(filters?: LocationRequestFilters, pagination?: PaginationParams, requestOptions?: RequestOptions): Promise<LocationRequestListResponse>;
926
+ /**
927
+ * Cancel a pending location request
928
+ *
929
+ * @param requestId - Location request ID
930
+ */
931
+ cancelLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<void>;
932
+ /**
933
+ * Resend notification for a location request
934
+ *
935
+ * @param requestId - Location request ID
936
+ * @param contact - Email or phone to send to
937
+ */
938
+ resendLocationRequest(requestId: string, contact: ResendLocationRequestRequest, requestOptions?: RequestOptions): Promise<void>;
939
+ /**
940
+ * Get location share info (customer-facing)
941
+ * This is called from the customer's device to get request details
942
+ *
943
+ * @param token - Secure token from share link
944
+ * @returns Location share info
945
+ */
946
+ getLocationShareInfo(token: string, requestOptions?: RequestOptions): Promise<LocationShareInfo>;
947
+ /**
948
+ * Submit location capture (customer-facing)
949
+ * This is called from the customer's device to submit their location
950
+ *
951
+ * @param token - Secure token from share link
952
+ * @param capture - Location capture data (GPS or WiFi)
953
+ * @returns Capture response
954
+ *
955
+ * @example
956
+ * ```typescript
957
+ * // Using GPS (preferred)
958
+ * const result = await client.captureLocation(token, {
959
+ * latitude: 37.7749,
960
+ * longitude: -122.4194,
961
+ * accuracy: 10
962
+ * });
963
+ *
964
+ * // Using WiFi positioning (fallback)
965
+ * const result = await client.captureLocation(token, {
966
+ * wifi_networks: [
967
+ * { macAddress: "00:11:22:33:44:55", signalStrength: -50 },
968
+ * { macAddress: "AA:BB:CC:DD:EE:FF", signalStrength: -70 }
969
+ * ]
970
+ * });
971
+ * ```
972
+ */
973
+ captureLocation(token: string, capture: LocationCaptureRequest, requestOptions?: RequestOptions): Promise<LocationCaptureResponse>;
974
+ /**
975
+ * Generate a signed cipherText containing device and location data.
976
+ *
977
+ * Automatically passes the client's API key for HMAC signing (v02 format).
978
+ * If no API key is configured, falls back to unsigned v01 format.
979
+ *
980
+ * @param options - Options for cipherText generation
981
+ * @param gpsConfig - Optional GPS config (from getGPSConfig)
982
+ * @returns CipherText result with the signed string
983
+ *
984
+ * @example
985
+ * ```typescript
986
+ * const result = await client.generateCipherText({ reason: 'login' });
987
+ * console.log(result.cipherText); // v02 signed cipherText
988
+ * ```
989
+ */
990
+ generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
991
+ }
992
+
993
+ export { type UseLocationRequestsOptions as $, type AlertStatus as A, type APIError as B, type CipherTextPayload as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationClientConfig as F, GeolocationClient as G, type UseGeolocationOptions as H, type UseGeolocationResult as I, type JurisdictionConfig as J, type UseAlertsOptions as K, type LocationVerification as L, type UseAlertsResult as M, type LocationRequestStatus as N, type LocationRequestChannel as O, type LocationRequest as P, type CreateLocationRequestRequest as Q, type LocationRequestResult as R, type LocationRequestFilters as S, type LocationRequestListResponse as T, type UpdateJurisdictionRequest as U, type ValidateCipherTextRequest as V, type ResendLocationRequestRequest as W, type WiFiNetwork as X, type LocationCaptureRequest as Y, type LocationShareInfo as Z, type LocationCaptureResponse as _, type CipherTextReason as a, type UseLocationRequestsResult as a0, type UseLocationCaptureOptions as a1, type UseLocationCaptureResult as a2, type CipherTextOptions as b, type CipherTextResult as c, type DecryptedCipherText as d, type CipherTextCustomerData as e, type ValidateCipherTextResponse as f, type VerifyIPRequest as g, type GeoIPResult as h, type GeofenceEvaluation as i, type DeviceFingerprint as j, type DeviceTrustResult as k, type ComplianceCheckResponse as l, type AlertSeverity as m, type AlertType as n, type GeolocationAlert as o, type AlertFilters as p, type AlertListResponse as q, type DashboardMetrics as r, type CreateJurisdictionRequest as s, type GeofenceRuleType as t, type GeofenceAction as u, type GeofenceRule as v, type CreateGeofenceRuleRequest as w, type UpdateGeofenceRuleRequest as x, type UpdateDeviceTrustRequest as y, type GeolocationRecord as z };
@@ -1,4 +1,4 @@
1
- import { L as Logger, P as PaginationParams } from './types-DBGM-bFB.mjs';
1
+ import { b as Logger, P as PaginationParams, B as BaseClient, R as RequestOptions } from './types-BpKxSXGF.js';
2
2
 
3
3
  interface DeviceFingerprintRequest {
4
4
  device_id: string;
@@ -73,6 +73,10 @@ type CipherTextReason = 'registration' | 'login' | 'transaction' | 'interval_che
73
73
  interface CipherTextOptions {
74
74
  /** Reason for collection (required) */
75
75
  reason: CipherTextReason;
76
+ /** Public signing key (pk_) for HMAC signing (produces v02 signed cipherText) */
77
+ signingKey?: string;
78
+ /** @deprecated Use signingKey instead. API key for HMAC signing (backward compat) */
79
+ apiKey?: string;
76
80
  /** Request GPS location (default: false) */
77
81
  requestLocation?: boolean;
78
82
  /** GPS timeout in milliseconds (default: 10000) */
@@ -449,6 +453,8 @@ interface GeolocationConfigResponse {
449
453
  registration: boolean;
450
454
  transaction: boolean;
451
455
  };
456
+ /** Public signing key (pk_) for client-side HMAC signing */
457
+ signing_key?: string;
452
458
  }
453
459
  interface GeolocationClientConfig {
454
460
  /** Base URL of the API Gateway (e.g., "https://api.example.com") */
@@ -718,4 +724,270 @@ interface UseLocationCaptureResult {
718
724
  captureAndSubmitGPS: () => Promise<LocationCaptureResponse>;
719
725
  }
720
726
 
721
- export type { UseLocationRequestsResult as $, AlertStatus as A, DashboardMetrics as B, ComplianceCheckResponse as C, DeviceFingerprintRequest as D, CreateJurisdictionRequest as E, GeofenceRuleType as F, GeolocationClientConfig as G, GeofenceAction as H, GeofenceRule as I, JurisdictionConfig as J, CreateGeofenceRuleRequest as K, LocationVerification as L, UpdateGeofenceRuleRequest as M, UpdateDeviceTrustRequest as N, GeolocationRecord as O, APIError as P, UseGeolocationOptions as Q, ResendLocationRequestRequest as R, UseGeolocationResult as S, UseAlertsOptions as T, UpdateJurisdictionRequest as U, VerifyIPRequest as V, UseAlertsResult as W, LocationRequestStatus as X, LocationRequestChannel as Y, WiFiNetwork as Z, UseLocationRequestsOptions as _, GeolocationConfigResponse as a, UseLocationCaptureOptions as a0, UseLocationCaptureResult as a1, CipherTextReason as b, CipherTextCustomerData as c, ValidateCipherTextResponse as d, CreateLocationRequestRequest as e, LocationRequestResult as f, LocationRequest as g, LocationRequestFilters as h, LocationRequestListResponse as i, LocationShareInfo as j, LocationCaptureRequest as k, LocationCaptureResponse as l, CipherTextPayload as m, CipherTextOptions as n, CipherTextResult as o, DecryptedCipherText as p, ValidateCipherTextRequest as q, GeoIPResult as r, GeofenceEvaluation as s, DeviceFingerprint as t, DeviceTrustResult as u, AlertSeverity as v, AlertType as w, GeolocationAlert as x, AlertFilters as y, AlertListResponse as z };
727
+ /**
728
+ * GeolocationClient - TypeScript SDK for CGS Geolocation & Compliance Service
729
+ *
730
+ * Provides type-safe methods to interact with the geolocation service API.
731
+ * Extends BaseClient for consistent retry logic, timeout handling, and error management.
732
+ */
733
+
734
+ /**
735
+ * GeolocationClient extends BaseClient for:
736
+ * - Consistent retry logic with exponential backoff
737
+ * - Unified error handling (CGSError, NetworkError, TimeoutError, etc.)
738
+ * - Automatic timeout management
739
+ * - Debug logging
740
+ *
741
+ * All geolocation verification calls use requestWithRetry() to handle
742
+ * transient failures gracefully.
743
+ */
744
+ declare class GeolocationClient extends BaseClient {
745
+ private cachedSigningKey?;
746
+ constructor(config: GeolocationClientConfig);
747
+ /**
748
+ * Verify an IP address and check compliance
749
+ *
750
+ * Uses requestWithRetry() for automatic retry on transient failures.
751
+ *
752
+ * @param request - Verification request with IP, user ID, event type, and optional device fingerprint
753
+ * @returns Location verification result with risk assessment
754
+ *
755
+ * @example
756
+ * ```typescript
757
+ * const result = await client.verifyIP({
758
+ * ip_address: "8.8.8.8",
759
+ * user_id: "user_123",
760
+ * event_type: "login",
761
+ * device_fingerprint: {
762
+ * device_id: "device_abc",
763
+ * user_agent: navigator.userAgent,
764
+ * platform: "web"
765
+ * }
766
+ * });
767
+ *
768
+ * if (result.is_blocked) {
769
+ * console.log("Access blocked:", result.risk_reasons);
770
+ * }
771
+ * ```
772
+ */
773
+ verifyIP(request: VerifyIPRequest, requestOptions?: RequestOptions): Promise<LocationVerification>;
774
+ /**
775
+ * Check compliance for a specific country
776
+ *
777
+ * @param countryISO - ISO 3166-1 alpha-2 country code (e.g., "US", "GB")
778
+ * @returns Jurisdiction configuration and compliance status
779
+ *
780
+ * @example
781
+ * ```typescript
782
+ * const compliance = await client.checkCompliance("KP"); // North Korea
783
+ * if (!compliance.is_compliant) {
784
+ * console.log("Country is not allowed:", compliance.jurisdiction?.status);
785
+ * }
786
+ * ```
787
+ */
788
+ checkCompliance(countryISO: string, requestOptions?: RequestOptions): Promise<ComplianceCheckResponse>;
789
+ /**
790
+ * Get the tenant's GPS requirement configuration
791
+ *
792
+ * Returns which event types require GPS location to be collected.
793
+ * Use this to auto-enable GPS collection in generateCipherText when required.
794
+ *
795
+ * @returns GPS requirement config per event type
796
+ *
797
+ * @example
798
+ * ```typescript
799
+ * const config = await client.getGPSConfig();
800
+ * if (config.require_gps.login) {
801
+ * // GPS is required for login — auto-enable location
802
+ * }
803
+ * ```
804
+ */
805
+ getGPSConfig(requestOptions?: RequestOptions): Promise<GeolocationConfigResponse>;
806
+ /**
807
+ * Validate a cipherText generated by the frontend SDK
808
+ *
809
+ * The cipherText contains encrypted device fingerprint and optional location data.
810
+ * This method decrypts and validates the data, returning device info, location,
811
+ * and risk assessment.
812
+ *
813
+ * @param cipherText - The encrypted cipherText string from generateCipherText()
814
+ * @param userId - User ID associated with this verification
815
+ * @param eventType - Reason for verification (login, registration, etc.)
816
+ * @param expectedIP - Optional expected IP address for additional validation
817
+ * @param customerData - Optional customer data for risk profile creation (used when user is blocked)
818
+ * @returns Validation result with device info, location, and risk assessment
819
+ *
820
+ * @example
821
+ * ```typescript
822
+ * // Validate cipherText during registration with customer data
823
+ * const result = await client.validateCipherText(
824
+ * cipherText,
825
+ * "user_123",
826
+ * "registration",
827
+ * clientIP,
828
+ * {
829
+ * full_name: "John Doe",
830
+ * email: "john@example.com",
831
+ * country: "US",
832
+ * state: "CA"
833
+ * }
834
+ * );
835
+ *
836
+ * if (!result.valid) {
837
+ * console.log("CipherText validation failed:", result.errors);
838
+ * return;
839
+ * }
840
+ *
841
+ * if (result.risk.is_blocked) {
842
+ * console.log("Access blocked:", result.risk.block_reasons);
843
+ * // A risk profile with full customer data has been created for the alert
844
+ * }
845
+ * ```
846
+ */
847
+ validateCipherText(cipherText: string, userId: string, eventType: CipherTextReason, expectedIP?: string, customerData?: CipherTextCustomerData, requestOptions?: RequestOptions): Promise<ValidateCipherTextResponse>;
848
+ /**
849
+ * Validate cipherText and verify IP in a single call
850
+ *
851
+ * Combines cipherText validation with IP verification for complete
852
+ * location and device verification in one request.
853
+ *
854
+ * @param cipherText - The encrypted cipherText string
855
+ * @param ipAddress - Client IP address
856
+ * @param userId - User ID
857
+ * @param eventType - Event type (login, registration, etc.)
858
+ * @returns Combined validation and verification result
859
+ *
860
+ * @example
861
+ * ```typescript
862
+ * const result = await client.validateAndVerify(
863
+ * cipherText,
864
+ * clientIP,
865
+ * "user_123",
866
+ * "registration"
867
+ * );
868
+ *
869
+ * if (!result.ciphertext_valid) {
870
+ * throw new Error("Device verification failed");
871
+ * }
872
+ *
873
+ * if (result.location.is_blocked) {
874
+ * throw new Error("Location not allowed");
875
+ * }
876
+ * ```
877
+ */
878
+ validateAndVerify(cipherText: string, ipAddress: string, userId: string, eventType: CipherTextReason, requestOptions?: RequestOptions): Promise<{
879
+ ciphertext_valid: boolean;
880
+ ciphertext_result: ValidateCipherTextResponse;
881
+ location: LocationVerification;
882
+ }>;
883
+ /**
884
+ * Create a location request to get customer's live location
885
+ *
886
+ * @param request - Location request details
887
+ * @returns Location request result with share link
888
+ *
889
+ * @example
890
+ * ```typescript
891
+ * const result = await client.createLocationRequest({
892
+ * user_id: "customer_123",
893
+ * channel: "sms",
894
+ * phone: "+1234567890",
895
+ * reason: "Verification for high-value transaction"
896
+ * });
897
+ *
898
+ * console.log(`Share link sent: ${result.share_link}`);
899
+ * console.log(`Expires at: ${result.token_expiry}`);
900
+ * ```
901
+ */
902
+ createLocationRequest(request: CreateLocationRequestRequest, requestOptions?: RequestOptions): Promise<LocationRequestResult>;
903
+ /**
904
+ * Get a location request by ID
905
+ *
906
+ * @param requestId - Location request ID
907
+ * @returns Location request details
908
+ */
909
+ getLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<LocationRequest>;
910
+ /**
911
+ * List location requests with filters and pagination
912
+ *
913
+ * @param filters - Optional filters
914
+ * @param pagination - Optional pagination
915
+ * @returns Paginated list of location requests
916
+ *
917
+ * @example
918
+ * ```typescript
919
+ * const requests = await client.listLocationRequests(
920
+ * { status: "completed", user_id: "customer_123" },
921
+ * { page: 1, limit: 20 }
922
+ * );
923
+ * ```
924
+ */
925
+ listLocationRequests(filters?: LocationRequestFilters, pagination?: PaginationParams, requestOptions?: RequestOptions): Promise<LocationRequestListResponse>;
926
+ /**
927
+ * Cancel a pending location request
928
+ *
929
+ * @param requestId - Location request ID
930
+ */
931
+ cancelLocationRequest(requestId: string, requestOptions?: RequestOptions): Promise<void>;
932
+ /**
933
+ * Resend notification for a location request
934
+ *
935
+ * @param requestId - Location request ID
936
+ * @param contact - Email or phone to send to
937
+ */
938
+ resendLocationRequest(requestId: string, contact: ResendLocationRequestRequest, requestOptions?: RequestOptions): Promise<void>;
939
+ /**
940
+ * Get location share info (customer-facing)
941
+ * This is called from the customer's device to get request details
942
+ *
943
+ * @param token - Secure token from share link
944
+ * @returns Location share info
945
+ */
946
+ getLocationShareInfo(token: string, requestOptions?: RequestOptions): Promise<LocationShareInfo>;
947
+ /**
948
+ * Submit location capture (customer-facing)
949
+ * This is called from the customer's device to submit their location
950
+ *
951
+ * @param token - Secure token from share link
952
+ * @param capture - Location capture data (GPS or WiFi)
953
+ * @returns Capture response
954
+ *
955
+ * @example
956
+ * ```typescript
957
+ * // Using GPS (preferred)
958
+ * const result = await client.captureLocation(token, {
959
+ * latitude: 37.7749,
960
+ * longitude: -122.4194,
961
+ * accuracy: 10
962
+ * });
963
+ *
964
+ * // Using WiFi positioning (fallback)
965
+ * const result = await client.captureLocation(token, {
966
+ * wifi_networks: [
967
+ * { macAddress: "00:11:22:33:44:55", signalStrength: -50 },
968
+ * { macAddress: "AA:BB:CC:DD:EE:FF", signalStrength: -70 }
969
+ * ]
970
+ * });
971
+ * ```
972
+ */
973
+ captureLocation(token: string, capture: LocationCaptureRequest, requestOptions?: RequestOptions): Promise<LocationCaptureResponse>;
974
+ /**
975
+ * Generate a signed cipherText containing device and location data.
976
+ *
977
+ * Automatically passes the client's API key for HMAC signing (v02 format).
978
+ * If no API key is configured, falls back to unsigned v01 format.
979
+ *
980
+ * @param options - Options for cipherText generation
981
+ * @param gpsConfig - Optional GPS config (from getGPSConfig)
982
+ * @returns CipherText result with the signed string
983
+ *
984
+ * @example
985
+ * ```typescript
986
+ * const result = await client.generateCipherText({ reason: 'login' });
987
+ * console.log(result.cipherText); // v02 signed cipherText
988
+ * ```
989
+ */
990
+ generateCipherText(options: Omit<CipherTextOptions, 'apiKey' | 'signingKey'>, gpsConfig?: GeolocationConfigResponse): Promise<CipherTextResult>;
991
+ }
992
+
993
+ export { type UseLocationRequestsOptions as $, type AlertStatus as A, type APIError as B, type CipherTextPayload as C, type DeviceFingerprintRequest as D, type GeolocationConfigResponse as E, type GeolocationClientConfig as F, GeolocationClient as G, type UseGeolocationOptions as H, type UseGeolocationResult as I, type JurisdictionConfig as J, type UseAlertsOptions as K, type LocationVerification as L, type UseAlertsResult as M, type LocationRequestStatus as N, type LocationRequestChannel as O, type LocationRequest as P, type CreateLocationRequestRequest as Q, type LocationRequestResult as R, type LocationRequestFilters as S, type LocationRequestListResponse as T, type UpdateJurisdictionRequest as U, type ValidateCipherTextRequest as V, type ResendLocationRequestRequest as W, type WiFiNetwork as X, type LocationCaptureRequest as Y, type LocationShareInfo as Z, type LocationCaptureResponse as _, type CipherTextReason as a, type UseLocationRequestsResult as a0, type UseLocationCaptureOptions as a1, type UseLocationCaptureResult as a2, type CipherTextOptions as b, type CipherTextResult as c, type DecryptedCipherText as d, type CipherTextCustomerData as e, type ValidateCipherTextResponse as f, type VerifyIPRequest as g, type GeoIPResult as h, type GeofenceEvaluation as i, type DeviceFingerprint as j, type DeviceTrustResult as k, type ComplianceCheckResponse as l, type AlertSeverity as m, type AlertType as n, type GeolocationAlert as o, type AlertFilters as p, type AlertListResponse as q, type DashboardMetrics as r, type CreateJurisdictionRequest as s, type GeofenceRuleType as t, type GeofenceAction as u, type GeofenceRule as v, type CreateGeofenceRuleRequest as w, type UpdateGeofenceRuleRequest as x, type UpdateDeviceTrustRequest as y, type GeolocationRecord as z };
@@ -1,7 +1,8 @@
1
- import { E as EntityType, e as CGSConfig, R as RequestOptions, P as PaginationParams } from '../types-DBGM-bFB.mjs';
2
- import { C as CustomerProfile } from '../types-BQTkTvNp.mjs';
3
- import { D as DeviceFingerprintRequest, L as LocationVerification, g as LocationRequest, h as LocationRequestFilters, i as LocationRequestListResponse } from '../types-DGbuL8c0.mjs';
4
- export { e as CreateLocationRequestRequest, k as LocationCaptureRequest, l as LocationCaptureResponse, Y as LocationRequestChannel, f as LocationRequestResult, X as LocationRequestStatus, j as LocationShareInfo, R as ResendLocationRequestRequest } from '../types-DGbuL8c0.mjs';
1
+ import { D as DeviceFingerprintRequest, L as LocationVerification, P as LocationRequest, G as GeolocationClient, S as LocationRequestFilters, T as LocationRequestListResponse } from '../client-BIfLMfuC.mjs';
2
+ export { Q as CreateLocationRequestRequest, Y as LocationCaptureRequest, _ as LocationCaptureResponse, O as LocationRequestChannel, R as LocationRequestResult, N as LocationRequestStatus, Z as LocationShareInfo, W as ResendLocationRequestRequest } from '../client-BIfLMfuC.mjs';
3
+ import { RiskProfileClient } from '../risk-profile/index.mjs';
4
+ import { E as EntityType, e as CGSConfig, R as RequestOptions, P as PaginationParams } from '../types-BpKxSXGF.mjs';
5
+ import { C as CustomerProfile } from '../types-DKCQN4C5.mjs';
5
6
 
6
7
  interface RegistrationVerificationRequest {
7
8
  customerId: string;
@@ -124,6 +125,10 @@ declare class ComplianceClient {
124
125
  private _currencyRatesCustomized;
125
126
  private _currencyRatesWarned;
126
127
  constructor(config: CGSConfig);
128
+ /** Get the underlying GeolocationClient for direct geolocation API access */
129
+ getGeolocationClient(): GeolocationClient;
130
+ /** Get the underlying RiskProfileClient for direct risk profile API access */
131
+ getRiskProfileClient(): RiskProfileClient;
127
132
  /**
128
133
  * Verify customer registration with automatic profile creation
129
134
  *
@@ -1,7 +1,8 @@
1
- import { E as EntityType, e as CGSConfig, R as RequestOptions, P as PaginationParams } from '../types-DBGM-bFB.js';
2
- import { C as CustomerProfile } from '../types-BF8mYH2W.js';
3
- import { D as DeviceFingerprintRequest, L as LocationVerification, g as LocationRequest, h as LocationRequestFilters, i as LocationRequestListResponse } from '../types-DgNbBnEH.js';
4
- export { e as CreateLocationRequestRequest, k as LocationCaptureRequest, l as LocationCaptureResponse, Y as LocationRequestChannel, f as LocationRequestResult, X as LocationRequestStatus, j as LocationShareInfo, R as ResendLocationRequestRequest } from '../types-DgNbBnEH.js';
1
+ import { D as DeviceFingerprintRequest, L as LocationVerification, P as LocationRequest, G as GeolocationClient, S as LocationRequestFilters, T as LocationRequestListResponse } from '../client-BWp5FI3x.js';
2
+ export { Q as CreateLocationRequestRequest, Y as LocationCaptureRequest, _ as LocationCaptureResponse, O as LocationRequestChannel, R as LocationRequestResult, N as LocationRequestStatus, Z as LocationShareInfo, W as ResendLocationRequestRequest } from '../client-BWp5FI3x.js';
3
+ import { RiskProfileClient } from '../risk-profile/index.js';
4
+ import { E as EntityType, e as CGSConfig, R as RequestOptions, P as PaginationParams } from '../types-BpKxSXGF.js';
5
+ import { C as CustomerProfile } from '../types-DfHLp_tz.js';
5
6
 
6
7
  interface RegistrationVerificationRequest {
7
8
  customerId: string;
@@ -124,6 +125,10 @@ declare class ComplianceClient {
124
125
  private _currencyRatesCustomized;
125
126
  private _currencyRatesWarned;
126
127
  constructor(config: CGSConfig);
128
+ /** Get the underlying GeolocationClient for direct geolocation API access */
129
+ getGeolocationClient(): GeolocationClient;
130
+ /** Get the underlying RiskProfileClient for direct risk profile API access */
131
+ getRiskProfileClient(): RiskProfileClient;
127
132
  /**
128
133
  * Verify customer registration with automatic profile creation
129
134
  *