/// <reference types="web" />
/// <reference types="node" />
import { CellType } from '../sheet';
export declare type BaseType = 'int' | 'str' | 'list' | 'dict';
export declare type PyType = BaseType | `typing.List[${BaseType}]`;
export declare function matchType(type: PyType): CellType;
export declare type FunctionPreview = {
    /**
     * Unique ID that won't make conflict
     */
    id: string;
    name: string;
    description: string;
    path: `/param/${string}`;
};
export declare type GetListResponse = {
    list: FunctionPreview[];
};
export declare function getList(url: URL, init?: RequestInit): Promise<GetListResponse>;
export declare type Param = {
    type: PyType;
    treat_as: 'config' | 'column' | 'cell';
    whitelist?: string[];
    example?: any[];
};
export declare type FunctionDetail = {
    /**
     * Unique ID that won't make conflict
     */
    id: string;
    /**
     * Display Name
     */
    name: string;
    destination: null | string;
    /**
     * Params of the function
     */
    params: {
        [key: string]: {
            type: PyType;
            treat_as: 'config' | 'column' | 'cell';
            whitelist?: string[];
            example?: any[];
        };
    };
    /**
     * Output data type
     */
    return_type: {
        [key: string]: PyType;
    };
    /**
     * Description of this function
     */
    description: string;
    /**
     * Json Schema
     *  Refs: https://json-schema.org/
     */
    schema: Record<string, any>;
};
export declare function getParam(url: URL, init?: RequestInit): Promise<FunctionDetail>;
export declare type CallBody = {
    [x: string]: any;
};
export declare type PostCallResponseSuccess = {
    [key: string]: any;
};
export declare type PostCallResponseError = {
    'error_type': 'wrapper' | 'function';
    'error_body': string;
};
export declare type PostCallResponse = PostCallResponseSuccess | PostCallResponseError;
export declare function callFunction(url: URL, body: CallBody, init?: RequestInit): Promise<PostCallResponse>;
//# sourceMappingURL=index.d.ts.map