Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

@reactor/functions — functionsclient

@reactor/functions


@reactor/functions / FunctionsClient

Defined in: index.ts:36

new FunctionsClient(ctx): FunctionsClient

Defined in: index.ts:37

RequestContext

FunctionsClient

get env(): object

Defined in: index.ts:146

Admin: Environment variables

object

list: (name) => Promise<Result<EnvVar[]>>

string

Promise<Result<EnvVar[]>>

set: (name, vars) => Promise<Result<void>>

string

Record<string, string>

Promise<Result<void>>

unset: (name, keys) => Promise<Result<void>>

string

string[]

Promise<Result<void>>


get logs(): object

Defined in: index.ts:160

Admin: Logs

object

list: (name, options?) => Promise<Result<FunctionLog[]>>

string

number

string

Promise<Result<FunctionLog[]>>


get versions(): object

Defined in: index.ts:172

Admin: Versions

object

list: (name) => Promise<Result<FunctionVersion[]>>

string

Promise<Result<FunctionVersion[]>>

rollback: (name, version) => Promise<Result<void>>

string

string

Promise<Result<void>>

deploy(name, bundle, options?): Promise<Result<{ version: string; }>>

Defined in: index.ts:130

Admin: Deploy a function

string

Blob | ArrayBuffer

string

Promise<Result<{ version: string; }>>


invoke<T>(name, options?): Promise<Result<T>>

Defined in: index.ts:42

Invoke a function and return JSON response.

T = unknown

string

InvokeOptions

Promise<Result<T>>


invokeRaw(name, options?): Promise<Response>

Defined in: index.ts:103

Invoke a function and return raw Response.

string

InvokeOptions

Promise<Response>


invokeStream(name, options?): AsyncIterable<string>

Defined in: index.ts:58

Invoke a function and stream the response (SSE).

string

InvokeOptions

AsyncIterable<string>