import { APIResource } from "../../core/resource.mjs"; import { APIPromise } from "../../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../../core/pagination.mjs"; import { RequestOptions } from "../../internal/request-options.mjs"; /** * Functions defined by the company */ export declare class Executions extends APIResource { /** * A list of function executions. * * - Requires: `API Tier 2` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(functionAPIName: string, query?: ExecutionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new function execution. */ create(functionAPIName: string, body: ExecutionCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific function execution. */ retrieve(executionID: string, params: ExecutionRetrieveParams, options?: RequestOptions): APIPromise; /** * A list of function execution logs. * * - Requires: `API Tier 2` */ listLogs(executionID: string, params: ExecutionListLogsParams, options?: RequestOptions): APIPromise; } export type FunctionExecutionsPageCursorURL = PageCursorURL; export interface FunctionExecution { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The ID of the function this execution belongs to */ function_id: string; /** * The inputs of the execution */ inputs: unknown; /** * Record update date */ updated_at: string; /** * The end time of the execution */ finished_at?: string; /** * The outputs of the execution */ outputs?: unknown; /** * The start time of the execution */ started_at?: string; /** * The status of the execution */ status?: string; } export interface ExecutionListLogsResponse { results?: Array; } export declare namespace ExecutionListLogsResponse { interface Result { /** * The log message */ message: string; /** * The sequence number of the log line */ sequence_num: number; /** * The log level */ level?: string; /** * Parameters associated with the log line */ params?: unknown; /** * The log timestamp */ timestamp?: string; } } export interface ExecutionListParams { order_by?: string; } export interface ExecutionCreateParams { /** * The inputs of the execution */ inputs: unknown; } export interface ExecutionRetrieveParams { /** * The API name of the function. */ function_api_name: string; } export interface ExecutionListLogsParams { /** * The API name of the function. */ function_api_name: string; } export declare namespace Executions { export { type FunctionExecution as FunctionExecution, type ExecutionListLogsResponse as ExecutionListLogsResponse, type FunctionExecutionsPageCursorURL as FunctionExecutionsPageCursorURL, type ExecutionListParams as ExecutionListParams, type ExecutionCreateParams as ExecutionCreateParams, type ExecutionRetrieveParams as ExecutionRetrieveParams, type ExecutionListLogsParams as ExecutionListLogsParams, }; } //# sourceMappingURL=executions.d.mts.map