import { APIResource } from "../../core/resource.js"; import * as DeploymentsAPI from "./deployments.js"; import { DeploymentCreateParams, DeploymentListLogsParams, DeploymentListLogsResponse, DeploymentListResponse, DeploymentRetrieveParams, Deployments, FunctionDeployment } from "./deployments.js"; import * as ExecutionsAPI from "./executions.js"; import { ExecutionCreateParams, ExecutionListLogsParams, ExecutionListLogsResponse, ExecutionListParams, ExecutionRetrieveParams, Executions, FunctionExecution, FunctionExecutionsPageCursorURL } from "./executions.js"; import { APIPromise } from "../../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../../core/pagination.js"; import { RequestOptions } from "../../internal/request-options.js"; /** * Functions defined by the company */ export declare class Functions extends APIResource { deployments: DeploymentsAPI.Deployments; executions: ExecutionsAPI.Executions; /** * A list of functions. * * - Requires: `API Tier 2` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(query?: FunctionListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new function. */ create(body?: FunctionCreateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Retrieve a specific function. */ retrieve(functionAPIName: string, options?: RequestOptions): APIPromise; /** * Update a function */ update(functionAPIName: string, body?: FunctionUpdateParams | null | undefined, options?: RequestOptions): APIPromise; /** * Create a new function dev bundle. */ createDevBundle(functionAPIName: string, body?: FunctionCreateDevBundleParams | null | undefined, options?: RequestOptions): APIPromise; } export type FunctionsPageCursorURL = PageCursorURL; export interface Function { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The API name of the function */ api_name?: string; /** * The current draft of code for the function */ code_draft?: string; /** * The dependencies of the function */ dependencies?: unknown; /** * The function description */ description?: string; /** * Whether this function runs asynchronously */ is_async?: boolean; /** * The function name */ name?: string; } export interface FunctionCreateDevBundleResponse { /** * The bundle contents as a base64 encoded zip */ contents?: string; } export interface FunctionListParams { order_by?: string; } export interface FunctionCreateParams { /** * The API name of the function */ api_name?: string; /** * The current draft of code for the function */ code_draft?: string; /** * The dependencies of the function */ dependencies?: unknown; /** * The function description */ description?: string; /** * Whether this function runs asynchronously */ is_async?: boolean; /** * The function name */ name?: string; } export interface FunctionUpdateParams { /** * The current draft of code for the function */ code_draft?: string; /** * The dependencies of the function */ dependencies?: unknown; /** * The function description */ description?: string; /** * The function name */ name?: string; } export interface FunctionCreateDevBundleParams { } export declare namespace Functions { export { type Function as Function, type FunctionCreateDevBundleResponse as FunctionCreateDevBundleResponse, type FunctionsPageCursorURL as FunctionsPageCursorURL, type FunctionListParams as FunctionListParams, type FunctionCreateParams as FunctionCreateParams, type FunctionUpdateParams as FunctionUpdateParams, type FunctionCreateDevBundleParams as FunctionCreateDevBundleParams, }; export { Deployments as Deployments, type FunctionDeployment as FunctionDeployment, type DeploymentListResponse as DeploymentListResponse, type DeploymentListLogsResponse as DeploymentListLogsResponse, type DeploymentCreateParams as DeploymentCreateParams, type DeploymentRetrieveParams as DeploymentRetrieveParams, type DeploymentListLogsParams as DeploymentListLogsParams, }; export { Executions as Executions, 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=functions.d.ts.map