import { Hyper } from '../hyper'; import type { MethodParamsOptions } from './@types'; export declare class Types { private readonly hyper; constructor(hyper: Hyper); private makeRequest; /** * More information: https://docs.gethyper.ai/types#string * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a string data type * @example * const { data, error } = await hyper.types.string( 'Who is the CEO of SpaceX?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // Elon Musk */ string(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: string; error: null; }>; /** * More information: https://docs.gethyper.ai/types#integer * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as an integer data type * @example * const { data, error } = await hyper.types.integer( 'How many planets are in the Solar System?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // 8 */ integer(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: number; error: null; }>; /** * More information: https://docs.gethyper.ai/types#float * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a float data type * @example * const { data, error } = await hyper.types.float( 'How many billion years old is the universe?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // 13.8 */ float(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: number; error: null; }>; /** * More information: https://docs.gethyper.ai/types#boolean * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a boolean data type * @example * const { data, error } = await hyper.types.boolean( 'Can cats see in the dark?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // true */ boolean(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: boolean; error: null; }>; /** * More information: https://docs.gethyper.ai/types#datetime * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a datetime data type * @example * const { data, error } = await hyper.types.datetime( 'What is the date of the Apollo 11 moon landing?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // '1969-07-20T20:17:00Z' */ datetime(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: string; error: null; }>; /** * More information: https://docs.gethyper.ai/types#string-array * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a array of strings * @example * const { data, error } = await hyper.types.stringArray( 'List all department names', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // ['Human Resources', 'Finance', 'Research and Development', 'Sales', 'Customer Support'] */ stringArray(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: string[]; error: null; }>; /** * More information: https://docs.gethyper.ai/types#integer-array * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a array of integers * @example * const { data, error } = await hyper.types.integerArray( 'What is the headcount for each department?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // [25, 40, 15, 50, 30] */ integerArray(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: number[]; error: null; }>; /** * More information: https://docs.gethyper.ai/types#float-array * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a array of floats * @example * const { data, error } = await hyper.types.floatArray( 'What were the customer satisfaction ratings from the last survey?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // [4.2, 3.8, 4.5, 4.7, 3.9] */ floatArray(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: number[]; error: null; }>; /** * More information: https://docs.gethyper.ai/types#boolean-array * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a array of booleans * @example * const { data, error } = await hyper.types.booleanArray( 'Are services meeting performance targets?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // [true, false, true, true, false] */ booleanArray(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: boolean[]; error: null; }>; /** * More information: https://docs.gethyper.ai/types#datetime-array * @param {string} query - The query to be processed * @param {MethodParamsOptions} options - Optional parameters to be passed to the request, such as `contextId` * @returns The result of the query as a array of datetime strings * @example * const { data, error } = await hyper.types.datetimeArray( 'What are the upcoming project deadlines?', { contextId: '123e4567-e89b-12d3-a456-426614174000' }, ); * console.log(data); // ['2023-11-15T17:00:00Z', '2023-12-01T17:00:00Z', '2023-12-20T17:00:00Z'] */ datetimeArray(query: string, options?: MethodParamsOptions): Promise<{ data: null; error: string; } | { data: string[]; error: null; }>; }