import IFunctionSchema from '@ulixee/databox/interfaces/IFunctionSchema'; import { IPassthroughFunctionComponents } from '@ulixee/databox/lib/PassthroughFunction'; import { IAnySchemaJson } from '@ulixee/schema/interfaces/ISchemaJson'; import { IFunctionComponents } from '@ulixee/databox'; export interface IFetchMetaMessage { messageId: string; action: 'fetchMeta'; scriptPath: string; } export interface IRunMessage { messageId: string; action: 'exec'; functionName: string; scriptPath: string; input: any; } export declare type IMessage = IFetchMetaMessage | IRunMessage; export interface IExecResponseData { output?: any; error?: { message: string; stack?: string; }; } export interface IFetchMetaResponseData { coreVersion: string; remoteDataboxes?: Record; paymentAddress?: string; giftCardIssuerIdentity?: string; functionsByName: { [name: string]: { corePlugins: { [name: string]: string; }; schema?: Omit & { input?: Record; output?: Record | IAnySchemaJson; }; } & Omit, 'schema'> & IPassthroughFunctionComponents; }; tablesByName: { [name: string]: { schema: Record; seedlings: Record; }; }; } export declare type IResponseData = IExecResponseData | IFetchMetaResponseData; export interface IResponse { responseId: string; data: IResponseData; }