diff --git a/packages/inngest/etc/inngest.api.md b/packages/inngest/etc/inngest.api.md index 375eca40..80ab1a0b 100644 --- a/packages/inngest/etc/inngest.api.md +++ b/packages/inngest/etc/inngest.api.md @@ -121,10 +121,19 @@ export interface FunctionOptions, Ev retries?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; } +// Warning: (ae-internal-missing-underscore) The name "FunctionTrigger" should be prefixed with an underscore because the declaration is marked as @internal +// +// @internal +export type FunctionTrigger = { + event: T; + expression?: string; +} | { + cron: string; +}; + // @public export type GetEvents> = EventsFromOpts>; -// Warning: (ae-forgotten-export) The symbol "Handler" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "ExtendWithMiddleware" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "builtInMiddleware" needs to be exported by the entry point index.d.ts // @@ -139,6 +148,12 @@ export type GetStepTools, TTrigger extends keyof G step: infer TStep; } ? TStep : never; +// Warning: (ae-forgotten-export) The symbol "Context" needs to be exported by the entry point index.d.ts +// +// @public +export type Handler, TTrigger extends keyof TEvents & string, TOverrides extends Record = Record> = ( +ctx: Context) => unknown; + // @public export enum headerKeys { // (undocumented) @@ -163,8 +178,7 @@ export enum headerKeys { export class Inngest { constructor({ id, eventKey, baseUrl, fetch, env, logger, middleware, }: TOpts); // Warning: (ae-forgotten-export) The symbol "ExclusiveKeys" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "InngestFunction" needs to be exported by the entry point index.d.ts - // Warning: (ae-forgotten-export) The symbol "FunctionTrigger" needs to be exported by the entry point index.d.ts + // Warning: (ae-incompatible-release-tags) The symbol "createFunction" is marked as @public, but its signature references "FunctionTrigger" which is marked as @internal // // (undocumented) createFunction & string>, TTriggerName extends keyof EventsFromOpts & string = EventNameFromTrigger, TTrigger>>(options: ExclusiveKeys, TTriggerName>, "onFailure" | "middleware"> & { @@ -233,6 +247,24 @@ export class InngestCommHandler = EventsFromOpts, Trigger extends FunctionTrigger = FunctionTrigger, Opts extends FunctionOptions> = FunctionOptions>> { + constructor(client: Inngest, + opts: Opts, trigger: Trigger, fn: Handler); + // (undocumented) + static failureSuffix: string; + id(prefix?: string): string; + get name(): string; + // (undocumented) + readonly opts: Opts; + // (undocumented) + static stepId: string; + // (undocumented) + readonly trigger: Trigger; +} + // @public export class InngestMiddleware { constructor({ name, init }: TOpts); diff --git a/packages/inngest/src/index.ts b/packages/inngest/src/index.ts index 908b0e73..f5d27a55 100644 --- a/packages/inngest/src/index.ts +++ b/packages/inngest/src/index.ts @@ -42,12 +42,12 @@ export type { FailureEventArgs, FailureEventPayload, FunctionOptions, + FunctionTrigger, + Handler, LogLevel, RegisterOptions, StepOptions, StepOptionsOrId, TimeStr, TriggerOptions, - FunctionTrigger, - Handler, } from "./types";