Function Versions hooks

Hand-written shim. Generated CRUD hooks via ./function-versions.gen. useForkFunctionVersion + useSetDefaultFunctionVersion stay hand-written (the codegen skips `custom` ops).

Hooks

useCreateFunctionVersion mutation

Create an ADDITIONAL version of an existing function. The initial v1 is created automatically by createFunction — do NOT call this right after createFunction. Use this only when you actually need a v2+, or use forkFunctionVersion to branch from a specific version.

TypeScript
useCreateFunctionVersion(options?: MutationOpts<FunctionVersion, CreateFunctionVersionParams>)

Types: FunctionVersion · CreateFunctionVersionParams

useDeleteFunctionVersion mutation

Soft-delete a function version.

TypeScript
useDeleteFunctionVersion(options?: MutationOpts<SuccessResponse, string>)

Types: SuccessResponse

useForkFunctionVersion composite

TypeScript
useForkFunctionVersion(options?: MutationOpts<FunctionVersion, ForkFunctionVersionParams>)

Types: FunctionVersion · ForkFunctionVersionParams

useListFunctionVersions query

List function versions.

TypeScript
useListFunctionVersions(params?: Omit<ListFunctionVersionsParams, | > & { filter?: FunctionVersionFilter; orderBy?: FunctionVersionOrderBy[]; } & FunctionVersionShorthands, options?: QueryOpts<Page<FunctionVersion>>)

Types: ListFunctionVersionsParams · FunctionVersionFilter · FunctionVersionOrderBy · FunctionVersionShorthands · Page · FunctionVersion

usePurgeFunctionVersion composite

Permanently delete a soft-deleted function version.

TypeScript
usePurgeFunctionVersion(options?: MutationOpts<SuccessResponse, PurgeFunctionVersionParams>)

Types: SuccessResponse · PurgeFunctionVersionParams

useRestoreFunctionVersion composite

Restore a soft-deleted function version.

TypeScript
useRestoreFunctionVersion(options?: MutationOpts<FunctionVersion, string>)

Types: FunctionVersion

useRetrieveFunctionVersion query

Get a function version by ID.

TypeScript
useRetrieveFunctionVersion(id: string, options?: QueryOpts<FunctionVersion>)

Types: FunctionVersion

useSetDefaultFunctionVersion composite

TypeScript
useSetDefaultFunctionVersion(options?: MutationOpts<Function, SetDefaultFunctionVersionParams>)

Types: Function · SetDefaultFunctionVersionParams

useUpdateFunctionVersion mutation

Update a function version.

TypeScript
useUpdateFunctionVersion(options?: MutationOpts<FunctionVersion, UpdateFunctionVersionParams>)

Types: FunctionVersion · UpdateFunctionVersionParams