Skip to content

Commit 65845ca

Browse files
committed
auth:chore: update worker types
1 parent d38b286 commit 65845ca

1 file changed

Lines changed: 35 additions & 9 deletions

File tree

apps/workers/auth/worker-configuration.d.ts

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable */
22
// Generated by Wrangler by running `wrangler types --env-interface CloudflareBindings` (hash: ccbee2a3c30286130a13ea822d3576cf)
3-
// Runtime types generated with workerd@1.20250617.0 2025-05-31
3+
// Runtime types generated with workerd@1.20250709.0 2025-05-31
44
declare namespace Cloudflare {
55
interface Env {
66
NEXT_PUBLIC_APP_URL: "app.deepcrawl.dev" | "http://localhost:3000";
@@ -356,7 +356,7 @@ interface ExecutionContext {
356356
type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: Env, ctx: ExecutionContext) => Response | Promise<Response>;
357357
type ExportedHandlerTailHandler<Env = unknown> = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>;
358358
type ExportedHandlerTraceHandler<Env = unknown> = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>;
359-
type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>;
359+
type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent<TailStream.Onset>, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>;
360360
type ExportedHandlerScheduledHandler<Env = unknown> = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise<void>;
361361
type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (batch: MessageBatch<Message>, env: Env, ctx: ExecutionContext) => void | Promise<void>;
362362
type ExportedHandlerTestHandler<Env = unknown> = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise<void>;
@@ -5272,7 +5272,7 @@ type AiModelListType = Record<string, any>;
52725272
declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
52735273
aiGatewayLogId: string | null;
52745274
gateway(gatewayId: string): AiGateway;
5275-
autorag(autoragId: string): AutoRAG;
5275+
autorag(autoragId?: string): AutoRAG;
52765276
run<Name extends keyof AiModelList, Options extends AiOptions, InputOptions extends AiModelList[Name]["inputs"]>(model: Name, inputs: InputOptions, options?: Options): Promise<Options extends {
52775277
returnRawResponse: true;
52785278
} ? Response : InputOptions extends {
@@ -6342,6 +6342,22 @@ declare module "cloudflare:email" {
63426342
};
63436343
export { _EmailMessage as EmailMessage };
63446344
}
6345+
/**
6346+
* Hello World binding to serve as an explanatory example. DO NOT USE
6347+
*/
6348+
interface HelloWorldBinding {
6349+
/**
6350+
* Retrieve the current stored value
6351+
*/
6352+
get(): Promise<{
6353+
value: string;
6354+
ms?: number;
6355+
}>;
6356+
/**
6357+
* Set a new stored value
6358+
*/
6359+
set(value: string): Promise<void>;
6360+
}
63456361
interface Hyperdrive {
63466362
/**
63476363
* Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
@@ -6953,17 +6969,27 @@ declare namespace TailStream {
69536969
readonly type: "attributes";
69546970
readonly info: Attribute[];
69556971
}
6956-
interface TailEvent {
6957-
readonly traceId: string;
6972+
type EventType = Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes;
6973+
interface TailEvent<Event extends EventType> {
69586974
readonly invocationId: string;
69596975
readonly spanId: string;
69606976
readonly timestamp: Date;
69616977
readonly sequence: number;
6962-
readonly event: Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes;
6978+
readonly event: Event;
69636979
}
6964-
type TailEventHandler = (event: TailEvent) => void | Promise<void>;
6965-
type TailEventHandlerName = "outcome" | "hibernate" | "spanOpen" | "spanClose" | "diagnosticChannel" | "exception" | "log" | "return" | "link" | "attributes";
6966-
type TailEventHandlerObject = Record<TailEventHandlerName, TailEventHandler>;
6980+
type TailEventHandler<Event extends EventType = EventType> = (event: TailEvent<Event>) => void | Promise<void>;
6981+
type TailEventHandlerObject = {
6982+
outcome?: TailEventHandler<Outcome>;
6983+
hibernate?: TailEventHandler<Hibernate>;
6984+
spanOpen?: TailEventHandler<SpanOpen>;
6985+
spanClose?: TailEventHandler<SpanClose>;
6986+
diagnosticChannel?: TailEventHandler<DiagnosticChannelEvent>;
6987+
exception?: TailEventHandler<Exception>;
6988+
log?: TailEventHandler<Log>;
6989+
return?: TailEventHandler<Return>;
6990+
link?: TailEventHandler<Link>;
6991+
attributes?: TailEventHandler<Attributes>;
6992+
};
69676993
type TailEventHandlerType = TailEventHandler | TailEventHandlerObject;
69686994
}
69696995
// Copyright (c) 2022-2023 Cloudflare, Inc.

0 commit comments

Comments
 (0)