import { TableType } from './components/Table/Table'; import { Dictionary, Field } from './engine/Engine'; import { DocumentNode } from 'graphql'; import { QueryConfig } from './state/state'; export declare const ID_AUTO_GENERATED = "ID will be autogenerated"; /** * Stringify JSON data and copy to clipboard * @param data JSON data */ export declare const copyJson: (data: any) => void; /** * Parses location href to endpoint + token * @param location `window.location.href` link */ export declare const parseLocation: (location: string) => { endpoint: string; token: string | undefined; }; /** * Checks if typename is inside queryConfig * @param typename string * @param queryConfig Dictionary of query config */ export declare const typeExistsInQueryConfig: (typename: string, queryConfig: Dictionary) => boolean; export declare type InputTypes = 'text' | 'number' | 'boolean' | 'date' | 'json' | 'enum'; export declare const queryNotExecuted: (currentQuery: any, lastQuery: any) => boolean; export declare const generateQueryName: (name: any, savedQueryNames: any) => any; declare type TFormatData = (data: any, scalarType: 'ID' | 'String' | 'Int' | 'Float' | 'Boolean' | 'Json' | 'DateTime' | string) => string; export declare const inputTypeFromScalar: (scalarType: string) => "text" | "number"; export declare const inputFieldType: (typeName: string) => { type: InputTypes; open: boolean; }; export declare const isScalar: (type: any) => boolean; export declare const prettyQuery: (query: string) => any; export declare const isLimbo: (data: any, index: number, fieldName: string, fields: Dictionary) => any; export declare const formatData: TFormatData; export declare const castData: (value: any, type: string) => any; export declare const tableWidth: (fields: any, width: any, type: TableType) => any; export declare const fieldWidth: (fields: any, width: any, type: TableType) => number; export declare const getPayloadFromFields: (fields: Dictionary) => string; export declare const artifacts: string[]; export declare const clearObject: (obj: any, properties?: string[]) => any; export declare const validateSchema: (values: any, schema: any) => Promise<{}>; export declare const removeArtifacts: (node: any) => any; /** * Adding __id to query to have always unique identifier * TODO: right now works just with `id` field, requires `modelIdMap` from engine */ export declare function addUniqueFieldToDocument(doc: DocumentNode): DocumentNode; export {};