Skip to content
RelKit
Esc
↑↓navigate↵open⌘Jpreview
On this page

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
>;

Source

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.