@insure-os/client 0.0.75 → 0.0.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -70,7 +70,8 @@ declare class EnhancedHttpClient {
70
70
  id: string;
71
71
  payment_link_id: string;
72
72
  payment_link: string;
73
- expires_at: string;
73
+ /** ISO date string, or null when the link is configured to never expire. */
74
+ expires_at: string | null;
74
75
  }>;
75
76
  continueLater(quoteIntentId: string, email: string): Promise<{
76
77
  id: string;
@@ -673,6 +674,17 @@ declare enum ErrorType {
673
674
  TIMEOUT_ERROR = "TIMEOUT_ERROR",
674
675
  MAINTENANCE_ERROR = "MAINTENANCE_ERROR"
675
676
  }
677
+ /**
678
+ * Public contact details for the insurer that owns the current widget
679
+ * context. Surfaced by the engine on 503 responses so error pages can show
680
+ * "Call us" / "Email us" actions.
681
+ */
682
+ interface ErrorOrganisation {
683
+ name?: string | null;
684
+ admin_email?: string | null;
685
+ phone?: string | null;
686
+ quote_page_url?: string | null;
687
+ }
676
688
  /**
677
689
  * Custom error class for InsureOS operations
678
690
  */
@@ -682,7 +694,8 @@ declare class InsureOSError extends Error {
682
694
  statusCode?: number | undefined;
683
695
  retryAfter?: string | undefined;
684
696
  validationErrors?: Record<string, any> | undefined;
685
- constructor(type: ErrorType, message: string, retryable?: boolean, statusCode?: number | undefined, retryAfter?: string | undefined, validationErrors?: Record<string, any> | undefined);
697
+ organisation?: (ErrorOrganisation | null) | undefined;
698
+ constructor(type: ErrorType, message: string, retryable?: boolean, statusCode?: number | undefined, retryAfter?: string | undefined, validationErrors?: Record<string, any> | undefined, organisation?: (ErrorOrganisation | null) | undefined);
686
699
  }
687
700
  /**
688
701
  * Error handling strategy for different error types
@@ -909,6 +922,17 @@ declare function groupErrorsByField(errors: ValidationError[]): Record<string, V
909
922
 
910
923
  type AppErrorType = "initialization" | "calculation" | "network" | "validation" | "maintenance" | "unknown";
911
924
  type AppErrorSeverity = "warning" | "error" | "critical";
925
+ /**
926
+ * Public insurer contact info forwarded by the engine on 503 responses so
927
+ * error pages (currently the maintenance page) can render "Call us" /
928
+ * "Email us" actions.
929
+ */
930
+ interface AppErrorOrganisation {
931
+ name?: string | null;
932
+ admin_email?: string | null;
933
+ phone?: string | null;
934
+ quote_page_url?: string | null;
935
+ }
912
936
  interface AppError {
913
937
  id: string;
914
938
  type: AppErrorType;
@@ -921,6 +945,7 @@ interface AppError {
921
945
  timestamp: number;
922
946
  dismissed?: boolean;
923
947
  trackingId?: string;
948
+ organisation?: AppErrorOrganisation | null;
924
949
  }
925
950
  interface ServerErrorResponse {
926
951
  statusCode: number;