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 1` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/executions/?order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "function_id": "string", * "inputs": {}, * "outputs": {}, * "status": "string", * "started_at": "string", * "finished_at": "string" * } * ], * "next_link": "string" * } * ``` */ list(functionAPIName: string, query?: ExecutionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new function execution. This API does not guarantee exactly-once * execution. Retrying side-effecting operations requires application-level * idempotency enforced by the function or downstream provider. A rejection applies * only to this submission attempt, not to any earlier attempt. * * @example HTTP * Representative request and response shapes. * ``` * POST /functions/{function_api_name}/executions/ HTTP/1.1 * Host: rest.ripplingapis.com * Content-Type: application/json * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * { * "inputs": {} * } * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "function_id": "string", * "inputs": {}, * "outputs": {}, * "status": "string", * "started_at": "string", * "finished_at": "string" * } * ``` */ create(functionAPIName: string, body: ExecutionCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific function execution. * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/executions/{execution_id}/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "function_id": "string", * "inputs": {}, * "outputs": {}, * "status": "string", * "started_at": "string", * "finished_at": "string" * } * ``` */ retrieve(executionID: string, params: ExecutionRetrieveParams, options?: RequestOptions): APIPromise; /** * A list of function execution logs. * * - Requires: `API Tier 1` * * @example HTTP * Representative request and response shapes. * ``` * GET /functions/{function_api_name}/executions/{execution_id}/logs/ HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "results": [ * { * "message": "string", * "sequence_num": 0, * "timestamp": "string", * "level": "string", * "params": {} * } * ] * } * ``` */ 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 { cursor?: string; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; 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