Skip to main content

Appnest Functions — Overview

Appnest splits "functions" into two surfaces: backend helpers used inside server handlers, and a client API used to invoke those handlers by name.

Backend — From AppnestFunctions (e.g. require('@sparrowengg/appnest-app-sdk-utils')), destructure what you need: $db (typed key/value storage), $fetch (outbound HTTP), $file (signed upload/download and object ops), $next (invoke another backend function), $schedule (one-time, cron, recurring jobs), and getTraceId (request correlation). The platform supplies this package at runtime for backend code; use it for storage, HTTP, files, chaining functions, and scheduling.

FrontendappBackendInvoke({ apiFunctionName, functionPayload, options? }) runs in the browser or app client: it POSTs to the platform backend-invoke endpoint, attaches app/trace context, and returns the parsed JSON body of the response (not a { data, status } wrapper). Use it whenever the UI needs to call a named server function.

For signatures, parameters, return shapes, and code-generation detail, see appnestFunctionsBackend.md (backend) and appnestFunctionsFrontend.md (frontend / client).