Application API
Generated public TypeScript reference for relkit.
Common APIs
For configuration and examples, read Application configuration, Provider bindings, modules.
For a complete workflow, follow upload product images.
Most-used APIs
These entries carry each API’s contract and example. The complete reference follows.
defineApp
Defines one immutable application topology synchronously.
Throws
The original validation error for invalid options.
Example
import { defineApp } from "relkit";
import { defineEnv } from "relkit/config";
const app = defineApp({ env: defineEnv({}), server: { port: 3000 } });
Signature
declare const defineApp: <
const Shape extends EnvShape,
const Bucket extends AppProviderBindings["bucket"] = undefined,
const Cache extends AppProviderBindings["cache"] = undefined,
const Jobs extends AppProviderBindings["jobs"] = undefined,
const Event extends AppProviderBindings["event"] = undefined,
const Model extends AppProviderBindings["model"] = undefined,
const Realtime extends AppProviderBindings["realtime"] = undefined,
const AgentState extends AppProviderBindings["agent-state"] = undefined,
const Exporters extends TelemetryExporterMap = Readonly<
Record<string, TelemetryExporterDescriptor<string, string, object>>
>,
>(
options: DefineAppOptions<
Shape,
DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
Exporters
>,
) => ApplicationDescriptor<
Shape,
DefineAppBindings<Bucket, Cache, Jobs, Event, Model, Realtime, AgentState>,
Exporters
>;
Since v0.2.0
Complete reference
Public imports
relkit— 117 exports
All exported APIs
Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API’s inline sample, a maintained repository usage, or the shared module walkthrough.
| API | Kind | Import from | Example |
|---|---|---|---|
| AgentClientFor | Type | relkit |
API example |
| AgentDescriptor | Type | relkit |
Module example |
| AgentLimits | Type | relkit |
Module example |
| ApplicationDescriptor | Type | relkit |
API example |
| ApprovalPolicy | Type | relkit |
Module example |
| AuthContext | Type | relkit |
API example |
| BucketClient | Type | relkit |
API example |
| BucketClientFor | Type | relkit |
API example |
| BucketDescriptor | Type | relkit |
API example |
| BucketObjectMetadata | Type | relkit |
API example |
| BucketPutOptions | Type | relkit |
API example |
| CacheClient | Type | relkit |
API example |
| CacheClientFor | Type | relkit |
API example |
| CacheDescriptor | Type | relkit |
API example |
| ChannelDescriptor | Type | relkit |
API example |
| ChannelTriggerOptions | Type | relkit |
API example |
| ConstantsDescriptor | Type | relkit |
API example |
| createRelkit | Value |