@insure-os/client 0.0.73 → 0.0.74
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/bundle-sizes.json +11 -11
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +45 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +46 -45
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,22 @@ declare class EnhancedHttpClient {
|
|
|
75
75
|
continueLater(quoteIntentId: string, email: string): Promise<{
|
|
76
76
|
id: string;
|
|
77
77
|
message: string;
|
|
78
|
+
quote_link_short_code?: string;
|
|
79
|
+
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Resolve a `?q=<uuid>` resume request.
|
|
82
|
+
*
|
|
83
|
+
* Returns either { mode: 'resume', quote_intent_id } when the quote
|
|
84
|
+
* is still editable, or { mode: 'redirect', payment_link_short_code }
|
|
85
|
+
* when a payment_link exists for the quote and the customer should be
|
|
86
|
+
* silently sent to its `?p=<short_code>` URL.
|
|
87
|
+
*/
|
|
88
|
+
resumeQuoteIntent(quoteIntentId: string): Promise<{
|
|
89
|
+
mode: "resume";
|
|
90
|
+
quote_intent_id: string;
|
|
91
|
+
} | {
|
|
92
|
+
mode: "redirect";
|
|
93
|
+
payment_link_short_code: string;
|
|
78
94
|
}>;
|
|
79
95
|
getPaymentLinkDetails(signedUrl: string): Promise<PaymentLink>;
|
|
80
96
|
/**
|
|
@@ -103,6 +119,29 @@ declare class EnhancedHttpClient {
|
|
|
103
119
|
quote_page_url?: string | null;
|
|
104
120
|
message?: string;
|
|
105
121
|
}>;
|
|
122
|
+
/**
|
|
123
|
+
* Validate cover start date for a quote intent (used by the customer
|
|
124
|
+
* checkout when the original cover date has slipped into the past).
|
|
125
|
+
*/
|
|
126
|
+
validateQuoteCoverStartDate(quoteIntentId: string, coverStartDate: string): Promise<{
|
|
127
|
+
valid: boolean;
|
|
128
|
+
quote_page_url?: string | null;
|
|
129
|
+
message?: string;
|
|
130
|
+
}>;
|
|
131
|
+
/**
|
|
132
|
+
* Resolve a pending payment transaction. Called by the widget's
|
|
133
|
+
* "Processing your payment..." screen after the gateway redirects
|
|
134
|
+
* back. The engine polls the gateway, runs the matching success/
|
|
135
|
+
* cancel/fail handler, and returns the final status. May block for
|
|
136
|
+
* up to ~12s on the post-success poll loop, but the customer is on
|
|
137
|
+
* our loading screen the whole time instead of the gateway HPP.
|
|
138
|
+
*/
|
|
139
|
+
resolvePaymentTransaction(transactionId: string): Promise<{
|
|
140
|
+
transactionId: string;
|
|
141
|
+
status: "completed" | "cancelled" | "failed" | "expired" | "pending" | "initiated";
|
|
142
|
+
recovery: boolean;
|
|
143
|
+
fallback: boolean;
|
|
144
|
+
}>;
|
|
106
145
|
/**
|
|
107
146
|
* Validate a promo code for a quote intent
|
|
108
147
|
* Checks if the promo code is valid and applicable to the product
|
|
@@ -812,6 +851,12 @@ declare class InsureOSClient {
|
|
|
812
851
|
mount(element: HTMLElement, config: MountConfig): Promise<void>;
|
|
813
852
|
private createHttpClient;
|
|
814
853
|
createClient(config: ClientConfig): InsureOSWrapperClient;
|
|
854
|
+
/**
|
|
855
|
+
* Wipe local state that could otherwise override an explicit ?q= or
|
|
856
|
+
* ?p= link — the customer arrived via a specific URL, so anything
|
|
857
|
+
* they had cached from a prior session must yield to that intent.
|
|
858
|
+
*/
|
|
859
|
+
private clearQuoteStateForOrg;
|
|
815
860
|
private initializeFormContext;
|
|
816
861
|
/**
|
|
817
862
|
* Check if all form pages are completed and trigger calculation automatically
|