Functions
bulk-update-functions
fn (project-ref: Str, body: Any): Map
Bulk update edge functions for a project.
create-function
fn (request: CreateFunctionRequest): EdgeFunction
Create and deploy a new edge function. body is the function source code. slug is the URL path segment.
Example
::functions ::supabase::admin::functions
fn-result ::functions/create-function(::functions/CreateFunctionRequest({
project_ref: "my-project-ref",
slug: "hello-world",
name: "hello-world",
body: "Deno.serve(() => new Response('Hello from Hot!'))",
verify_jwt: true
}))
delete-function
fn (project-ref: Str, function-slug: Str): Map
Delete an edge function by slug.
deploy-function
fn (project-ref: Str, body: Any): Map
Deploy a function bundle through the Management API deploy endpoint.
get-function
fn (project-ref: Str, function-slug: Str): EdgeFunction
Get details for a specific edge function by slug.
get-function-body
fn (project-ref: Str, function-slug: Str): Any
Get the source code of an edge function.
list-functions
fn (project-ref: Str): Vec
List all edge functions for a project.
Example
::functions ::supabase::admin::functions
fns ::functions/list-functions("my-project-ref")
// => [{id: "...", slug: "hello-world", name: "hello-world", status: "ACTIVE", ...}, ...]
ns
Alias of ::supabase::admin::functions/
update-function
fn (request: UpdateFunctionRequest): Map
Update an existing edge function. Only provided fields are updated.
Types
CreateFunctionRequest
CreateFunctionRequest type {
project_ref: Str,
slug: Str,
name: Str,
body: Str,
verify_jwt: Bool?,
import_map: Bool?,
entrypoint_path: Str?,
import_map_path: Str?
}
EdgeFunction
EdgeFunction type {
id: Str?,
slug: Str,
name: Str?,
status: Str?,
verify_jwt: Bool?,
created_at: Str?,
updated_at: Str?
}
UpdateFunctionRequest
UpdateFunctionRequest type {
project_ref: Str,
function_slug: Str,
body: Str?,
name: Str?,
verify_jwt: Bool?,
import_map: Bool?,
entrypoint_path: Str?,
import_map_path: Str?
}