|
1 | 1 | /* eslint-disable */ |
2 | 2 | // 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 |
4 | 4 | declare namespace Cloudflare { |
5 | 5 | interface Env { |
6 | 6 | NEXT_PUBLIC_APP_URL: "app.deepcrawl.dev" | "http://localhost:3000"; |
@@ -356,7 +356,7 @@ interface ExecutionContext { |
356 | 356 | type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: Env, ctx: ExecutionContext) => Response | Promise<Response>; |
357 | 357 | type ExportedHandlerTailHandler<Env = unknown> = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>; |
358 | 358 | 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>; |
360 | 360 | type ExportedHandlerScheduledHandler<Env = unknown> = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise<void>; |
361 | 361 | type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (batch: MessageBatch<Message>, env: Env, ctx: ExecutionContext) => void | Promise<void>; |
362 | 362 | type ExportedHandlerTestHandler<Env = unknown> = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise<void>; |
@@ -5272,7 +5272,7 @@ type AiModelListType = Record<string, any>; |
5272 | 5272 | declare abstract class Ai<AiModelList extends AiModelListType = AiModels> { |
5273 | 5273 | aiGatewayLogId: string | null; |
5274 | 5274 | gateway(gatewayId: string): AiGateway; |
5275 | | - autorag(autoragId: string): AutoRAG; |
| 5275 | + autorag(autoragId?: string): AutoRAG; |
5276 | 5276 | run<Name extends keyof AiModelList, Options extends AiOptions, InputOptions extends AiModelList[Name]["inputs"]>(model: Name, inputs: InputOptions, options?: Options): Promise<Options extends { |
5277 | 5277 | returnRawResponse: true; |
5278 | 5278 | } ? Response : InputOptions extends { |
@@ -6342,6 +6342,22 @@ declare module "cloudflare:email" { |
6342 | 6342 | }; |
6343 | 6343 | export { _EmailMessage as EmailMessage }; |
6344 | 6344 | } |
| 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 | +} |
6345 | 6361 | interface Hyperdrive { |
6346 | 6362 | /** |
6347 | 6363 | * Connect directly to Hyperdrive as if it's your database, returning a TCP socket. |
@@ -6953,17 +6969,27 @@ declare namespace TailStream { |
6953 | 6969 | readonly type: "attributes"; |
6954 | 6970 | readonly info: Attribute[]; |
6955 | 6971 | } |
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> { |
6958 | 6974 | readonly invocationId: string; |
6959 | 6975 | readonly spanId: string; |
6960 | 6976 | readonly timestamp: Date; |
6961 | 6977 | readonly sequence: number; |
6962 | | - readonly event: Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes; |
| 6978 | + readonly event: Event; |
6963 | 6979 | } |
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 | + }; |
6967 | 6993 | type TailEventHandlerType = TailEventHandler | TailEventHandlerObject; |
6968 | 6994 | } |
6969 | 6995 | // Copyright (c) 2022-2023 Cloudflare, Inc. |
|
0 commit comments