import {z} from 'zod' export type QuoteOfferCreateRequest = {quote_id: string}; export type PolicyCreateRequest = {binder_id: string, policy_id?: (string | null) | undefined} | {[key: string]: unknown}; export type PolicyTypeOptions = 'DP1' | 'DP2' | 'DP3'; export type RalphieModelsAddressAddress = {street_address: string, city: string, state: string, zip_code: string}; export type YesNo = 'yes' | 'no'; export type CompanyTypes = {contracting?: (YesNo | null) | undefined, operations_beyond_rental_property_ownership_and_maintenance?: (YesNo | null) | undefined}; export type Policyholder = {first_name?: (string | null) | undefined, last_name?: (string | null) | undefined, suffix?: (string | null) | undefined, company_name?: (string | null) | undefined, date_of_birth?: (string | null) | undefined, phone_number?: (string | null) | undefined, email?: (string | null) | undefined, mailing_address?: (RalphieModelsAddressAddress | null) | undefined, previous_address?: (RalphieModelsAddressAddress | null) | undefined, is_military_member?: (YesNo | null) | undefined, company_types?: (CompanyTypes | null) | undefined}; export type AdditionalNamedInsuredType = 'person' | 'company' | 'trust_or_estate'; export type AdditionalNamedInsured = {type: AdditionalNamedInsuredType, name: string, address: RalphieModelsAddressAddress}; export type InsuranceScoreEstimate = 999 | 725 | 865; export type Occupancy = 'owner_and_tenant' | 'rental' | 'seasonal' | 'vacant' | 'fix_and_flip' | 'landlord_primary_home'; export type LossReason = 'weather' | 'fire' | 'water_appliance' | 'water' | 'theft' | 'earthquake' | 'liability' | 'medical' | 'other'; export type SelfReportedClaims = {date_of_loss?: (string | null) | undefined, loss_reason?: (LossReason | null) | undefined, loss_amount_dollars?: (number | null) | undefined, caused_by_catastrophe?: (YesNo | null) | undefined}; export type PolicyDetails = {insurance_score_estimate?: (InsuranceScoreEstimate | null) | undefined, is_paperless?: (YesNo | null) | undefined, occupancy: Occupancy, similar_insurance_declined?: (YesNo | null) | undefined, self_reported_claims?: (Array | null) | undefined, unique_tracking_id?: (string | null) | undefined, wind_coverage_excluded?: (YesNo | null) | undefined, ca_dic?: (YesNo | null) | undefined}; export type PropertyAddress = {street_address: string, city: string, state: string, zip_code: string, county?: (string | null) | undefined, county_fips?: (string | null) | undefined, lat?: (number | null) | undefined, lng?: (number | null) | undefined}; export type SelectedValueRequest = {type: 'selected', value: YesNo, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type LimitValueRequest = {type: 'limit', value: string, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type AdditionalLivingCostsAndFairRentalValueCoverageRequest = {name: 'additional_living_costs_and_fair_rental_value', config: Array}; export type DeductibleValueRequest = {type: 'deductible', value: string, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type AllOtherPerilsDeductibleCoverageRequest = {name: 'all_other_perils_deductible', config: Array}; export type BedBugInfestationCostReimbursementCoverageRequest = {name: 'bed_bug_infestation_cost_reimbursement', config: Array}; export type HOAFinesCoverageRequest = {name: 'hoa_fines', config: Array}; export type RalphieModelsCoverageModelsDwellingLossValuationOptionValueRequestValueOptions = 'actual_cash_value' | 'replacement_cost' | 'repair_cost' | 'extended_replacement_cost' | 'functional_replacement_cost'; export type DwellingLossValuationOptionValueRequest = {type: 'loss_valuation_option', value: RalphieModelsCoverageModelsDwellingLossValuationOptionValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type DwellingCoverageRequest = {name: 'dwelling', config: Array}; export type LimitedHiddenWaterCoverageRequest = {name: 'limited_hidden_water', config: Array}; export type LimitedRenovationCoverageRequest = {name: 'limited_renovation', config: Array}; export type LimitedTheftCoverageRequest = {name: 'limited_theft', config: Array}; export type RalphieModelsCoverageModelsLossAssessmentLimitValueRequestValueOptions = '1000' | '5000' | '10000' | '15000' | '20000' | '25000' | '50000'; export type LossAssessmentLimitValueRequest = {type: 'limit', value: RalphieModelsCoverageModelsLossAssessmentLimitValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type LossAssessmentCoverageRequest = {name: 'loss_assessment', config: Array}; export type MineSubsidenceCoverageRequest = {name: 'mine_subsidence', config: Array}; export type MineSubsidenceDwellingCoverageRequest = {name: 'mine_subsidence_dwelling', config: Array}; export type MineSubsidencePrivateStructuresCoverageRequest = {name: 'mine_subsidence_private_structures', config: Array}; export type MineSubsidenceAdditionalLivingCostsAndFairRentalValueCoverageRequest = {name: 'mine_subsidence_additional_living_costs_and_fair_rental_value', config: Array}; export type MoldAndFungusDamageSubLimitCoverageRequest = {name: 'mold_and_fungus_damage_sublimit', config: Array}; export type RalphieModelsCoverageModelsOrdinanceOrLawSelectionFactorValueRequestValueOptions = '10%' | '25%'; export type OrdinanceOrLawSelectionFactorValueRequest = {type: 'selection_factor', value: RalphieModelsCoverageModelsOrdinanceOrLawSelectionFactorValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type OrdinanceOrLawCoverageRequest = {name: 'ordinance_or_law', config: Array}; export type PersonalInjuryLiabilityCoverageRequest = {name: 'personal_injury_liability', config: Array}; export type RalphieModelsCoverageModelsPersonalPropertyLossValuationOptionValueRequestValueOptions = 'actual_cash_value' | 'replacement_cost' | 'repair_cost' | 'extended_replacement_cost' | 'functional_replacement_cost'; export type PersonalPropertyLossValuationOptionValueRequest = {type: 'loss_valuation_option', value: RalphieModelsCoverageModelsPersonalPropertyLossValuationOptionValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type PersonalPropertyCoverageRequest = {name: 'personal_property', config: Array}; export type ExcludedValueRequest = {type: 'excluded', value?: (YesNo | null) | undefined, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type RalphieModelsCoverageModelsExclusionDescriptionValueRequestValueOptions = '' | 'Accessory Dwelling Unit Insured on Another Policy' | 'Detached Barn' | 'Detached Carport' | 'Detached Garage' | 'Detached Pool House' | 'Detached Shed' | 'Detached Shed/Storage Unit' | 'Detached Structure' | 'Detached Structures Over and/or Partially Over Water' | 'Dock and Attached Deck'; export type ExclusionDescriptionValueRequest = {type: 'exclusion_description', value?: (RalphieModelsCoverageModelsExclusionDescriptionValueRequestValueOptions | string | Array | null) | undefined, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type ExclusionRiskTypeValueRequest = {type: 'exclusion_risk_type', value?: (string | Array | null) | undefined, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type PrivateStructuresCoverageRequest = {name: 'private_structures', config: Array}; export type SinkholeLossDwellingCoverageRequest = {name: 'sinkhole_loss_dwelling', config: Array}; export type SinkholeLossPersonalPropertyCoverageRequest = {name: 'sinkhole_loss_personal_property', config: Array}; export type SolarPanelCoverageRequest = {name: 'solar_panel', config: Array}; export type EquipmentBreakdownCoverageRequest = {name: 'equipment_breakdown', config: Array}; export type ServiceLineCoverageRequest = {name: 'service_line', config: Array, parent_coverage?: (string | null) | undefined}; export type TheftCoverageRequest = {name: 'theft', config: Array}; export type RalphieModelsCoverageModelsVandalismOrMaliciousMischiefSelectionFactorValueRequestValueOptions = '5%' | '10%' | '25%' | '50%' | '100%'; export type VandalismOrMaliciousMischiefSelectionFactorValueRequest = {type: 'selection_factor', value: RalphieModelsCoverageModelsVandalismOrMaliciousMischiefSelectionFactorValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type VandalismOrMaliciousMischiefCoverageRequest = {name: 'vandalism_or_malicious_mischief', config: Array}; export type WaterBackUpAndSumpOverflowOrDischargeCoverageRequest = {name: 'water_back_up_and_sump_overflow_or_discharge', config: Array}; export type WaterDamageExclusionCoverageRequest = {name: 'water_damage_exclusion', config: Array}; export type RalphieModelsCoverageModelsWaterDamageLimitationSelectionFactorValueRequestValueOptions = '0%' | '10%' | '25%' | '50%' | '75%' | '100%' | '5000'; export type WaterDamageLimitationSelectionFactorValueRequest = {type: 'selection_factor', value: RalphieModelsCoverageModelsWaterDamageLimitationSelectionFactorValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type SublimitValueRequest = {type: 'sublimit', value: string, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type WaterDamageLimitationCoverageRequest = {name: 'water_damage_limitation', config: Array}; export type WaterDamagePerilsCoverageRequest = {name: 'water_damage_perils', config: Array}; export type RalphieModelsCoverageModelsWindAndHailDeductibleDeductibleValueRequestValueOptions = '500' | '1000' | '2000' | '2500' | '5000' | '10000' | '1%' | '2%' | '3%' | '5%' | '10%'; export type WindAndHailDeductibleDeductibleValueRequest = {type: 'deductible', value: RalphieModelsCoverageModelsWindAndHailDeductibleDeductibleValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type WindAndHailDeductibleCoverageRequest = {name: 'wind_and_hail_deductible', config: Array}; export type RalphieModelsCoverageModelsHurricaneDeductibleDeductibleValueRequestValueOptions = '2500' | '5000' | '10000' | '1%' | '2%' | '3%' | '5%' | '10%'; export type HurricaneDeductibleDeductibleValueRequest = {type: 'deductible', value: RalphieModelsCoverageModelsHurricaneDeductibleDeductibleValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type HurricaneDeductibleCoverageRequest = {name: 'hurricane_deductible', config: Array}; export type HurricaneOrNamedStormDeductibleCoverageRequest = {name: 'hurricane_or_named_storm_deductible', config: Array}; export type WindstormOrHailExclusionValueRequest = {type: 'excluded', value: YesNo, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type WindstormOrHailExclusionCoverageRequest = {name: 'windstorm_or_hail_exclusion', config: Array}; export type AnnualPremiumIncreaseCoverageRequest = {name: 'annual_premium_increase', config: Array}; export type GeneralLiabilityCoverageRequest = {name: 'general_liability', config: Array}; export type LiabilityExclusionAnimalCoverageRequest = {name: 'liability_exclusion_animal', config: Array}; export type RoofSurfacingExclusionCoverageRequest = {name: 'roof_surfacing_exclusion', config: Array}; export type RalphieModelsCoverageModelsRoofSurfacingLossValuationOptionValueRequestValueOptions = 'actual_cash_value'; export type RoofSurfacingLossValuationOptionValueRequest = {type: 'loss_valuation_option', value: RalphieModelsCoverageModelsRoofSurfacingLossValuationOptionValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type RoofSurfacingCoverageRequest = {name: 'roof_surfacing', config: Array}; export type TrampolineOrReboundingDeviceExcludedValueRequest = {type: 'excluded', value: YesNo, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type TrampolineOrReboundingDeviceCoverageRequest = {name: 'trampoline_or_rebounding_device', config: Array}; export type CosmeticDamageValueRequest = {type: 'excluded', value: YesNo, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type CosmeticDamageCoverageRequest = {name: 'cosmetic_damage', config: Array}; export type TerrorismCoverageRequest = {name: 'terrorism', config: Array}; export type RalphieModelsCoverageModelsOffPremisesLiabilityExtensionValueRequestValueOptions = '10%'; export type OffPremisesLiabilityExtensionValueRequest = {type: 'selection_factor', value: RalphieModelsCoverageModelsOffPremisesLiabilityExtensionValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type OffPremisesLiabilityExtensionRequest = {name: 'offpremises_liability_extension', config: Array}; export type DogBiteCoverageRequest = {name: 'dog_bite', config: Array}; export type HotTubLiabilityExclusionCoverageRequest = {name: 'hot_tub_liability_exclusion', config: Array}; export type SwimmingPoolExclusionCoverageRequest = {name: 'swimming_pool_exclusion', config: Array}; export type PrivateStructuresRoofExclusionCoverageRequest = {name: 'private_structures_roof_exclusion', config: Array}; export type RalphieModelsCoverageModelsExtendedReplacementCostSelectionFactorValueRequestValueOptions = '10%' | '25%'; export type ExtendedReplacementCostSelectionFactorValueRequest = {type: 'selection_factor', value: RalphieModelsCoverageModelsExtendedReplacementCostSelectionFactorValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type ExtendedReplacementCostCoverageRequest = {name: 'extended_replacement_cost', config: Array, parent_coverage?: (string | null) | undefined}; export type OutdoorApplianceExclusionCoverageRequest = {name: 'outdoor_appliance_exclusion', config: Array}; export type FireLightningExplosionSmokeExclusionValueRequest = {type: 'excluded', value: YesNo, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type FireLightningExplosionSmokeExclusionCoverageRequest = {name: 'fire_lightning_explosion_smoke_exclusion', config: Array}; export type PropertyManagerType = 'person' | 'company'; export type PropertyManager = {type: PropertyManagerType, is_additional_insured?: (YesNo | null) | undefined, name: string, address: RalphieModelsAddressAddress, is_active_manager?: (YesNo | null) | undefined}; export type RalphieModelsMappedModelsPropertyType = 'single_family' | 'townhouse_or_rowhouse' | 'duplex' | 'triplex' | 'quadplex' | 'apartment_building' | 'manufactured_or_mobile_home' | 'other' | 'condominium_unit' | 'barndominium_unit'; export type ConfirmedPropertyStyle = 'barndominium_unit' | 'condominium_unit'; export type ConstructionType = 'frame' | 'brick_veneer' | 'brick_or_masonry_or_stone' | 'concrete' | 'log' | 'adobe_or_stucco' | 'asbestos' | 'other' | 'adobe_or_stucco_v2' | 'brick_solid' | 'cedar_siding' | 'cement_fiber_siding' | 'concrete_decorative' | 'concrete_exposed' | 'concrete_stucco' | 'log_v2' | 'metal_siding' | 'pre_engineered_metal' | 'vinyl_siding'; export type RoofType = 'asbestos' | 'concrete_or_slate' | 'rubber_or_tar_and_gravel_or_rolled_roof' | 'metal_excluding_tin_or_aluminum' | 'asphalt_shingles' | 'tile' | 'tin_or_aluminum' | 'wood' | 'other' | 'architectural_shingle' | 'three_tab_shingle' | 'wood_shingle_shake' | 'impact_resistant_shingle' | 'clay' | 'concrete' | 'cement_fiber' | 'tile_shake' | 'standing_seam' | 'corrugated_galvanized' | 'painted_rib' | 'copper_shingle' | 'built_up_with_gravel' | 'built_up_without_gravel' | 'membrane' | 'sprayed_polyurethane_foam' | 'slate' | 'synthetic_composite' | 'solar_shingle'; export type HeatingSource = 'furnace_electric' | 'furnace_natural_gas' | 'propane_gas' | 'oil' | 'wood_burning_stove_or_fireplace' | 'other'; export type RentalDurationOptions = 'long_term' | 'short_term'; export type RenovationStatus = 'under_construction' | 'under_renovation' | 'not_under_renovation'; export type BuildingQuality = 'economy' | 'standard' | 'above_average' | 'custom' | 'premium'; export type BuildingCondition = 'excellent' | 'average' | 'fair'; export type Style = 'attached_or_built_in' | 'basement' | 'carport'; export type Garage = {carport_additional_walls?: (number | null) | undefined, size: string, style?: (Style | null) | undefined} | {[key: string]: unknown}; export type BathroomRequest = {type: 'Full' | 'Half' | '3/4' | '1.5'} | {[key: string]: unknown}; export type FoundationShape = 'square_rectangle' | 'l_shape' | 't_u_z_shape' | 'h_or_custom_shape' | 'irregular_complex'; export type PrimaryInteriorWallMaterial = 'drywall' | 'plaster' | 'solid_brick' | 'solid_stone' | 'solid_log' | 'concrete_block' | 'adobe' | 'glass_block' | 'studs_only' | 'open_no_wall'; export type PropertySlope = 'none' | 'moderate' | 'steep'; export type BuildingQualityDetails = {cabinets_and_countertops: BuildingQuality, exterior_features_and_finishes: BuildingQuality, home_quality_grade: BuildingQuality, interior_features_and_finishes: BuildingQuality} | {[key: string]: unknown}; export type HasInspectionDocument = 'yes' | 'no'; export type IbhsFortifiedDesignation = 'bronze' | 'silver' | 'gold'; export type IbhsFortifiedDesignationType = 'wind_only' | 'wind_and_hail'; export type IbhsFortifiedRoof = 'existing_roof' | 'new_roof'; export type IbhsHasFortifiedCertificateDocument = 'yes' | 'no'; export type WindMitigation = {asphalt_shingle_high_wind_rated?: (string | null) | undefined, deck_attachment?: (string | null) | undefined, document_id?: (string | null) | undefined, florida_roof_product_approval?: (string | null) | undefined, gable_roof_bracing?: (string | null) | undefined, has_inspection_document?: (HasInspectionDocument | null) | undefined, ibhs_fortified_certificate_document_id?: (string | null) | undefined, ibhs_fortified_designation?: (IbhsFortifiedDesignation | null) | undefined, ibhs_fortified_designation_type?: (IbhsFortifiedDesignationType | null) | undefined, ibhs_fortified_roof?: (IbhsFortifiedRoof | null) | undefined, ibhs_fortified_roof_designation_date?: (string | null) | undefined, ibhs_has_fortified_certificate_document?: (IbhsHasFortifiedCertificateDocument | null) | undefined, inspection_date?: (string | null) | undefined, opening_protection_class?: (string | null) | undefined, opening_protection_extent?: (string | null) | undefined, roof_covering_type?: (string | null) | undefined, roof_install_year?: (number | null) | undefined, roof_shape?: (string | null) | undefined, roof_slope?: (string | null) | undefined, roof_to_wall?: (string | null) | undefined, sealed_roof_deck?: (string | null) | undefined} | {[key: string]: unknown}; export type ActiveLeak = 'yes' | 'no'; export type CentralAc = 'yes' | 'no'; export type CentralHeat = 'yes' | 'no'; export type HvacGoodWorkingOrder = 'yes' | 'no'; export type PriorLeak = 'yes' | 'no'; export type RoofLeaks = 'yes' | 'no'; export type FourPointInspection = {active_leak?: (ActiveLeak | null) | undefined, central_ac?: (CentralAc | null) | undefined, central_heat?: (CentralHeat | null) | undefined, document_id?: (string | null) | undefined, electrical_hazards?: (Array | null) | undefined, has_inspection_document?: (HasInspectionDocument | null) | undefined, hvac_good_working_order?: (HvacGoodWorkingOrder | null) | undefined, hvac_hazards?: (Array | null) | undefined, main_panel_type?: (string | null) | undefined, pipe_types?: (Array | null) | undefined, primary_heat_source?: (string | null) | undefined, prior_leak?: (PriorLeak | null) | undefined, roof_covering_material?: (string | null) | undefined, roof_damage?: (Array | null) | undefined, roof_install_year?: (number | null) | undefined, roof_leaks?: (RoofLeaks | null) | undefined, unsatisfactory_fixtures?: (Array | null) | undefined, wiring_conditions?: (Array | null) | undefined, wiring_types?: (Array | null) | undefined} | {[key: string]: unknown}; export type SecondaryConstructionType = {construction_type: ConstructionType, percentage: number}; export type FoundationType = 'basement' | 'concrete_slab' | 'crawlspace' | 'deep_pilings' | 'elevated_post_pier_and_beam_stilts' | 'pier_and_grade_beam' | 'shallow_basement' | 'stilts_with_sweep_away_walls'; export type SecondaryFoundationType = {foundation_type: FoundationType, percentage: number}; export type QuotePropertyDetailsRequest = {year_built?: (number | null) | undefined, stories?: (number | null) | undefined, total_sq_feet?: (number | null) | undefined, property_type?: (RalphieModelsMappedModelsPropertyType | null) | undefined, confirmed_property_style?: (ConfirmedPropertyStyle | null) | undefined, construction_type?: (ConstructionType | null) | undefined, roof_type?: (RoofType | null) | undefined, heating_sources?: (Array | null) | undefined, has_barred_windows_over_50_percent?: (string | null) | undefined, days_uninsured?: (number | null) | undefined, central_station?: (YesNo | null) | undefined, wrought_iron_bars?: (YesNo | null) | undefined, rental_duration?: (RentalDurationOptions | null) | undefined, renovation_status?: (RenovationStatus | null) | undefined, pool_trampoline_hot_tub?: (YesNo | null) | undefined, intermittent_rental?: (YesNo | null) | undefined, building_quality?: (BuildingQuality | null) | undefined, building_condition?: (BuildingCondition | null) | undefined, builder_name?: (string | null) | undefined, electrical_hvac_plumbing_renovated?: (YesNo | null) | undefined, fire_protection_class?: (string | null) | undefined, wind_coverage_exclusion_zone?: (YesNo | null) | undefined, ca_dic_zone?: (string | null) | undefined, foundation_type?: (string | null) | undefined, garages?: (Array | null) | undefined, average_wall_height_feet?: (number | null) | undefined, bathroom_details?: (Array | null) | undefined, bedrooms?: (number | null) | undefined, fireplaces?: (number | null) | undefined, foundation_shape?: (FoundationShape | null) | undefined, primary_interior_wall_material?: (PrimaryInteriorWallMaterial | null) | undefined, finished_basement_percent?: (number | null) | undefined, kitchens?: (number | null) | undefined, property_slope?: (PropertySlope | null) | undefined, building_quality_details?: (BuildingQualityDetails | null) | undefined, wind_mitigation?: (WindMitigation | null) | undefined, four_point_inspection?: (FourPointInspection | null) | undefined, secondary_construction_type?: (SecondaryConstructionType | 'none' | null) | undefined, secondary_foundation_type?: (SecondaryFoundationType | 'none' | null) | undefined}; export type PropertyAcknowledgements = {steadily_roof_condition_exclusion_user_agrees_to_all_terms?: (YesNo | null) | undefined}; export type AdditionalInsuredType = 'person' | 'company' | 'mortgagee' | 'non_institutional_lender' | 'trust_or_estate' | 'homeowner_association'; export type AdditionalInsured = {type: AdditionalInsuredType, name: string, loan_number?: (string | null) | undefined, address: RalphieModelsAddressAddress, email?: (string | null) | undefined}; export type LookupStatus = 'unknown' | 'started' | 'skipped' | 'failed' | 'succeeded'; export type DuplicateAddressPolicies = {deferral_reason?: (string | null) | undefined, lookup_status?: (LookupStatus | null) | undefined, policies?: ({[key: string]: unknown} | null) | undefined}; export type PropertyRequest = {property_id?: (string | null) | undefined, address: PropertyAddress, property_coverages?: (Array) | undefined, property_manager?: (PropertyManager | null) | undefined, property_details?: (QuotePropertyDetailsRequest | null) | undefined, property_acknowledgements?: (PropertyAcknowledgements | null) | undefined, additional_insured?: Array | undefined, duplicate_address_policies?: (DuplicateAddressPolicies | null) | undefined}; export type LimitDeductibleValueRequest = {type: 'limit_deductible', value: string, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type MedicalPaymentsCoverageRequest = {name: 'medical_payments', config: Array}; export type RalphieModelsCoverageModelsPersonalLiabilityLimitValueRequestValueOptions = '25000' | '50000' | '100000' | '200000' | '300000' | '500000'; export type PersonalLiabilityLimitValueRequest = {type: 'limit', value: RalphieModelsCoverageModelsPersonalLiabilityLimitValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type PersonalLiabilityCoverageRequest = {name: 'personal_liability', config: Array}; export type RalphieModelsCoverageModelsPremisesLiabilityLimitValueRequestValueOptions = '25000' | '50000' | '100000' | '200000' | '300000' | '500000' | '1000000/2000000'; export type PremisesLiabilityLimitValueRequest = {type: 'limit', value: RalphieModelsCoverageModelsPremisesLiabilityLimitValueRequestValueOptions, label?: (string | null) | undefined, editable?: (string | null) | undefined}; export type PremisesLiabilityCoverageRequest = {name: 'premises_liability', config: Array}; export type PaymentScheduleTypes = 'full' | 'full_escrow' | 'mortgagee_billed' | 'semi_annual' | 'quarterly' | 'monthly' | 'monthly_eft'; export type QuotePaymentRequest = {schedule: PaymentScheduleTypes, payment_schedule_discount?: (YesNo | null) | undefined}; export type QuoteUnderwritingRequest = {answer?: (YesNo | null) | undefined}; export type QuoteRequest = {policy_type: PolicyTypeOptions, primary_insured: Policyholder, additional_named_insured?: (Array | null) | undefined, effective_date?: string | undefined, policy_details: PolicyDetails, properties?: Array | undefined, policy_coverages?: (Array) | undefined, payment?: (QuotePaymentRequest | null) | undefined, underwriting?: (QuoteUnderwritingRequest | null) | undefined}; export type QuoteCreateRequest = {quote_id?: (string | null) | undefined, quote?: (QuoteRequest | null) | undefined}; export type GetApiV1AgencyQuoteOfferOfferIdArgs = {offer_id: string | null, quote_id?: (string | null) | undefined, policy_id?: (string | null) | undefined, body: QuoteOfferCreateRequest | PolicyCreateRequest | QuoteCreateRequest | null}; export type GetApiV1AgencyQuoteOfferOfferIdOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; export const policyTypeOptions = z.enum(["DP1", "DP2", "DP3"]); export const ralphieModelsAddressAddress = z.object({street_address: z.string(), city: z.string(), state: z.string(), zip_code: z.string()}); export const yesNo = z.enum(["yes", "no"]); export const companyTypes = z.object({contracting: yesNo.nullable().optional(), operations_beyond_rental_property_ownership_and_maintenance: yesNo.nullable().optional()}); export const policyholder = z.object({first_name: z.string().nullable().optional(), last_name: z.string().nullable().optional(), suffix: z.string().nullable().optional(), company_name: z.string().nullable().optional(), date_of_birth: z.string().nullable().optional(), phone_number: z.string().nullable().optional(), email: z.string().nullable().optional(), mailing_address: ralphieModelsAddressAddress.nullable().optional(), previous_address: ralphieModelsAddressAddress.nullable().optional(), is_military_member: yesNo.nullable().optional(), company_types: companyTypes.nullable().optional()}); export const additionalNamedInsuredType = z.enum(["person", "company", "trust_or_estate"]); export const additionalNamedInsured = z.object({type: additionalNamedInsuredType, name: z.string(), address: ralphieModelsAddressAddress}); export const insuranceScoreEstimate = z.union([z.literal(999), z.literal(725), z.literal(865)]); export const occupancy = z.enum(["owner_and_tenant", "rental", "seasonal", "vacant", "fix_and_flip", "landlord_primary_home"]); export const lossReason = z.enum(["weather", "fire", "water_appliance", "water", "theft", "earthquake", "liability", "medical", "other"]); export const selfReportedClaims = z.object({date_of_loss: z.string().nullable().optional(), loss_reason: lossReason.nullable().optional(), loss_amount_dollars: z.number().int().gt(0).nullable().optional(), caused_by_catastrophe: yesNo.nullable().optional()}); export const policyDetails = z.object({insurance_score_estimate: insuranceScoreEstimate.nullable().optional(), is_paperless: yesNo.nullable().optional(), occupancy: occupancy, similar_insurance_declined: yesNo.nullable().optional(), self_reported_claims: z.array(selfReportedClaims).nullable().optional(), unique_tracking_id: z.string().nullable().optional(), wind_coverage_excluded: yesNo.nullable().optional(), ca_dic: yesNo.nullable().optional()}); export const propertyAddress = z.object({street_address: z.string(), city: z.string(), state: z.string(), zip_code: z.string(), county: z.string().nullable().optional(), county_fips: z.string().nullable().optional(), lat: z.number().nullable().optional(), lng: z.number().nullable().optional()}); export const coverageType = z.enum(["limit", "sublimit", "deductible", "limit_deductible", "loss_valuation_option", "selection_factor", "selected", "excluded", "exclusion_description", "exclusion_risk_type", "description", "custom"]); export const coverageValueResponse = z.object({type: coverageType, value: z.union([z.string(), z.array(z.string())]), label: z.string(), default: z.string().nullable().optional(), options: z.array(z.string()).nullable().optional(), options_additional_allowed: yesNo.nullable().optional(), min: z.number().int().nullable().optional(), max: z.number().int().nullable().optional(), editable: yesNo, bumped_from_value: z.string().nullable().optional(), bumped_description: z.string().nullable().optional()}); export const coverageResponse = z.object({name: z.string(), parent_coverage: z.string().nullable().optional(), config: z.array(coverageValueResponse).nullable().optional(), label: z.string().nullable().optional()}); export const propertyManagerType = z.enum(["person", "company"]); export const propertyManager = z.object({type: propertyManagerType, is_additional_insured: yesNo.nullable().optional(), name: z.string(), address: ralphieModelsAddressAddress, is_active_manager: yesNo.nullable().optional()}); export const ralphieModelsMappedModelsPropertyType = z.enum(["single_family", "townhouse_or_rowhouse", "duplex", "triplex", "quadplex", "apartment_building", "manufactured_or_mobile_home", "other", "condominium_unit", "barndominium_unit"]); export const confirmedPropertyStyle = z.enum(["barndominium_unit", "condominium_unit"]); export const constructionType = z.enum(["frame", "brick_veneer", "brick_or_masonry_or_stone", "concrete", "log", "adobe_or_stucco", "asbestos", "other", "adobe_or_stucco_v2", "brick_solid", "cedar_siding", "cement_fiber_siding", "concrete_decorative", "concrete_exposed", "concrete_stucco", "log_v2", "metal_siding", "pre_engineered_metal", "vinyl_siding"]); export const roofType = z.enum(["asbestos", "concrete_or_slate", "rubber_or_tar_and_gravel_or_rolled_roof", "metal_excluding_tin_or_aluminum", "asphalt_shingles", "tile", "tin_or_aluminum", "wood", "other", "architectural_shingle", "three_tab_shingle", "wood_shingle_shake", "impact_resistant_shingle", "clay", "concrete", "cement_fiber", "tile_shake", "standing_seam", "corrugated_galvanized", "painted_rib", "copper_shingle", "built_up_with_gravel", "built_up_without_gravel", "membrane", "sprayed_polyurethane_foam", "slate", "synthetic_composite", "solar_shingle"]); export const heatingSource = z.enum(["furnace_electric", "furnace_natural_gas", "propane_gas", "oil", "wood_burning_stove_or_fireplace", "other"]); export const rentalDurationOptions = z.enum(["long_term", "short_term"]); export const renovationStatus = z.enum(["under_construction", "under_renovation", "not_under_renovation"]); export const buildingQuality = z.enum(["economy", "standard", "above_average", "custom", "premium"]); export const buildingCondition = z.enum(["excellent", "average", "fair"]); export const style = z.enum(["attached_or_built_in", "basement", "carport"]); export const garage = z.object({carport_additional_walls: z.number().int().gte(0).lte(3).nullable().optional(), size: z.string(), style: style.nullable().optional()}).and(z.record(z.string(), z.unknown())); export const bathroomRequest = z.object({type: z.enum(["Full", "Half", "3/4", "1.5"])}).and(z.record(z.string(), z.unknown())); export const foundationShape = z.enum(["square_rectangle", "l_shape", "t_u_z_shape", "h_or_custom_shape", "irregular_complex"]); export const primaryInteriorWallMaterial = z.enum(["drywall", "plaster", "solid_brick", "solid_stone", "solid_log", "concrete_block", "adobe", "glass_block", "studs_only", "open_no_wall"]); export const propertySlope = z.enum(["none", "moderate", "steep"]); export const buildingQualityDetails = z.object({cabinets_and_countertops: buildingQuality, exterior_features_and_finishes: buildingQuality, home_quality_grade: buildingQuality, interior_features_and_finishes: buildingQuality}).and(z.record(z.string(), z.unknown())); export const hasInspectionDocument = z.enum(["yes", "no"]); export const ibhsFortifiedDesignation = z.enum(["bronze", "silver", "gold"]); export const ibhsFortifiedDesignationType = z.enum(["wind_only", "wind_and_hail"]); export const ibhsFortifiedRoof = z.enum(["existing_roof", "new_roof"]); export const ibhsHasFortifiedCertificateDocument = z.enum(["yes", "no"]); export const windMitigation = z.object({asphalt_shingle_high_wind_rated: z.string().nullable().optional(), deck_attachment: z.string().nullable().optional(), document_id: z.string().nullable().optional(), florida_roof_product_approval: z.string().nullable().optional(), gable_roof_bracing: z.string().nullable().optional(), has_inspection_document: hasInspectionDocument.nullable().optional(), ibhs_fortified_certificate_document_id: z.string().nullable().optional(), ibhs_fortified_designation: ibhsFortifiedDesignation.nullable().optional(), ibhs_fortified_designation_type: ibhsFortifiedDesignationType.nullable().optional(), ibhs_fortified_roof: ibhsFortifiedRoof.nullable().optional(), ibhs_fortified_roof_designation_date: z.string().nullable().optional(), ibhs_has_fortified_certificate_document: ibhsHasFortifiedCertificateDocument.nullable().optional(), inspection_date: z.string().nullable().optional(), opening_protection_class: z.string().nullable().optional(), opening_protection_extent: z.string().nullable().optional(), roof_covering_type: z.string().nullable().optional(), roof_install_year: z.number().int().nullable().optional(), roof_shape: z.string().nullable().optional(), roof_slope: z.string().nullable().optional(), roof_to_wall: z.string().nullable().optional(), sealed_roof_deck: z.string().nullable().optional()}).and(z.record(z.string(), z.unknown())); export const activeLeak = z.enum(["yes", "no"]); export const centralAc = z.enum(["yes", "no"]); export const centralHeat = z.enum(["yes", "no"]); export const hvacGoodWorkingOrder = z.enum(["yes", "no"]); export const priorLeak = z.enum(["yes", "no"]); export const roofLeaks = z.enum(["yes", "no"]); export const fourPointInspection = z.object({active_leak: activeLeak.nullable().optional(), central_ac: centralAc.nullable().optional(), central_heat: centralHeat.nullable().optional(), document_id: z.string().nullable().optional(), electrical_hazards: z.array(z.string()).nullable().optional(), has_inspection_document: hasInspectionDocument.nullable().optional(), hvac_good_working_order: hvacGoodWorkingOrder.nullable().optional(), hvac_hazards: z.array(z.string()).nullable().optional(), main_panel_type: z.string().nullable().optional(), pipe_types: z.array(z.string()).nullable().optional(), primary_heat_source: z.string().nullable().optional(), prior_leak: priorLeak.nullable().optional(), roof_covering_material: z.string().nullable().optional(), roof_damage: z.array(z.string()).nullable().optional(), roof_install_year: z.number().int().nullable().optional(), roof_leaks: roofLeaks.nullable().optional(), unsatisfactory_fixtures: z.array(z.string()).nullable().optional(), wiring_conditions: z.array(z.string()).nullable().optional(), wiring_types: z.array(z.string()).nullable().optional()}).and(z.record(z.string(), z.unknown())); export const secondaryConstructionType = z.object({construction_type: constructionType, percentage: z.number().int().gte(1).lte(50)}); export const foundationType = z.enum(["basement", "concrete_slab", "crawlspace", "deep_pilings", "elevated_post_pier_and_beam_stilts", "pier_and_grade_beam", "shallow_basement", "stilts_with_sweep_away_walls"]); export const secondaryFoundationType = z.object({foundation_type: foundationType, percentage: z.number().int().gte(1).lte(50)}); export const quotePropertyDetails = z.object({year_built: z.number().int().gt(0).nullable().optional(), stories: z.number().gt(0).nullable().optional(), total_sq_feet: z.number().gt(0).nullable().optional(), property_type: ralphieModelsMappedModelsPropertyType.nullable().optional(), confirmed_property_style: confirmedPropertyStyle.nullable().optional(), construction_type: constructionType.nullable().optional(), roof_type: roofType.nullable().optional(), heating_sources: z.array(heatingSource).nullable().optional(), has_barred_windows_over_50_percent: z.string().nullable().optional(), days_uninsured: z.number().int().nullable().optional(), central_station: yesNo.nullable().optional(), wrought_iron_bars: yesNo.nullable().optional(), rental_duration: rentalDurationOptions.nullable().optional(), renovation_status: renovationStatus.nullable().optional(), pool_trampoline_hot_tub: yesNo.nullable().optional(), intermittent_rental: yesNo.nullable().optional(), building_quality: buildingQuality.nullable().optional(), building_condition: buildingCondition.nullable().optional(), builder_name: z.string().nullable().optional(), electrical_hvac_plumbing_renovated: yesNo.nullable().optional(), fire_protection_class: z.string().nullable().optional(), wind_coverage_exclusion_zone: yesNo.nullable().optional(), ca_dic_zone: z.string().nullable().optional(), foundation_type: z.string().nullable().optional(), garages: z.array(garage).nullable().optional(), average_wall_height_feet: z.number().nullable().optional(), bathroom_details: z.array(bathroomRequest).nullable().optional(), bedrooms: z.number().nullable().optional(), fireplaces: z.number().int().nullable().optional(), foundation_shape: foundationShape.nullable().optional(), primary_interior_wall_material: primaryInteriorWallMaterial.nullable().optional(), finished_basement_percent: z.number().int().gte(0).lte(100).nullable().optional(), kitchens: z.number().int().gte(1).nullable().optional(), property_slope: propertySlope.nullable().optional(), building_quality_details: buildingQualityDetails.nullable().optional(), wind_mitigation: windMitigation.nullable().optional(), four_point_inspection: fourPointInspection.nullable().optional(), secondary_construction_type: z.union([secondaryConstructionType, z.literal("none")]).nullable().optional(), secondary_foundation_type: z.union([secondaryFoundationType, z.literal("none")]).nullable().optional()}); export const underwritingRule = z.enum(["ASYNC_PROPERTY_DATA_LOOKUP_NOT_COMPLETE", "AOP_DEDUCTIBLE_FLOOR", "AIT_POOL_CONDITION", "AIT_BARRED_BOARDED_WINDOWS", "AIT_LOG_CONSTRUCTION", "AIT_MANUFACTURED_HOME", "AIT_ROOF_CONDITION", "BARRED_WINDOWS", "BLOCK_TEXAS_ZIP_CODES", "CLAIMS", "CLAIM_MISSING_DATE_OF_LOSS", "COASTAL_ZONE_FRAME_CONSTRUCTION_INITIAL_DWELLING", "CONDO_LIMITS_RULE", "CONDO_PERSONAL_PROPERTY_LIMITS_RULE", "CONDOS_ONLY_RULE", "CONSTRUCTION_TYPE", "CONSTRUCTION_TYPE_MISSING", "COUNTY_ELIGIBILITY", "COVERAGE_A", "COVERAGE_A_HIGH_TIV", "COVERAGE_A_HIGH_ITV", "COVERAGE_A_WARNING", "COVERAGE_A_DWELLING_LIMIT_EXCEEDED", "COVERAGE_A_MISSOURI", "COVERAGE_A_THRESHOLD", "DISTANCE_TO_COAST", "DWELLING_AGE", "DWELLING_AGE_DEFAULT_VALUES", "DWELLING_AGE_INITIAL_DWELLING", "DWELLING_AGE_MANUAL_REVIEW", "DWELLING_AGE_OVER_LIMIT", "DWELLING_AGE_STATE_CUTOFF", "DWELLING_DEFAULT_VALUES_PRESENT", "DWELLING_DEFAULT_VALUES_REVIEW", "DWELLING_ELEVATION", "DWELLING_INFRASTRUCTURE_AGE_INVALID", "DWELLING_AGE_MISSING", "DWELLING_OCCUPANCY", "EXCESSIVE_CLAIMS", "EXCESSIVE_CLAIMS_THEFT", "EXCESSIVE_CLAIMS_LIABILITY", "EXCESSIVE_CLAIMS_WATER", "EXCESSIVE_CLAIMS_FIRE", "EXCESSIVE_CLAIMS_LOSS_AMOUNT", "EXCESSIVE_CLAIMS_OTHER", "EXPOSURE_PRIOR_LAPSE", "EXPOSURE_PRIOR_LAPSE_MISSING", "FIRE_PROTECTION", "FIRE_PROTECTION_CLASS_LIMIT", "FRIZZLE_VERISK_CLAIMS_WORKFLOW_STATUS_IS_PENDING", "GEO_EXCLUSION_B", "HAS_CHARGEABLE_LIABILITY_LOSSES_AND_OFF_PREMISES_LIABILITY_EXTENSION", "HAS_CHARGEABLE_LOSSES_AND_LOSS_ASSESSMENT_COVERAGE_GREATER_THAN_5K", "HAS_CHARGEABLE_WATER_LOSSES_AND_LIMITED_HIDDEN_WATER_COVERAGE", "HAS_CHARGEABLE_LOSSES", "HAS_CHARGEABLE_LOSSES_VANDALISM", "HAS_CHARGEABLE_LOSSES_MULTIPLE", "HAS_OPEN_CLAIMS", "IN_AGGREGATION_MANAGEMENT_ZONE", "INSURANCE_SCORE_LOOKUP", "INSURANCE_SCORE", "INSURANCE_SCORE_FAILED", "INSURANCE_SCORE_MATCH", "LARGE_ACCOUNT", "LENDER_COUNT", "LENDER_MISSING", "LIMITED_RENOVATION", "LOG_CONSTRUCTION", "MAX_DAYS_SINCE_ORIGINAL_QUOTE_CREATED", "MUNICHRE_WILDFIRE_RISK_SCORE", "NO_CLAIMS_REPORT", "NO_MAILING_ADDRESS", "NUMBER_OF_UNITS_LIMIT", "OFF_PREMISES_LIABILITY_EXTENSION", "POLICY_START", "POOL_CONDITION", "PREMISES_LIABILITY_COVERAGE_LIMIT", "PREMISES_LIABILITY_COVERAGE_LIMIT_DP1", "PREMISES_LIABILITY_COVERAGE_LIMIT_ONE_MILLION", "PREMISES_LIABILITY_COVERAGE_LIMIT_STEADILY", "PREMIUM_BELOW_MINIMUM_WRITTEN_THRESHOLD", "PREMIUM_OR_CUSTOM_BUILDING_QUALITY", "PRIMARY_INSURED_DOB", "PRIMARY_INSURED_EMAIL", "PRIMARY_INSURED_PHONE", "PRIMARY_INSURED_IS_CONTRACTOR_PROOF_OF_INSURANCE_REQUIRED", "PRIOR_WATER_CLAIMS", "RCE", "RENTAL_OWNER_OCCUPIED_DWELLING", "ROOF_CONDITION_RATING", "ROOF_COVERAGE_EXCLUDED", "ROOF_TYPE", "SIMILAR_DECLINED", "SINGLE_FAMILY_BARNDOMINIUM", "TRAMPOLINE_PRESENCE", "TRISURA_TIV", "UNDEFINED_CLAIM_AMOUNT", "UNDERWRITING_APPLICATION_QUESTIONS", "URBAN_FIRE", "WATER_DAMAGE_CLAIMS", "WATER_DAMAGE_LIMITATION_CAP", "WATER_DAMAGE_LIMITATION_CAP_MISSING", "WATER_DAMAGE_LIMITATION_CAP_POST_YEAR", "WILDFIRE", "WILDFIRE_RISK_HAZARD", "WILDFIRE_CA", "WILDFIRE_RISK_SCORE_MISSING", "WILDFIRE_UNKNOWN_RISK_STRATEGY", "WILDFIRE_HAZARD", "WILDFIRE_TMP", "YARD_DEBRIS_COVERAGE_SQFT", "TOTAL_INSURED_VALUE_IN_QUARTER_MILE", "SINGLE_FAMILY_OWNER_OCCUPIED_DWELLING", "ADDITIONAL_NAMED_INSURED_COMPANY_RESTRICTIONS", "PRIMARY_INSURED_COMPANY_RESTRICTIONS", "PRIMARY_INSURED_COMPANY_RESTRICTIONS_UNANSWERED", "PRIMARY_INSURED_COMPANY_RESTRICTIONS_CONTRACTOR", "PRIMARY_INSURED_COMPANY_RESTRICTIONS_NON_CONTRACTOR", "TEMPORARY_TRISURA_NEW_BUSINESS_BLOCK", "FORM_VERSION_BLOCK", "COVERAGE_A_LIMIT_NOT_FOUND", "TEMPORARY_FORTEGRA_NEW_BUSINESS_BLOCK", "CONTRACTING_COMPANY_TYPE", "TOTAL_INSURED_VALUE_IN_RADIUS", "TOTAL_ENTERPRISE_INSURED_VALUE_IN_RADIUS", "DUPLICATE_ADDRESS_POLICIES_CANCELED_NON_REWRITE", "DUPLICATE_ADDRESS_POLICIES_ISSUED", "DUPLICATE_ADDRESS_QUOTES_REJECTED", "WINDSTORM_OR_HAIL_EXCLUSION_WARNING_NOT_ACKNOWLEDGED", "WINDSTORM_OR_HAIL_EXCLUSION_MIXED_PROPERTIES", "WINDSTORM_OR_HAIL_EXCLUSION_ZONE_IS_NULL", "WIND_AND_HAIL_DEDUCTIBLE", "WIND_AND_HAIL_DEDUCTIBLE_APPLIED_WITH_WINDSTORM_OR_HAIL_EXCLUSION", "WINDSTORM_OR_HAIL_EXCLUSION_APPLIED_INCORRECTLY", "WINDSTORM_OR_HAIL_EXCLUSION_MISSING", "MISSING_TIV_IN_RADIUS", "CA_DIC_REQUIRE_FAIR_PLAN", "PROPERTY_UNDER_RENOVATION_REQUIRES_LIMITED_RENOVATION_COVERAGE", "PROPERTY_TYPE_OTHER", "MAILING_ADDRESS", "PRIMARY_INSURED_IS_CONTRACTOR_UNANSWERED", "ROOF_COVERAGE_EXCLUSION_NEEDED", "EXPOSURE_H3_FACTOR_MISSING", "PERSONAL_AND_PREMISES_LIABILITY_SELECTED", "RCE_NOT_FOUND", "TIV_IN_RADIUS_INTERNAL_FAILURE", "DISTANCE_TO_COAST_REVIEW", "DWELLING_ELEVATION_RESOLUTION_TOO_POOR"]); export const decisionGuideMatchedRow = z.object({number_of_claims: z.string(), loss_amount_bucket: z.string(), loss_location: z.string()}); export const requireWaterRepairsCompleteAttestation = z.object({key: z.literal("REQUIRE_WATER_REPAIRS_COMPLETE_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional()}); export const requireNoExistingWindHailDamageAttestation = z.object({key: z.literal("REQUIRE_NO_EXISTING_WIND_HAIL_DAMAGE_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional()}); export const requireAllOtherRepairsCompleteAttestation = z.object({key: z.literal("REQUIRE_ALL_OTHER_REPAIRS_COMPLETE_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional()}); export const requireFireDamageRepairedAttestation = z.object({key: z.literal("REQUIRE_FIRE_DAMAGE_REPAIRED_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional()}); export const requireElectricalSystemGoodAttestation = z.object({key: z.literal("REQUIRE_ELECTRICAL_SYSTEM_GOOD_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional()}); export const requireTenantChangedAttestation = z.object({key: z.literal("REQUIRE_TENANT_CHANGED_ATTESTATION").optional(), display: z.string().optional(), attested: z.boolean().nullable().optional(), required: z.boolean().optional()}); export const fireRootCauseCategory = z.enum(["electrical", "intentional", "undetermined", "other"]); export const fireRootCauseOption = z.object({value: z.string(), display: z.string(), category: fireRootCauseCategory}); export const requireFireRootCauseAttestation = z.object({key: z.literal("REQUIRE_FIRE_ROOT_CAUSE_ATTESTATION").optional(), display: z.string().optional(), answer: z.string().nullable().optional(), answer_options: z.array(fireRootCauseOption).optional()}); export const unknownDecisionGuideAttestation = z.object({key: z.string()}).and(z.record(z.string(), z.unknown())); export const setAopDeductibleFloor = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), minimum_percent_of_cov_a: z.number().int(), resolved_minimum_option: z.string().nullable().optional(), key: z.literal("SET_AOP_DEDUCTIBLE_FLOOR").optional(), minimum_amount_usd: z.number().int().optional()}); export const setWindHailDeductibleFloor = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), minimum_percent_of_cov_a: z.number().int(), resolved_minimum_option: z.string().nullable().optional(), key: z.literal("SET_WIND_HAIL_DEDUCTIBLE_FLOOR").optional()}); export const limitWaterDamageCoverage = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), key: z.literal("LIMIT_WATER_DAMAGE_COVERAGE").optional(), limit_percent: z.number().int().nullable().optional(), limit_amount_usd: z.number().int().nullable().optional()}); export const limitLiabilityCoverage = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), key: z.literal("LIMIT_LIABILITY_COVERAGE").optional(), limit_usd: z.number().int()}); export const suppressCoverage = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), key: z.literal("SUPPRESS_COVERAGE").optional(), target: z.enum(["limited_hidden_water", "water_back_up_and_sump_overflow_or_discharge", "water_damage_perils", "limited_theft", "vandalism_or_malicious_mischief", "offpremises_liability_extension"])}); export const addCoverage = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), key: z.literal("ADD_COVERAGE").optional(), coverage: z.enum(["water_damage_exclusion", "roof_surfacing_exclusion"])}); export const pivotToDp1 = z.object({necessary: z.boolean().nullable().optional(), display: z.string().optional(), key: z.literal("PIVOT_TO_DP1").optional(), without_coverage: z.literal("vandalism_or_malicious_mischief")}); export const manualUwReview = z.object({necessary: z.boolean().nullable().optional(), display: z.literal("Review risk as a whole").optional(), key: z.literal("MANUAL_UW_REVIEW").optional()}); export const markIneligible = z.object({necessary: z.boolean().nullable().optional(), display: z.literal("Ineligible").optional(), key: z.literal("MARK_INELIGIBLE").optional(), reasons: z.array(z.string())}); export const persistedClaimIdentity = z.object({carrier_name: z.string().nullable().optional(), carrier_claim_number: z.string().nullable().optional()}); export const claimsAutomationResponse = z.object({loss_type: z.string(), underwriting_rule: underwritingRule.nullable().optional(), matched_row_id: z.string(), matched_row: decisionGuideMatchedRow.nullable().optional(), attestations: z.array(z.union([z.union([requireWaterRepairsCompleteAttestation, requireNoExistingWindHailDamageAttestation, requireAllOtherRepairsCompleteAttestation, requireFireDamageRepairedAttestation, requireElectricalSystemGoodAttestation, requireTenantChangedAttestation, requireFireRootCauseAttestation]), unknownDecisionGuideAttestation])), actions: z.array(z.discriminatedUnion("key", [setAopDeductibleFloor, setWindHailDeductibleFloor, limitWaterDamageCoverage, limitLiabilityCoverage, suppressCoverage, addCoverage, pivotToDp1, manualUwReview, markIneligible])).nullable().optional(), eligible_for_automation: z.boolean().nullable().optional(), decision_source_version: z.string().nullable().optional(), matched_claim_identities: z.array(persistedClaimIdentity).nullable().optional(), dwelling_id: z.string()}); export const propertyAcknowledgementsResponse = z.object({steadily_roof_condition_exclusion_user_agrees_to_all_terms: yesNo.nullable().optional(), claims_automations: z.array(claimsAutomationResponse).nullable().optional()}); export const additionalInsuredType = z.enum(["person", "company", "mortgagee", "non_institutional_lender", "trust_or_estate", "homeowner_association"]); export const additionalInsured = z.object({type: additionalInsuredType, name: z.string(), loan_number: z.string().nullable().optional(), address: ralphieModelsAddressAddress, email: z.string().nullable().optional()}); export const userReplacementCost = z.object({purchase_price: z.number().int().gte(0).lte(50000000), renovation_cost: z.number().int().gte(0).lte(50000000)}); export const matchedMoratorium = z.object({moratorium_id: z.string()}).and(z.record(z.string(), z.unknown())); export const lookupStatus = z.enum(["unknown", "started", "skipped", "failed", "succeeded"]); export const duplicateAddressPolicies = z.object({deferral_reason: z.string().nullable().optional(), lookup_status: lookupStatus.nullable().optional(), policies: z.record(z.string(), z.unknown()).nullable().optional()}); export const propertyResponse = z.object({property_id: z.string(), address: propertyAddress, property_coverages: z.array(coverageResponse), property_manager: propertyManager.nullable().optional(), property_details: quotePropertyDetails.nullable().optional(), property_acknowledgements: propertyAcknowledgementsResponse.nullable().optional(), additional_insured: z.array(additionalInsured).optional(), replacement_cost_estimate: z.number().int(), user_replacement_cost: userReplacementCost.nullable().optional(), moratoriums: z.array(matchedMoratorium).optional(), duplicate_address_policies: duplicateAddressPolicies.nullable().optional()}); export const paymentScheduleTypes = z.enum(["full", "full_escrow", "mortgagee_billed", "semi_annual", "quarterly", "monthly", "monthly_eft"]); export const quotePaymentResponse = z.object({schedule: paymentScheduleTypes, payment_schedule_discount: yesNo}); export const ipodUnderwritingStatementContent: z.ZodType = z.object({content: z.string().nullable().optional(), items: z.array(z.lazy(() => ipodUnderwritingStatementContent)).nullable().optional()}); export const ipodUnderwritingAttestation = z.object({answer: z.enum(["yes", "no"]).nullable().optional(), statement: ipodUnderwritingStatementContent.nullable().optional(), notice: ipodUnderwritingStatementContent.nullable().optional()}); export const attestationStatement: z.ZodType = z.object({content: z.string().nullable().optional(), items: z.array(z.lazy(() => attestationStatement)).nullable().optional()}); export const uwAppQuestion = z.object({name: z.string(), prefix: z.string().nullable().optional(), text: z.array(z.string()), answer: z.string().nullable().optional()}); export const quoteUnderwritingApplicationQuestions = z.object({disclaimer: z.string().nullable().optional(), questions_prefix: z.string().nullable().optional(), questions: z.array(uwAppQuestion).nullable().optional()}); export const quoteUnderwritingResponse = z.object({attestation: z.union([ipodUnderwritingAttestation, z.array(z.union([attestationStatement, z.string()]))]).nullable().optional(), answer: yesNo.nullable().optional(), application_questions: quoteUnderwritingApplicationQuestions.nullable().optional()}); export const signingRequirements = z.object({requires_diligent_effort_affidavit: z.boolean().optional(), requires_esignature_consent: z.boolean().optional()}); export const apiValidationError = z.object({loc: z.array(z.string()).optional(), msg: z.string(), type: z.string(), retryable: z.boolean().nullable().optional(), request_id: z.string().nullable().optional(), error_id: z.string().nullable().optional(), ctx: z.record(z.string(), z.unknown()).nullable().optional()}); export const insuranceStructure = z.enum(["COI_MASTER_MGA", "STANDARD_MGA", "XMGA", "ARCHIVED"]); export const renewalStatus = z.enum(["draft", "quoted", "bound", "invalidated"]); export const coveragePriceResponse = z.object({coverage_id: z.string(), name: z.string(), premium_cents: z.number().int(), taxes_cents: z.number().int(), total_cents: z.number().int()}); export const type = z.enum(["days", "flat_cents"]); export const propertyPriceResponse = z.object({property_id: z.string(), coverage_premiums: z.array(coveragePriceResponse), premium_cents: z.number().int(), taxes_cents: z.number().int(), total_cents: z.number().int(), minimum_earned_premium_type: type.nullable().optional(), minimum_earned_premium_scalar_amount: z.number().int().gte(0).nullable().optional(), minimum_earned_premium_cents: z.number().int().gte(0).nullable().optional()}); export const installment = z.object({amount_cents: z.number().int(), due_date: z.string()}); export const surchargeResponse = z.object({label: z.string(), state: z.string(), amount_cents: z.number().int(), rate_basis_points: z.number().int(), applies_to_payment_method: z.string()}); export const rateLineResponse = z.object({key: z.string(), kind: z.enum(["fee", "tax"]), amount_cents: z.number().int()}); export const paymentOption = z.object({plan: z.string(), label: z.string(), premium_cents: z.number().int(), minimum_earned_premium_cents: z.number().int().gte(0).nullable().optional(), fees_cents: z.number().int(), taxes_cents: z.number().int(), total_cents: z.number().int(), installments: z.array(installment), surcharges: z.array(surchargeResponse).optional(), rate_lines: z.array(rateLineResponse).nullable().optional()}); export const quotePriceResponse = z.object({property_premiums: z.array(propertyPriceResponse), payment_option: paymentOption, payment_options_available: z.array(paymentOption)}); export const offerStatus = z.enum(["quoted", "declined"]); export const contractStatus = z.enum(["pending", "completed", "rejected", "voided"]); export const contractResponse = z.object({contract_id: z.string(), status: contractStatus}); export const documentStatus = z.enum(["pending", "completed"]); export const document = z.object({display_name: z.string(), file_name: z.string().nullable().optional(), file_code: z.string().nullable().optional(), url: z.string().nullable().optional(), status: documentStatus.optional(), quote_version: z.number().int().nullable().optional(), quote_id: z.string().nullable().optional(), created_at: z.string(), steadily_universal_dwelling_id: z.string().nullable().optional(), external_reference_id: z.string().nullable().optional(), external_reference_version: z.string().nullable().optional()}); export const offerResponse = z.object({policy_type: policyTypeOptions, primary_insured: policyholder, additional_named_insured: z.array(additionalNamedInsured).nullable().optional(), effective_date: z.string().optional(), policy_details: policyDetails.nullable().optional(), properties: z.array(propertyResponse), policy_coverages: z.array(coverageResponse), payment: quotePaymentResponse.nullable().optional(), underwriting: quoteUnderwritingResponse.nullable().optional(), signing_requirements: signingRequirements.optional(), agent_ui_url: z.string().nullable().optional(), errors: z.array(apiValidationError).nullable().optional(), carrier: z.string(), public_policy_id: z.string().nullable(), quote_version: z.number().int().nullable().optional(), insurance_structure: insuranceStructure.nullable().optional(), effective_date_timezone: z.string().nullable().optional(), updated_at: z.string().nullable().optional(), previous_policy_id: z.string().nullable().optional(), renewal_policy_id: z.string().nullable().optional(), renewal_quote_id: z.string().nullable().optional(), renewal_status: renewalStatus.nullable().optional(), renewal_start_date: z.string().nullable().optional(), renewal_end_date: z.string().nullable().optional(), pricing: quotePriceResponse.nullable().optional(), offer_id: z.string(), public_offer_id: z.string(), status: offerStatus, mandatory_agent_agreement_contract: contractResponse.nullable().optional(), mandatory_policyholder_agreement_contract: contractResponse.nullable().optional(), documents: z.array(document)}); export const validateResponse = async ( schema: { readonly '~standard': { readonly validate: (value: unknown) => ({ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }) | Promise<{ readonly value: Output; readonly issues?: undefined } | { readonly issues: ReadonlyArray<{ readonly message: string; readonly path?: ReadonlyArray | undefined }> }> } }, value: unknown ): Promise => { const result = await schema['~standard'].validate(value) if (result.issues !== undefined) { const detail = result.issues .map(({ message, path }) => path?.length ? `${path.map((segment) => String(typeof segment === 'object' ? segment.key : segment)).join('.')}: ${message}` : message ) .join('; ') throw new Error(`Response does not match the schema: ${detail}`, { cause: { issues: result.issues } }) } return result.value }; /** * Get Offer * * GET /v1/agency/quote_offer/{offer_id} */ export const getApiV1AgencyQuoteOfferOfferId = async (args: GetApiV1AgencyQuoteOfferOfferIdArgs, options: GetApiV1AgencyQuoteOfferOfferIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() headers.set('content-type', "application/json") headers.set('accept', "application/json") if (args.quote_id != null) query.append("quote_id", String(args.quote_id)) if (args.policy_id != null) query.append("policy_id", String(args.policy_id)) if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/v1/agency/quote_offer/${encodeURIComponent(String(args.offer_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers, body: JSON.stringify(args.body)}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return validateResponse(offerResponse, await res.json()) };