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

Inngest API

Generated public TypeScript reference for @relkit/inngest.

For configuration and examples, read bindings, schedules, docker.

Public imports

  • @relkit/inngest — 7 exports
  • @relkit/inngest/runtime — 26 exports
  • @relkit/inngest/local-recipe — 1 exports
  • @relkit/inngest/deployment — 4 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
createInngestFunction Value @relkit/inngest/runtime Module example
createInngestFunctionConfig Value @relkit/inngest/runtime Module example
createInngestRunApi Value @relkit/inngest/runtime Module example
createInngestRuntime Value @relkit/inngest/runtime Module example
createInngestServeHandler Value @relkit/inngest/runtime Module example
createInngestWorker Value @relkit/inngest/runtime Module example
deploymentProfile Value @relkit/inngest/deployment Module example
inngest Value @relkit/inngest Source example
InngestAdapter Type @relkit/inngest Module example
InngestApiRequestError Value @relkit/inngest/runtime Module example
InngestBehavior Type @relkit/inngest Module example
inngestConnectionContract Value @relkit/inngest Module example
InngestDeploymentProfile Type @relkit/inngest/deployment Module example
inngestFunctionId Value @relkit/inngest/runtime Module example
inngestIntegration Value @relkit/inngest Module example
inngestLocalRecipe Value @relkit/inngest Module example
InngestObservationOptions Type @relkit/inngest/runtime Module example
InngestOptions Type @relkit/inngest Module example
InngestRunApi Type @relkit/inngest/runtime Module example
InngestRunMetadata Type @relkit/inngest/runtime Module example
InngestRuntime Type @relkit/inngest/runtime Module example
InngestRuntimeOptions Type @relkit/inngest/runtime Module example
InngestSdk Type @relkit/inngest/runtime Module example
InngestTaskDefinition Type @relkit/inngest/runtime Module example
InngestWorkerHandle Type @relkit/inngest/runtime Module example
InngestWorkerOptions Type @relkit/inngest/runtime Module example
InngestWorkerPublication Type @relkit/inngest/deployment Module example
InngestWorkerRegistrationOptions Type @relkit/inngest/runtime Module example
isAmbiguousInngestWrite Value @relkit/inngest/runtime Module example
loadInngestSdk Value @relkit/inngest/runtime Module example
localRecipe Value @relkit/inngest/local-recipe Source example
MAX_LOCAL_INDEX_ENTRIES Value @relkit/inngest/runtime Module example
nativeWorkerPublication Value @relkit/inngest/deployment Module example
observeInngestRun Value @relkit/inngest/runtime Module example
rememberInngestRecord Value @relkit/inngest/runtime Module example
runtimeIntegration Value @relkit/inngest/runtime Module example
snapshot Value @relkit/inngest/runtime Module example
statusOf Value @relkit/inngest/runtime Module example

index.ts

InngestDeploymentProfile (interface)

Signature

export interface InngestDeploymentProfile {
  readonly provider: "inngest";
  readonly compatibility: "native";
  readonly adapterId: "inngest";
  readonly sdk: "inngest@4.20.0";
  readonly serverImageDigest: string;
  readonly profile: "self-hosted-docker";
  readonly workerRuntime: "bun";
  readonly executionLimits: Readonly<{
    readonly inputBytes: number;
    readonly progressBytes: number;
    readonly maxRunList: number;
  }>;
  readonly policyIdentity: readonly string[];
}

Source

InngestWorkerPublication (interface)

Signature

export interface InngestWorkerPublication {
  readonly provider: "inngest";
  readonly mechanism: "inngest-sdk";
  readonly taskId: string;
  readonly taskVersion: string;
  readonly buildId: string;
  readonly serviceGeneration: string;
  readonly entrypoint: string;
}

Source

deploymentProfile

Signature

declare const deploymentProfile: InngestDeploymentProfile;

Source

nativeWorkerPublication

Signature

declare const nativeWorkerPublication: (
  value: Omit<InngestWorkerPublication, "provider" | "mechanism">,
) => InngestWorkerPublication;

Source

index.ts

InngestAdapter (type alias)

Signature

type InngestAdapter<Options extends InngestOptions = InngestOptions> = ProviderAdapter<
  typeof job,
  "inngest",
  ProviderConnectionValues,
  ProviderBehavior<InngestBehavior>
>;

Source

InngestBehavior (type alias)

Signature

type InngestBehavior = JobsServiceBehavior;

Source

InngestOptions (interface)

Signature

export interface InngestOptions extends JobsServiceOptions {
  readonly appId?: string;
  readonly baseUrl?: string | URL | TextReference;
  readonly eventKey?: SecretReference;
  readonly signingKey?: SecretReference;
  readonly serveOrigin?: string | URL | TextReference;
  readonly appVersion?: string;
  readonly native?: Readonly<Record<string, import("@relkit/contracts").JsonValue>>;
}

Source

inngest

Defines a native Inngest durable-jobs adapter without importing the SDK.

Signature

declare const inngest: <const Options extends InngestOptions = InngestOptions>(
  options?: Options,
) => InngestAdapter<Options>;

Source

inngestConnectionContract

Signature

declare const inngestConnectionContract: ProviderConnectionContract;

Source

inngestIntegration

Signature

declare const inngestIntegration: IntegrationReference<"inngest">;

Source

inngestLocalRecipe

Signature

declare const inngestLocalRecipe: ProviderLocalRecipeReference;

Source

local-readiness.ts

waitForInngestReadiness

Signature

declare const waitForInngestReadiness: (context: LocalServiceRecipeOutputContext) => Promise<void>;

Source

index.ts

localRecipe

Signature

declare const localRecipe: Readonly<{
  kind: "local-service-recipe";
  protocolVersion: 2;
  integrationId: "inngest";
  recipeId: "inngest-docker";
  recipeVersion: 2;
  materializerId: "docker";
  containers: ReadonlyArray<
    | Readonly<{
        id: "postgres";
        image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        environment: Readonly<{
          POSTGRES_DB: Readonly<{ value: "inngest" }>;
          POSTGRES_USER: Readonly<{ value: "inngest" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "redis";
        image: "redis:7-alpine@sha256:ff02b58f971e7d7d156a1267e283fcbbeee91773b6aa36c49dac28ecfe28eadf";
        command: ReadonlyArray<string>;
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "inngest";
        image: "inngest/inngest@sha256:d5365a31f8bf504dc2d54ddd114fcdc1a0413f8b57a450365c095ab6234ad8c2";
        command: ReadonlyArray<string>;
        dependsOn: ReadonlyArray<string>;
        ports: Readonly<{ api: 8288 }>;
        health: Readonly<{ command: Array<string>; intervalMs: 500; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
        hostAliases: Readonly<{ "host.docker.internal": "host-gateway" }>;
        environment: Readonly<{
          INNGEST_EVENT_KEY: Readonly<{ secret: "eventKey" }>;
          INNGEST_SIGNING_KEY: Readonly<{ secret: "signingKey" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
      }>
  >;
  workers: ReadonlyArray<
    Readonly<{
      id: "worker";
      image: "oven/bun:1.3.10@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e";
      command: ReadonlyArray<string>;
      dependsOn: ReadonlyArray<string>;
      ports: Readonly<{ api: 3000 }>;
      health: Readonly<{
        command: Array<string>;
        intervalMs: 500;
        timeoutMs: 2000;
        retries: number;
      }>;
      networkAliases: ReadonlyArray<string>;
      hostAliases: Readonly<{ "host.docker.internal": "host-gateway" }>;
    }>
  >;
  init: ReadonlyArray<
    Readonly<{
      id: "postgres-ready";
      image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
      dependsOn: ReadonlyArray<string>;
      command: ReadonlyArray<string>;
      environment: Readonly<{ POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }> }>;
    }>
  >;
  volumes: Readonly<{
    postgres: Readonly<{ mountPath: "/var/lib/postgresql/data"; persistent: true }>;
    redis: Readonly<{ mountPath: "/data"; persistent: true }>;
  }>;
  generatedSecrets: Readonly<{
    eventKey: Readonly<{ bytes: 24; encoding: "hex" }>;
    signingKey: Readonly<{ bytes: 32; encoding: "hex" }>;
    postgresPassword: Readonly<{ bytes: 24; encoding: "hex" }>;
  }>;
  network: Readonly<{ internal: false }>;
  ownership: Readonly<{ scope: "project"; retainVolumes: true }>;
  outputs: ({ ports, secrets, endpoints }: LocalServiceRecipeOutputContext) => Readonly<{
    baseUrl: `http://127.0.0.1:${number}`;
    eventKey: string;
    signingKey: string;
    serveOrigin: string;
  }>;
  initialize: (context: LocalServiceRecipeOutputContext) => Promise<void>;
}>;

Source

local-timeouts.ts

Startup budget shared by the Docker worker health check and readiness probes.

INNGEST_LOCAL_HEALTH_INTERVAL_MS

Signature

declare const INNGEST_LOCAL_HEALTH_INTERVAL_MS: 500;

Source

INNGEST_LOCAL_HEALTH_RETRIES

Signature

declare const INNGEST_LOCAL_HEALTH_RETRIES: number;

Source

INNGEST_LOCAL_STARTUP_TIMEOUT_MS

Startup budget shared by the Docker worker health check and readiness probes.

Signature

declare const INNGEST_LOCAL_STARTUP_TIMEOUT_MS: 300000;

Source

local.ts

localRecipe

Signature

declare const localRecipe: Readonly<{
  kind: "local-service-recipe";
  protocolVersion: 2;
  integrationId: "inngest";
  recipeId: "inngest-docker";
  recipeVersion: 2;
  materializerId: "docker";
  containers: ReadonlyArray<
    | Readonly<{
        id: "postgres";
        image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        environment: Readonly<{
          POSTGRES_DB: Readonly<{ value: "inngest" }>;
          POSTGRES_USER: Readonly<{ value: "inngest" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "redis";
        image: "redis:7-alpine@sha256:ff02b58f971e7d7d156a1267e283fcbbeee91773b6aa36c49dac28ecfe28eadf";
        command: ReadonlyArray<string>;
        ports: Readonly<{}>;
        volumes: ReadonlyArray<{ name: string; mountPath: string }>;
        health: Readonly<{ command: Array<string>; intervalMs: 250; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
      }>
    | Readonly<{
        id: "inngest";
        image: "inngest/inngest@sha256:d5365a31f8bf504dc2d54ddd114fcdc1a0413f8b57a450365c095ab6234ad8c2";
        command: ReadonlyArray<string>;
        dependsOn: ReadonlyArray<string>;
        ports: Readonly<{ api: 8288 }>;
        health: Readonly<{ command: Array<string>; intervalMs: 500; timeoutMs: 2000; retries: 60 }>;
        networkAliases: ReadonlyArray<string>;
        hostAliases: Readonly<{ "host.docker.internal": "host-gateway" }>;
        environment: Readonly<{
          INNGEST_EVENT_KEY: Readonly<{ secret: "eventKey" }>;
          INNGEST_SIGNING_KEY: Readonly<{ secret: "signingKey" }>;
          POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }>;
        }>;
      }>
  >;
  workers: ReadonlyArray<
    Readonly<{
      id: "worker";
      image: "oven/bun:1.3.10@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e";
      command: ReadonlyArray<string>;
      dependsOn: ReadonlyArray<string>;
      ports: Readonly<{ api: 3000 }>;
      health: Readonly<{
        command: Array<string>;
        intervalMs: 500;
        timeoutMs: 2000;
        retries: number;
      }>;
      networkAliases: ReadonlyArray<string>;
      hostAliases: Readonly<{ "host.docker.internal": "host-gateway" }>;
    }>
  >;
  init: ReadonlyArray<
    Readonly<{
      id: "postgres-ready";
      image: "postgres:16-alpine@sha256:cf78e76683b9ca8c5733cbbdce6c9262b45b6767934dd0a95e671f9a0fc20685";
      dependsOn: ReadonlyArray<string>;
      command: ReadonlyArray<string>;
      environment: Readonly<{ POSTGRES_PASSWORD: Readonly<{ secret: "postgresPassword" }> }>;
    }>
  >;
  volumes: Readonly<{
    postgres: Readonly<{ mountPath: "/var/lib/postgresql/data"; persistent: true }>;
    redis: Readonly<{ mountPath: "/data"; persistent: true }>;
  }>;
  generatedSecrets: Readonly<{
    eventKey: Readonly<{ bytes: 24; encoding: "hex" }>;
    signingKey: Readonly<{ bytes: 32; encoding: "hex" }>;
    postgresPassword: Readonly<{ bytes: 24; encoding: "hex" }>;
  }>;
  network: Readonly<{ internal: false }>;
  ownership: Readonly<{ scope: "project"; retainVolumes: true }>;
  outputs: ({ ports, secrets, endpoints }: LocalServiceRecipeOutputContext) => Readonly<{
    baseUrl: `http://127.0.0.1:${number}`;
    eventKey: string;
    signingKey: string;
    serveOrigin: string;
  }>;
  initialize: (context: LocalServiceRecipeOutputContext) => Promise<void>;
}>;

Source

index.ts

“./observe.js” (namespace export)

Re-exports all named exports from the “./observe.js” module.

Signature

export * from "./observe.js";

Source

“./runs.js” (namespace export)

Re-exports all named exports from the “./runs.js” module.

Signature

export * from "./runs.js";

Source

“./task-binding.js” (namespace export)

Re-exports all named exports from the “./task-binding.js” module.

Signature

export * from "./task-binding.js";

Source

InngestRuntime (interface)

Signature

export interface InngestRuntime extends JobsAdapterRuntime {
  readonly registerWorker: (options: InngestWorkerRegistrationOptions) => InngestWorkerHandle;
}

Source

InngestRuntimeOptions (interface)

Signature

export interface InngestRuntimeOptions {
  readonly appId: string;
  readonly baseUrl: string;
  readonly eventKey?: string;
  readonly signingKey?: string;
  readonly serveOrigin?: string;
  readonly appVersion?: string;
  readonly fetch?: typeof globalThis.fetch;
  readonly pollIntervalMs?: number;
  readonly maxPolls?: number;
  readonly serviceOptions?: JobsServiceOptions;
}

Source

createInngestRuntime

Signature

declare const createInngestRuntime: (options: InngestRuntimeOptions) => InngestRuntime;

Source

runtimeIntegration

Signature

declare const runtimeIntegration: RuntimeProviderIntegration<"inngest">;

Source

observe.ts

InngestObservationOptions (interface)

Signature

export interface InngestObservationOptions {
  readonly get: (runId: string, context: OperationContext) => Promise<RunSnapshot>;
  readonly pollIntervalMs?: number;
  readonly readTimeoutMs?: number;
  readonly maxPolls?: number;
  readonly subscribe?: (
    runId: string,
    onSnapshot: (run: RunSnapshot) => void,
    context: OperationContext,
  ) => Promise<(() => void) | undefined>;
}

Source

observeInngestRun

Signature

declare const observeInngestRun: (
  request: NativeWatchRequest,
  context: OperationContext,
  options: InngestObservationOptions,
) => AsyncIterable<NativeObservation>;

Source

policy.ts

InngestPolicyMapping (interface)

Signature

export interface InngestPolicyMapping {
  readonly retries?: number;
  readonly timeoutSeconds?: number;
  readonly concurrency?: number;
}

Source

mapInngestPolicy

Maps only fields whose semantics are certified by the pinned Inngest profile.

Signature

declare const mapInngestPolicy: (value: unknown) => InngestPolicyMapping;

Source

realtime.ts

subscribeInngestRun

Signature

declare const subscribeInngestRun: (
  client: Inngest.Any,
  appId: string,
  runId: string,
  onMessage: () => Promise<void>,
  context: OperationContext,
) => Promise<(() => void) | undefined>;

Source

run-controls.ts

cancelInngestRun

Signature

declare const cancelInngestRun: (
  locator: string,
  operationId: string,
  reason: string | undefined,
  context: OperationContext,
  api: InngestRunApi,
  records: Map<string, InngestRunMetadata>,
) => Promise<NativeControlReceipt>;

Source

retryInngestRun

Signature

declare const retryInngestRun: (
  request: NativeRetryRequest,
  context: OperationContext,
  api: InngestRunApi,
  records: Map<string, InngestRunMetadata>,
  retryResults: Map<string, NativeControlReceipt>,
) => Promise<NativeControlReceipt>;

Source

run-operations.ts

listInngestRuns

Signature

declare const listInngestRuns: (
  query: RunListQuery,
  context: OperationContext,
  api: InngestRunApi,
  records: Map<string, InngestRunMetadata>,
) => Promise<RunPage>;

Source

readInngestRun

Signature

declare const readInngestRun: (
  locator: NativeLocator,
  context: OperationContext,
  api: InngestRunApi,
  records: Map<string, InngestRunMetadata>,
) => Promise<RunSnapshot>;

Source

run-query.ts

decodeCursor

Signature

declare const decodeCursor: (value: string | undefined) => number;

Source

encodeCursor

Signature

declare const encodeCursor: (offset: number) => string;

Source

matchesMetadata

Signature

declare const matchesMetadata: (query: RunListQuery, metadata: InngestRunMetadata) => boolean;

Source

matchesSnapshot

Signature

declare const matchesSnapshot: (query: RunListQuery, run: RunSnapshot) => boolean;

Source

normalizeLimit

Signature

declare const normalizeLimit: (value: number | undefined) => number;

Source

uniqueRecords

Signature

declare const uniqueRecords: (records: Map<string, InngestRunMetadata>) => InngestRunMetadata[];

Source

runs-support.ts

date

Signature

declare const date: (value: unknown) => string | undefined;

Source

hashSigningKey

Signature

declare const hashSigningKey: (signingKey: string) => string;

Source

number

Signature

declare const number: (value: unknown) => number | undefined;

Source

record

Signature

declare const record: (value: unknown) => Record<string, unknown> | undefined;

Source

rows

Signature

declare const rows: (value: unknown) => Record<string, unknown>[];

Source

text

Signature

declare const text: (value: unknown, fallback: string) => string;

Source

runs.ts

InngestApiRequestError (class)

Signature

declare class InngestApiRequestError { constructor(
    readonly status: number,
    message: string,
  ) }

Source

InngestRunApi (interface)

Signature

export interface InngestRunApi {
  readonly eventRuns: (
    eventId: string,
    signal?: AbortSignal,
  ) => Promise<readonly Record<string, unknown>[]>;
  readonly run: (runId: string, signal?: AbortSignal) => Promise<Record<string, unknown>>;
  readonly cancel: (
    runId: string,
    reason: string | undefined,
    signal?: AbortSignal,
  ) => Promise<Record<string, unknown>>;
  readonly retry: (runId: string, signal?: AbortSignal) => Promise<Record<string, unknown>>;
}

Source

InngestRunMetadata (interface)

Signature

export interface InngestRunMetadata extends RunHandle {
  readonly eventId: string;
  readonly input?: JsonValue;
  readonly inputHash?: string;
  readonly inputSchemaHash?: string;
  readonly buildId: string;
  readonly service: string;
  readonly scope?: string;
  readonly acceptanceIdentity?: string;
  readonly occurrenceIdentity?: string;
  readonly parentRunId?: string;
  readonly scheduledFor?: string;
  readonly retryOfRunId?: string;
  readonly tags?: readonly string[];
  readonly correlationId?: string;
  readonly propagation?: TracePropagation;
  readonly serviceGeneration?: string;
}

Source

MAX_LOCAL_INDEX_ENTRIES

Signature

declare const MAX_LOCAL_INDEX_ENTRIES: 1000;

Source

createInngestRunApi

Signature

declare const createInngestRunApi: (options: {
  readonly baseUrl: string;
  readonly signingKey?: string;
  readonly fetch?: typeof globalThis.fetch;
}) => InngestRunApi;

Source

isAmbiguousInngestWrite

Signature

declare const isAmbiguousInngestWrite: (error: unknown) => boolean;

Source

rememberInngestRecord

Signature

declare const rememberInngestRecord: (
  records: Map<string, InngestRunMetadata>,
  key: string,
  value: InngestRunMetadata,
) => void;

Source

snapshot

Signature

declare const snapshot: (
  value: Record<string, unknown>,
  metadata: InngestRunMetadata,
  observedAt?: string,
) => RunSnapshot;

Source

statusOf

Signature

declare const statusOf: (value: unknown) => RunSnapshot["status"];

Source

submission.ts

providerEventId

Signature

declare const providerEventId: (request: NativeSubmission, context: OperationContext) => string;

Source

submitInngestEvent

Signature

declare const submitInngestEvent: (
  client: Inngest.Any,
  request: NativeSubmission,
  context: OperationContext,
  records: Map<string, InngestRunMetadata>,
  submitted: Map<string, InngestRunMetadata>,
) => Promise<NativeReceipt>;

Source

support.ts

duplicateReceipt

Signature

declare const duplicateReceipt: (value: NativeReceipt) => NativeReceipt;

Source

eventIdFrom

Signature

declare const eventIdFrom: (value: unknown, fallback: string) => string;

Source

eventNameFor

Signature

declare const eventNameFor: (request: NativeSubmission) => string;

Source

observationOptions

Signature

declare const observationOptions: (
  options: InngestRuntimeOptions,
) => Readonly<Record<string, number>>;

Source

optionalText

Signature

declare const optionalText: (value: unknown) => string | undefined;

Source

text

Signature

declare const text: (value: unknown, label: string) => string;

Source

url

Signature

declare const url: (value: string) => void;

Source

task-binding-function.ts

createInngestFunction

Signature

declare const createInngestFunction: (
  client: Inngest.Any,
  definition: InngestTaskDefinition,
  executor: TaskExecutor,
  activeSignals?: Set<AbortController>,
) => InngestFunction.Any;

Source

task-binding-support.ts

duration

Signature

declare const duration: (milliseconds: number) => `${number}s`;

Source

envelopeFrom

Signature

declare const envelopeFrom: (
  context: Context,
  native: Record<string, unknown>,
  input: unknown,
) => TaskExecutionEnvelope;

Source

record

Signature

declare const record: (value: unknown) => Record<string, any> | undefined;

Source

safeSegment

Signature

declare const safeSegment: (value: string) => string;

Source

scheduleMetadata

Signature

declare const scheduleMetadata: (
  context: Context,
  definition: InngestTaskDefinition,
) => Record<string, unknown>;

Source

signalFrom

Signature

declare const signalFrom: (value: unknown) => AbortSignal | undefined;

Source

wireInput

Signature

declare const wireInput: (input: unknown) => TaskExecutionEnvelope["input"];

Source

withoutSchedules

Signature

declare const withoutSchedules: (
  definition: InngestTaskDefinition,
) => Omit<InngestTaskDefinition, "schedules" | "schedule">;

Source

task-binding.ts

InngestSdk (interface)

Signature

export interface InngestSdk {
  readonly Inngest: InngestConstructor;
  readonly serve: InngestServe;
}

Source

InngestTaskDefinition (interface)

Signature

export interface InngestTaskDefinition {
  readonly functionId: string;
  readonly eventName: string;
  readonly jobId?: string;
  readonly taskId?: string;
  readonly version?: string;
  readonly taskVersion?: string;
  readonly buildId?: string;
  readonly retries?: number;
  readonly timeoutSeconds?: number;
  readonly concurrency?: number;
  readonly policy?: unknown;
  readonly schedules?: readonly ScheduleDefinition[];
  readonly schedule?: ScheduleDefinition;
}

Source

InngestWorkerHandle (interface)

Signature

export interface InngestWorkerHandle {
  readonly path: string;
  readonly handler: (request: Request) => Promise<Response>;
  readonly ready: () => Promise<void>;
  readonly close: () => Promise<void>;
}

Source

InngestWorkerOptions (interface)

Signature

export interface InngestWorkerOptions {
  readonly client: Inngest.Any;
  readonly definitions: readonly InngestTaskDefinition[];
  readonly executor: TaskExecutor;
  readonly servePath?: string;
  readonly serveOrigin?: string;
  readonly startWorker?: boolean;
}

Source

InngestWorkerRegistrationOptions (type alias)

Signature

type InngestWorkerRegistrationOptions = Omit<InngestWorkerOptions, "client">;

Source

createInngestFunction

Signature

declare const createInngestFunction: (
  client: Inngest.Any,
  definition: InngestTaskDefinition,
  executor: TaskExecutor,
  activeSignals?: Set<AbortController>,
) => InngestFunction.Any;

Source

createInngestFunctionConfig

Signature

declare const createInngestFunctionConfig: (
  definition: InngestTaskDefinition,
) => Readonly<Record<string, unknown>>;

Source

createInngestServeHandler

Signature

declare const createInngestServeHandler: (
  options: InngestWorkerOptions,
  activeSignals?: Set<AbortController>,
) => (request: Request) => Promise<Response>;

Source

createInngestWorker

Signature

declare const createInngestWorker: (options: InngestWorkerOptions) => {
  readonly path: string;
  readonly handler: (request: Request) => Promise<Response>;
  readonly ready: () => Promise<void>;
  readonly close: () => Promise<void>;
};

Source

inngestFunctionId

Signature

declare const inngestFunctionId: (
  jobId: string,
  taskId: string,
  taskVersion: string,
  buildId: string,
) => string;

Source

loadInngestSdk

Signature

declare const loadInngestSdk: () => InngestSdk;

Source