import { InputParams, InputParamValue, InputParamValues } from "./params_input"; import { ConfigVar } from "../api/types"; import { AirplaneFileObject } from "../file/file_object"; export type JSONValue = string | number | boolean | null | JSONObject | JSONArray; export interface JSONObject { [key: string]: JSONValue; } export type JSONArray = Array; export type SerializedParamValueByType = { shorttext: string; longtext: string; sql: string; boolean: boolean; upload: AirplaneFileObject; integer: number; float: number; date: string; datetime: string; configvar: ConfigVar; json: JSONValue; }; type SerializedParamValue = SerializedParamValueByType[keyof SerializedParamValueByType] | undefined; export type SerializedParamValues = Record; export type SerializedParamType = "string" | "boolean" | "upload" | "integer" | "float" | "date" | "datetime" | "configvar" | "json"; export type SerializedParamComponent = "editor-sql" | "textarea"; export type SerializedParam = { slug: string; name: string; desc?: string; type: SerializedParamType; component?: SerializedParamComponent; default?: SerializedParamValue | SerializedParamValue[]; constraints: { optional: boolean; regex?: string; options?: Array; }; }; export type SerializedParams = SerializedParam[]; export declare const serializeParamValues: (paramValues: InputParamValues) => SerializedParamValues; export declare const serializeParamValue: (paramValue: InputParamValue | InputParamValue[], multi?: boolean) => SerializedParamValue | SerializedParamValue[]; export declare const serializeParamValueSingle: (paramValue: InputParamValue) => SerializedParamValue; export declare const serializeParams: (params: InputParams) => SerializedParams; export {};