@mychoice/mychoice-sdk-store 2.2.8 → 2.2.10
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/cjs/handlers/autofill/index.d.ts +3 -0
- package/dist/cjs/handlers/autofill/types.d.ts +76 -0
- package/dist/cjs/handlers/autofill/useAutofillCarForm.d.ts +8 -0
- package/dist/cjs/handlers/autofill/utils.d.ts +94 -0
- package/dist/cjs/handlers/index.d.ts +1 -0
- package/dist/cjs/index.js +472 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/states/reducers/states/formStates/FormLifeState/QuoteState/interfaces.d.ts +1 -1
- package/dist/esm/handlers/autofill/index.d.ts +3 -0
- package/dist/esm/handlers/autofill/types.d.ts +76 -0
- package/dist/esm/handlers/autofill/useAutofillCarForm.d.ts +8 -0
- package/dist/esm/handlers/autofill/utils.d.ts +94 -0
- package/dist/esm/handlers/index.d.ts +1 -0
- package/dist/esm/index.js +467 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/states/reducers/states/formStates/FormLifeState/QuoteState/interfaces.d.ts +1 -1
- package/dist/index.d.ts +181 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2734,7 +2734,7 @@ declare enum StoreFormLifeQuoteActionTypes {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
|
|
2736
2736
|
interface LifeBrokerIntegrationInterface {
|
|
2737
|
-
type: 'hub' | '
|
|
2737
|
+
type: 'hub' | 'dcw';
|
|
2738
2738
|
data: {
|
|
2739
2739
|
label?: string;
|
|
2740
2740
|
description?: string;
|
|
@@ -3035,4 +3035,183 @@ declare const useValidationLifeApplicant: () => UseHandlerApplicantValidateInter
|
|
|
3035
3035
|
declare const addDayToDate: (value: string, days?: number | string) => string;
|
|
3036
3036
|
declare const differenceInHoursFromNow: (date: string) => number;
|
|
3037
3037
|
|
|
3038
|
-
|
|
3038
|
+
interface AutofillDriver {
|
|
3039
|
+
gender: string;
|
|
3040
|
+
listed: boolean;
|
|
3041
|
+
ticket: boolean;
|
|
3042
|
+
insured: boolean;
|
|
3043
|
+
accident: boolean;
|
|
3044
|
+
first_name: string;
|
|
3045
|
+
occupation: number;
|
|
3046
|
+
listed_year?: string;
|
|
3047
|
+
insured_year?: string;
|
|
3048
|
+
licence_info: {
|
|
3049
|
+
licence_type: string;
|
|
3050
|
+
g_licence_date?: string;
|
|
3051
|
+
g1_licence_date?: string;
|
|
3052
|
+
g2_licence_date?: string;
|
|
3053
|
+
first_licence_age: number;
|
|
3054
|
+
};
|
|
3055
|
+
date_of_birth: string;
|
|
3056
|
+
marital_status: string;
|
|
3057
|
+
licence_suspension: boolean;
|
|
3058
|
+
insurance_cancellation: boolean;
|
|
3059
|
+
}
|
|
3060
|
+
interface AutofillVehicleCoverage {
|
|
3061
|
+
coverage: boolean;
|
|
3062
|
+
deductible?: number;
|
|
3063
|
+
limit?: number;
|
|
3064
|
+
}
|
|
3065
|
+
interface AutofillVehicle {
|
|
3066
|
+
city: string;
|
|
3067
|
+
make: string;
|
|
3068
|
+
year: number;
|
|
3069
|
+
model: string;
|
|
3070
|
+
leased: boolean;
|
|
3071
|
+
condition: string;
|
|
3072
|
+
liability: AutofillVehicleCoverage;
|
|
3073
|
+
collision: AutofillVehicleCoverage;
|
|
3074
|
+
lossofuse: AutofillVehicleCoverage;
|
|
3075
|
+
comprehensive: AutofillVehicleCoverage;
|
|
3076
|
+
liabilityfordamage: AutofillVehicleCoverage;
|
|
3077
|
+
limitedwaiverofdepreciation: AutofillVehicleCoverage;
|
|
3078
|
+
postal_code: string;
|
|
3079
|
+
primary_use: string;
|
|
3080
|
+
winter_tires: boolean;
|
|
3081
|
+
purchase_date: string;
|
|
3082
|
+
distance_daily: number;
|
|
3083
|
+
distance_yearly: number;
|
|
3084
|
+
parking_location: string;
|
|
3085
|
+
distance_business: number;
|
|
3086
|
+
location_index: number;
|
|
3087
|
+
bodytype: string;
|
|
3088
|
+
ext_vicc: string;
|
|
3089
|
+
vicc_code: string;
|
|
3090
|
+
}
|
|
3091
|
+
interface AutofillVehLink {
|
|
3092
|
+
priority: string;
|
|
3093
|
+
driver_index: number;
|
|
3094
|
+
vehicle_index: number;
|
|
3095
|
+
}
|
|
3096
|
+
interface AutofillData {
|
|
3097
|
+
uuid: string;
|
|
3098
|
+
drivers: AutofillDriver[];
|
|
3099
|
+
vehicles: AutofillVehicle[];
|
|
3100
|
+
vehlinks: AutofillVehLink[];
|
|
3101
|
+
email_to: string;
|
|
3102
|
+
policy_start: string;
|
|
3103
|
+
province_code: string;
|
|
3104
|
+
caa_member_discount: boolean;
|
|
3105
|
+
app_install_discount: boolean;
|
|
3106
|
+
multiple_policies_discount: boolean;
|
|
3107
|
+
}
|
|
3108
|
+
interface MappedAutofillData {
|
|
3109
|
+
drivers: any[];
|
|
3110
|
+
vehicles: any[];
|
|
3111
|
+
postalData: any;
|
|
3112
|
+
configData: any;
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
/**
|
|
3116
|
+
* Parse URL-encoded JSON from query parameter
|
|
3117
|
+
*/
|
|
3118
|
+
declare const parseAutofillParam: (urlEncodedJson: string) => AutofillData;
|
|
3119
|
+
/**
|
|
3120
|
+
* Get province name from code
|
|
3121
|
+
*/
|
|
3122
|
+
declare const getProvinceName: (code: string) => string;
|
|
3123
|
+
/**
|
|
3124
|
+
* Map autofill data to postal state format
|
|
3125
|
+
*/
|
|
3126
|
+
declare const mapToPostalState: (autofillData: AutofillData) => {
|
|
3127
|
+
city: string;
|
|
3128
|
+
postalCode: string;
|
|
3129
|
+
locationIndex: string;
|
|
3130
|
+
provinceCode: string;
|
|
3131
|
+
provinceName: string;
|
|
3132
|
+
};
|
|
3133
|
+
/**
|
|
3134
|
+
* Map autofill data to vehicle state format
|
|
3135
|
+
*/
|
|
3136
|
+
declare const mapToVehicleState: (autofillData: AutofillData) => {
|
|
3137
|
+
year: string;
|
|
3138
|
+
make: string;
|
|
3139
|
+
model: string;
|
|
3140
|
+
condition: string;
|
|
3141
|
+
leased: boolean;
|
|
3142
|
+
purchaseDate: string;
|
|
3143
|
+
winterTires: boolean;
|
|
3144
|
+
parkingLocation: string;
|
|
3145
|
+
primaryUse: string;
|
|
3146
|
+
distanceDaily: number;
|
|
3147
|
+
distanceBusiness: number;
|
|
3148
|
+
distanceYearly: number;
|
|
3149
|
+
comprehensive: {
|
|
3150
|
+
coverage: boolean;
|
|
3151
|
+
deductible: number;
|
|
3152
|
+
};
|
|
3153
|
+
collision: {
|
|
3154
|
+
coverage: boolean;
|
|
3155
|
+
deductible: number;
|
|
3156
|
+
};
|
|
3157
|
+
liability: {
|
|
3158
|
+
coverage: boolean;
|
|
3159
|
+
limit: number;
|
|
3160
|
+
};
|
|
3161
|
+
lossofuse: {
|
|
3162
|
+
coverage: boolean;
|
|
3163
|
+
limit: number;
|
|
3164
|
+
};
|
|
3165
|
+
liabilityfordamage: {
|
|
3166
|
+
coverage: boolean;
|
|
3167
|
+
limit: number;
|
|
3168
|
+
};
|
|
3169
|
+
limitedwaiverofdepreciation: {
|
|
3170
|
+
coverage: boolean;
|
|
3171
|
+
limit: number;
|
|
3172
|
+
};
|
|
3173
|
+
postalCode: string;
|
|
3174
|
+
locationIndex: string;
|
|
3175
|
+
city: string;
|
|
3176
|
+
};
|
|
3177
|
+
/**
|
|
3178
|
+
* Map autofill data to driver state format
|
|
3179
|
+
*/
|
|
3180
|
+
declare const mapToDriverState: (autofillData: AutofillData) => {
|
|
3181
|
+
firstName: string;
|
|
3182
|
+
dateOfBirth: string;
|
|
3183
|
+
maritalStatus: string;
|
|
3184
|
+
gender: string;
|
|
3185
|
+
occupation: number;
|
|
3186
|
+
listed: boolean;
|
|
3187
|
+
listedYear: string;
|
|
3188
|
+
insured: boolean;
|
|
3189
|
+
insuredYear: string;
|
|
3190
|
+
ticket: boolean;
|
|
3191
|
+
accident: boolean;
|
|
3192
|
+
licenceSuspension: boolean;
|
|
3193
|
+
insuranceCancellation: boolean;
|
|
3194
|
+
licenceInfo: {
|
|
3195
|
+
licenceType: string;
|
|
3196
|
+
firstLicenceAge: number;
|
|
3197
|
+
gLicenceDate: string;
|
|
3198
|
+
g1LicenceDate: string;
|
|
3199
|
+
g2LicenceDate: string;
|
|
3200
|
+
};
|
|
3201
|
+
};
|
|
3202
|
+
/**
|
|
3203
|
+
* Map autofill data to config state format
|
|
3204
|
+
*/
|
|
3205
|
+
declare const mapToConfigState: (autofillData: AutofillData) => {
|
|
3206
|
+
province: string;
|
|
3207
|
+
};
|
|
3208
|
+
|
|
3209
|
+
interface AutofillOptions {
|
|
3210
|
+
onComplete?: () => void;
|
|
3211
|
+
}
|
|
3212
|
+
/**
|
|
3213
|
+
* Hook to initialize car insurance form with autofill data from query parameter
|
|
3214
|
+
*/
|
|
3215
|
+
declare const useAutofillCarForm: (options?: AutofillOptions) => void;
|
|
3216
|
+
|
|
3217
|
+
export { AccidentItemInterface, AppConfigStateInterface, AppLoaderStateInterface, AppModalStateInterface, ApplicantCancellationItemInterface, ApplicantClaimItemInterface, ApplicantInsuredInterface, AutofillData, AutofillDriver, AutofillVehLink, AutofillVehicle, AutofillVehicleCoverage, BirthDatePayloadType, CarBrokerIntegrationInterface, CarBrokerTypeEnum, CarQuoteCoverageInterface, CarQuoteDataHandler, CarQuoteItemInterface, ClearFormDataHandler, ClientStateInterface, DiscountQuoterInfoInterface, DiscountVehLinkInterface, DriverCancellationItemInterface, DriverItemInterface, DriverLicenceInterface, DriverMinMaxDates, FormCarConfigStateInterface, FormCarDiscountStateInterface, FormCarDriverStateInterface, FormCarPostalStateInterface, FormCarQuoteStateInterface, FormCarQuoteStateReducerInterface, FormCarVehicleStateInterface, FormHomeApplicantStateInterface, FormHomeDiscountStateInterface, FormHomeDwellingStateInterface, FormHomePostalStateInterface, FormHomeQuoteStateInterface, FormHomeQuoteStateReducerInterface, FormLifeApplicantStateInterface, FormLifeCoverageStateInterface, FormLifePostalStateInterface, FormLifeQuoteStateInterface, FormLifeQuoteStateReducerInterface, HomeBrokerIntegrationInterface, HomeBrokerTypeEnum, HomeQuoteDataHandler, HomeQuoteItemInterface, LicenceAgePayloadType, LicenceConfigInterface, LifeBrokerIntegrationInterface, LifeQuoteDataHandler, LifeQuoteItemInterface, MappedAutofillData, PartnerStateInterface, ProvinceHookInterface, QuoterInfoInterface, StoreClientActionTypes, StoreConfigAppConfigActionTypes, StoreConfigAppDeviceActionTypes, StoreConfigAppLoaderActionTypes, StoreConfigAppModalActionTypes, StoreFormCarConfigActionTypes, StoreFormCarDiscountActionTypes, StoreFormCarDriverAccidentActionTypes, StoreFormCarDriverBaseActionTypes, StoreFormCarDriverCancellationActionTypes, StoreFormCarDriverInfoActionTypes, StoreFormCarDriverInsuranceActionTypes, StoreFormCarDriverLicenceActionTypes, StoreFormCarDriverSuspensionActionTypes, StoreFormCarDriverTicketActionTypes, StoreFormCarPostalActionTypes, StoreFormCarQuoteActionTypes, StoreFormCarVehicleActionTypes, StoreFormHomeApplicantBaseActionTypes, StoreFormHomeApplicantCancellationActionTypes, StoreFormHomeApplicantClaimActionTypes, StoreFormHomeApplicantInfoActionTypes, StoreFormHomeApplicantInsuranceActionTypes, StoreFormHomeDiscountActionTypes, StoreFormHomeDwellingActionTypes, StoreFormHomePostalActionTypes, StoreFormHomeQuoteActionTypes, StoreFormLifeApplicantActionTypes, StoreFormLifeCoverageActionTypes, StoreFormLifePostalActionTypes, StoreFormLifeQuoteActionTypes, StorePartnerActionTypes, StoreProvider, SuspensionItemInterface, TicketItemInterface, addDayToDate, configStateReducer, differenceInHoursFromNow, formCarReducer, formCondoDwellingInitialState, formHomeDwellingInitialState, formHomeReducer, formLifeReducer, formTenantDwellingInitialState, getDwellingInitialState, getProvinceName, globalStateReducer, initHttpResponse, mapToConfigState, mapToDriverState, mapToPostalState, mapToVehicleState, parseAutofillParam, reducers, export_default as token, useAutofillCarForm, useHandlerAuth, useHandlerCarMake, useHandlerCarModel, useHandlerCarQuoterEmail, useHandlerHomeQuoterEmail, useHandlerLifeQuoterEmail, useHandlerPartner, useHandlerPostal, useProvince, useStoreAppConfig, useStoreAppDevice, useStoreAppLoader, useStoreAppModal, useStoreClient, useStoreClientLoggedIn, useStoreClientProfile, useStoreClientToken, useStoreDeviceBP, useStoreDeviceType, useStoreFormCarConfig, useStoreFormCarDiscount, useStoreFormCarDriverAccident, useStoreFormCarDriverBase, useStoreFormCarDriverCancellation, useStoreFormCarDriverInfo, useStoreFormCarDriverInsurance, useStoreFormCarDriverLicence, useStoreFormCarDriverSuspension, useStoreFormCarDriverTicket, useStoreFormCarPostal, useStoreFormCarQuote, useStoreFormCarVehicle, useStoreFormHomeApplicantBase, useStoreFormHomeApplicantCancellation, useStoreFormHomeApplicantClaim, useStoreFormHomeApplicantInfo, useStoreFormHomeApplicantInsurance, useStoreFormHomeDiscount, useStoreFormHomeDwelling, useStoreFormHomePostal, useStoreFormHomeQuote, useStoreFormLifeApplicant, useStoreFormLifeCoverage, useStoreFormLifePostal, useStoreFormLifeQuote, useStorePartner, useValidationAddress, useValidationApplicant, useValidationCarDiscount, useValidationCoverage, useValidationDriver, useValidationDwelling, useValidationHomeDiscount, useValidationLifeApplicant, useValidationVehicle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mychoice/mychoice-sdk-store",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.10",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "https://github.com/hexdivision/mychoice-sdk#readme",
|
|
6
6
|
"author": "GogMes",
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"redux": "^4.2.0",
|
|
38
38
|
"redux-thunk": "^2.4.1"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "cea865303c4aa4c702ff1a7047c97d90e069d2e9"
|
|
41
41
|
}
|