SPB Git

Repository Public

estimate-defaults.ts 3.2 KB 63 lines typescript

1/**2 * =============================================================================3 *                  SP BOUCHER | SOFTWARE & RESEARCH4 *             ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project          : Vrai-Prix8 * File             : src/lib/cost/estimate-defaults.ts9 * Module           : lib10 * Repository       : https://git.spboucher.ai/vrai-prix11 * Created          : 2026-09-0812 * Last Modified    : 2026-09-0813 *14 * Author           : Simon-Pierre Boucher15 * Position         : Professor of Finance16 * Institution      : Université du Québec en Outaouais (UQO)17 * Organization     : SP Boucher18 * Website          : https://spboucher.ai19 * Git              : https://git.spboucher.ai20 *21 * Preferred Contact: contact@spboucher.ai22 * Development      : dev@spboucher.ai23 * Support          : support@spboucher.ai24 * Security/Admin   : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License          : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142/** Entrées par défaut de la méthode du coût — module PUR (client + serveur + tests). */43import { DEFAULT_PARAMS } from "./taxonomy";44import type { BuildingSpec, CostInput } from "./types";4546export function defaultBuilding(): BuildingSpec {47  return {48    type: "detached", quality: "standard", grossFloorAreaSqft: 1800, footprintSqft: null, stories: 2, yearBuilt: null, basement: "unfinished", basementFinishedPct: 0,49    garage: { type: "none", spaces: 0, areaSqft: null }, structure: "wood_frame", foundation: "poured_concrete", siding: { vinyl: 1 }, roof: "asphalt_shingle", roofGeometry: "gable", roofPitch: 6,50    windows: "pvc", windowCount: null, heating: "electric_baseboard", hasAirConditioning: false, hasAirExchanger: true, kitchens: 1, kitchenQuality: "standard", bathrooms: 1, powderRooms: 0, bathroomQuality: "standard",51    bedrooms: null, flooring: {}, deckSqft: 0, drivewaySqft: 0, driveway: "none", fenceLinFt: 0, landscapingSqft: 0, pool: "none", units: 1,52  };53}5455export function defaultInput(): CostInput {56  return {57    mode: "construction", propertyId: null, listingUid: null, address: null, municipality: null, lat: null, lng: null, locationCode: null,58    building: defaultBuilding(), quantityOverrides: {}, excludedAssemblies: [], params: JSON.parse(JSON.stringify(DEFAULT_PARAMS)),59    depreciation: { method: "age_life", effectiveAge: null, economicLife: 60, effectiveAgeSource: "derived", componentConditions: {}, functional: [], externalValueLoss: 0, externalNote: "" },60    land: { value: null, source: "none", rollYear: null, method: "" }, attributeSources: {}, roll: null, priceDate: null,61  };62}63
Files main
Menu

Theme