UNPKG

@tmlmobilidade/types

Version:
208 lines (207 loc) • 7.22 kB
import { z } from 'zod'; export declare const VkmCalculationMethodValues: readonly ["rolling_year", "fixed_range"]; export declare const VkmCalculationMethodSchema: z.ZodEnum<["rolling_year", "fixed_range"]>; export type VkmCalculationMethod = z.infer<typeof VkmCalculationMethodSchema>; export declare const VkmExtensionSourceValues: readonly ["go", "stop_times"]; export declare const VkmExtensionSourceSchema: z.ZodEnum<["go", "stop_times"]>; export type VkmExtensionSource = z.infer<typeof VkmExtensionSourceSchema>; export declare const LegacyVkmDayTypeSchema: z.ZodEnum<["1", "2", "3"]>; export type LegacyVkmDayType = z.infer<typeof LegacyVkmDayTypeSchema>; export declare const CalculateVkmSchema: z.ZodObject<{ agency_id: z.ZodString; calculation_method: z.ZodEnum<["rolling_year", "fixed_range"]>; end_date: z.ZodOptional<z.ZodNullable<z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>>>; extension_source: z.ZodEnum<["go", "stop_times"]>; start_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>; }, "strip", z.ZodTypeAny, { agency_id: string; calculation_method: "rolling_year" | "fixed_range"; extension_source: "go" | "stop_times"; start_date: string & { __brand: "OperationalDate"; }; end_date?: import("@tmlmobilidade/go-types-shared").OperationalDate | null | undefined; }, { agency_id: string; calculation_method: "rolling_year" | "fixed_range"; extension_source: "go" | "stop_times"; start_date: string; end_date?: string | null | undefined; }>; export declare const VkmCalculationInputsSchema: z.ZodObject<{ agency_id: z.ZodString; agency_name: z.ZodString; calculation_method: z.ZodEnum<["rolling_year", "fixed_range"]>; end_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>; price_per_km: z.ZodNumber; start_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>; total_vkm_per_year: z.ZodNumber; }, "strip", z.ZodTypeAny, { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string & { __brand: "OperationalDate"; }; start_date: string & { __brand: "OperationalDate"; }; total_vkm_per_year: number; }, { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string; start_date: string; total_vkm_per_year: number; }>; export declare const VkmPeriodResultSchema: z.ZodObject<{ code: z.ZodNullable<z.ZodString>; day_type_one: z.ZodNumber; day_type_three: z.ZodNumber; day_type_two: z.ZodNumber; id: z.ZodNullable<z.ZodString>; name: z.ZodString; total: z.ZodNumber; }, "strip", z.ZodTypeAny, { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }, { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }>; export declare const VkmCalculationResultSchema: z.ZodObject<{ day_type_one: z.ZodNumber; day_type_three: z.ZodNumber; day_type_two: z.ZodNumber; inputs: z.ZodObject<{ agency_id: z.ZodString; agency_name: z.ZodString; calculation_method: z.ZodEnum<["rolling_year", "fixed_range"]>; end_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>; price_per_km: z.ZodNumber; start_date: z.ZodEffects<z.ZodString, import("@tmlmobilidade/go-types-shared").OperationalDate, string>; total_vkm_per_year: z.ZodNumber; }, "strip", z.ZodTypeAny, { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string & { __brand: "OperationalDate"; }; start_date: string & { __brand: "OperationalDate"; }; total_vkm_per_year: number; }, { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string; start_date: string; total_vkm_per_year: number; }>; periods: z.ZodArray<z.ZodObject<{ code: z.ZodNullable<z.ZodString>; day_type_one: z.ZodNumber; day_type_three: z.ZodNumber; day_type_two: z.ZodNumber; id: z.ZodNullable<z.ZodString>; name: z.ZodString; total: z.ZodNumber; }, "strip", z.ZodTypeAny, { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }, { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }>, "many">; total_from_distance: z.ZodNumber; total_from_shape: z.ZodNumber; total_in_euros: z.ZodNumber; total_relative_to_contract: z.ZodNumber; }, "strip", z.ZodTypeAny, { day_type_one: number; day_type_three: number; day_type_two: number; inputs: { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string & { __brand: "OperationalDate"; }; start_date: string & { __brand: "OperationalDate"; }; total_vkm_per_year: number; }; periods: { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }[]; total_from_distance: number; total_from_shape: number; total_in_euros: number; total_relative_to_contract: number; }, { day_type_one: number; day_type_three: number; day_type_two: number; inputs: { price_per_km: number; agency_id: string; agency_name: string; calculation_method: "rolling_year" | "fixed_range"; end_date: string; start_date: string; total_vkm_per_year: number; }; periods: { code: string | null; name: string; id: string | null; total: number; day_type_one: number; day_type_three: number; day_type_two: number; }[]; total_from_distance: number; total_from_shape: number; total_in_euros: number; total_relative_to_contract: number; }>; export type CalculateVkmDto = z.infer<typeof CalculateVkmSchema>; export type VkmCalculationInputs = z.infer<typeof VkmCalculationInputsSchema>; export type VkmCalculationResult = z.infer<typeof VkmCalculationResultSchema>; export type VkmPeriodResult = z.infer<typeof VkmPeriodResultSchema>;