@insure-os/client 0.0.6 → 0.0.8
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 +23 -6
- 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 +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -603,11 +603,7 @@ type ClientConfig = {
|
|
|
603
603
|
/** HTTP client configuration */
|
|
604
604
|
httpConfig?: Partial<HttpClientConfig>;
|
|
605
605
|
};
|
|
606
|
-
type
|
|
607
|
-
/** Existing quote intent url for loading (omit for new quote intents) */
|
|
608
|
-
quoteIntentUrl?: string;
|
|
609
|
-
/** Version strategy configuration */
|
|
610
|
-
product: VersionStrategyConfig;
|
|
606
|
+
type BaseMountConfig = ClientConfig & {
|
|
611
607
|
/** Storage type preference */
|
|
612
608
|
storageType?: "localStorage" | "sessionStorage";
|
|
613
609
|
/** Polyfill configuration */
|
|
@@ -625,6 +621,21 @@ type MountConfig = ClientConfig & {
|
|
|
625
621
|
/** Enable performance monitoring (default: false) */
|
|
626
622
|
enablePerformanceMonitoring?: boolean;
|
|
627
623
|
};
|
|
624
|
+
type QuoteMountConfig = BaseMountConfig & {
|
|
625
|
+
mode?: 'quote' | undefined;
|
|
626
|
+
/** Existing quote intent url for loading (omit for new quote intents) */
|
|
627
|
+
quoteIntentUrl?: string;
|
|
628
|
+
/** Version strategy configuration (required for 'quote' mode) */
|
|
629
|
+
product: VersionStrategyConfig;
|
|
630
|
+
};
|
|
631
|
+
type PaymentLinkMountConfig = BaseMountConfig & {
|
|
632
|
+
mode: 'payment';
|
|
633
|
+
/** Payment link ID (required when mode is 'payment') */
|
|
634
|
+
paymentLinkId: string;
|
|
635
|
+
/** Signed URL for payment link (required when mode is 'payment') */
|
|
636
|
+
signedUrl: string;
|
|
637
|
+
};
|
|
638
|
+
type MountConfig = QuoteMountConfig | PaymentLinkMountConfig;
|
|
628
639
|
type QuoteIntentState = {
|
|
629
640
|
id: string;
|
|
630
641
|
created_at: number;
|
|
@@ -634,6 +645,7 @@ type QuoteIntentState = {
|
|
|
634
645
|
url: string;
|
|
635
646
|
calculate_url: string;
|
|
636
647
|
status: string;
|
|
648
|
+
reference?: string | null;
|
|
637
649
|
product_id?: string;
|
|
638
650
|
form_definition?: FormDefinition;
|
|
639
651
|
form_data?: FormData;
|
|
@@ -824,9 +836,14 @@ declare class FormStateManager {
|
|
|
824
836
|
loadFormProgress(): Promise<FormData>;
|
|
825
837
|
updatePageData(pageId: string, data: Record<string, any>): void;
|
|
826
838
|
updateFieldValue(pageId: string, fieldId: string, value: any): void;
|
|
827
|
-
updateFieldAnswer(pageId: string, fieldId: string, answer: string): void;
|
|
839
|
+
updateFieldAnswer(pageId: string, fieldId: string, answer: string, detailsRatingFactorId?: string): void;
|
|
828
840
|
restoreFormProgress(data: FormData): void;
|
|
829
841
|
restoreCalculationResult(result: CalculationResponse): void;
|
|
842
|
+
/**
|
|
843
|
+
* Get rating factor code by rating factor ID
|
|
844
|
+
* Searches through all form pages and fields to find the rating factor code
|
|
845
|
+
*/
|
|
846
|
+
private getRatingFactorCodeById;
|
|
830
847
|
private processRatingFactorMappings;
|
|
831
848
|
private applyDerivationRule;
|
|
832
849
|
private calculateAge;
|