Skip to content
Snippets Groups Projects
Select Git revision
  • 06f2180ed1a78d7f9eee1612ba4e0f3f4ea6c9fe
  • master default protected
  • pote_2023
  • documentations-html-f0e8dcec4bba9d7e8b79b95b79fedf732f2d19ec
  • documentations-html-fd10cfaeb1ac3b2fcd47b527a8ece2958c0a2dbe
  • documentations-html-fbb6ca14cc3bec2a3e98ba0cbb3fd98600828f8c
  • documentation-non-recours
  • ajout-variable-taux-allegement-general
  • tester-variable-taux-allegement-cotisations
  • ppa-rsa
  • documentations-html-acad4c9f95a39e798170e3e9ab147b24b9f7e613
  • 184-ajouter-une-variable-sur-le-non-recours
  • aides-logement
  • statistiques_impot
  • documentations-html-ab2ff75179b3a97939d5c802e370f32c1978b99b
  • statistiques_impot_corrections_chloe
  • documentations-html-e96b6fd1b3963bc54903d8de1e23ea3f7dbb2e00
  • cdhr_reform
  • memo_pfu
  • 177-integration-erfs-2021-pipeline
  • 175-ajout-code-casd
21 results

example.env

Blame
  • parameters.ts 1.61 KiB
    export type AnyParameter = Parameter | ParameterNode | Scale
    
    export interface Parameter extends ParameterBase {
      class: ParameterClass.Parameter
      values: ParameterAtInstant[]
    }
    
    export interface ParameterAtInstant {
      instant: string
      name: string
      source?: string
      unit?: Unit
      value: number | string | string[]
    }
    
    export interface ParameterBase {
      class: ParameterClass
      description?: string
      documentation?: string
      id: string // Generated attribute (last part of name)
      name: string
      parent?: ParameterNode // Generated attribute
      reference?: string | string[] | { [instant: string]: string | string[] }
      referring_variables?: string[]
      source?: string
      title: string // Generated attribute constructed using description or name
      titles: string // Generated attribute aggregating the titles of every ancestors
      unit?: Unit
    }
    
    export enum ParameterClass {
      Node = "Node",
      Parameter = "Parameter",
      Scale = "Scale",
    }
    
    export interface ParameterNode extends ParameterBase {
      children: { [id: string]: AnyParameter }
      class: ParameterClass.Node
    }
    
    export interface Scale extends ParameterBase {
      brackets: { [instant: string]: { [threshold: string]: number | null } | null }
      class: ParameterClass.Scale
      rate_unit?: Unit.Rate
      threshold_unit?: Unit.Currency
      type: ScaleType
    }
    
    export enum ScaleType {
      MarginalRate = "marginal_rate",
      SingleAmount = "single_amount",
    }
    
    export enum Unit {
      CodesDepartements = "codes départements",
      CountryCode = "ISO 3166-1 alpha-2", // Two-letters code of a country
      Currency = "currency",
      Month = "month",
      Rate = "/1", // Number between 0 and 1
      Year = "year",
    }