···11/* eslint-disable */
22-// Generated by Wrangler by running `wrangler types` (hash: 869ac3b4ce0f52ba3b2e0bc70c49089e)
33-// Runtime types generated with workerd@1.20250617.0 2025-08-25
22+// Generated by Wrangler by running `wrangler types` (hash: eeaa8440f56ab30c6a4f65cb191015f2)
33+// Runtime types generated with workerd@1.20251202.0 2025-08-16
44declare namespace Cloudflare {
55+ interface GlobalProps {
66+ mainModule: typeof import("./server/index");
77+ }
58 interface Env {
99+ VITE_APP_NAME: string;
610 }
711}
812interface Env extends Cloudflare.Env {}
···2630// noinspection JSUnusedGlobalSymbols
2731declare var onmessage: never;
2832/**
2929- * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API.
3333+ * The **`DOMException`** interface represents an abnormal event (called an **exception**) that occurs as a result of calling a method or accessing a property of a web API.
3034 *
3135 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException)
3236 */
3337declare class DOMException extends Error {
3438 constructor(message?: string, name?: string);
3535- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */
3939+ /**
4040+ * The **`message`** read-only property of the a message or description associated with the given error name.
4141+ *
4242+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message)
4343+ */
3644 readonly message: string;
3737- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */
4545+ /**
4646+ * The **`name`** read-only property of the one of the strings associated with an error name.
4747+ *
4848+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name)
4949+ */
3850 readonly name: string;
3951 /**
5252+ * The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or `0` if none match.
4053 * @deprecated
4154 *
4255 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code)
···8093declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> {
8194 EventTarget: typeof EventTarget;
8295}
8383-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
9696+/* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). *
9797+ * The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox).
9898+ *
9999+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console)
100100+ */
84101interface Console {
85102 "assert"(condition?: boolean, ...data: any[]): void;
8686- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
103103+ /**
104104+ * The **`console.clear()`** static method clears the console if possible.
105105+ *
106106+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static)
107107+ */
87108 clear(): void;
8888- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
109109+ /**
110110+ * The **`console.count()`** static method logs the number of times that this particular call to `count()` has been called.
111111+ *
112112+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static)
113113+ */
89114 count(label?: string): void;
9090- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */
115115+ /**
116116+ * The **`console.countReset()`** static method resets counter used with console/count_static.
117117+ *
118118+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static)
119119+ */
91120 countReset(label?: string): void;
9292- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
121121+ /**
122122+ * The **`console.debug()`** static method outputs a message to the console at the 'debug' log level.
123123+ *
124124+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static)
125125+ */
93126 debug(...data: any[]): void;
9494- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */
127127+ /**
128128+ * The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object.
129129+ *
130130+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static)
131131+ */
95132 dir(item?: any, options?: any): void;
9696- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */
133133+ /**
134134+ * The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element.
135135+ *
136136+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static)
137137+ */
97138 dirxml(...data: any[]): void;
9898- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */
139139+ /**
140140+ * The **`console.error()`** static method outputs a message to the console at the 'error' log level.
141141+ *
142142+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static)
143143+ */
99144 error(...data: any[]): void;
100100- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
145145+ /**
146146+ * The **`console.group()`** static method creates a new inline group in the Web console log, causing any subsequent console messages to be indented by an additional level, until console/groupEnd_static is called.
147147+ *
148148+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static)
149149+ */
101150 group(...data: any[]): void;
102102- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */
151151+ /**
152152+ * The **`console.groupCollapsed()`** static method creates a new inline group in the console.
153153+ *
154154+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static)
155155+ */
103156 groupCollapsed(...data: any[]): void;
104104- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */
157157+ /**
158158+ * The **`console.groupEnd()`** static method exits the current inline group in the console.
159159+ *
160160+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static)
161161+ */
105162 groupEnd(): void;
106106- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
163163+ /**
164164+ * The **`console.info()`** static method outputs a message to the console at the 'info' log level.
165165+ *
166166+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static)
167167+ */
107168 info(...data: any[]): void;
108108- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */
169169+ /**
170170+ * The **`console.log()`** static method outputs a message to the console.
171171+ *
172172+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static)
173173+ */
109174 log(...data: any[]): void;
110110- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */
175175+ /**
176176+ * The **`console.table()`** static method displays tabular data as a table.
177177+ *
178178+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static)
179179+ */
111180 table(tabularData?: any, properties?: string[]): void;
112112- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
181181+ /**
182182+ * The **`console.time()`** static method starts a timer you can use to track how long an operation takes.
183183+ *
184184+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static)
185185+ */
113186 time(label?: string): void;
114114- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */
187187+ /**
188188+ * The **`console.timeEnd()`** static method stops a timer that was previously started by calling console/time_static.
189189+ *
190190+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static)
191191+ */
115192 timeEnd(label?: string): void;
116116- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */
193193+ /**
194194+ * The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console/time_static.
195195+ *
196196+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static)
197197+ */
117198 timeLog(label?: string, ...data: any[]): void;
118199 timeStamp(label?: string): void;
119119- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
200200+ /**
201201+ * The **`console.trace()`** static method outputs a stack trace to the console.
202202+ *
203203+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static)
204204+ */
120205 trace(...data: any[]): void;
121121- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */
206206+ /**
207207+ * The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level.
208208+ *
209209+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static)
210210+ */
122211 warn(...data: any[]): void;
123212}
124213declare const console: Console;
···192281 function validate(bytes: BufferSource): boolean;
193282}
194283/**
195195- * This ServiceWorker API interface represents the global execution context of a service worker.
284284+ * The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker.
196285 * Available only in secure contexts.
197286 *
198287 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
···238327 ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
239328 CountQueuingStrategy: typeof CountQueuingStrategy;
240329 ErrorEvent: typeof ErrorEvent;
330330+ MessageChannel: typeof MessageChannel;
331331+ MessagePort: typeof MessagePort;
241332 EventSource: typeof EventSource;
242333 ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
243334 ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
···279370declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void;
280371declare function removeEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void;
281372/**
282282- * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
373373+ * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
283374 *
284375 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
285376 */
···337428declare const navigator: Navigator;
338429interface TestController {
339430}
340340-interface ExecutionContext {
431431+interface ExecutionContext<Props = unknown> {
341432 waitUntil(promise: Promise<any>): void;
342433 passThroughOnException(): void;
343343- props: any;
434434+ readonly props: Props;
344435}
345436type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: Env, ctx: ExecutionContext) => Response | Promise<Response>;
346437type ExportedHandlerTailHandler<Env = unknown> = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>;
347438type ExportedHandlerTraceHandler<Env = unknown> = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>;
348348-type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>;
439439+type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent<TailStream.Onset>, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>;
349440type ExportedHandlerScheduledHandler<Env = unknown> = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise<void>;
350441type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (batch: MessageBatch<Message>, env: Env, ctx: ExecutionContext) => void | Promise<void>;
351442type ExportedHandlerTestHandler<Env = unknown> = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise<void>;
···362453interface StructuredSerializeOptions {
363454 transfer?: any[];
364455}
365365-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */
366366-declare abstract class PromiseRejectionEvent extends Event {
367367- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */
368368- readonly promise: Promise<any>;
369369- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */
370370- readonly reason: any;
371371-}
372456declare abstract class Navigator {
373373- sendBeacon(url: string, body?: (ReadableStream | string | (ArrayBuffer | ArrayBufferView) | Blob | FormData | URLSearchParams | URLSearchParams)): boolean;
457457+ sendBeacon(url: string, body?: BodyInit): boolean;
374458 readonly userAgent: string;
375459 readonly hardwareConcurrency: number;
376460 readonly language: string;
377461 readonly languages: string[];
378462}
379379-/**
380380-* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
381381-* as well as timing of subrequests and other operations.
382382-*
383383-* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
384384-*/
385385-interface Performance {
386386- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
387387- readonly timeOrigin: number;
388388- /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
389389- now(): number;
390390-}
391463interface AlarmInvocationInfo {
392464 readonly isRetry: boolean;
393465 readonly retryCount: number;
···411483 equals(other: DurableObjectId): boolean;
412484 readonly name?: string;
413485}
414414-interface DurableObjectNamespace<T extends Rpc.DurableObjectBranded | undefined = undefined> {
486486+declare abstract class DurableObjectNamespace<T extends Rpc.DurableObjectBranded | undefined = undefined> {
415487 newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId;
416488 idFromName(name: string): DurableObjectId;
417489 idFromString(id: string): DurableObjectId;
418490 get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub<T>;
491491+ getByName(name: string, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub<T>;
419492 jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace<T>;
420493}
421494type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high";
···426499interface DurableObjectNamespaceGetDurableObjectOptions {
427500 locationHint?: DurableObjectLocationHint;
428501}
429429-interface DurableObjectState {
502502+interface DurableObjectClass<_T extends Rpc.DurableObjectBranded | undefined = undefined> {
503503+}
504504+interface DurableObjectState<Props = unknown> {
430505 waitUntil(promise: Promise<any>): void;
506506+ readonly props: Props;
431507 readonly id: DurableObjectId;
432508 readonly storage: DurableObjectStorage;
433509 container?: Container;
···470546 deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
471547 sync(): Promise<void>;
472548 sql: SqlStorage;
549549+ kv: SyncKvStorage;
473550 transactionSync<T>(closure: () => T): T;
474551 getCurrentBookmark(): Promise<string>;
475552 getBookmarkForTime(timestamp: number | Date): Promise<string>;
···515592 blobs?: ((ArrayBuffer | string) | null)[];
516593}
517594/**
518518- * An event which takes place in the DOM.
595595+ * The **`Event`** interface represents an event which takes place on an `EventTarget`.
519596 *
520597 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event)
521598 */
522599declare class Event {
523600 constructor(type: string, init?: EventInit);
524601 /**
525525- * Returns the type of event, e.g. "click", "hashchange", or "submit".
602602+ * The **`type`** read-only property of the Event interface returns a string containing the event's type.
526603 *
527604 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
528605 */
529606 get type(): string;
530607 /**
531531- * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE.
608608+ * The **`eventPhase`** read-only property of the being evaluated.
532609 *
533610 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
534611 */
535612 get eventPhase(): number;
536613 /**
537537- * Returns true or false depending on how event was initialized. True if event invokes listeners past a ShadowRoot node that is the root of its target, and false otherwise.
614614+ * The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
538615 *
539616 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
540617 */
541618 get composed(): boolean;
542619 /**
543543- * Returns true or false depending on how event was initialized. True if event goes through its target's ancestors in reverse tree order, and false otherwise.
620620+ * The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
544621 *
545622 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
546623 */
547624 get bubbles(): boolean;
548625 /**
549549- * Returns true or false depending on how event was initialized. Its return value does not always carry meaning, but true can indicate that part of the operation during which event was dispatched, can be canceled by invoking the preventDefault() method.
626626+ * The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
550627 *
551628 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
552629 */
553630 get cancelable(): boolean;
554631 /**
555555- * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise.
632632+ * The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.
556633 *
557634 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
558635 */
559636 get defaultPrevented(): boolean;
560637 /**
638638+ * The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
561639 * @deprecated
562640 *
563641 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
564642 */
565643 get returnValue(): boolean;
566644 /**
567567- * Returns the object whose event listener's callback is currently being invoked.
645645+ * The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
568646 *
569647 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
570648 */
571649 get currentTarget(): EventTarget | undefined;
572650 /**
573573- * Returns the object to which event is dispatched (its target).
651651+ * The read-only **`target`** property of the dispatched.
574652 *
575653 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
576654 */
577655 get target(): EventTarget | undefined;
578656 /**
657657+ * The deprecated **`Event.srcElement`** is an alias for the Event.target property.
579658 * @deprecated
580659 *
581660 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
582661 */
583662 get srcElement(): EventTarget | undefined;
584663 /**
585585- * Returns the event's timestamp as the number of milliseconds measured relative to the time origin.
664664+ * The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
586665 *
587666 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
588667 */
589668 get timeStamp(): number;
590669 /**
591591- * Returns true if event was dispatched by the user agent, and false otherwise.
670670+ * The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.
592671 *
593672 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
594673 */
595674 get isTrusted(): boolean;
596675 /**
676676+ * The **`cancelBubble`** property of the Event interface is deprecated.
597677 * @deprecated
598678 *
599679 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
600680 */
601681 get cancelBubble(): boolean;
602682 /**
683683+ * The **`cancelBubble`** property of the Event interface is deprecated.
603684 * @deprecated
604685 *
605686 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
606687 */
607688 set cancelBubble(value: boolean);
608689 /**
609609- * Invoking this method prevents event from reaching any registered event listeners after the current one finishes running and, when dispatched in a tree, also prevents event from reaching any other objects.
690690+ * The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.
610691 *
611692 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation)
612693 */
613694 stopImmediatePropagation(): void;
614695 /**
615615- * If invoked when the cancelable attribute value is true, and while executing a listener for the event with passive set to false, signals to the operation that caused event to be dispatched that it needs to be canceled.
696696+ * The **`preventDefault()`** method of the Event interface tells the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be.
616697 *
617698 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault)
618699 */
619700 preventDefault(): void;
620701 /**
621621- * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object.
702702+ * The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases.
622703 *
623704 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation)
624705 */
625706 stopPropagation(): void;
626707 /**
627627- * Returns the invocation target objects of event's path (objects on which listeners will be invoked), except for any nodes in shadow trees of which the shadow root's mode is "closed" that are not reachable from event's currentTarget.
708708+ * The **`composedPath()`** method of the Event interface returns the event's path which is an array of the objects on which listeners will be invoked.
628709 *
629710 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath)
630711 */
···645726}
646727type EventListenerOrEventListenerObject<EventType extends Event = Event> = EventListener<EventType> | EventListenerObject<EventType>;
647728/**
648648- * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them.
729729+ * The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them.
649730 *
650731 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget)
651732 */
652733declare class EventTarget<EventMap extends Record<string, Event> = Record<string, Event>> {
653734 constructor();
654735 /**
655655- * Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
656656- *
657657- * The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
658658- *
659659- * When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
660660- *
661661- * When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
662662- *
663663- * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed.
664664- *
665665- * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
666666- *
667667- * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
736736+ * The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
668737 *
669738 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener)
670739 */
671740 addEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void;
672741 /**
673673- * Removes the event listener in target's event listener list with the same type, callback, and options.
742742+ * The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
674743 *
675744 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener)
676745 */
677746 removeEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void;
678747 /**
679679- * Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
748748+ * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
680749 *
681750 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent)
682751 */
···695764 handleEvent: (event: Event) => any | undefined;
696765}
697766/**
698698- * A controller object that allows you to abort one or more DOM requests as and when desired.
767767+ * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired.
699768 *
700769 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController)
701770 */
702771declare class AbortController {
703772 constructor();
704773 /**
705705- * Returns the AbortSignal object associated with this object.
774774+ * The **`signal`** read-only property of the AbortController interface returns an AbortSignal object instance, which can be used to communicate with/abort an asynchronous operation as desired.
706775 *
707776 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
708777 */
709778 get signal(): AbortSignal;
710779 /**
711711- * Invoking this method will set this object's AbortSignal's aborted flag and signal to any observers that the associated activity is to be aborted.
780780+ * The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
712781 *
713782 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort)
714783 */
715784 abort(reason?: any): void;
716785}
717786/**
718718- * A signal object that allows you to communicate with a DOM request (such as a Fetch) and abort it if required via an AbortController object.
787787+ * The **`AbortSignal`** interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object.
719788 *
720789 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal)
721790 */
722791declare abstract class AbortSignal extends EventTarget {
723723- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */
792792+ /**
793793+ * The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event).
794794+ *
795795+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static)
796796+ */
724797 static abort(reason?: any): AbortSignal;
725725- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */
798798+ /**
799799+ * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time.
800800+ *
801801+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static)
802802+ */
726803 static timeout(delay: number): AbortSignal;
727727- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */
804804+ /**
805805+ * The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal.
806806+ *
807807+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static)
808808+ */
728809 static any(signals: AbortSignal[]): AbortSignal;
729810 /**
730730- * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise.
811811+ * The **`aborted`** read-only property returns a value that indicates whether the asynchronous operations the signal is communicating with are aborted (`true`) or not (`false`).
731812 *
732813 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
733814 */
734815 get aborted(): boolean;
735735- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */
816816+ /**
817817+ * The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
818818+ *
819819+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
820820+ */
736821 get reason(): any;
737822 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
738823 get onabort(): any | null;
739824 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
740825 set onabort(value: any | null);
741741- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
826826+ /**
827827+ * The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing.
828828+ *
829829+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted)
830830+ */
742831 throwIfAborted(): void;
743832}
744833interface Scheduler {
···748837 signal?: AbortSignal;
749838}
750839/**
751751- * Extends the lifetime of the install and activate events dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries.
840840+ * The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle.
752841 *
753842 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent)
754843 */
755844declare abstract class ExtendableEvent extends Event {
756756- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */
845845+ /**
846846+ * The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing.
847847+ *
848848+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil)
849849+ */
757850 waitUntil(promise: Promise<any>): void;
758851}
759759-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */
852852+/**
853853+ * The **`CustomEvent`** interface represents events initialized by an application for any purpose.
854854+ *
855855+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent)
856856+ */
760857declare class CustomEvent<T = any> extends Event {
761858 constructor(type: string, init?: CustomEventCustomEventInit);
762859 /**
763763- * Returns any custom data event was created with. Typically used for synthetic events.
860860+ * The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event.
764861 *
765862 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail)
766863 */
···773870 detail?: any;
774871}
775872/**
776776- * A file-like object of immutable, raw data. Blobs represent data that isn't necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to support files on the user's system.
873873+ * The **`Blob`** interface represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data.
777874 *
778875 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob)
779876 */
780877declare class Blob {
781878 constructor(type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[], options?: BlobOptions);
782782- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */
879879+ /**
880880+ * The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes.
881881+ *
882882+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
883883+ */
783884 get size(): number;
784784- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */
885885+ /**
886886+ * The **`type`** read-only property of the Blob interface returns the MIME type of the file.
887887+ *
888888+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
889889+ */
785890 get type(): string;
786786- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */
891891+ /**
892892+ * The **`slice()`** method of the Blob interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.
893893+ *
894894+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice)
895895+ */
787896 slice(start?: number, end?: number, type?: string): Blob;
788788- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
897897+ /**
898898+ * The **`arrayBuffer()`** method of the Blob interface returns a Promise that resolves with the contents of the blob as binary data contained in an ArrayBuffer.
899899+ *
900900+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer)
901901+ */
789902 arrayBuffer(): Promise<ArrayBuffer>;
790790- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */
903903+ /**
904904+ * The **`bytes()`** method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.
905905+ *
906906+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes)
907907+ */
791908 bytes(): Promise<Uint8Array>;
792792- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
909909+ /**
910910+ * The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8.
911911+ *
912912+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text)
913913+ */
793914 text(): Promise<string>;
794794- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
915915+ /**
916916+ * The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`.
917917+ *
918918+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream)
919919+ */
795920 stream(): ReadableStream;
796921}
797922interface BlobOptions {
798923 type?: string;
799924}
800925/**
801801- * Provides information about files and allows JavaScript in a web page to access their content.
926926+ * The **`File`** interface provides information about files and allows JavaScript in a web page to access their content.
802927 *
803928 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File)
804929 */
805930declare class File extends Blob {
806931 constructor(bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined, name: string, options?: FileOptions);
807807- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */
932932+ /**
933933+ * The **`name`** read-only property of the File interface returns the name of the file represented by a File object.
934934+ *
935935+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
936936+ */
808937 get name(): string;
809809- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
938938+ /**
939939+ * The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).
940940+ *
941941+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
942942+ */
810943 get lastModified(): number;
811944}
812945interface FileOptions {
···819952* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/)
820953*/
821954declare abstract class CacheStorage {
822822- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */
955955+ /**
956956+ * The **`open()`** method of the the Cache object matching the `cacheName`.
957957+ *
958958+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open)
959959+ */
823960 open(cacheName: string): Promise<Cache>;
824961 readonly default: Cache;
825962}
···849986*/
850987declare abstract class Crypto {
851988 /**
989989+ * The **`Crypto.subtle`** read-only property returns a cryptographic operations.
852990 * Available only in secure contexts.
853991 *
854992 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
855993 */
856994 get subtle(): SubtleCrypto;
857857- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */
995995+ /**
996996+ * The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
997997+ *
998998+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues)
999999+ */
8581000 getRandomValues<T extends Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array>(buffer: T): T;
8591001 /**
10021002+ * The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator.
8601003 * Available only in secure contexts.
8611004 *
8621005 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID)
···8651008 DigestStream: typeof DigestStream;
8661009}
8671010/**
868868- * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
10111011+ * The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions.
8691012 * Available only in secure contexts.
8701013 *
8711014 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto)
8721015 */
8731016declare abstract class SubtleCrypto {
874874- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */
10171017+ /**
10181018+ * The **`encrypt()`** method of the SubtleCrypto interface encrypts data.
10191019+ *
10201020+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt)
10211021+ */
8751022 encrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, plainText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
876876- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */
10231023+ /**
10241024+ * The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data.
10251025+ *
10261026+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt)
10271027+ */
8771028 decrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, cipherText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
878878- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */
10291029+ /**
10301030+ * The **`sign()`** method of the SubtleCrypto interface generates a digital signature.
10311031+ *
10321032+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign)
10331033+ */
8791034 sign(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
880880- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */
10351035+ /**
10361036+ * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature.
10371037+ *
10381038+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify)
10391039+ */
8811040 verify(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, signature: ArrayBuffer | ArrayBufferView, data: ArrayBuffer | ArrayBufferView): Promise<boolean>;
882882- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */
10411041+ /**
10421042+ * The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function.
10431043+ *
10441044+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest)
10451045+ */
8831046 digest(algorithm: string | SubtleCryptoHashAlgorithm, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>;
884884- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */
10471047+ /**
10481048+ * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
10491049+ *
10501050+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
10511051+ */
8851052 generateKey(algorithm: string | SubtleCryptoGenerateKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey | CryptoKeyPair>;
886886- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */
10531053+ /**
10541054+ * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
10551055+ *
10561056+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
10571057+ */
8871058 deriveKey(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
888888- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */
10591059+ /**
10601060+ * The **`deriveBits()`** method of the key.
10611061+ *
10621062+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits)
10631063+ */
8891064 deriveBits(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>;
890890- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */
10651065+ /**
10661066+ * The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
10671067+ *
10681068+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
10691069+ */
8911070 importKey(format: string, keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey, algorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
892892- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */
10711071+ /**
10721072+ * The **`exportKey()`** method of the SubtleCrypto interface exports a key: that is, it takes as input a CryptoKey object and gives you the key in an external, portable format.
10731073+ *
10741074+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey)
10751075+ */
8931076 exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
894894- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */
10771077+ /**
10781078+ * The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key.
10791079+ *
10801080+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey)
10811081+ */
8951082 wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm): Promise<ArrayBuffer>;
896896- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */
10831083+ /**
10841084+ * The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
10851085+ *
10861086+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
10871087+ */
8971088 unwrapKey(format: string, wrappedKey: ArrayBuffer | ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | SubtleCryptoEncryptAlgorithm, unwrappedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>;
8981089 timingSafeEqual(a: ArrayBuffer | ArrayBufferView, b: ArrayBuffer | ArrayBufferView): boolean;
8991090}
9001091/**
901901- * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
10921092+ * The **`CryptoKey`** interface of the Web Crypto API represents a cryptographic key obtained from one of the SubtleCrypto methods SubtleCrypto.generateKey, SubtleCrypto.deriveKey, SubtleCrypto.importKey, or SubtleCrypto.unwrapKey.
9021093 * Available only in secure contexts.
9031094 *
9041095 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey)
9051096 */
9061097declare abstract class CryptoKey {
907907- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */
10981098+ /**
10991099+ * The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object.
11001100+ *
11011101+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type)
11021102+ */
9081103 readonly type: string;
909909- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */
11041104+ /**
11051105+ * The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`.
11061106+ *
11071107+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable)
11081108+ */
9101109 readonly extractable: boolean;
911911- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */
11101110+ /**
11111111+ * The read-only **`algorithm`** property of the CryptoKey interface returns an object describing the algorithm for which this key can be used, and any associated extra parameters.
11121112+ *
11131113+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm)
11141114+ */
9121115 readonly algorithm: CryptoKeyKeyAlgorithm | CryptoKeyAesKeyAlgorithm | CryptoKeyHmacKeyAlgorithm | CryptoKeyRsaKeyAlgorithm | CryptoKeyEllipticKeyAlgorithm | CryptoKeyArbitraryKeyAlgorithm;
913913- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
11161116+ /**
11171117+ * The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key.
11181118+ *
11191119+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages)
11201120+ */
9141121 readonly usages: string[];
9151122}
9161123interface CryptoKeyPair {
···10171224 get bytesWritten(): number | bigint;
10181225}
10191226/**
10201020- * A decoder for a specific method, that is a specific character encoding, like utf-8, iso-8859-2, koi8, cp1261, gbk, etc. A decoder takes a stream of bytes as input and emits a stream of code points. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
12271227+ * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc.
10211228 *
10221229 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder)
10231230 */
10241231declare class TextDecoder {
10251232 constructor(label?: string, options?: TextDecoderConstructorOptions);
10261233 /**
10271027- * Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented input. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.
10281028- *
10291029- * ```
10301030- * var string = "", decoder = new TextDecoder(encoding), buffer;
10311031- * while(buffer = next_chunk()) {
10321032- * string += decoder.decode(buffer, {stream:true});
10331033- * }
10341034- * string += decoder.decode(); // end-of-queue
10351035- * ```
10361036- *
10371037- * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError.
12341234+ * The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter.
10381235 *
10391236 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode)
10401237 */
···10441241 get ignoreBOM(): boolean;
10451242}
10461243/**
10471047- * TextEncoder takes a stream of code points as input and emits a stream of bytes. For a more scalable, non-native library, see StringView – a C-like representation of strings based on typed arrays.
12441244+ * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
10481245 *
10491246 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder)
10501247 */
10511248declare class TextEncoder {
10521249 constructor();
10531250 /**
10541054- * Returns the result of running UTF-8's encoder.
12511251+ * The **`TextEncoder.encode()`** method takes a string as input, and returns a Global_Objects/Uint8Array containing the text given in parameters encoded with the specific method for that TextEncoder object.
10551252 *
10561253 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode)
10571254 */
10581255 encode(input?: string): Uint8Array;
10591256 /**
10601060- * Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination.
12571257+ * The **`TextEncoder.encodeInto()`** method takes a string to encode and a destination Uint8Array to put resulting UTF-8 encoded text into, and returns a dictionary object indicating the progress of the encoding.
10611258 *
10621259 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
10631260 */
10641064- encodeInto(input: string, buffer: ArrayBuffer | ArrayBufferView): TextEncoderEncodeIntoResult;
12611261+ encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
10651262 get encoding(): string;
10661263}
10671264interface TextDecoderConstructorOptions {
···10761273 written: number;
10771274}
10781275/**
10791079- * Events providing information related to errors in scripts or in files.
12761276+ * The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files.
10801277 *
10811278 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent)
10821279 */
10831280declare class ErrorEvent extends Event {
10841281 constructor(type: string, init?: ErrorEventErrorEventInit);
10851085- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
12821282+ /**
12831283+ * The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred.
12841284+ *
12851285+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename)
12861286+ */
10861287 get filename(): string;
10871087- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
12881288+ /**
12891289+ * The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem.
12901290+ *
12911291+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message)
12921292+ */
10881293 get message(): string;
10891089- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
12941294+ /**
12951295+ * The **`lineno`** read-only property of the ErrorEvent interface returns an integer containing the line number of the script file on which the error occurred.
12961296+ *
12971297+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno)
12981298+ */
10901299 get lineno(): number;
10911091- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
13001300+ /**
13011301+ * The **`colno`** read-only property of the ErrorEvent interface returns an integer containing the column number of the script file on which the error occurred.
13021302+ *
13031303+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno)
13041304+ */
10921305 get colno(): number;
10931093- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
13061306+ /**
13071307+ * The **`error`** read-only property of the ErrorEvent interface returns a JavaScript value, such as an Error or DOMException, representing the error associated with this event.
13081308+ *
13091309+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error)
13101310+ */
10941311 get error(): any;
10951312}
10961313interface ErrorEventErrorEventInit {
···11011318 error?: any;
11021319}
11031320/**
11041104- * Provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
13211321+ * The **`MessageEvent`** interface represents a message received by a target object.
13221322+ *
13231323+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
13241324+ */
13251325+declare class MessageEvent extends Event {
13261326+ constructor(type: string, initializer: MessageEventInit);
13271327+ /**
13281328+ * The **`data`** read-only property of the The data sent by the message emitter; this can be any data type, depending on what originated this event.
13291329+ *
13301330+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
13311331+ */
13321332+ readonly data: any;
13331333+ /**
13341334+ * The **`origin`** read-only property of the origin of the message emitter.
13351335+ *
13361336+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin)
13371337+ */
13381338+ readonly origin: string | null;
13391339+ /**
13401340+ * The **`lastEventId`** read-only property of the unique ID for the event.
13411341+ *
13421342+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId)
13431343+ */
13441344+ readonly lastEventId: string;
13451345+ /**
13461346+ * The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter.
13471347+ *
13481348+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source)
13491349+ */
13501350+ readonly source: MessagePort | null;
13511351+ /**
13521352+ * The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order.
13531353+ *
13541354+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports)
13551355+ */
13561356+ readonly ports: MessagePort[];
13571357+}
13581358+interface MessageEventInit {
13591359+ data: ArrayBuffer | string;
13601360+}
13611361+/**
13621362+ * The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected.
13631363+ *
13641364+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent)
13651365+ */
13661366+declare abstract class PromiseRejectionEvent extends Event {
13671367+ /**
13681368+ * The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected.
13691369+ *
13701370+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise)
13711371+ */
13721372+ readonly promise: Promise<any>;
13731373+ /**
13741374+ * The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject().
13751375+ *
13761376+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason)
13771377+ */
13781378+ readonly reason: any;
13791379+}
13801380+/**
13811381+ * The **`FormData`** interface provides a way to construct a set of key/value pairs representing form fields and their values, which can be sent using the Window/fetch, XMLHttpRequest.send() or navigator.sendBeacon() methods.
11051382 *
11061383 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData)
11071384 */
11081385declare class FormData {
11091386 constructor();
11101110- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
13871387+ /**
13881388+ * The **`append()`** method of the FormData interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.
13891389+ *
13901390+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
13911391+ */
11111392 append(name: string, value: string): void;
11121112- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */
13931393+ /**
13941394+ * The **`append()`** method of the FormData interface appends a new value onto an existing key inside a `FormData` object, or adds the key if it does not already exist.
13951395+ *
13961396+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append)
13971397+ */
11131398 append(name: string, value: Blob, filename?: string): void;
11141114- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */
13991399+ /**
14001400+ * The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object.
14011401+ *
14021402+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete)
14031403+ */
11151404 delete(name: string): void;
11161116- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */
14051405+ /**
14061406+ * The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object.
14071407+ *
14081408+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
14091409+ */
11171410 get(name: string): (File | string) | null;
11181118- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */
14111411+ /**
14121412+ * The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
14131413+ *
14141414+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
14151415+ */
11191416 getAll(name: string): (File | string)[];
11201120- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */
14171417+ /**
14181418+ * The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
14191419+ *
14201420+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has)
14211421+ */
11211422 has(name: string): boolean;
11221122- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
14231423+ /**
14241424+ * The **`set()`** method of the FormData interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.
14251425+ *
14261426+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
14271427+ */
11231428 set(name: string, value: string): void;
11241124- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */
14291429+ /**
14301430+ * The **`set()`** method of the FormData interface sets a new value for an existing key inside a `FormData` object, or adds the key/value if it does not already exist.
14311431+ *
14321432+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set)
14331433+ */
11251434 set(name: string, value: Blob, filename?: string): void;
11261435 /* Returns an array of key, value pairs for every entry in the list. */
11271436 entries(): IterableIterator<[
···12091518 append(content: string, options?: ContentOptions): DocumentEnd;
12101519}
12111520/**
12121212- * This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.
15211521+ * This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope.
12131522 *
12141523 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent)
12151524 */
12161525declare abstract class FetchEvent extends ExtendableEvent {
12171217- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */
15261526+ /**
15271527+ * The **`request`** read-only property of the the event handler.
15281528+ *
15291529+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request)
15301530+ */
12181531 readonly request: Request;
12191219- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */
15321532+ /**
15331533+ * The **`respondWith()`** method of allows you to provide a promise for a Response yourself.
15341534+ *
15351535+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith)
15361536+ */
12201537 respondWith(promise: Response | Promise<Response>): void;
12211538 passThroughOnException(): void;
12221539}
12231540type HeadersInit = Headers | Iterable<Iterable<string>> | Record<string, string>;
12241541/**
12251225- * This Fetch API interface allows you to perform various actions on HTTP request and response headers. These actions include retrieving, setting, adding to, and removing. A Headers object has an associated header list, which is initially empty and consists of zero or more name and value pairs. You can add to this using methods like append() (see Examples.) In all methods of this interface, header names are matched by case-insensitive byte sequence.
15421542+ * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers.
12261543 *
12271544 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers)
12281545 */
12291546declare class Headers {
12301547 constructor(init?: HeadersInit);
12311231- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */
15481548+ /**
15491549+ * The **`get()`** method of the Headers interface returns a byte string of all the values of a header within a `Headers` object with a given name.
15501550+ *
15511551+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get)
15521552+ */
12321553 get(name: string): string | null;
12331554 getAll(name: string): string[];
12341234- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */
15551555+ /**
15561556+ * The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
15571557+ *
15581558+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
15591559+ */
12351560 getSetCookie(): string[];
12361236- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */
15611561+ /**
15621562+ * The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
15631563+ *
15641564+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has)
15651565+ */
12371566 has(name: string): boolean;
12381238- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */
15671567+ /**
15681568+ * The **`set()`** method of the Headers interface sets a new value for an existing header inside a `Headers` object, or adds the header if it does not already exist.
15691569+ *
15701570+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set)
15711571+ */
12391572 set(name: string, value: string): void;
12401240- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */
15731573+ /**
15741574+ * The **`append()`** method of the Headers interface appends a new value onto an existing header inside a `Headers` object, or adds the header if it does not already exist.
15751575+ *
15761576+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append)
15771577+ */
12411578 append(name: string, value: string): void;
12421242- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */
15791579+ /**
15801580+ * The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object.
15811581+ *
15821582+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete)
15831583+ */
12431584 delete(name: string): void;
12441585 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: Headers) => void, thisArg?: This): void;
12451586 /* Returns an iterator allowing to go through all key/value pairs contained in this object. */
···12761617 blob(): Promise<Blob>;
12771618}
12781619/**
12791279- * This Fetch API interface represents the response to a request.
16201620+ * The **`Response`** interface of the Fetch API represents the response to a request.
12801621 *
12811622 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
12821623 */
···12881629 json(any: any, maybeInit?: (ResponseInit | Response)): Response;
12891630};
12901631/**
12911291- * This Fetch API interface represents the response to a request.
16321632+ * The **`Response`** interface of the Fetch API represents the response to a request.
12921633 *
12931634 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response)
12941635 */
12951636interface Response extends Body {
12961296- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */
16371637+ /**
16381638+ * The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable.
16391639+ *
16401640+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone)
16411641+ */
12971642 clone(): Response;
12981298- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */
16431643+ /**
16441644+ * The **`status`** read-only property of the Response interface contains the HTTP status codes of the response.
16451645+ *
16461646+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
16471647+ */
12991648 status: number;
13001300- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */
16491649+ /**
16501650+ * The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
16511651+ *
16521652+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
16531653+ */
13011654 statusText: string;
13021302- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */
16551655+ /**
16561656+ * The **`headers`** read-only property of the with the response.
16571657+ *
16581658+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
16591659+ */
13031660 headers: Headers;
13041304- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */
16611661+ /**
16621662+ * The **`ok`** read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
16631663+ *
16641664+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
16651665+ */
13051666 ok: boolean;
13061306- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */
16671667+ /**
16681668+ * The **`redirected`** read-only property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
16691669+ *
16701670+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
16711671+ */
13071672 redirected: boolean;
13081308- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */
16731673+ /**
16741674+ * The **`url`** read-only property of the Response interface contains the URL of the response.
16751675+ *
16761676+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
16771677+ */
13091678 url: string;
13101679 webSocket: WebSocket | null;
13111680 cf: any | undefined;
13121312- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type) */
16811681+ /**
16821682+ * The **`type`** read-only property of the Response interface contains the type of the response.
16831683+ *
16841684+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type)
16851685+ */
13131686 type: "default" | "error";
13141687}
13151688interface ResponseInit {
···13221695}
13231696type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> = Request<CfHostMetadata, Cf> | string;
13241697/**
13251325- * This Fetch API interface represents a resource request.
16981698+ * The **`Request`** interface of the Fetch API represents a resource request.
13261699 *
13271700 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
13281701 */
···13311704 new <CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>(input: RequestInfo<CfProperties> | URL, init?: RequestInit<Cf>): Request<CfHostMetadata, Cf>;
13321705};
13331706/**
13341334- * This Fetch API interface represents a resource request.
17071707+ * The **`Request`** interface of the Fetch API represents a resource request.
13351708 *
13361709 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request)
13371710 */
13381711interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> extends Body {
13391339- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */
17121712+ /**
17131713+ * The **`clone()`** method of the Request interface creates a copy of the current `Request` object.
17141714+ *
17151715+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone)
17161716+ */
13401717 clone(): Request<CfHostMetadata, Cf>;
13411718 /**
13421342- * Returns request's HTTP method, which is "GET" by default.
17191719+ * The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request.
13431720 *
13441721 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
13451722 */
13461723 method: string;
13471724 /**
13481348- * Returns the URL of request as a string.
17251725+ * The **`url`** read-only property of the Request interface contains the URL of the request.
13491726 *
13501727 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
13511728 */
13521729 url: string;
13531730 /**
13541354- * Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the "Host" header.
17311731+ * The **`headers`** read-only property of the with the request.
13551732 *
13561733 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
13571734 */
13581735 headers: Headers;
13591736 /**
13601360- * Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.
17371737+ * The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
13611738 *
13621739 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
13631740 */
13641741 redirect: string;
13651742 fetcher: Fetcher | null;
13661743 /**
13671367- * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.
17441744+ * The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
13681745 *
13691746 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
13701747 */
13711748 signal: AbortSignal;
13721749 cf: Cf | undefined;
13731750 /**
13741374- * Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]
17511751+ * The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
13751752 *
13761753 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
13771754 */
13781755 integrity: string;
13791756 /**
13801380- * Returns a boolean indicating whether or not request can outlive the global in which it was created.
17571757+ * The **`keepalive`** read-only property of the Request interface contains the request's `keepalive` setting (`true` or `false`), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
13811758 *
13821759 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
13831760 */
13841761 keepalive: boolean;
13851762 /**
13861386- * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
17631763+ * The **`cache`** read-only property of the Request interface contains the cache mode of the request.
13871764 *
13881765 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
13891766 */
13901390- cache?: "no-store";
17671767+ cache?: "no-store" | "no-cache";
13911768}
13921769interface RequestInit<Cf = CfProperties> {
13931770 /* A string to set request's method. */
···14011778 fetcher?: (Fetcher | null);
14021779 cf?: Cf;
14031780 /* A string indicating how the request will interact with the browser's cache to set request's cache. */
14041404- cache?: "no-store";
17811781+ cache?: "no-store" | "no-cache";
14051782 /* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
14061783 integrity?: string;
14071784 /* An AbortSignal to set request's signal. */
14081785 signal?: (AbortSignal | null);
14091786 encodeResponseBody?: "automatic" | "manual";
14101787}
14111411-type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> = Fetcher<T>;
17881788+type Service<T extends (new (...args: any[]) => Rpc.WorkerEntrypointBranded) | Rpc.WorkerEntrypointBranded | ExportedHandler<any, any, any> | undefined = undefined> = T extends new (...args: any[]) => Rpc.WorkerEntrypointBranded ? Fetcher<InstanceType<T>> : T extends Rpc.WorkerEntrypointBranded ? Fetcher<T> : T extends Exclude<Rpc.EntrypointBranded, Rpc.WorkerEntrypointBranded> ? never : Fetcher<undefined>;
14121789type Fetcher<T extends Rpc.EntrypointBranded | undefined = undefined, Reserved extends string = never> = (T extends Rpc.EntrypointBranded ? Rpc.Provider<T, Reserved | "fetch" | "connect"> : unknown) & {
14131790 fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
14141791 connect(address: SocketAddress | string, options?: SocketOptions): Socket;
···17342111 value?: undefined;
17352112};
17362113/**
17371737- * This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
21142114+ * The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
17382115 *
17392116 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
17402117 */
17412118interface ReadableStream<R = any> {
17421742- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
21192119+ /**
21202120+ * The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader.
21212121+ *
21222122+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
21232123+ */
17432124 get locked(): boolean;
17441744- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
21252125+ /**
21262126+ * The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
21272127+ *
21282128+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel)
21292129+ */
17452130 cancel(reason?: any): Promise<void>;
17461746- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
21312131+ /**
21322132+ * The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
21332133+ *
21342134+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
21352135+ */
17472136 getReader(): ReadableStreamDefaultReader<R>;
17481748- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */
21372137+ /**
21382138+ * The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it.
21392139+ *
21402140+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader)
21412141+ */
17492142 getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader;
17501750- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */
21432143+ /**
21442144+ * The **`pipeThrough()`** method of the ReadableStream interface provides a chainable way of piping the current stream through a transform stream or any other writable/readable pair.
21452145+ *
21462146+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough)
21472147+ */
17512148 pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
17521752- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */
21492149+ /**
21502150+ * The **`pipeTo()`** method of the ReadableStream interface pipes the current `ReadableStream` to a given WritableStream and returns a Promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
21512151+ *
21522152+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo)
21532153+ */
17532154 pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
17541754- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */
21552155+ /**
21562156+ * The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances.
21572157+ *
21582158+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee)
21592159+ */
17552160 tee(): [
17562161 ReadableStream<R>,
17572162 ReadableStream<R>
···17602165 [Symbol.asyncIterator](options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>;
17612166}
17622167/**
17631763- * This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.
21682168+ * The `ReadableStream` interface of the Streams API represents a readable stream of byte data.
17642169 *
17652170 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
17662171 */
···17692174 new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>;
17702175 new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
17712176};
17721772-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */
21772177+/**
21782178+ * The **`ReadableStreamDefaultReader`** interface of the Streams API represents a default reader that can be used to read stream data supplied from a network (such as a fetch request).
21792179+ *
21802180+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader)
21812181+ */
17732182declare class ReadableStreamDefaultReader<R = any> {
17742183 constructor(stream: ReadableStream);
17752184 get closed(): Promise<void>;
17762185 cancel(reason?: any): Promise<void>;
17771777- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */
21862186+ /**
21872187+ * The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
21882188+ *
21892189+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read)
21902190+ */
17782191 read(): Promise<ReadableStreamReadResult<R>>;
17791779- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */
21922192+ /**
21932193+ * The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream.
21942194+ *
21952195+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock)
21962196+ */
17802197 releaseLock(): void;
17812198}
17821782-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */
21992199+/**
22002200+ * The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source.
22012201+ *
22022202+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader)
22032203+ */
17832204declare class ReadableStreamBYOBReader {
17842205 constructor(stream: ReadableStream);
17852206 get closed(): Promise<void>;
17862207 cancel(reason?: any): Promise<void>;
17871787- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */
22082208+ /**
22092209+ * The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.
22102210+ *
22112211+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read)
22122212+ */
17882213 read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
17891789- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */
22142214+ /**
22152215+ * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream.
22162216+ *
22172217+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock)
22182218+ */
17902219 releaseLock(): void;
17912220 readAtLeast<T extends ArrayBufferView>(minElements: number, view: T): Promise<ReadableStreamReadResult<T>>;
17922221}
···18012230 */
18022231 mode: "byob";
18032232}
18041804-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
22332233+/**
22342234+ * The **`ReadableStreamBYOBRequest`** interface of the Streams API represents a 'pull request' for data from an underlying source that will made as a zero-copy transfer to a consumer (bypassing the stream's internal queues).
22352235+ *
22362236+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
22372237+ */
18052238declare abstract class ReadableStreamBYOBRequest {
18061806- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
22392239+ /**
22402240+ * The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
22412241+ *
22422242+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view)
22432243+ */
18072244 get view(): Uint8Array | null;
18081808- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
22452245+ /**
22462246+ * The **`respond()`** method of the ReadableStreamBYOBRequest interface is used to signal to the associated readable byte stream that the specified number of bytes were written into the ReadableStreamBYOBRequest.view.
22472247+ *
22482248+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond)
22492249+ */
18092250 respond(bytesWritten: number): void;
18101810- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */
22512251+ /**
22522252+ * The **`respondWithNewView()`** method of the ReadableStreamBYOBRequest interface specifies a new view that the consumer of the associated readable byte stream should write to instead of ReadableStreamBYOBRequest.view.
22532253+ *
22542254+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView)
22552255+ */
18112256 respondWithNewView(view: ArrayBuffer | ArrayBufferView): void;
18122257 get atLeast(): number | null;
18132258}
18141814-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
22592259+/**
22602260+ * The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue.
22612261+ *
22622262+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
22632263+ */
18152264declare abstract class ReadableStreamDefaultController<R = any> {
18161816- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
22652265+ /**
22662266+ * The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
22672267+ *
22682268+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize)
22692269+ */
18172270 get desiredSize(): number | null;
18181818- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
22712271+ /**
22722272+ * The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream.
22732273+ *
22742274+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close)
22752275+ */
18192276 close(): void;
18201820- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */
22772277+ /**
22782278+ * The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue.
22792279+ *
22802280+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue)
22812281+ */
18212282 enqueue(chunk?: R): void;
18221822- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */
22832283+ /**
22842284+ * The **`error()`** method of the with the associated stream to error.
22852285+ *
22862286+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error)
22872287+ */
18232288 error(reason: any): void;
18242289}
18251825-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
22902290+/**
22912291+ * The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream.
22922292+ *
22932293+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
22942294+ */
18262295declare abstract class ReadableByteStreamController {
18271827- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
22962296+ /**
22972297+ * The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
22982298+ *
22992299+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest)
23002300+ */
18282301 get byobRequest(): ReadableStreamBYOBRequest | null;
18291829- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
23022302+ /**
23032303+ * The **`desiredSize`** read-only property of the ReadableByteStreamController interface returns the number of bytes required to fill the stream's internal queue to its 'desired size'.
23042304+ *
23052305+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize)
23062306+ */
18302307 get desiredSize(): number | null;
18311831- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */
23082308+ /**
23092309+ * The **`close()`** method of the ReadableByteStreamController interface closes the associated stream.
23102310+ *
23112311+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close)
23122312+ */
18322313 close(): void;
18331833- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */
23142314+ /**
23152315+ * The **`enqueue()`** method of the ReadableByteStreamController interface enqueues a given chunk on the associated readable byte stream (the chunk is copied into the stream's internal queues).
23162316+ *
23172317+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue)
23182318+ */
18342319 enqueue(chunk: ArrayBuffer | ArrayBufferView): void;
18351835- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */
23202320+ /**
23212321+ * The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason.
23222322+ *
23232323+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error)
23242324+ */
18362325 error(reason: any): void;
18372326}
18382327/**
18391839- * This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate.
23282328+ * The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state.
18402329 *
18412330 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
18422331 */
18432332declare abstract class WritableStreamDefaultController {
18441844- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
23332333+ /**
23342334+ * The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
23352335+ *
23362336+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal)
23372337+ */
18452338 get signal(): AbortSignal;
18461846- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
23392339+ /**
23402340+ * The **`error()`** method of the with the associated stream to error.
23412341+ *
23422342+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error)
23432343+ */
18472344 error(reason?: any): void;
18482345}
18491849-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
23462346+/**
23472347+ * The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream.
23482348+ *
23492349+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
23502350+ */
18502351declare abstract class TransformStreamDefaultController<O = any> {
18511851- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
23522352+ /**
23532353+ * The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
23542354+ *
23552355+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize)
23562356+ */
18522357 get desiredSize(): number | null;
18531853- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
23582358+ /**
23592359+ * The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream.
23602360+ *
23612361+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue)
23622362+ */
18542363 enqueue(chunk?: O): void;
18551855- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */
23642364+ /**
23652365+ * The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream.
23662366+ *
23672367+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error)
23682368+ */
18562369 error(reason: any): void;
18571857- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
23702370+ /**
23712371+ * The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream.
23722372+ *
23732373+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate)
23742374+ */
18582375 terminate(): void;
18592376}
18602377interface ReadableWritablePair<R = any, W = any> {
···18672384 readable: ReadableStream<R>;
18682385}
18692386/**
18701870- * This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing.
23872387+ * The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink.
18712388 *
18722389 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream)
18732390 */
18742391declare class WritableStream<W = any> {
18752392 constructor(underlyingSink?: UnderlyingSink, queuingStrategy?: QueuingStrategy);
18761876- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */
23932393+ /**
23942394+ * The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer.
23952395+ *
23962396+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
23972397+ */
18772398 get locked(): boolean;
18781878- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */
23992399+ /**
24002400+ * The **`abort()`** method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
24012401+ *
24022402+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort)
24032403+ */
18792404 abort(reason?: any): Promise<void>;
18801880- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */
24052405+ /**
24062406+ * The **`close()`** method of the WritableStream interface closes the associated stream.
24072407+ *
24082408+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close)
24092409+ */
18812410 close(): Promise<void>;
18821882- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */
24112411+ /**
24122412+ * The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance.
24132413+ *
24142414+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter)
24152415+ */
18832416 getWriter(): WritableStreamDefaultWriter<W>;
18842417}
18852418/**
18861886- * This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink.
24192419+ * The **`WritableStreamDefaultWriter`** interface of the Streams API is the object returned by WritableStream.getWriter() and once created locks the writer to the `WritableStream` ensuring that no other streams can write to the underlying sink.
18872420 *
18882421 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter)
18892422 */
18902423declare class WritableStreamDefaultWriter<W = any> {
18912424 constructor(stream: WritableStream);
18921892- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */
24252425+ /**
24262426+ * The **`closed`** read-only property of the the stream errors or the writer's lock is released.
24272427+ *
24282428+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
24292429+ */
18932430 get closed(): Promise<void>;
18941894- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */
24312431+ /**
24322432+ * The **`ready`** read-only property of the that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
24332433+ *
24342434+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
24352435+ */
18952436 get ready(): Promise<void>;
18961896- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */
24372437+ /**
24382438+ * The **`desiredSize`** read-only property of the to fill the stream's internal queue.
24392439+ *
24402440+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
24412441+ */
18972442 get desiredSize(): number | null;
18981898- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */
24432443+ /**
24442444+ * The **`abort()`** method of the the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
24452445+ *
24462446+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort)
24472447+ */
18992448 abort(reason?: any): Promise<void>;
19001900- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */
24492449+ /**
24502450+ * The **`close()`** method of the stream.
24512451+ *
24522452+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close)
24532453+ */
19012454 close(): Promise<void>;
19021902- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */
24552455+ /**
24562456+ * The **`write()`** method of the operation.
24572457+ *
24582458+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write)
24592459+ */
19032460 write(chunk?: W): Promise<void>;
19041904- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */
24612461+ /**
24622462+ * The **`releaseLock()`** method of the corresponding stream.
24632463+ *
24642464+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock)
24652465+ */
19052466 releaseLock(): void;
19062467}
19071907-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */
24682468+/**
24692469+ * The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept.
24702470+ *
24712471+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream)
24722472+ */
19082473declare class TransformStream<I = any, O = any> {
19092474 constructor(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>);
19101910- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */
24752475+ /**
24762476+ * The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`.
24772477+ *
24782478+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
24792479+ */
19112480 get readable(): ReadableStream<O>;
19121912- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */
24812481+ /**
24822482+ * The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
24832483+ *
24842484+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
24852485+ */
19132486 get writable(): WritableStream<I>;
19142487}
19152488declare class FixedLengthStream extends IdentityTransformStream {
···19242497interface ReadableStreamValuesOptions {
19252498 preventCancel?: boolean;
19262499}
19271927-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */
25002500+/**
25012501+ * The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data.
25022502+ *
25032503+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream)
25042504+ */
19282505declare class CompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> {
19292506 constructor(format: "gzip" | "deflate" | "deflate-raw");
19302507}
19311931-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */
25082508+/**
25092509+ * The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data.
25102510+ *
25112511+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream)
25122512+ */
19322513declare class DecompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> {
19332514 constructor(format: "gzip" | "deflate" | "deflate-raw");
19342515}
19351935-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */
25162516+/**
25172517+ * The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding.
25182518+ *
25192519+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream)
25202520+ */
19362521declare class TextEncoderStream extends TransformStream<string, Uint8Array> {
19372522 constructor();
19382523 get encoding(): string;
19392524}
19401940-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */
25252525+/**
25262526+ * The **`TextDecoderStream`** interface of the Encoding API converts a stream of text in a binary encoding, such as UTF-8 etc., to a stream of strings.
25272527+ *
25282528+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream)
25292529+ */
19412530declare class TextDecoderStream extends TransformStream<ArrayBuffer | ArrayBufferView, string> {
19422531 constructor(label?: string, options?: TextDecoderStreamTextDecoderStreamInit);
19432532 get encoding(): string;
···19492538 ignoreBOM?: boolean;
19502539}
19512540/**
19521952- * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
25412541+ * The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams.
19532542 *
19542543 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy)
19552544 */
19562545declare class ByteLengthQueuingStrategy implements QueuingStrategy<ArrayBufferView> {
19572546 constructor(init: QueuingStrategyInit);
19581958- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */
25472547+ /**
25482548+ * The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied.
25492549+ *
25502550+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark)
25512551+ */
19592552 get highWaterMark(): number;
19602553 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */
19612554 get size(): (chunk?: any) => number;
19622555}
19632556/**
19641964- * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams.
25572557+ * The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams.
19652558 *
19662559 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy)
19672560 */
19682561declare class CountQueuingStrategy implements QueuingStrategy {
19692562 constructor(init: QueuingStrategyInit);
19701970- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */
25632563+ /**
25642564+ * The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied.
25652565+ *
25662566+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark)
25672567+ */
19712568 get highWaterMark(): number;
19722569 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
19732570 get size(): (chunk?: any) => number;
···20002597 readonly scriptVersion?: ScriptVersion;
20012598 readonly dispatchNamespace?: string;
20022599 readonly scriptTags?: string[];
26002600+ readonly durableObjectId?: string;
20032601 readonly outcome: string;
20042602 readonly executionModel: string;
20052603 readonly truncated: boolean;
···20852683 fromTrace(item: TraceItem): TraceMetrics;
20862684}
20872685/**
20882088- * The URL interface represents an object providing static methods used for creating object URLs.
26862686+ * The **`URL`** interface is used to parse, construct, normalize, and encode URL.
20892687 *
20902688 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL)
20912689 */
20922690declare class URL {
20932691 constructor(url: string | URL, base?: string | URL);
20942094- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */
26922692+ /**
26932693+ * The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
26942694+ *
26952695+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
26962696+ */
20952697 get origin(): string;
20962096- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
26982698+ /**
26992699+ * The **`href`** property of the URL interface is a string containing the whole URL.
27002700+ *
27012701+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
27022702+ */
20972703 get href(): string;
20982098- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */
27042704+ /**
27052705+ * The **`href`** property of the URL interface is a string containing the whole URL.
27062706+ *
27072707+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
27082708+ */
20992709 set href(value: string);
21002100- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
27102710+ /**
27112711+ * The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
27122712+ *
27132713+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
27142714+ */
21012715 get protocol(): string;
21022102- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */
27162716+ /**
27172717+ * The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
27182718+ *
27192719+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
27202720+ */
21032721 set protocol(value: string);
21042104- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
27222722+ /**
27232723+ * The **`username`** property of the URL interface is a string containing the username component of the URL.
27242724+ *
27252725+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
27262726+ */
21052727 get username(): string;
21062106- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */
27282728+ /**
27292729+ * The **`username`** property of the URL interface is a string containing the username component of the URL.
27302730+ *
27312731+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
27322732+ */
21072733 set username(value: string);
21082108- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
27342734+ /**
27352735+ * The **`password`** property of the URL interface is a string containing the password component of the URL.
27362736+ *
27372737+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
27382738+ */
21092739 get password(): string;
21102110- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */
27402740+ /**
27412741+ * The **`password`** property of the URL interface is a string containing the password component of the URL.
27422742+ *
27432743+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
27442744+ */
21112745 set password(value: string);
21122112- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
27462746+ /**
27472747+ * The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
27482748+ *
27492749+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
27502750+ */
21132751 get host(): string;
21142114- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */
27522752+ /**
27532753+ * The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
27542754+ *
27552755+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
27562756+ */
21152757 set host(value: string);
21162116- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
27582758+ /**
27592759+ * The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
27602760+ *
27612761+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
27622762+ */
21172763 get hostname(): string;
21182118- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */
27642764+ /**
27652765+ * The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
27662766+ *
27672767+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
27682768+ */
21192769 set hostname(value: string);
21202120- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
27702770+ /**
27712771+ * The **`port`** property of the URL interface is a string containing the port number of the URL.
27722772+ *
27732773+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
27742774+ */
21212775 get port(): string;
21222122- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */
27762776+ /**
27772777+ * The **`port`** property of the URL interface is a string containing the port number of the URL.
27782778+ *
27792779+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
27802780+ */
21232781 set port(value: string);
21242124- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
27822782+ /**
27832783+ * The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
27842784+ *
27852785+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
27862786+ */
21252787 get pathname(): string;
21262126- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */
27882788+ /**
27892789+ * The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
27902790+ *
27912791+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
27922792+ */
21272793 set pathname(value: string);
21282128- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
27942794+ /**
27952795+ * The **`search`** property of the URL interface is a search string, also called a _query string_, that is a string containing a `'?'` followed by the parameters of the URL.
27962796+ *
27972797+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
27982798+ */
21292799 get search(): string;
21302130- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */
28002800+ /**
28012801+ * The **`search`** property of the URL interface is a search string, also called a _query string_, that is a string containing a `'?'` followed by the parameters of the URL.
28022802+ *
28032803+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
28042804+ */
21312805 set search(value: string);
21322132- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
28062806+ /**
28072807+ * The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
28082808+ *
28092809+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
28102810+ */
21332811 get hash(): string;
21342134- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */
28122812+ /**
28132813+ * The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
28142814+ *
28152815+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
28162816+ */
21352817 set hash(value: string);
21362136- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */
28182818+ /**
28192819+ * The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
28202820+ *
28212821+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
28222822+ */
21372823 get searchParams(): URLSearchParams;
21382138- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */
28242824+ /**
28252825+ * The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as ```js-nolint toJSON() ``` None.
28262826+ *
28272827+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
28282828+ */
21392829 toJSON(): string;
21402830 /*function toString() { [native code] }*/
21412831 toString(): string;
21422142- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */
28322832+ /**
28332833+ * The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
28342834+ *
28352835+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
28362836+ */
21432837 static canParse(url: string, base?: string): boolean;
21442144- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */
28382838+ /**
28392839+ * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
28402840+ *
28412841+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
28422842+ */
21452843 static parse(url: string, base?: string): URL | null;
21462146- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */
28442844+ /**
28452845+ * The **`createObjectURL()`** static method of the URL interface creates a string containing a URL representing the object given in the parameter.
28462846+ *
28472847+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
28482848+ */
21472849 static createObjectURL(object: File | Blob): string;
21482148- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */
28502850+ /**
28512851+ * The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
28522852+ *
28532853+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
28542854+ */
21492855 static revokeObjectURL(object_url: string): void;
21502856}
21512151-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */
28572857+/**
28582858+ * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
28592859+ *
28602860+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams)
28612861+ */
21522862declare class URLSearchParams {
21532863 constructor(init?: (Iterable<Iterable<string>> | Record<string, string> | string));
21542154- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */
28642864+ /**
28652865+ * The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
28662866+ *
28672867+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size)
28682868+ */
21552869 get size(): number;
21562870 /**
21572157- * Appends a specified key/value pair as a new search parameter.
28712871+ * The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter.
21582872 *
21592873 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append)
21602874 */
21612875 append(name: string, value: string): void;
21622876 /**
21632163- * Deletes the given search parameter, and its associated value, from the list of all search parameters.
28772877+ * The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters.
21642878 *
21652879 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
21662880 */
21672881 delete(name: string, value?: string): void;
21682882 /**
21692169- * Returns the first value associated to the given search parameter.
28832883+ * The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
21702884 *
21712885 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get)
21722886 */
21732887 get(name: string): string | null;
21742888 /**
21752175- * Returns all the values association with a given search parameter.
28892889+ * The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array.
21762890 *
21772891 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll)
21782892 */
21792893 getAll(name: string): string[];
21802894 /**
21812181- * Returns a Boolean indicating if such a search parameter exists.
28952895+ * The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters.
21822896 *
21832897 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
21842898 */
21852899 has(name: string, value?: string): boolean;
21862900 /**
21872187- * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others.
29012901+ * The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
21882902 *
21892903 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set)
21902904 */
21912905 set(name: string, value: string): void;
21922192- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */
29062906+ /**
29072907+ * The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`.
29082908+ *
29092909+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort)
29102910+ */
21932911 sort(): void;
21942912 /* Returns an array of key, value pairs for every entry in the search params. */
21952913 entries(): IterableIterator<[
···22012919 /* Returns a list of values in the search params. */
22022920 values(): IterableIterator<string>;
22032921 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: URLSearchParams) => void, thisArg?: This): void;
22042204- /*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */
29222922+ /*function toString() { [native code] }*/
22052923 toString(): string;
22062924 [Symbol.iterator](): IterableIterator<[
22072925 key: string,
···22522970 ignoreCase?: boolean;
22532971}
22542972/**
22552255- * A CloseEvent is sent to clients using WebSockets when the connection is closed. This is delivered to the listener indicated by the WebSocket object's onclose attribute.
29732973+ * A `CloseEvent` is sent to clients using WebSockets when the connection is closed.
22562974 *
22572975 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent)
22582976 */
22592977declare class CloseEvent extends Event {
22602978 constructor(type: string, initializer?: CloseEventInit);
22612979 /**
22622262- * Returns the WebSocket connection close code provided by the server.
29802980+ * The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed.
22632981 *
22642982 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code)
22652983 */
22662984 readonly code: number;
22672985 /**
22682268- * Returns the WebSocket connection close reason provided by the server.
29862986+ * The **`reason`** read-only property of the CloseEvent interface returns the WebSocket connection close reason the server gave for closing the connection; that is, a concise human-readable prose explanation for the closure.
22692987 *
22702988 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason)
22712989 */
22722990 readonly reason: string;
22732991 /**
22742274- * Returns true if the connection closed cleanly; false otherwise.
29922992+ * The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly.
22752993 *
22762994 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean)
22772995 */
···22823000 reason?: string;
22833001 wasClean?: boolean;
22843002}
22852285-/**
22862286- * A message received by a target object.
22872287- *
22882288- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
22892289- */
22902290-declare class MessageEvent extends Event {
22912291- constructor(type: string, initializer: MessageEventInit);
22922292- /**
22932293- * Returns the data of the message.
22942294- *
22952295- * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data)
22962296- */
22972297- readonly data: ArrayBuffer | string;
22982298-}
22992299-interface MessageEventInit {
23002300- data: ArrayBuffer | string;
23012301-}
23023003type WebSocketEventMap = {
23033004 close: CloseEvent;
23043005 message: MessageEvent;
···23063007 error: ErrorEvent;
23073008};
23083009/**
23092309- * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
30103010+ * The `WebSocket` object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
23103011 *
23113012 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
23123013 */
···23233024 readonly CLOSED: number;
23243025};
23253026/**
23262326- * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
30273027+ * The `WebSocket` object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
23273028 *
23283029 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket)
23293030 */
23303031interface WebSocket extends EventTarget<WebSocketEventMap> {
23313032 accept(): void;
23323033 /**
23332333- * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView.
30343034+ * The **`WebSocket.send()`** method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of `bufferedAmount` by the number of bytes needed to contain the data.
23343035 *
23353036 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send)
23363037 */
23373038 send(message: (ArrayBuffer | ArrayBufferView) | string): void;
23383039 /**
23392339- * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason.
30403040+ * The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing.
23403041 *
23413042 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close)
23423043 */
···23443045 serializeAttachment(attachment: any): void;
23453046 deserializeAttachment(): any | null;
23463047 /**
23472347- * Returns the state of the WebSocket object's connection. It can have the values described below.
30483048+ * The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection.
23483049 *
23493050 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
23503051 */
23513052 readyState: number;
23523053 /**
23532353- * Returns the URL that was used to establish the WebSocket connection.
30543054+ * The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
23543055 *
23553056 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
23563057 */
23573058 url: string | null;
23583059 /**
23592359- * Returns the subprotocol selected by the server, if any. It can be used in conjunction with the array form of the constructor's second argument to perform subprotocol negotiation.
30603060+ * The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the `protocols` parameter when creating the WebSocket object, or the empty string if no connection is established.
23603061 *
23613062 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
23623063 */
23633064 protocol: string | null;
23643065 /**
23652365- * Returns the extensions selected by the server, if any.
30663066+ * The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
23663067 *
23673068 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
23683069 */
···24253126 remoteAddress?: string;
24263127 localAddress?: string;
24273128}
24282428-/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */
31293129+/**
31303130+ * The **`EventSource`** interface is web content's interface to server-sent events.
31313131+ *
31323132+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource)
31333133+ */
24293134declare class EventSource extends EventTarget {
24303135 constructor(url: string, init?: EventSourceEventSourceInit);
24313136 /**
24322432- * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED.
31373137+ * The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None.
24333138 *
24343139 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close)
24353140 */
24363141 close(): void;
24373142 /**
24382438- * Returns the URL providing the event stream.
31433143+ * The **`url`** read-only property of the URL of the source.
24393144 *
24403145 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url)
24413146 */
24423147 get url(): string;
24433148 /**
24442444- * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise.
31493149+ * The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set.
24453150 *
24463151 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials)
24473152 */
24483153 get withCredentials(): boolean;
24493154 /**
24502450- * Returns the state of this EventSource object's connection. It can have the values described below.
31553155+ * The **`readyState`** read-only property of the connection.
24513156 *
24523157 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState)
24533158 */
···24803185 destroy(error?: any): Promise<void>;
24813186 signal(signo: number): void;
24823187 getTcpPort(port: number): Fetcher;
31883188+ setInactivityTimeout(durationMs: number | bigint): Promise<void>;
24833189}
24843190interface ContainerStartupOptions {
24853191 entrypoint?: string[];
24863192 enableInternet: boolean;
24873193 env?: Record<string, string>;
31943194+ hardTimeout?: (number | bigint);
31953195+}
31963196+/**
31973197+ * The **`MessagePort`** interface of the Channel Messaging API represents one of the two ports of a MessageChannel, allowing messages to be sent from one port and listening out for them arriving at the other.
31983198+ *
31993199+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort)
32003200+ */
32013201+declare abstract class MessagePort extends EventTarget {
32023202+ /**
32033203+ * The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts.
32043204+ *
32053205+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage)
32063206+ */
32073207+ postMessage(data?: any, options?: (any[] | MessagePortPostMessageOptions)): void;
32083208+ /**
32093209+ * The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active.
32103210+ *
32113211+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close)
32123212+ */
32133213+ close(): void;
32143214+ /**
32153215+ * The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port.
32163216+ *
32173217+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start)
32183218+ */
32193219+ start(): void;
32203220+ get onmessage(): any | null;
32213221+ set onmessage(value: any | null);
32223222+}
32233223+/**
32243224+ * The **`MessageChannel`** interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties.
32253225+ *
32263226+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel)
32273227+ */
32283228+declare class MessageChannel {
32293229+ constructor();
32303230+ /**
32313231+ * The **`port1`** read-only property of the the port attached to the context that originated the channel.
32323232+ *
32333233+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
32343234+ */
32353235+ readonly port1: MessagePort;
32363236+ /**
32373237+ * The **`port2`** read-only property of the the port attached to the context at the other end of the channel, which the message is initially sent to.
32383238+ *
32393239+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
32403240+ */
32413241+ readonly port2: MessagePort;
32423242+}
32433243+interface MessagePortPostMessageOptions {
32443244+ transfer?: any[];
32453245+}
32463246+type LoopbackForExport<T extends (new (...args: any[]) => Rpc.EntrypointBranded) | ExportedHandler<any, any, any> | undefined = undefined> = T extends new (...args: any[]) => Rpc.WorkerEntrypointBranded ? LoopbackServiceStub<InstanceType<T>> : T extends new (...args: any[]) => Rpc.DurableObjectBranded ? LoopbackDurableObjectClass<InstanceType<T>> : T extends ExportedHandler<any, any, any> ? LoopbackServiceStub<undefined> : undefined;
32473247+type LoopbackServiceStub<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> = Fetcher<T> & (T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props> ? (opts: {
32483248+ props?: Props;
32493249+}) => Fetcher<T> : (opts: {
32503250+ props?: any;
32513251+}) => Fetcher<T>);
32523252+type LoopbackDurableObjectClass<T extends Rpc.DurableObjectBranded | undefined = undefined> = DurableObjectClass<T> & (T extends CloudflareWorkersModule.DurableObject<any, infer Props> ? (opts: {
32533253+ props?: Props;
32543254+}) => DurableObjectClass<T> : (opts: {
32553255+ props?: any;
32563256+}) => DurableObjectClass<T>);
32573257+interface SyncKvStorage {
32583258+ get<T = unknown>(key: string): T | undefined;
32593259+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[
32603260+ string,
32613261+ T
32623262+ ]>;
32633263+ put<T>(key: string, value: T): void;
32643264+ delete(key: string): boolean;
32653265+}
32663266+interface SyncKvListOptions {
32673267+ start?: string;
32683268+ startAfter?: string;
32693269+ end?: string;
32703270+ prefix?: string;
32713271+ reverse?: boolean;
32723272+ limit?: number;
32733273+}
32743274+interface WorkerStub {
32753275+ getEntrypoint<T extends Rpc.WorkerEntrypointBranded | undefined>(name?: string, options?: WorkerStubEntrypointOptions): Fetcher<T>;
32763276+}
32773277+interface WorkerStubEntrypointOptions {
32783278+ props?: any;
32793279+}
32803280+interface WorkerLoader {
32813281+ get(name: string, getCode: () => WorkerLoaderWorkerCode | Promise<WorkerLoaderWorkerCode>): WorkerStub;
32823282+}
32833283+interface WorkerLoaderModule {
32843284+ js?: string;
32853285+ cjs?: string;
32863286+ text?: string;
32873287+ data?: ArrayBuffer;
32883288+ json?: any;
32893289+ py?: string;
32903290+ wasm?: ArrayBuffer;
32913291+}
32923292+interface WorkerLoaderWorkerCode {
32933293+ compatibilityDate: string;
32943294+ compatibilityFlags?: string[];
32953295+ allowExperimental?: boolean;
32963296+ mainModule: string;
32973297+ modules: Record<string, WorkerLoaderModule | string>;
32983298+ env?: any;
32993299+ globalOutbound?: (Fetcher | null);
33003300+ tails?: Fetcher[];
33013301+ streamingTails?: Fetcher[];
33023302+}
33033303+/**
33043304+* The Workers runtime supports a subset of the Performance API, used to measure timing and performance,
33053305+* as well as timing of subrequests and other operations.
33063306+*
33073307+* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/)
33083308+*/
33093309+declare abstract class Performance {
33103310+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */
33113311+ get timeOrigin(): number;
33123312+ /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
33133313+ now(): number;
24883314}
24893315type AiImageClassificationInput = {
24903316 image: number[];
···25373363 description: string;
25383364};
25393365declare abstract class BaseAiImageTextToText {
33663366+ inputs: AiImageTextToTextInput;
33673367+ postProcessedOutputs: AiImageTextToTextOutput;
33683368+}
33693369+type AiMultimodalEmbeddingsInput = {
33703370+ image: string;
33713371+ text: string[];
33723372+};
33733373+type AiIMultimodalEmbeddingsOutput = {
33743374+ data: number[][];
33753375+ shape: number[];
33763376+};
33773377+declare abstract class BaseAiMultimodalEmbeddings {
25403378 inputs: AiImageTextToTextInput;
25413379 postProcessedOutputs: AiImageTextToTextOutput;
25423380}
···26703508 tools?: AiTextGenerationToolInput[] | AiTextGenerationToolLegacyInput[] | (object & NonNullable<unknown>);
26713509 functions?: AiTextGenerationFunctionsInput[];
26723510};
35113511+type AiTextGenerationToolLegacyOutput = {
35123512+ name: string;
35133513+ arguments: unknown;
35143514+};
35153515+type AiTextGenerationToolOutput = {
35163516+ id: string;
35173517+ type: "function";
35183518+ function: {
35193519+ name: string;
35203520+ arguments: string;
35213521+ };
35223522+};
35233523+type UsageTags = {
35243524+ prompt_tokens: number;
35253525+ completion_tokens: number;
35263526+ total_tokens: number;
35273527+};
26733528type AiTextGenerationOutput = {
26743529 response?: string;
26752675- tool_calls?: {
26762676- name: string;
26772677- arguments: unknown;
26782678- }[];
35303530+ tool_calls?: AiTextGenerationToolLegacyOutput[] & AiTextGenerationToolOutput[];
35313531+ usage?: UsageTags;
26793532};
26803533declare abstract class BaseAiTextGeneration {
26813534 inputs: AiTextGenerationInput;
···27223575 inputs: AiTranslationInput;
27233576 postProcessedOutputs: AiTranslationOutput;
27243577}
35783578+/**
35793579+ * Workers AI support for OpenAI's Responses API
35803580+ * Reference: https://github.com/openai/openai-node/blob/master/src/resources/responses/responses.ts
35813581+ *
35823582+ * It's a stripped down version from its source.
35833583+ * It currently supports basic function calling, json mode and accepts images as input.
35843584+ *
35853585+ * It does not include types for WebSearch, CodeInterpreter, FileInputs, MCP, CustomTools.
35863586+ * We plan to add those incrementally as model + platform capabilities evolve.
35873587+ */
35883588+type ResponsesInput = {
35893589+ background?: boolean | null;
35903590+ conversation?: string | ResponseConversationParam | null;
35913591+ include?: Array<ResponseIncludable> | null;
35923592+ input?: string | ResponseInput;
35933593+ instructions?: string | null;
35943594+ max_output_tokens?: number | null;
35953595+ parallel_tool_calls?: boolean | null;
35963596+ previous_response_id?: string | null;
35973597+ prompt_cache_key?: string;
35983598+ reasoning?: Reasoning | null;
35993599+ safety_identifier?: string;
36003600+ service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
36013601+ stream?: boolean | null;
36023602+ stream_options?: StreamOptions | null;
36033603+ temperature?: number | null;
36043604+ text?: ResponseTextConfig;
36053605+ tool_choice?: ToolChoiceOptions | ToolChoiceFunction;
36063606+ tools?: Array<Tool>;
36073607+ top_p?: number | null;
36083608+ truncation?: "auto" | "disabled" | null;
36093609+};
36103610+type ResponsesOutput = {
36113611+ id?: string;
36123612+ created_at?: number;
36133613+ output_text?: string;
36143614+ error?: ResponseError | null;
36153615+ incomplete_details?: ResponseIncompleteDetails | null;
36163616+ instructions?: string | Array<ResponseInputItem> | null;
36173617+ object?: "response";
36183618+ output?: Array<ResponseOutputItem>;
36193619+ parallel_tool_calls?: boolean;
36203620+ temperature?: number | null;
36213621+ tool_choice?: ToolChoiceOptions | ToolChoiceFunction;
36223622+ tools?: Array<Tool>;
36233623+ top_p?: number | null;
36243624+ max_output_tokens?: number | null;
36253625+ previous_response_id?: string | null;
36263626+ prompt?: ResponsePrompt | null;
36273627+ reasoning?: Reasoning | null;
36283628+ safety_identifier?: string;
36293629+ service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null;
36303630+ status?: ResponseStatus;
36313631+ text?: ResponseTextConfig;
36323632+ truncation?: "auto" | "disabled" | null;
36333633+ usage?: ResponseUsage;
36343634+};
36353635+type EasyInputMessage = {
36363636+ content: string | ResponseInputMessageContentList;
36373637+ role: "user" | "assistant" | "system" | "developer";
36383638+ type?: "message";
36393639+};
36403640+type ResponsesFunctionTool = {
36413641+ name: string;
36423642+ parameters: {
36433643+ [key: string]: unknown;
36443644+ } | null;
36453645+ strict: boolean | null;
36463646+ type: "function";
36473647+ description?: string | null;
36483648+};
36493649+type ResponseIncompleteDetails = {
36503650+ reason?: "max_output_tokens" | "content_filter";
36513651+};
36523652+type ResponsePrompt = {
36533653+ id: string;
36543654+ variables?: {
36553655+ [key: string]: string | ResponseInputText | ResponseInputImage;
36563656+ } | null;
36573657+ version?: string | null;
36583658+};
36593659+type Reasoning = {
36603660+ effort?: ReasoningEffort | null;
36613661+ generate_summary?: "auto" | "concise" | "detailed" | null;
36623662+ summary?: "auto" | "concise" | "detailed" | null;
36633663+};
36643664+type ResponseContent = ResponseInputText | ResponseInputImage | ResponseOutputText | ResponseOutputRefusal | ResponseContentReasoningText;
36653665+type ResponseContentReasoningText = {
36663666+ text: string;
36673667+ type: "reasoning_text";
36683668+};
36693669+type ResponseConversationParam = {
36703670+ id: string;
36713671+};
36723672+type ResponseCreatedEvent = {
36733673+ response: Response;
36743674+ sequence_number: number;
36753675+ type: "response.created";
36763676+};
36773677+type ResponseCustomToolCallOutput = {
36783678+ call_id: string;
36793679+ output: string | Array<ResponseInputText | ResponseInputImage>;
36803680+ type: "custom_tool_call_output";
36813681+ id?: string;
36823682+};
36833683+type ResponseError = {
36843684+ code: "server_error" | "rate_limit_exceeded" | "invalid_prompt" | "vector_store_timeout" | "invalid_image" | "invalid_image_format" | "invalid_base64_image" | "invalid_image_url" | "image_too_large" | "image_too_small" | "image_parse_error" | "image_content_policy_violation" | "invalid_image_mode" | "image_file_too_large" | "unsupported_image_media_type" | "empty_image_file" | "failed_to_download_image" | "image_file_not_found";
36853685+ message: string;
36863686+};
36873687+type ResponseErrorEvent = {
36883688+ code: string | null;
36893689+ message: string;
36903690+ param: string | null;
36913691+ sequence_number: number;
36923692+ type: "error";
36933693+};
36943694+type ResponseFailedEvent = {
36953695+ response: Response;
36963696+ sequence_number: number;
36973697+ type: "response.failed";
36983698+};
36993699+type ResponseFormatText = {
37003700+ type: "text";
37013701+};
37023702+type ResponseFormatJSONObject = {
37033703+ type: "json_object";
37043704+};
37053705+type ResponseFormatTextConfig = ResponseFormatText | ResponseFormatTextJSONSchemaConfig | ResponseFormatJSONObject;
37063706+type ResponseFormatTextJSONSchemaConfig = {
37073707+ name: string;
37083708+ schema: {
37093709+ [key: string]: unknown;
37103710+ };
37113711+ type: "json_schema";
37123712+ description?: string;
37133713+ strict?: boolean | null;
37143714+};
37153715+type ResponseFunctionCallArgumentsDeltaEvent = {
37163716+ delta: string;
37173717+ item_id: string;
37183718+ output_index: number;
37193719+ sequence_number: number;
37203720+ type: "response.function_call_arguments.delta";
37213721+};
37223722+type ResponseFunctionCallArgumentsDoneEvent = {
37233723+ arguments: string;
37243724+ item_id: string;
37253725+ name: string;
37263726+ output_index: number;
37273727+ sequence_number: number;
37283728+ type: "response.function_call_arguments.done";
37293729+};
37303730+type ResponseFunctionCallOutputItem = ResponseInputTextContent | ResponseInputImageContent;
37313731+type ResponseFunctionCallOutputItemList = Array<ResponseFunctionCallOutputItem>;
37323732+type ResponseFunctionToolCall = {
37333733+ arguments: string;
37343734+ call_id: string;
37353735+ name: string;
37363736+ type: "function_call";
37373737+ id?: string;
37383738+ status?: "in_progress" | "completed" | "incomplete";
37393739+};
37403740+interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
37413741+ id: string;
37423742+}
37433743+type ResponseFunctionToolCallOutputItem = {
37443744+ id: string;
37453745+ call_id: string;
37463746+ output: string | Array<ResponseInputText | ResponseInputImage>;
37473747+ type: "function_call_output";
37483748+ status?: "in_progress" | "completed" | "incomplete";
37493749+};
37503750+type ResponseIncludable = "message.input_image.image_url" | "message.output_text.logprobs";
37513751+type ResponseIncompleteEvent = {
37523752+ response: Response;
37533753+ sequence_number: number;
37543754+ type: "response.incomplete";
37553755+};
37563756+type ResponseInput = Array<ResponseInputItem>;
37573757+type ResponseInputContent = ResponseInputText | ResponseInputImage;
37583758+type ResponseInputImage = {
37593759+ detail: "low" | "high" | "auto";
37603760+ type: "input_image";
37613761+ /**
37623762+ * Base64 encoded image
37633763+ */
37643764+ image_url?: string | null;
37653765+};
37663766+type ResponseInputImageContent = {
37673767+ type: "input_image";
37683768+ detail?: "low" | "high" | "auto" | null;
37693769+ /**
37703770+ * Base64 encoded image
37713771+ */
37723772+ image_url?: string | null;
37733773+};
37743774+type ResponseInputItem = EasyInputMessage | ResponseInputItemMessage | ResponseOutputMessage | ResponseFunctionToolCall | ResponseInputItemFunctionCallOutput | ResponseReasoningItem;
37753775+type ResponseInputItemFunctionCallOutput = {
37763776+ call_id: string;
37773777+ output: string | ResponseFunctionCallOutputItemList;
37783778+ type: "function_call_output";
37793779+ id?: string | null;
37803780+ status?: "in_progress" | "completed" | "incomplete" | null;
37813781+};
37823782+type ResponseInputItemMessage = {
37833783+ content: ResponseInputMessageContentList;
37843784+ role: "user" | "system" | "developer";
37853785+ status?: "in_progress" | "completed" | "incomplete";
37863786+ type?: "message";
37873787+};
37883788+type ResponseInputMessageContentList = Array<ResponseInputContent>;
37893789+type ResponseInputMessageItem = {
37903790+ id: string;
37913791+ content: ResponseInputMessageContentList;
37923792+ role: "user" | "system" | "developer";
37933793+ status?: "in_progress" | "completed" | "incomplete";
37943794+ type?: "message";
37953795+};
37963796+type ResponseInputText = {
37973797+ text: string;
37983798+ type: "input_text";
37993799+};
38003800+type ResponseInputTextContent = {
38013801+ text: string;
38023802+ type: "input_text";
38033803+};
38043804+type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem;
38053805+type ResponseOutputItem = ResponseOutputMessage | ResponseFunctionToolCall | ResponseReasoningItem;
38063806+type ResponseOutputItemAddedEvent = {
38073807+ item: ResponseOutputItem;
38083808+ output_index: number;
38093809+ sequence_number: number;
38103810+ type: "response.output_item.added";
38113811+};
38123812+type ResponseOutputItemDoneEvent = {
38133813+ item: ResponseOutputItem;
38143814+ output_index: number;
38153815+ sequence_number: number;
38163816+ type: "response.output_item.done";
38173817+};
38183818+type ResponseOutputMessage = {
38193819+ id: string;
38203820+ content: Array<ResponseOutputText | ResponseOutputRefusal>;
38213821+ role: "assistant";
38223822+ status: "in_progress" | "completed" | "incomplete";
38233823+ type: "message";
38243824+};
38253825+type ResponseOutputRefusal = {
38263826+ refusal: string;
38273827+ type: "refusal";
38283828+};
38293829+type ResponseOutputText = {
38303830+ text: string;
38313831+ type: "output_text";
38323832+ logprobs?: Array<Logprob>;
38333833+};
38343834+type ResponseReasoningItem = {
38353835+ id: string;
38363836+ summary: Array<ResponseReasoningSummaryItem>;
38373837+ type: "reasoning";
38383838+ content?: Array<ResponseReasoningContentItem>;
38393839+ encrypted_content?: string | null;
38403840+ status?: "in_progress" | "completed" | "incomplete";
38413841+};
38423842+type ResponseReasoningSummaryItem = {
38433843+ text: string;
38443844+ type: "summary_text";
38453845+};
38463846+type ResponseReasoningContentItem = {
38473847+ text: string;
38483848+ type: "reasoning_text";
38493849+};
38503850+type ResponseReasoningTextDeltaEvent = {
38513851+ content_index: number;
38523852+ delta: string;
38533853+ item_id: string;
38543854+ output_index: number;
38553855+ sequence_number: number;
38563856+ type: "response.reasoning_text.delta";
38573857+};
38583858+type ResponseReasoningTextDoneEvent = {
38593859+ content_index: number;
38603860+ item_id: string;
38613861+ output_index: number;
38623862+ sequence_number: number;
38633863+ text: string;
38643864+ type: "response.reasoning_text.done";
38653865+};
38663866+type ResponseRefusalDeltaEvent = {
38673867+ content_index: number;
38683868+ delta: string;
38693869+ item_id: string;
38703870+ output_index: number;
38713871+ sequence_number: number;
38723872+ type: "response.refusal.delta";
38733873+};
38743874+type ResponseRefusalDoneEvent = {
38753875+ content_index: number;
38763876+ item_id: string;
38773877+ output_index: number;
38783878+ refusal: string;
38793879+ sequence_number: number;
38803880+ type: "response.refusal.done";
38813881+};
38823882+type ResponseStatus = "completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete";
38833883+type ResponseStreamEvent = ResponseCompletedEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent;
38843884+type ResponseCompletedEvent = {
38853885+ response: Response;
38863886+ sequence_number: number;
38873887+ type: "response.completed";
38883888+};
38893889+type ResponseTextConfig = {
38903890+ format?: ResponseFormatTextConfig;
38913891+ verbosity?: "low" | "medium" | "high" | null;
38923892+};
38933893+type ResponseTextDeltaEvent = {
38943894+ content_index: number;
38953895+ delta: string;
38963896+ item_id: string;
38973897+ logprobs: Array<Logprob>;
38983898+ output_index: number;
38993899+ sequence_number: number;
39003900+ type: "response.output_text.delta";
39013901+};
39023902+type ResponseTextDoneEvent = {
39033903+ content_index: number;
39043904+ item_id: string;
39053905+ logprobs: Array<Logprob>;
39063906+ output_index: number;
39073907+ sequence_number: number;
39083908+ text: string;
39093909+ type: "response.output_text.done";
39103910+};
39113911+type Logprob = {
39123912+ token: string;
39133913+ logprob: number;
39143914+ top_logprobs?: Array<TopLogprob>;
39153915+};
39163916+type TopLogprob = {
39173917+ token?: string;
39183918+ logprob?: number;
39193919+};
39203920+type ResponseUsage = {
39213921+ input_tokens: number;
39223922+ output_tokens: number;
39233923+ total_tokens: number;
39243924+};
39253925+type Tool = ResponsesFunctionTool;
39263926+type ToolChoiceFunction = {
39273927+ name: string;
39283928+ type: "function";
39293929+};
39303930+type ToolChoiceOptions = "none";
39313931+type ReasoningEffort = "minimal" | "low" | "medium" | "high" | null;
39323932+type StreamOptions = {
39333933+ include_obfuscation?: boolean;
39343934+};
27253935type Ai_Cf_Baai_Bge_Base_En_V1_5_Input = {
27263936 text: string | string[];
27273937 /**
···27503960 * The pooling method used in the embedding process.
27513961 */
27523962 pooling?: "mean" | "cls";
27532753-} | AsyncResponse;
27542754-interface AsyncResponse {
39633963+} | Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse;
39643964+interface Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse {
27553965 /**
27563966 * The async request id that can be used to obtain the results.
27573967 */
···28274037 * The translated text in the target language
28284038 */
28294039 translated_text?: string;
28302830-} | AsyncResponse;
40404040+} | Ai_Cf_Meta_M2M100_1_2B_AsyncResponse;
40414041+interface Ai_Cf_Meta_M2M100_1_2B_AsyncResponse {
40424042+ /**
40434043+ * The async request id that can be used to obtain the results.
40444044+ */
40454045+ request_id?: string;
40464046+}
28314047declare abstract class Base_Ai_Cf_Meta_M2M100_1_2B {
28324048 inputs: Ai_Cf_Meta_M2M100_1_2B_Input;
28334049 postProcessedOutputs: Ai_Cf_Meta_M2M100_1_2B_Output;
···28604076 * The pooling method used in the embedding process.
28614077 */
28624078 pooling?: "mean" | "cls";
28632863-} | AsyncResponse;
40794079+} | Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse;
40804080+interface Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse {
40814081+ /**
40824082+ * The async request id that can be used to obtain the results.
40834083+ */
40844084+ request_id?: string;
40854085+}
28644086declare abstract class Base_Ai_Cf_Baai_Bge_Small_En_V1_5 {
28654087 inputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Input;
28664088 postProcessedOutputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Output;
···28934115 * The pooling method used in the embedding process.
28944116 */
28954117 pooling?: "mean" | "cls";
28962896-} | AsyncResponse;
41184118+} | Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse;
41194119+interface Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse {
41204120+ /**
41214121+ * The async request id that can be used to obtain the results.
41224122+ */
41234123+ request_id?: string;
41244124+}
28974125declare abstract class Base_Ai_Cf_Baai_Bge_Large_En_V1_5 {
28984126 inputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Input;
28994127 postProcessedOutputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Output;
···30794307 inputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input;
30804308 postProcessedOutputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output;
30814309}
30823082-type Ai_Cf_Baai_Bge_M3_Input = BGEM3InputQueryAndContexts | BGEM3InputEmbedding | {
43104310+type Ai_Cf_Baai_Bge_M3_Input = Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts | Ai_Cf_Baai_Bge_M3_Input_Embedding | {
30834311 /**
30844312 * Batch of the embeddings requests to run using async-queue
30854313 */
30863086- requests: (BGEM3InputQueryAndContexts1 | BGEM3InputEmbedding1)[];
43144314+ requests: (Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 | Ai_Cf_Baai_Bge_M3_Input_Embedding_1)[];
30874315};
30883088-interface BGEM3InputQueryAndContexts {
43164316+interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts {
30894317 /**
30904318 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts
30914319 */
···31044332 */
31054333 truncate_inputs?: boolean;
31064334}
31073107-interface BGEM3InputEmbedding {
43354335+interface Ai_Cf_Baai_Bge_M3_Input_Embedding {
31084336 text: string | string[];
31094337 /**
31104338 * When provided with too long context should the model error out or truncate the context to fit?
31114339 */
31124340 truncate_inputs?: boolean;
31134341}
31143114-interface BGEM3InputQueryAndContexts1 {
43424342+interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 {
31154343 /**
31164344 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts
31174345 */
···31304358 */
31314359 truncate_inputs?: boolean;
31324360}
31333133-interface BGEM3InputEmbedding1 {
43614361+interface Ai_Cf_Baai_Bge_M3_Input_Embedding_1 {
31344362 text: string | string[];
31354363 /**
31364364 * When provided with too long context should the model error out or truncate the context to fit?
31374365 */
31384366 truncate_inputs?: boolean;
31394367}
31403140-type Ai_Cf_Baai_Bge_M3_Output = BGEM3OuputQuery | BGEM3OutputEmbeddingForContexts | BGEM3OuputEmbedding | AsyncResponse;
31413141-interface BGEM3OuputQuery {
43684368+type Ai_Cf_Baai_Bge_M3_Output = Ai_Cf_Baai_Bge_M3_Ouput_Query | Ai_Cf_Baai_Bge_M3_Output_EmbeddingFor_Contexts | Ai_Cf_Baai_Bge_M3_Ouput_Embedding | Ai_Cf_Baai_Bge_M3_AsyncResponse;
43694369+interface Ai_Cf_Baai_Bge_M3_Ouput_Query {
31424370 response?: {
31434371 /**
31444372 * Index of the context in the request
···31504378 score?: number;
31514379 }[];
31524380}
31533153-interface BGEM3OutputEmbeddingForContexts {
43814381+interface Ai_Cf_Baai_Bge_M3_Output_EmbeddingFor_Contexts {
31544382 response?: number[][];
31554383 shape?: number[];
31564384 /**
···31584386 */
31594387 pooling?: "mean" | "cls";
31604388}
31613161-interface BGEM3OuputEmbedding {
43894389+interface Ai_Cf_Baai_Bge_M3_Ouput_Embedding {
31624390 shape?: number[];
31634391 /**
31644392 * Embeddings of the requested text values
···31684396 * The pooling method used in the embedding process.
31694397 */
31704398 pooling?: "mean" | "cls";
43994399+}
44004400+interface Ai_Cf_Baai_Bge_M3_AsyncResponse {
44014401+ /**
44024402+ * The async request id that can be used to obtain the results.
44034403+ */
44044404+ request_id?: string;
31714405}
31724406declare abstract class Base_Ai_Cf_Baai_Bge_M3 {
31734407 inputs: Ai_Cf_Baai_Bge_M3_Input;
···31934427 inputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input;
31944428 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Output;
31954429}
31963196-type Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input = Prompt | Messages;
31973197-interface Prompt {
44304430+type Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input = Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Prompt | Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Messages;
44314431+interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Prompt {
31984432 /**
31994433 * The input text prompt for the model to generate a response.
32004434 */
···32454479 */
32464480 lora?: string;
32474481}
32483248-interface Messages {
44824482+interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Messages {
32494483 /**
32504484 * An array of message objects representing the conversation history.
32514485 */
···34364670 inputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input;
34374671 postProcessedOutputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Output;
34384672}
34393439-type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input = Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt | Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages | AsyncBatch;
34403440-interface Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt {
46734673+type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input = Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Async_Batch;
46744674+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt {
34414675 /**
34424676 * The input text prompt for the model to generate a response.
34434677 */
···34464680 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
34474681 */
34484682 lora?: string;
34493449- response_format?: JSONMode;
46834683+ response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode;
34504684 /**
34514685 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
34524686 */
···34884722 */
34894723 presence_penalty?: number;
34904724}
34913491-interface JSONMode {
47254725+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode {
34924726 type?: "json_object" | "json_schema";
34934727 json_schema?: unknown;
34944728}
34953495-interface Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages {
47294729+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages {
34964730 /**
34974731 * An array of message objects representing the conversation history.
34984732 */
···35974831 };
35984832 };
35994833 })[];
36003600- response_format?: JSONMode;
48344834+ response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1;
36014835 /**
36024836 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
36034837 */
···36394873 */
36404874 presence_penalty?: number;
36414875}
36423642-interface AsyncBatch {
48764876+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1 {
48774877+ type?: "json_object" | "json_schema";
48784878+ json_schema?: unknown;
48794879+}
48804880+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Async_Batch {
36434881 requests?: {
36444882 /**
36454883 * User-supplied reference. This field will be present in the response as well it can be used to reference the request and response. It's NOT validated to be unique.
···36814919 * Increases the likelihood of the model introducing new topics.
36824920 */
36834921 presence_penalty?: number;
36843684- response_format?: JSONMode;
49224922+ response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2;
36854923 }[];
36864924}
49254925+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2 {
49264926+ type?: "json_object" | "json_schema";
49274927+ json_schema?: unknown;
49284928+}
36874929type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output = {
36884930 /**
36894931 * The generated text response from the model
···37194961 */
37204962 name?: string;
37214963 }[];
37223722-} | AsyncResponse;
49644964+} | string | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse;
49654965+interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse {
49664966+ /**
49674967+ * The async request id that can be used to obtain the results.
49684968+ */
49694969+ request_id?: string;
49704970+}
37234971declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast {
37244972 inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input;
37254973 postProcessedOutputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output;
···37935041 /**
37945042 * A query you wish to perform against the provided contexts.
37955043 */
37963796- query: string;
37975044 /**
37985045 * Number of returned results starting with the best score.
37995046 */
···38245071 inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input;
38255072 postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output;
38265073}
38273827-type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input = Qwen2_5_Coder_32B_Instruct_Prompt | Qwen2_5_Coder_32B_Instruct_Messages;
38283828-interface Qwen2_5_Coder_32B_Instruct_Prompt {
50745074+type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input = Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Prompt | Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Messages;
50755075+interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Prompt {
38295076 /**
38305077 * The input text prompt for the model to generate a response.
38315078 */
···38345081 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
38355082 */
38365083 lora?: string;
38373837- response_format?: JSONMode;
50845084+ response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode;
38385085 /**
38395086 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
38405087 */
···38765123 */
38775124 presence_penalty?: number;
38785125}
38793879-interface Qwen2_5_Coder_32B_Instruct_Messages {
51265126+interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode {
51275127+ type?: "json_object" | "json_schema";
51285128+ json_schema?: unknown;
51295129+}
51305130+interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Messages {
38805131 /**
38815132 * An array of message objects representing the conversation history.
38825133 */
···39815232 };
39825233 };
39835234 })[];
39843984- response_format?: JSONMode;
52355235+ response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1;
39855236 /**
39865237 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
39875238 */
···40235274 */
40245275 presence_penalty?: number;
40255276}
52775277+interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1 {
52785278+ type?: "json_object" | "json_schema";
52795279+ json_schema?: unknown;
52805280+}
40265281type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output = {
40275282 /**
40285283 * The generated text response from the model
···40635318 inputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input;
40645319 postProcessedOutputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output;
40655320}
40664066-type Ai_Cf_Qwen_Qwq_32B_Input = Qwen_Qwq_32B_Prompt | Qwen_Qwq_32B_Messages;
40674067-interface Qwen_Qwq_32B_Prompt {
53215321+type Ai_Cf_Qwen_Qwq_32B_Input = Ai_Cf_Qwen_Qwq_32B_Prompt | Ai_Cf_Qwen_Qwq_32B_Messages;
53225322+interface Ai_Cf_Qwen_Qwq_32B_Prompt {
40685323 /**
40695324 * The input text prompt for the model to generate a response.
40705325 */
···41145369 */
41155370 presence_penalty?: number;
41165371}
41174117-interface Qwen_Qwq_32B_Messages {
53725372+interface Ai_Cf_Qwen_Qwq_32B_Messages {
41185373 /**
41195374 * An array of message objects representing the conversation history.
41205375 */
···43295584 inputs: Ai_Cf_Qwen_Qwq_32B_Input;
43305585 postProcessedOutputs: Ai_Cf_Qwen_Qwq_32B_Output;
43315586}
43324332-type Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input = Mistral_Small_3_1_24B_Instruct_Prompt | Mistral_Small_3_1_24B_Instruct_Messages;
43334333-interface Mistral_Small_3_1_24B_Instruct_Prompt {
55875587+type Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input = Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Prompt | Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Messages;
55885588+interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Prompt {
43345589 /**
43355590 * The input text prompt for the model to generate a response.
43365591 */
···43805635 */
43815636 presence_penalty?: number;
43825637}
43834383-interface Mistral_Small_3_1_24B_Instruct_Messages {
56385638+interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Messages {
43845639 /**
43855640 * An array of message objects representing the conversation history.
43865641 */
···45955850 inputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input;
45965851 postProcessedOutputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output;
45975852}
45984598-type Ai_Cf_Google_Gemma_3_12B_It_Input = Google_Gemma_3_12B_It_Prompt | Google_Gemma_3_12B_It_Messages;
45994599-interface Google_Gemma_3_12B_It_Prompt {
58535853+type Ai_Cf_Google_Gemma_3_12B_It_Input = Ai_Cf_Google_Gemma_3_12B_It_Prompt | Ai_Cf_Google_Gemma_3_12B_It_Messages;
58545854+interface Ai_Cf_Google_Gemma_3_12B_It_Prompt {
46005855 /**
46015856 * The input text prompt for the model to generate a response.
46025857 */
···46465901 */
46475902 presence_penalty?: number;
46485903}
46494649-interface Google_Gemma_3_12B_It_Messages {
59045904+interface Ai_Cf_Google_Gemma_3_12B_It_Messages {
46505905 /**
46515906 * An array of message objects representing the conversation history.
46525907 */
···46675922 */
46685923 url?: string;
46695924 };
46704670- }[] | {
46714671- /**
46724672- * Type of the content provided
46734673- */
46744674- type?: string;
46754675- text?: string;
46764676- image_url?: {
46774677- /**
46784678- * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
46794679- */
46804680- url?: string;
46814681- };
46824682- };
59255925+ }[];
46835926 }[];
46845927 functions?: {
46855928 name: string;
···48576100 inputs: Ai_Cf_Google_Gemma_3_12B_It_Input;
48586101 postProcessedOutputs: Ai_Cf_Google_Gemma_3_12B_It_Output;
48596102}
48604860-type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input = Ai_Cf_Meta_Llama_4_Prompt | Ai_Cf_Meta_Llama_4_Messages;
48614861-interface Ai_Cf_Meta_Llama_4_Prompt {
61036103+type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input = Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Async_Batch;
61046104+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt {
48626105 /**
48636106 * The input text prompt for the model to generate a response.
48646107 */
···48676110 * JSON schema that should be fulfilled for the response.
48686111 */
48696112 guided_json?: object;
48704870- response_format?: JSONMode;
61136113+ response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
48716114 /**
48726115 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
48736116 */
···49096152 */
49106153 presence_penalty?: number;
49116154}
49124912-interface Ai_Cf_Meta_Llama_4_Messages {
61556155+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode {
61566156+ type?: "json_object" | "json_schema";
61576157+ json_schema?: unknown;
61586158+}
61596159+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages {
49136160 /**
49146161 * An array of message objects representing the conversation history.
49156162 */
···50396286 };
50406287 };
50416288 })[];
50425042- response_format?: JSONMode;
62896289+ response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
62906290+ /**
62916291+ * JSON schema that should be fufilled for the response.
62926292+ */
62936293+ guided_json?: object;
62946294+ /**
62956295+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
62966296+ */
62976297+ raw?: boolean;
62986298+ /**
62996299+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
63006300+ */
63016301+ stream?: boolean;
63026302+ /**
63036303+ * The maximum number of tokens to generate in the response.
63046304+ */
63056305+ max_tokens?: number;
63066306+ /**
63076307+ * Controls the randomness of the output; higher values produce more random results.
63086308+ */
63096309+ temperature?: number;
63106310+ /**
63116311+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
63126312+ */
63136313+ top_p?: number;
63146314+ /**
63156315+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
63166316+ */
63176317+ top_k?: number;
63186318+ /**
63196319+ * Random seed for reproducibility of the generation.
63206320+ */
63216321+ seed?: number;
63226322+ /**
63236323+ * Penalty for repeated tokens; higher values discourage repetition.
63246324+ */
63256325+ repetition_penalty?: number;
63266326+ /**
63276327+ * Decreases the likelihood of the model repeating the same lines verbatim.
63286328+ */
63296329+ frequency_penalty?: number;
63306330+ /**
63316331+ * Increases the likelihood of the model introducing new topics.
63326332+ */
63336333+ presence_penalty?: number;
63346334+}
63356335+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Async_Batch {
63366336+ requests: (Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner)[];
63376337+}
63386338+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner {
63396339+ /**
63406340+ * The input text prompt for the model to generate a response.
63416341+ */
63426342+ prompt: string;
63436343+ /**
63446344+ * JSON schema that should be fulfilled for the response.
63456345+ */
63466346+ guided_json?: object;
63476347+ response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
63486348+ /**
63496349+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
63506350+ */
63516351+ raw?: boolean;
63526352+ /**
63536353+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
63546354+ */
63556355+ stream?: boolean;
63566356+ /**
63576357+ * The maximum number of tokens to generate in the response.
63586358+ */
63596359+ max_tokens?: number;
63606360+ /**
63616361+ * Controls the randomness of the output; higher values produce more random results.
63626362+ */
63636363+ temperature?: number;
63646364+ /**
63656365+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
63666366+ */
63676367+ top_p?: number;
63686368+ /**
63696369+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
63706370+ */
63716371+ top_k?: number;
63726372+ /**
63736373+ * Random seed for reproducibility of the generation.
63746374+ */
63756375+ seed?: number;
63766376+ /**
63776377+ * Penalty for repeated tokens; higher values discourage repetition.
63786378+ */
63796379+ repetition_penalty?: number;
63806380+ /**
63816381+ * Decreases the likelihood of the model repeating the same lines verbatim.
63826382+ */
63836383+ frequency_penalty?: number;
63846384+ /**
63856385+ * Increases the likelihood of the model introducing new topics.
63866386+ */
63876387+ presence_penalty?: number;
63886388+}
63896389+interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner {
63906390+ /**
63916391+ * An array of message objects representing the conversation history.
63926392+ */
63936393+ messages: {
63946394+ /**
63956395+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
63966396+ */
63976397+ role?: string;
63986398+ /**
63996399+ * The tool call id. If you don't know what to put here you can fall back to 000000001
64006400+ */
64016401+ tool_call_id?: string;
64026402+ content?: string | {
64036403+ /**
64046404+ * Type of the content provided
64056405+ */
64066406+ type?: string;
64076407+ text?: string;
64086408+ image_url?: {
64096409+ /**
64106410+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
64116411+ */
64126412+ url?: string;
64136413+ };
64146414+ }[] | {
64156415+ /**
64166416+ * Type of the content provided
64176417+ */
64186418+ type?: string;
64196419+ text?: string;
64206420+ image_url?: {
64216421+ /**
64226422+ * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted
64236423+ */
64246424+ url?: string;
64256425+ };
64266426+ };
64276427+ }[];
64286428+ functions?: {
64296429+ name: string;
64306430+ code: string;
64316431+ }[];
64326432+ /**
64336433+ * A list of tools available for the assistant to use.
64346434+ */
64356435+ tools?: ({
64366436+ /**
64376437+ * The name of the tool. More descriptive the better.
64386438+ */
64396439+ name: string;
64406440+ /**
64416441+ * A brief description of what the tool does.
64426442+ */
64436443+ description: string;
64446444+ /**
64456445+ * Schema defining the parameters accepted by the tool.
64466446+ */
64476447+ parameters: {
64486448+ /**
64496449+ * The type of the parameters object (usually 'object').
64506450+ */
64516451+ type: string;
64526452+ /**
64536453+ * List of required parameter names.
64546454+ */
64556455+ required?: string[];
64566456+ /**
64576457+ * Definitions of each parameter.
64586458+ */
64596459+ properties: {
64606460+ [k: string]: {
64616461+ /**
64626462+ * The data type of the parameter.
64636463+ */
64646464+ type: string;
64656465+ /**
64666466+ * A description of the expected parameter.
64676467+ */
64686468+ description: string;
64696469+ };
64706470+ };
64716471+ };
64726472+ } | {
64736473+ /**
64746474+ * Specifies the type of tool (e.g., 'function').
64756475+ */
64766476+ type: string;
64776477+ /**
64786478+ * Details of the function tool.
64796479+ */
64806480+ function: {
64816481+ /**
64826482+ * The name of the function.
64836483+ */
64846484+ name: string;
64856485+ /**
64866486+ * A brief description of what the function does.
64876487+ */
64886488+ description: string;
64896489+ /**
64906490+ * Schema defining the parameters accepted by the function.
64916491+ */
64926492+ parameters: {
64936493+ /**
64946494+ * The type of the parameters object (usually 'object').
64956495+ */
64966496+ type: string;
64976497+ /**
64986498+ * List of required parameter names.
64996499+ */
65006500+ required?: string[];
65016501+ /**
65026502+ * Definitions of each parameter.
65036503+ */
65046504+ properties: {
65056505+ [k: string]: {
65066506+ /**
65076507+ * The data type of the parameter.
65086508+ */
65096509+ type: string;
65106510+ /**
65116511+ * A description of the expected parameter.
65126512+ */
65136513+ description: string;
65146514+ };
65156515+ };
65166516+ };
65176517+ };
65186518+ })[];
65196519+ response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode;
50436520 /**
50446521 * JSON schema that should be fufilled for the response.
50456522 */
···51386615 inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input;
51396616 postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output;
51406617}
66186618+type Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Input = Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Async_Batch;
66196619+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt {
66206620+ /**
66216621+ * The input text prompt for the model to generate a response.
66226622+ */
66236623+ prompt: string;
66246624+ /**
66256625+ * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
66266626+ */
66276627+ lora?: string;
66286628+ response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode;
66296629+ /**
66306630+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
66316631+ */
66326632+ raw?: boolean;
66336633+ /**
66346634+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
66356635+ */
66366636+ stream?: boolean;
66376637+ /**
66386638+ * The maximum number of tokens to generate in the response.
66396639+ */
66406640+ max_tokens?: number;
66416641+ /**
66426642+ * Controls the randomness of the output; higher values produce more random results.
66436643+ */
66446644+ temperature?: number;
66456645+ /**
66466646+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
66476647+ */
66486648+ top_p?: number;
66496649+ /**
66506650+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
66516651+ */
66526652+ top_k?: number;
66536653+ /**
66546654+ * Random seed for reproducibility of the generation.
66556655+ */
66566656+ seed?: number;
66576657+ /**
66586658+ * Penalty for repeated tokens; higher values discourage repetition.
66596659+ */
66606660+ repetition_penalty?: number;
66616661+ /**
66626662+ * Decreases the likelihood of the model repeating the same lines verbatim.
66636663+ */
66646664+ frequency_penalty?: number;
66656665+ /**
66666666+ * Increases the likelihood of the model introducing new topics.
66676667+ */
66686668+ presence_penalty?: number;
66696669+}
66706670+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode {
66716671+ type?: "json_object" | "json_schema";
66726672+ json_schema?: unknown;
66736673+}
66746674+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages {
66756675+ /**
66766676+ * An array of message objects representing the conversation history.
66776677+ */
66786678+ messages: {
66796679+ /**
66806680+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
66816681+ */
66826682+ role: string;
66836683+ /**
66846684+ * The content of the message as a string.
66856685+ */
66866686+ content: string;
66876687+ }[];
66886688+ functions?: {
66896689+ name: string;
66906690+ code: string;
66916691+ }[];
66926692+ /**
66936693+ * A list of tools available for the assistant to use.
66946694+ */
66956695+ tools?: ({
66966696+ /**
66976697+ * The name of the tool. More descriptive the better.
66986698+ */
66996699+ name: string;
67006700+ /**
67016701+ * A brief description of what the tool does.
67026702+ */
67036703+ description: string;
67046704+ /**
67056705+ * Schema defining the parameters accepted by the tool.
67066706+ */
67076707+ parameters: {
67086708+ /**
67096709+ * The type of the parameters object (usually 'object').
67106710+ */
67116711+ type: string;
67126712+ /**
67136713+ * List of required parameter names.
67146714+ */
67156715+ required?: string[];
67166716+ /**
67176717+ * Definitions of each parameter.
67186718+ */
67196719+ properties: {
67206720+ [k: string]: {
67216721+ /**
67226722+ * The data type of the parameter.
67236723+ */
67246724+ type: string;
67256725+ /**
67266726+ * A description of the expected parameter.
67276727+ */
67286728+ description: string;
67296729+ };
67306730+ };
67316731+ };
67326732+ } | {
67336733+ /**
67346734+ * Specifies the type of tool (e.g., 'function').
67356735+ */
67366736+ type: string;
67376737+ /**
67386738+ * Details of the function tool.
67396739+ */
67406740+ function: {
67416741+ /**
67426742+ * The name of the function.
67436743+ */
67446744+ name: string;
67456745+ /**
67466746+ * A brief description of what the function does.
67476747+ */
67486748+ description: string;
67496749+ /**
67506750+ * Schema defining the parameters accepted by the function.
67516751+ */
67526752+ parameters: {
67536753+ /**
67546754+ * The type of the parameters object (usually 'object').
67556755+ */
67566756+ type: string;
67576757+ /**
67586758+ * List of required parameter names.
67596759+ */
67606760+ required?: string[];
67616761+ /**
67626762+ * Definitions of each parameter.
67636763+ */
67646764+ properties: {
67656765+ [k: string]: {
67666766+ /**
67676767+ * The data type of the parameter.
67686768+ */
67696769+ type: string;
67706770+ /**
67716771+ * A description of the expected parameter.
67726772+ */
67736773+ description: string;
67746774+ };
67756775+ };
67766776+ };
67776777+ };
67786778+ })[];
67796779+ response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1;
67806780+ /**
67816781+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
67826782+ */
67836783+ raw?: boolean;
67846784+ /**
67856785+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
67866786+ */
67876787+ stream?: boolean;
67886788+ /**
67896789+ * The maximum number of tokens to generate in the response.
67906790+ */
67916791+ max_tokens?: number;
67926792+ /**
67936793+ * Controls the randomness of the output; higher values produce more random results.
67946794+ */
67956795+ temperature?: number;
67966796+ /**
67976797+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
67986798+ */
67996799+ top_p?: number;
68006800+ /**
68016801+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
68026802+ */
68036803+ top_k?: number;
68046804+ /**
68056805+ * Random seed for reproducibility of the generation.
68066806+ */
68076807+ seed?: number;
68086808+ /**
68096809+ * Penalty for repeated tokens; higher values discourage repetition.
68106810+ */
68116811+ repetition_penalty?: number;
68126812+ /**
68136813+ * Decreases the likelihood of the model repeating the same lines verbatim.
68146814+ */
68156815+ frequency_penalty?: number;
68166816+ /**
68176817+ * Increases the likelihood of the model introducing new topics.
68186818+ */
68196819+ presence_penalty?: number;
68206820+}
68216821+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1 {
68226822+ type?: "json_object" | "json_schema";
68236823+ json_schema?: unknown;
68246824+}
68256825+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Async_Batch {
68266826+ requests: (Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1)[];
68276827+}
68286828+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 {
68296829+ /**
68306830+ * The input text prompt for the model to generate a response.
68316831+ */
68326832+ prompt: string;
68336833+ /**
68346834+ * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
68356835+ */
68366836+ lora?: string;
68376837+ response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2;
68386838+ /**
68396839+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
68406840+ */
68416841+ raw?: boolean;
68426842+ /**
68436843+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
68446844+ */
68456845+ stream?: boolean;
68466846+ /**
68476847+ * The maximum number of tokens to generate in the response.
68486848+ */
68496849+ max_tokens?: number;
68506850+ /**
68516851+ * Controls the randomness of the output; higher values produce more random results.
68526852+ */
68536853+ temperature?: number;
68546854+ /**
68556855+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
68566856+ */
68576857+ top_p?: number;
68586858+ /**
68596859+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
68606860+ */
68616861+ top_k?: number;
68626862+ /**
68636863+ * Random seed for reproducibility of the generation.
68646864+ */
68656865+ seed?: number;
68666866+ /**
68676867+ * Penalty for repeated tokens; higher values discourage repetition.
68686868+ */
68696869+ repetition_penalty?: number;
68706870+ /**
68716871+ * Decreases the likelihood of the model repeating the same lines verbatim.
68726872+ */
68736873+ frequency_penalty?: number;
68746874+ /**
68756875+ * Increases the likelihood of the model introducing new topics.
68766876+ */
68776877+ presence_penalty?: number;
68786878+}
68796879+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2 {
68806880+ type?: "json_object" | "json_schema";
68816881+ json_schema?: unknown;
68826882+}
68836883+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1 {
68846884+ /**
68856885+ * An array of message objects representing the conversation history.
68866886+ */
68876887+ messages: {
68886888+ /**
68896889+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
68906890+ */
68916891+ role: string;
68926892+ /**
68936893+ * The content of the message as a string.
68946894+ */
68956895+ content: string;
68966896+ }[];
68976897+ functions?: {
68986898+ name: string;
68996899+ code: string;
69006900+ }[];
69016901+ /**
69026902+ * A list of tools available for the assistant to use.
69036903+ */
69046904+ tools?: ({
69056905+ /**
69066906+ * The name of the tool. More descriptive the better.
69076907+ */
69086908+ name: string;
69096909+ /**
69106910+ * A brief description of what the tool does.
69116911+ */
69126912+ description: string;
69136913+ /**
69146914+ * Schema defining the parameters accepted by the tool.
69156915+ */
69166916+ parameters: {
69176917+ /**
69186918+ * The type of the parameters object (usually 'object').
69196919+ */
69206920+ type: string;
69216921+ /**
69226922+ * List of required parameter names.
69236923+ */
69246924+ required?: string[];
69256925+ /**
69266926+ * Definitions of each parameter.
69276927+ */
69286928+ properties: {
69296929+ [k: string]: {
69306930+ /**
69316931+ * The data type of the parameter.
69326932+ */
69336933+ type: string;
69346934+ /**
69356935+ * A description of the expected parameter.
69366936+ */
69376937+ description: string;
69386938+ };
69396939+ };
69406940+ };
69416941+ } | {
69426942+ /**
69436943+ * Specifies the type of tool (e.g., 'function').
69446944+ */
69456945+ type: string;
69466946+ /**
69476947+ * Details of the function tool.
69486948+ */
69496949+ function: {
69506950+ /**
69516951+ * The name of the function.
69526952+ */
69536953+ name: string;
69546954+ /**
69556955+ * A brief description of what the function does.
69566956+ */
69576957+ description: string;
69586958+ /**
69596959+ * Schema defining the parameters accepted by the function.
69606960+ */
69616961+ parameters: {
69626962+ /**
69636963+ * The type of the parameters object (usually 'object').
69646964+ */
69656965+ type: string;
69666966+ /**
69676967+ * List of required parameter names.
69686968+ */
69696969+ required?: string[];
69706970+ /**
69716971+ * Definitions of each parameter.
69726972+ */
69736973+ properties: {
69746974+ [k: string]: {
69756975+ /**
69766976+ * The data type of the parameter.
69776977+ */
69786978+ type: string;
69796979+ /**
69806980+ * A description of the expected parameter.
69816981+ */
69826982+ description: string;
69836983+ };
69846984+ };
69856985+ };
69866986+ };
69876987+ })[];
69886988+ response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3;
69896989+ /**
69906990+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
69916991+ */
69926992+ raw?: boolean;
69936993+ /**
69946994+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
69956995+ */
69966996+ stream?: boolean;
69976997+ /**
69986998+ * The maximum number of tokens to generate in the response.
69996999+ */
70007000+ max_tokens?: number;
70017001+ /**
70027002+ * Controls the randomness of the output; higher values produce more random results.
70037003+ */
70047004+ temperature?: number;
70057005+ /**
70067006+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
70077007+ */
70087008+ top_p?: number;
70097009+ /**
70107010+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
70117011+ */
70127012+ top_k?: number;
70137013+ /**
70147014+ * Random seed for reproducibility of the generation.
70157015+ */
70167016+ seed?: number;
70177017+ /**
70187018+ * Penalty for repeated tokens; higher values discourage repetition.
70197019+ */
70207020+ repetition_penalty?: number;
70217021+ /**
70227022+ * Decreases the likelihood of the model repeating the same lines verbatim.
70237023+ */
70247024+ frequency_penalty?: number;
70257025+ /**
70267026+ * Increases the likelihood of the model introducing new topics.
70277027+ */
70287028+ presence_penalty?: number;
70297029+}
70307030+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3 {
70317031+ type?: "json_object" | "json_schema";
70327032+ json_schema?: unknown;
70337033+}
70347034+type Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Output = Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Chat_Completion_Response | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Text_Completion_Response | string | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_AsyncResponse;
70357035+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Chat_Completion_Response {
70367036+ /**
70377037+ * Unique identifier for the completion
70387038+ */
70397039+ id?: string;
70407040+ /**
70417041+ * Object type identifier
70427042+ */
70437043+ object?: "chat.completion";
70447044+ /**
70457045+ * Unix timestamp of when the completion was created
70467046+ */
70477047+ created?: number;
70487048+ /**
70497049+ * Model used for the completion
70507050+ */
70517051+ model?: string;
70527052+ /**
70537053+ * List of completion choices
70547054+ */
70557055+ choices?: {
70567056+ /**
70577057+ * Index of the choice in the list
70587058+ */
70597059+ index?: number;
70607060+ /**
70617061+ * The message generated by the model
70627062+ */
70637063+ message?: {
70647064+ /**
70657065+ * Role of the message author
70667066+ */
70677067+ role: string;
70687068+ /**
70697069+ * The content of the message
70707070+ */
70717071+ content: string;
70727072+ /**
70737073+ * Internal reasoning content (if available)
70747074+ */
70757075+ reasoning_content?: string;
70767076+ /**
70777077+ * Tool calls made by the assistant
70787078+ */
70797079+ tool_calls?: {
70807080+ /**
70817081+ * Unique identifier for the tool call
70827082+ */
70837083+ id: string;
70847084+ /**
70857085+ * Type of tool call
70867086+ */
70877087+ type: "function";
70887088+ function: {
70897089+ /**
70907090+ * Name of the function to call
70917091+ */
70927092+ name: string;
70937093+ /**
70947094+ * JSON string of arguments for the function
70957095+ */
70967096+ arguments: string;
70977097+ };
70987098+ }[];
70997099+ };
71007100+ /**
71017101+ * Reason why the model stopped generating
71027102+ */
71037103+ finish_reason?: string;
71047104+ /**
71057105+ * Stop reason (may be null)
71067106+ */
71077107+ stop_reason?: string | null;
71087108+ /**
71097109+ * Log probabilities (if requested)
71107110+ */
71117111+ logprobs?: {} | null;
71127112+ }[];
71137113+ /**
71147114+ * Usage statistics for the inference request
71157115+ */
71167116+ usage?: {
71177117+ /**
71187118+ * Total number of tokens in input
71197119+ */
71207120+ prompt_tokens?: number;
71217121+ /**
71227122+ * Total number of tokens in output
71237123+ */
71247124+ completion_tokens?: number;
71257125+ /**
71267126+ * Total number of input and output tokens
71277127+ */
71287128+ total_tokens?: number;
71297129+ };
71307130+ /**
71317131+ * Log probabilities for the prompt (if requested)
71327132+ */
71337133+ prompt_logprobs?: {} | null;
71347134+}
71357135+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Text_Completion_Response {
71367136+ /**
71377137+ * Unique identifier for the completion
71387138+ */
71397139+ id?: string;
71407140+ /**
71417141+ * Object type identifier
71427142+ */
71437143+ object?: "text_completion";
71447144+ /**
71457145+ * Unix timestamp of when the completion was created
71467146+ */
71477147+ created?: number;
71487148+ /**
71497149+ * Model used for the completion
71507150+ */
71517151+ model?: string;
71527152+ /**
71537153+ * List of completion choices
71547154+ */
71557155+ choices?: {
71567156+ /**
71577157+ * Index of the choice in the list
71587158+ */
71597159+ index: number;
71607160+ /**
71617161+ * The generated text completion
71627162+ */
71637163+ text: string;
71647164+ /**
71657165+ * Reason why the model stopped generating
71667166+ */
71677167+ finish_reason: string;
71687168+ /**
71697169+ * Stop reason (may be null)
71707170+ */
71717171+ stop_reason?: string | null;
71727172+ /**
71737173+ * Log probabilities (if requested)
71747174+ */
71757175+ logprobs?: {} | null;
71767176+ /**
71777177+ * Log probabilities for the prompt (if requested)
71787178+ */
71797179+ prompt_logprobs?: {} | null;
71807180+ }[];
71817181+ /**
71827182+ * Usage statistics for the inference request
71837183+ */
71847184+ usage?: {
71857185+ /**
71867186+ * Total number of tokens in input
71877187+ */
71887188+ prompt_tokens?: number;
71897189+ /**
71907190+ * Total number of tokens in output
71917191+ */
71927192+ completion_tokens?: number;
71937193+ /**
71947194+ * Total number of input and output tokens
71957195+ */
71967196+ total_tokens?: number;
71977197+ };
71987198+}
71997199+interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_AsyncResponse {
72007200+ /**
72017201+ * The async request id that can be used to obtain the results.
72027202+ */
72037203+ request_id?: string;
72047204+}
72057205+declare abstract class Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8 {
72067206+ inputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Input;
72077207+ postProcessedOutputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Output;
72087208+}
72097209+interface Ai_Cf_Deepgram_Nova_3_Input {
72107210+ audio: {
72117211+ body: object;
72127212+ contentType: string;
72137213+ };
72147214+ /**
72157215+ * Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param.
72167216+ */
72177217+ custom_topic_mode?: "extended" | "strict";
72187218+ /**
72197219+ * Custom topics you want the model to detect within your input audio or text if present Submit up to 100
72207220+ */
72217221+ custom_topic?: string;
72227222+ /**
72237223+ * Sets how the model will interpret intents submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param
72247224+ */
72257225+ custom_intent_mode?: "extended" | "strict";
72267226+ /**
72277227+ * Custom intents you want the model to detect within your input audio if present
72287228+ */
72297229+ custom_intent?: string;
72307230+ /**
72317231+ * Identifies and extracts key entities from content in submitted audio
72327232+ */
72337233+ detect_entities?: boolean;
72347234+ /**
72357235+ * Identifies the dominant language spoken in submitted audio
72367236+ */
72377237+ detect_language?: boolean;
72387238+ /**
72397239+ * Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0
72407240+ */
72417241+ diarize?: boolean;
72427242+ /**
72437243+ * Identify and extract key entities from content in submitted audio
72447244+ */
72457245+ dictation?: boolean;
72467246+ /**
72477247+ * Specify the expected encoding of your submitted audio
72487248+ */
72497249+ encoding?: "linear16" | "flac" | "mulaw" | "amr-nb" | "amr-wb" | "opus" | "speex" | "g729";
72507250+ /**
72517251+ * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing
72527252+ */
72537253+ extra?: string;
72547254+ /**
72557255+ * Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um'
72567256+ */
72577257+ filler_words?: boolean;
72587258+ /**
72597259+ * Key term prompting can boost or suppress specialized terminology and brands.
72607260+ */
72617261+ keyterm?: string;
72627262+ /**
72637263+ * Keywords can boost or suppress specialized terminology and brands.
72647264+ */
72657265+ keywords?: string;
72667266+ /**
72677267+ * The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available.
72687268+ */
72697269+ language?: string;
72707270+ /**
72717271+ * Spoken measurements will be converted to their corresponding abbreviations.
72727272+ */
72737273+ measurements?: boolean;
72747274+ /**
72757275+ * Opts out requests from the Deepgram Model Improvement Program. Refer to our Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip.
72767276+ */
72777277+ mip_opt_out?: boolean;
72787278+ /**
72797279+ * Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio
72807280+ */
72817281+ mode?: "general" | "medical" | "finance";
72827282+ /**
72837283+ * Transcribe each audio channel independently.
72847284+ */
72857285+ multichannel?: boolean;
72867286+ /**
72877287+ * Numerals converts numbers from written format to numerical format.
72887288+ */
72897289+ numerals?: boolean;
72907290+ /**
72917291+ * Splits audio into paragraphs to improve transcript readability.
72927292+ */
72937293+ paragraphs?: boolean;
72947294+ /**
72957295+ * Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely.
72967296+ */
72977297+ profanity_filter?: boolean;
72987298+ /**
72997299+ * Add punctuation and capitalization to the transcript.
73007300+ */
73017301+ punctuate?: boolean;
73027302+ /**
73037303+ * Redaction removes sensitive information from your transcripts.
73047304+ */
73057305+ redact?: string;
73067306+ /**
73077307+ * Search for terms or phrases in submitted audio and replaces them.
73087308+ */
73097309+ replace?: string;
73107310+ /**
73117311+ * Search for terms or phrases in submitted audio.
73127312+ */
73137313+ search?: string;
73147314+ /**
73157315+ * Recognizes the sentiment throughout a transcript or text.
73167316+ */
73177317+ sentiment?: boolean;
73187318+ /**
73197319+ * Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability.
73207320+ */
73217321+ smart_format?: boolean;
73227322+ /**
73237323+ * Detect topics throughout a transcript or text.
73247324+ */
73257325+ topics?: boolean;
73267326+ /**
73277327+ * Segments speech into meaningful semantic units.
73287328+ */
73297329+ utterances?: boolean;
73307330+ /**
73317331+ * Seconds to wait before detecting a pause between words in submitted audio.
73327332+ */
73337333+ utt_split?: number;
73347334+ /**
73357335+ * The number of channels in the submitted audio
73367336+ */
73377337+ channels?: number;
73387338+ /**
73397339+ * Specifies whether the streaming endpoint should provide ongoing transcription updates as more audio is received. When set to true, the endpoint sends continuous updates, meaning transcription results may evolve over time. Note: Supported only for webosockets.
73407340+ */
73417341+ interim_results?: boolean;
73427342+ /**
73437343+ * Indicates how long model will wait to detect whether a speaker has finished speaking or pauses for a significant period of time. When set to a value, the streaming endpoint immediately finalizes the transcription for the processed time range and returns the transcript with a speech_final parameter set to true. Can also be set to false to disable endpointing
73447344+ */
73457345+ endpointing?: string;
73467346+ /**
73477347+ * Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets.
73487348+ */
73497349+ vad_events?: boolean;
73507350+ /**
73517351+ * Indicates how long model will wait to send an UtteranceEnd message after a word has been transcribed. Use with interim_results. Note: Supported only for webosockets.
73527352+ */
73537353+ utterance_end_ms?: boolean;
73547354+}
73557355+interface Ai_Cf_Deepgram_Nova_3_Output {
73567356+ results?: {
73577357+ channels?: {
73587358+ alternatives?: {
73597359+ confidence?: number;
73607360+ transcript?: string;
73617361+ words?: {
73627362+ confidence?: number;
73637363+ end?: number;
73647364+ start?: number;
73657365+ word?: string;
73667366+ }[];
73677367+ }[];
73687368+ }[];
73697369+ summary?: {
73707370+ result?: string;
73717371+ short?: string;
73727372+ };
73737373+ sentiments?: {
73747374+ segments?: {
73757375+ text?: string;
73767376+ start_word?: number;
73777377+ end_word?: number;
73787378+ sentiment?: string;
73797379+ sentiment_score?: number;
73807380+ }[];
73817381+ average?: {
73827382+ sentiment?: string;
73837383+ sentiment_score?: number;
73847384+ };
73857385+ };
73867386+ };
73877387+}
73887388+declare abstract class Base_Ai_Cf_Deepgram_Nova_3 {
73897389+ inputs: Ai_Cf_Deepgram_Nova_3_Input;
73907390+ postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output;
73917391+}
73927392+interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input {
73937393+ queries?: string | string[];
73947394+ /**
73957395+ * Optional instruction for the task
73967396+ */
73977397+ instruction?: string;
73987398+ documents?: string | string[];
73997399+ text?: string | string[];
74007400+}
74017401+interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output {
74027402+ data?: number[][];
74037403+ shape?: number[];
74047404+}
74057405+declare abstract class Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B {
74067406+ inputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input;
74077407+ postProcessedOutputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output;
74087408+}
74097409+type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input = {
74107410+ /**
74117411+ * readable stream with audio data and content-type specified for that data
74127412+ */
74137413+ audio: {
74147414+ body: object;
74157415+ contentType: string;
74167416+ };
74177417+ /**
74187418+ * type of data PCM data that's sent to the inference server as raw array
74197419+ */
74207420+ dtype?: "uint8" | "float32" | "float64";
74217421+} | {
74227422+ /**
74237423+ * base64 encoded audio data
74247424+ */
74257425+ audio: string;
74267426+ /**
74277427+ * type of data PCM data that's sent to the inference server as raw array
74287428+ */
74297429+ dtype?: "uint8" | "float32" | "float64";
74307430+};
74317431+interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output {
74327432+ /**
74337433+ * if true, end-of-turn was detected
74347434+ */
74357435+ is_complete?: boolean;
74367436+ /**
74377437+ * probability of the end-of-turn detection
74387438+ */
74397439+ probability?: number;
74407440+}
74417441+declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 {
74427442+ inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input;
74437443+ postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output;
74447444+}
74457445+declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B {
74467446+ inputs: ResponsesInput;
74477447+ postProcessedOutputs: ResponsesOutput;
74487448+}
74497449+declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B {
74507450+ inputs: ResponsesInput;
74517451+ postProcessedOutputs: ResponsesOutput;
74527452+}
74537453+interface Ai_Cf_Leonardo_Phoenix_1_0_Input {
74547454+ /**
74557455+ * A text description of the image you want to generate.
74567456+ */
74577457+ prompt: string;
74587458+ /**
74597459+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
74607460+ */
74617461+ guidance?: number;
74627462+ /**
74637463+ * Random seed for reproducibility of the image generation
74647464+ */
74657465+ seed?: number;
74667466+ /**
74677467+ * The height of the generated image in pixels
74687468+ */
74697469+ height?: number;
74707470+ /**
74717471+ * The width of the generated image in pixels
74727472+ */
74737473+ width?: number;
74747474+ /**
74757475+ * The number of diffusion steps; higher values can improve quality but take longer
74767476+ */
74777477+ num_steps?: number;
74787478+ /**
74797479+ * Specify what to exclude from the generated images
74807480+ */
74817481+ negative_prompt?: string;
74827482+}
74837483+/**
74847484+ * The generated image in JPEG format
74857485+ */
74867486+type Ai_Cf_Leonardo_Phoenix_1_0_Output = string;
74877487+declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 {
74887488+ inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input;
74897489+ postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output;
74907490+}
74917491+interface Ai_Cf_Leonardo_Lucid_Origin_Input {
74927492+ /**
74937493+ * A text description of the image you want to generate.
74947494+ */
74957495+ prompt: string;
74967496+ /**
74977497+ * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt
74987498+ */
74997499+ guidance?: number;
75007500+ /**
75017501+ * Random seed for reproducibility of the image generation
75027502+ */
75037503+ seed?: number;
75047504+ /**
75057505+ * The height of the generated image in pixels
75067506+ */
75077507+ height?: number;
75087508+ /**
75097509+ * The width of the generated image in pixels
75107510+ */
75117511+ width?: number;
75127512+ /**
75137513+ * The number of diffusion steps; higher values can improve quality but take longer
75147514+ */
75157515+ num_steps?: number;
75167516+ /**
75177517+ * The number of diffusion steps; higher values can improve quality but take longer
75187518+ */
75197519+ steps?: number;
75207520+}
75217521+interface Ai_Cf_Leonardo_Lucid_Origin_Output {
75227522+ /**
75237523+ * The generated image in Base64 format.
75247524+ */
75257525+ image?: string;
75267526+}
75277527+declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin {
75287528+ inputs: Ai_Cf_Leonardo_Lucid_Origin_Input;
75297529+ postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output;
75307530+}
75317531+interface Ai_Cf_Deepgram_Aura_1_Input {
75327532+ /**
75337533+ * Speaker used to produce the audio.
75347534+ */
75357535+ speaker?: "angus" | "asteria" | "arcas" | "orion" | "orpheus" | "athena" | "luna" | "zeus" | "perseus" | "helios" | "hera" | "stella";
75367536+ /**
75377537+ * Encoding of the output audio.
75387538+ */
75397539+ encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
75407540+ /**
75417541+ * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
75427542+ */
75437543+ container?: "none" | "wav" | "ogg";
75447544+ /**
75457545+ * The text content to be converted to speech
75467546+ */
75477547+ text: string;
75487548+ /**
75497549+ * Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
75507550+ */
75517551+ sample_rate?: number;
75527552+ /**
75537553+ * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
75547554+ */
75557555+ bit_rate?: number;
75567556+}
75577557+/**
75587558+ * The generated audio in MP3 format
75597559+ */
75607560+type Ai_Cf_Deepgram_Aura_1_Output = string;
75617561+declare abstract class Base_Ai_Cf_Deepgram_Aura_1 {
75627562+ inputs: Ai_Cf_Deepgram_Aura_1_Input;
75637563+ postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output;
75647564+}
75657565+interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input {
75667566+ /**
75677567+ * Input text to translate. Can be a single string or a list of strings.
75687568+ */
75697569+ text: string | string[];
75707570+ /**
75717571+ * Target langauge to translate to
75727572+ */
75737573+ target_language: "asm_Beng" | "awa_Deva" | "ben_Beng" | "bho_Deva" | "brx_Deva" | "doi_Deva" | "eng_Latn" | "gom_Deva" | "gon_Deva" | "guj_Gujr" | "hin_Deva" | "hne_Deva" | "kan_Knda" | "kas_Arab" | "kas_Deva" | "kha_Latn" | "lus_Latn" | "mag_Deva" | "mai_Deva" | "mal_Mlym" | "mar_Deva" | "mni_Beng" | "mni_Mtei" | "npi_Deva" | "ory_Orya" | "pan_Guru" | "san_Deva" | "sat_Olck" | "snd_Arab" | "snd_Deva" | "tam_Taml" | "tel_Telu" | "urd_Arab" | "unr_Deva";
75747574+}
75757575+interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output {
75767576+ /**
75777577+ * Translated texts
75787578+ */
75797579+ translations: string[];
75807580+}
75817581+declare abstract class Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B {
75827582+ inputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input;
75837583+ postProcessedOutputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output;
75847584+}
75857585+type Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Input = Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Async_Batch;
75867586+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt {
75877587+ /**
75887588+ * The input text prompt for the model to generate a response.
75897589+ */
75907590+ prompt: string;
75917591+ /**
75927592+ * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
75937593+ */
75947594+ lora?: string;
75957595+ response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode;
75967596+ /**
75977597+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
75987598+ */
75997599+ raw?: boolean;
76007600+ /**
76017601+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
76027602+ */
76037603+ stream?: boolean;
76047604+ /**
76057605+ * The maximum number of tokens to generate in the response.
76067606+ */
76077607+ max_tokens?: number;
76087608+ /**
76097609+ * Controls the randomness of the output; higher values produce more random results.
76107610+ */
76117611+ temperature?: number;
76127612+ /**
76137613+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
76147614+ */
76157615+ top_p?: number;
76167616+ /**
76177617+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
76187618+ */
76197619+ top_k?: number;
76207620+ /**
76217621+ * Random seed for reproducibility of the generation.
76227622+ */
76237623+ seed?: number;
76247624+ /**
76257625+ * Penalty for repeated tokens; higher values discourage repetition.
76267626+ */
76277627+ repetition_penalty?: number;
76287628+ /**
76297629+ * Decreases the likelihood of the model repeating the same lines verbatim.
76307630+ */
76317631+ frequency_penalty?: number;
76327632+ /**
76337633+ * Increases the likelihood of the model introducing new topics.
76347634+ */
76357635+ presence_penalty?: number;
76367636+}
76377637+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode {
76387638+ type?: "json_object" | "json_schema";
76397639+ json_schema?: unknown;
76407640+}
76417641+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages {
76427642+ /**
76437643+ * An array of message objects representing the conversation history.
76447644+ */
76457645+ messages: {
76467646+ /**
76477647+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
76487648+ */
76497649+ role: string;
76507650+ /**
76517651+ * The content of the message as a string.
76527652+ */
76537653+ content: string;
76547654+ }[];
76557655+ functions?: {
76567656+ name: string;
76577657+ code: string;
76587658+ }[];
76597659+ /**
76607660+ * A list of tools available for the assistant to use.
76617661+ */
76627662+ tools?: ({
76637663+ /**
76647664+ * The name of the tool. More descriptive the better.
76657665+ */
76667666+ name: string;
76677667+ /**
76687668+ * A brief description of what the tool does.
76697669+ */
76707670+ description: string;
76717671+ /**
76727672+ * Schema defining the parameters accepted by the tool.
76737673+ */
76747674+ parameters: {
76757675+ /**
76767676+ * The type of the parameters object (usually 'object').
76777677+ */
76787678+ type: string;
76797679+ /**
76807680+ * List of required parameter names.
76817681+ */
76827682+ required?: string[];
76837683+ /**
76847684+ * Definitions of each parameter.
76857685+ */
76867686+ properties: {
76877687+ [k: string]: {
76887688+ /**
76897689+ * The data type of the parameter.
76907690+ */
76917691+ type: string;
76927692+ /**
76937693+ * A description of the expected parameter.
76947694+ */
76957695+ description: string;
76967696+ };
76977697+ };
76987698+ };
76997699+ } | {
77007700+ /**
77017701+ * Specifies the type of tool (e.g., 'function').
77027702+ */
77037703+ type: string;
77047704+ /**
77057705+ * Details of the function tool.
77067706+ */
77077707+ function: {
77087708+ /**
77097709+ * The name of the function.
77107710+ */
77117711+ name: string;
77127712+ /**
77137713+ * A brief description of what the function does.
77147714+ */
77157715+ description: string;
77167716+ /**
77177717+ * Schema defining the parameters accepted by the function.
77187718+ */
77197719+ parameters: {
77207720+ /**
77217721+ * The type of the parameters object (usually 'object').
77227722+ */
77237723+ type: string;
77247724+ /**
77257725+ * List of required parameter names.
77267726+ */
77277727+ required?: string[];
77287728+ /**
77297729+ * Definitions of each parameter.
77307730+ */
77317731+ properties: {
77327732+ [k: string]: {
77337733+ /**
77347734+ * The data type of the parameter.
77357735+ */
77367736+ type: string;
77377737+ /**
77387738+ * A description of the expected parameter.
77397739+ */
77407740+ description: string;
77417741+ };
77427742+ };
77437743+ };
77447744+ };
77457745+ })[];
77467746+ response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1;
77477747+ /**
77487748+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
77497749+ */
77507750+ raw?: boolean;
77517751+ /**
77527752+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
77537753+ */
77547754+ stream?: boolean;
77557755+ /**
77567756+ * The maximum number of tokens to generate in the response.
77577757+ */
77587758+ max_tokens?: number;
77597759+ /**
77607760+ * Controls the randomness of the output; higher values produce more random results.
77617761+ */
77627762+ temperature?: number;
77637763+ /**
77647764+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
77657765+ */
77667766+ top_p?: number;
77677767+ /**
77687768+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
77697769+ */
77707770+ top_k?: number;
77717771+ /**
77727772+ * Random seed for reproducibility of the generation.
77737773+ */
77747774+ seed?: number;
77757775+ /**
77767776+ * Penalty for repeated tokens; higher values discourage repetition.
77777777+ */
77787778+ repetition_penalty?: number;
77797779+ /**
77807780+ * Decreases the likelihood of the model repeating the same lines verbatim.
77817781+ */
77827782+ frequency_penalty?: number;
77837783+ /**
77847784+ * Increases the likelihood of the model introducing new topics.
77857785+ */
77867786+ presence_penalty?: number;
77877787+}
77887788+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1 {
77897789+ type?: "json_object" | "json_schema";
77907790+ json_schema?: unknown;
77917791+}
77927792+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Async_Batch {
77937793+ requests: (Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1)[];
77947794+}
77957795+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1 {
77967796+ /**
77977797+ * The input text prompt for the model to generate a response.
77987798+ */
77997799+ prompt: string;
78007800+ /**
78017801+ * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model.
78027802+ */
78037803+ lora?: string;
78047804+ response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2;
78057805+ /**
78067806+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
78077807+ */
78087808+ raw?: boolean;
78097809+ /**
78107810+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
78117811+ */
78127812+ stream?: boolean;
78137813+ /**
78147814+ * The maximum number of tokens to generate in the response.
78157815+ */
78167816+ max_tokens?: number;
78177817+ /**
78187818+ * Controls the randomness of the output; higher values produce more random results.
78197819+ */
78207820+ temperature?: number;
78217821+ /**
78227822+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
78237823+ */
78247824+ top_p?: number;
78257825+ /**
78267826+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
78277827+ */
78287828+ top_k?: number;
78297829+ /**
78307830+ * Random seed for reproducibility of the generation.
78317831+ */
78327832+ seed?: number;
78337833+ /**
78347834+ * Penalty for repeated tokens; higher values discourage repetition.
78357835+ */
78367836+ repetition_penalty?: number;
78377837+ /**
78387838+ * Decreases the likelihood of the model repeating the same lines verbatim.
78397839+ */
78407840+ frequency_penalty?: number;
78417841+ /**
78427842+ * Increases the likelihood of the model introducing new topics.
78437843+ */
78447844+ presence_penalty?: number;
78457845+}
78467846+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2 {
78477847+ type?: "json_object" | "json_schema";
78487848+ json_schema?: unknown;
78497849+}
78507850+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1 {
78517851+ /**
78527852+ * An array of message objects representing the conversation history.
78537853+ */
78547854+ messages: {
78557855+ /**
78567856+ * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool').
78577857+ */
78587858+ role: string;
78597859+ /**
78607860+ * The content of the message as a string.
78617861+ */
78627862+ content: string;
78637863+ }[];
78647864+ functions?: {
78657865+ name: string;
78667866+ code: string;
78677867+ }[];
78687868+ /**
78697869+ * A list of tools available for the assistant to use.
78707870+ */
78717871+ tools?: ({
78727872+ /**
78737873+ * The name of the tool. More descriptive the better.
78747874+ */
78757875+ name: string;
78767876+ /**
78777877+ * A brief description of what the tool does.
78787878+ */
78797879+ description: string;
78807880+ /**
78817881+ * Schema defining the parameters accepted by the tool.
78827882+ */
78837883+ parameters: {
78847884+ /**
78857885+ * The type of the parameters object (usually 'object').
78867886+ */
78877887+ type: string;
78887888+ /**
78897889+ * List of required parameter names.
78907890+ */
78917891+ required?: string[];
78927892+ /**
78937893+ * Definitions of each parameter.
78947894+ */
78957895+ properties: {
78967896+ [k: string]: {
78977897+ /**
78987898+ * The data type of the parameter.
78997899+ */
79007900+ type: string;
79017901+ /**
79027902+ * A description of the expected parameter.
79037903+ */
79047904+ description: string;
79057905+ };
79067906+ };
79077907+ };
79087908+ } | {
79097909+ /**
79107910+ * Specifies the type of tool (e.g., 'function').
79117911+ */
79127912+ type: string;
79137913+ /**
79147914+ * Details of the function tool.
79157915+ */
79167916+ function: {
79177917+ /**
79187918+ * The name of the function.
79197919+ */
79207920+ name: string;
79217921+ /**
79227922+ * A brief description of what the function does.
79237923+ */
79247924+ description: string;
79257925+ /**
79267926+ * Schema defining the parameters accepted by the function.
79277927+ */
79287928+ parameters: {
79297929+ /**
79307930+ * The type of the parameters object (usually 'object').
79317931+ */
79327932+ type: string;
79337933+ /**
79347934+ * List of required parameter names.
79357935+ */
79367936+ required?: string[];
79377937+ /**
79387938+ * Definitions of each parameter.
79397939+ */
79407940+ properties: {
79417941+ [k: string]: {
79427942+ /**
79437943+ * The data type of the parameter.
79447944+ */
79457945+ type: string;
79467946+ /**
79477947+ * A description of the expected parameter.
79487948+ */
79497949+ description: string;
79507950+ };
79517951+ };
79527952+ };
79537953+ };
79547954+ })[];
79557955+ response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3;
79567956+ /**
79577957+ * If true, a chat template is not applied and you must adhere to the specific model's expected formatting.
79587958+ */
79597959+ raw?: boolean;
79607960+ /**
79617961+ * If true, the response will be streamed back incrementally using SSE, Server Sent Events.
79627962+ */
79637963+ stream?: boolean;
79647964+ /**
79657965+ * The maximum number of tokens to generate in the response.
79667966+ */
79677967+ max_tokens?: number;
79687968+ /**
79697969+ * Controls the randomness of the output; higher values produce more random results.
79707970+ */
79717971+ temperature?: number;
79727972+ /**
79737973+ * Adjusts the creativity of the AI's responses by controlling how many possible words it considers. Lower values make outputs more predictable; higher values allow for more varied and creative responses.
79747974+ */
79757975+ top_p?: number;
79767976+ /**
79777977+ * Limits the AI to choose from the top 'k' most probable words. Lower values make responses more focused; higher values introduce more variety and potential surprises.
79787978+ */
79797979+ top_k?: number;
79807980+ /**
79817981+ * Random seed for reproducibility of the generation.
79827982+ */
79837983+ seed?: number;
79847984+ /**
79857985+ * Penalty for repeated tokens; higher values discourage repetition.
79867986+ */
79877987+ repetition_penalty?: number;
79887988+ /**
79897989+ * Decreases the likelihood of the model repeating the same lines verbatim.
79907990+ */
79917991+ frequency_penalty?: number;
79927992+ /**
79937993+ * Increases the likelihood of the model introducing new topics.
79947994+ */
79957995+ presence_penalty?: number;
79967996+}
79977997+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3 {
79987998+ type?: "json_object" | "json_schema";
79997999+ json_schema?: unknown;
80008000+}
80018001+type Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Output = Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Chat_Completion_Response | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Text_Completion_Response | string | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_AsyncResponse;
80028002+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Chat_Completion_Response {
80038003+ /**
80048004+ * Unique identifier for the completion
80058005+ */
80068006+ id?: string;
80078007+ /**
80088008+ * Object type identifier
80098009+ */
80108010+ object?: "chat.completion";
80118011+ /**
80128012+ * Unix timestamp of when the completion was created
80138013+ */
80148014+ created?: number;
80158015+ /**
80168016+ * Model used for the completion
80178017+ */
80188018+ model?: string;
80198019+ /**
80208020+ * List of completion choices
80218021+ */
80228022+ choices?: {
80238023+ /**
80248024+ * Index of the choice in the list
80258025+ */
80268026+ index?: number;
80278027+ /**
80288028+ * The message generated by the model
80298029+ */
80308030+ message?: {
80318031+ /**
80328032+ * Role of the message author
80338033+ */
80348034+ role: string;
80358035+ /**
80368036+ * The content of the message
80378037+ */
80388038+ content: string;
80398039+ /**
80408040+ * Internal reasoning content (if available)
80418041+ */
80428042+ reasoning_content?: string;
80438043+ /**
80448044+ * Tool calls made by the assistant
80458045+ */
80468046+ tool_calls?: {
80478047+ /**
80488048+ * Unique identifier for the tool call
80498049+ */
80508050+ id: string;
80518051+ /**
80528052+ * Type of tool call
80538053+ */
80548054+ type: "function";
80558055+ function: {
80568056+ /**
80578057+ * Name of the function to call
80588058+ */
80598059+ name: string;
80608060+ /**
80618061+ * JSON string of arguments for the function
80628062+ */
80638063+ arguments: string;
80648064+ };
80658065+ }[];
80668066+ };
80678067+ /**
80688068+ * Reason why the model stopped generating
80698069+ */
80708070+ finish_reason?: string;
80718071+ /**
80728072+ * Stop reason (may be null)
80738073+ */
80748074+ stop_reason?: string | null;
80758075+ /**
80768076+ * Log probabilities (if requested)
80778077+ */
80788078+ logprobs?: {} | null;
80798079+ }[];
80808080+ /**
80818081+ * Usage statistics for the inference request
80828082+ */
80838083+ usage?: {
80848084+ /**
80858085+ * Total number of tokens in input
80868086+ */
80878087+ prompt_tokens?: number;
80888088+ /**
80898089+ * Total number of tokens in output
80908090+ */
80918091+ completion_tokens?: number;
80928092+ /**
80938093+ * Total number of input and output tokens
80948094+ */
80958095+ total_tokens?: number;
80968096+ };
80978097+ /**
80988098+ * Log probabilities for the prompt (if requested)
80998099+ */
81008100+ prompt_logprobs?: {} | null;
81018101+}
81028102+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Text_Completion_Response {
81038103+ /**
81048104+ * Unique identifier for the completion
81058105+ */
81068106+ id?: string;
81078107+ /**
81088108+ * Object type identifier
81098109+ */
81108110+ object?: "text_completion";
81118111+ /**
81128112+ * Unix timestamp of when the completion was created
81138113+ */
81148114+ created?: number;
81158115+ /**
81168116+ * Model used for the completion
81178117+ */
81188118+ model?: string;
81198119+ /**
81208120+ * List of completion choices
81218121+ */
81228122+ choices?: {
81238123+ /**
81248124+ * Index of the choice in the list
81258125+ */
81268126+ index: number;
81278127+ /**
81288128+ * The generated text completion
81298129+ */
81308130+ text: string;
81318131+ /**
81328132+ * Reason why the model stopped generating
81338133+ */
81348134+ finish_reason: string;
81358135+ /**
81368136+ * Stop reason (may be null)
81378137+ */
81388138+ stop_reason?: string | null;
81398139+ /**
81408140+ * Log probabilities (if requested)
81418141+ */
81428142+ logprobs?: {} | null;
81438143+ /**
81448144+ * Log probabilities for the prompt (if requested)
81458145+ */
81468146+ prompt_logprobs?: {} | null;
81478147+ }[];
81488148+ /**
81498149+ * Usage statistics for the inference request
81508150+ */
81518151+ usage?: {
81528152+ /**
81538153+ * Total number of tokens in input
81548154+ */
81558155+ prompt_tokens?: number;
81568156+ /**
81578157+ * Total number of tokens in output
81588158+ */
81598159+ completion_tokens?: number;
81608160+ /**
81618161+ * Total number of input and output tokens
81628162+ */
81638163+ total_tokens?: number;
81648164+ };
81658165+}
81668166+interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_AsyncResponse {
81678167+ /**
81688168+ * The async request id that can be used to obtain the results.
81698169+ */
81708170+ request_id?: string;
81718171+}
81728172+declare abstract class Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It {
81738173+ inputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Input;
81748174+ postProcessedOutputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Output;
81758175+}
81768176+interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Input {
81778177+ /**
81788178+ * Input text to embed. Can be a single string or a list of strings.
81798179+ */
81808180+ text: string | string[];
81818181+}
81828182+interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Output {
81838183+ /**
81848184+ * Embedding vectors, where each vector is a list of floats.
81858185+ */
81868186+ data: number[][];
81878187+ /**
81888188+ * Shape of the embedding data as [number_of_embeddings, embedding_dimension].
81898189+ *
81908190+ * @minItems 2
81918191+ * @maxItems 2
81928192+ */
81938193+ shape: [
81948194+ number,
81958195+ number
81968196+ ];
81978197+}
81988198+declare abstract class Base_Ai_Cf_Pfnet_Plamo_Embedding_1B {
81998199+ inputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Input;
82008200+ postProcessedOutputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Output;
82018201+}
82028202+interface Ai_Cf_Deepgram_Flux_Input {
82038203+ /**
82048204+ * Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM.
82058205+ */
82068206+ encoding: "linear16";
82078207+ /**
82088208+ * Sample rate of the audio stream in Hz.
82098209+ */
82108210+ sample_rate: string;
82118211+ /**
82128212+ * End-of-turn confidence required to fire an eager end-of-turn event. When set, enables EagerEndOfTurn and TurnResumed events. Valid Values 0.3 - 0.9.
82138213+ */
82148214+ eager_eot_threshold?: string;
82158215+ /**
82168216+ * End-of-turn confidence required to finish a turn. Valid Values 0.5 - 0.9.
82178217+ */
82188218+ eot_threshold?: string;
82198219+ /**
82208220+ * A turn will be finished when this much time has passed after speech, regardless of EOT confidence.
82218221+ */
82228222+ eot_timeout_ms?: string;
82238223+ /**
82248224+ * Keyterm prompting can improve recognition of specialized terminology. Pass multiple keyterm query parameters to boost multiple keyterms.
82258225+ */
82268226+ keyterm?: string;
82278227+ /**
82288228+ * Opts out requests from the Deepgram Model Improvement Program. Refer to Deepgram Docs for pricing impacts before setting this to true. https://dpgr.am/deepgram-mip
82298229+ */
82308230+ mip_opt_out?: "true" | "false";
82318231+ /**
82328232+ * Label your requests for the purpose of identification during usage reporting
82338233+ */
82348234+ tag?: string;
82358235+}
82368236+/**
82378237+ * Output will be returned as websocket messages.
82388238+ */
82398239+interface Ai_Cf_Deepgram_Flux_Output {
82408240+ /**
82418241+ * The unique identifier of the request (uuid)
82428242+ */
82438243+ request_id?: string;
82448244+ /**
82458245+ * Starts at 0 and increments for each message the server sends to the client.
82468246+ */
82478247+ sequence_id?: number;
82488248+ /**
82498249+ * The type of event being reported.
82508250+ */
82518251+ event?: "Update" | "StartOfTurn" | "EagerEndOfTurn" | "TurnResumed" | "EndOfTurn";
82528252+ /**
82538253+ * The index of the current turn
82548254+ */
82558255+ turn_index?: number;
82568256+ /**
82578257+ * Start time in seconds of the audio range that was transcribed
82588258+ */
82598259+ audio_window_start?: number;
82608260+ /**
82618261+ * End time in seconds of the audio range that was transcribed
82628262+ */
82638263+ audio_window_end?: number;
82648264+ /**
82658265+ * Text that was said over the course of the current turn
82668266+ */
82678267+ transcript?: string;
82688268+ /**
82698269+ * The words in the transcript
82708270+ */
82718271+ words?: {
82728272+ /**
82738273+ * The individual punctuated, properly-cased word from the transcript
82748274+ */
82758275+ word: string;
82768276+ /**
82778277+ * Confidence that this word was transcribed correctly
82788278+ */
82798279+ confidence: number;
82808280+ }[];
82818281+ /**
82828282+ * Confidence that no more speech is coming in this turn
82838283+ */
82848284+ end_of_turn_confidence?: number;
82858285+}
82868286+declare abstract class Base_Ai_Cf_Deepgram_Flux {
82878287+ inputs: Ai_Cf_Deepgram_Flux_Input;
82888288+ postProcessedOutputs: Ai_Cf_Deepgram_Flux_Output;
82898289+}
82908290+interface Ai_Cf_Deepgram_Aura_2_En_Input {
82918291+ /**
82928292+ * Speaker used to produce the audio.
82938293+ */
82948294+ speaker?: "amalthea" | "andromeda" | "apollo" | "arcas" | "aries" | "asteria" | "athena" | "atlas" | "aurora" | "callista" | "cora" | "cordelia" | "delia" | "draco" | "electra" | "harmonia" | "helena" | "hera" | "hermes" | "hyperion" | "iris" | "janus" | "juno" | "jupiter" | "luna" | "mars" | "minerva" | "neptune" | "odysseus" | "ophelia" | "orion" | "orpheus" | "pandora" | "phoebe" | "pluto" | "saturn" | "thalia" | "theia" | "vesta" | "zeus";
82958295+ /**
82968296+ * Encoding of the output audio.
82978297+ */
82988298+ encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
82998299+ /**
83008300+ * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
83018301+ */
83028302+ container?: "none" | "wav" | "ogg";
83038303+ /**
83048304+ * The text content to be converted to speech
83058305+ */
83068306+ text: string;
83078307+ /**
83088308+ * Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
83098309+ */
83108310+ sample_rate?: number;
83118311+ /**
83128312+ * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
83138313+ */
83148314+ bit_rate?: number;
83158315+}
83168316+/**
83178317+ * The generated audio in MP3 format
83188318+ */
83198319+type Ai_Cf_Deepgram_Aura_2_En_Output = string;
83208320+declare abstract class Base_Ai_Cf_Deepgram_Aura_2_En {
83218321+ inputs: Ai_Cf_Deepgram_Aura_2_En_Input;
83228322+ postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_En_Output;
83238323+}
83248324+interface Ai_Cf_Deepgram_Aura_2_Es_Input {
83258325+ /**
83268326+ * Speaker used to produce the audio.
83278327+ */
83288328+ speaker?: "sirio" | "nestor" | "carina" | "celeste" | "alvaro" | "diana" | "aquila" | "selena" | "estrella" | "javier";
83298329+ /**
83308330+ * Encoding of the output audio.
83318331+ */
83328332+ encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac";
83338333+ /**
83348334+ * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type..
83358335+ */
83368336+ container?: "none" | "wav" | "ogg";
83378337+ /**
83388338+ * The text content to be converted to speech
83398339+ */
83408340+ text: string;
83418341+ /**
83428342+ * Sample Rate specifies the sample rate for the output audio. Based on the encoding, different sample rates are supported. For some encodings, the sample rate is not configurable
83438343+ */
83448344+ sample_rate?: number;
83458345+ /**
83468346+ * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type.
83478347+ */
83488348+ bit_rate?: number;
83498349+}
83508350+/**
83518351+ * The generated audio in MP3 format
83528352+ */
83538353+type Ai_Cf_Deepgram_Aura_2_Es_Output = string;
83548354+declare abstract class Base_Ai_Cf_Deepgram_Aura_2_Es {
83558355+ inputs: Ai_Cf_Deepgram_Aura_2_Es_Input;
83568356+ postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_Es_Output;
83578357+}
51418358interface AiModels {
51428359 "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification;
51438360 "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage;
···51468363 "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage;
51478364 "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage;
51488365 "@cf/myshell-ai/melotts": BaseAiTextToSpeech;
83668366+ "@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings;
51498367 "@cf/microsoft/resnet-50": BaseAiImageClassification;
51505150- "@cf/facebook/detr-resnet-50": BaseAiObjectDetection;
51518368 "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration;
51528369 "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration;
51538370 "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration;
···51818398 "@cf/meta/llama-3-8b-instruct": BaseAiTextGeneration;
51828399 "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration;
51838400 "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration;
51845184- "@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration;
51855185- "@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration;
51868401 "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration;
51878402 "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration;
51888403 "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration;
51898404 "@cf/meta/llama-3.2-1b-instruct": BaseAiTextGeneration;
51908405 "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": BaseAiTextGeneration;
84068406+ "@cf/ibm-granite/granite-4.0-h-micro": BaseAiTextGeneration;
51918407 "@cf/facebook/bart-large-cnn": BaseAiSummarization;
51928408 "@cf/llava-hf/llava-1.5-7b-hf": BaseAiImageToText;
51938409 "@cf/baai/bge-base-en-v1.5": Base_Ai_Cf_Baai_Bge_Base_En_V1_5;
···52098425 "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct;
52108426 "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It;
52118427 "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct;
84288428+ "@cf/qwen/qwen3-30b-a3b-fp8": Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8;
84298429+ "@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3;
84308430+ "@cf/qwen/qwen3-embedding-0.6b": Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B;
84318431+ "@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2;
84328432+ "@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B;
84338433+ "@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B;
84348434+ "@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0;
84358435+ "@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin;
84368436+ "@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1;
84378437+ "@cf/ai4bharat/indictrans2-en-indic-1B": Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B;
84388438+ "@cf/aisingapore/gemma-sea-lion-v4-27b-it": Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It;
84398439+ "@cf/pfnet/plamo-embedding-1b": Base_Ai_Cf_Pfnet_Plamo_Embedding_1B;
84408440+ "@cf/deepgram/flux": Base_Ai_Cf_Deepgram_Flux;
84418441+ "@cf/deepgram/aura-2-en": Base_Ai_Cf_Deepgram_Aura_2_En;
84428442+ "@cf/deepgram/aura-2-es": Base_Ai_Cf_Deepgram_Aura_2_Es;
52128443}
52138444type AiOptions = {
52148445 /**
···52168447 * https://developers.cloudflare.com/workers-ai/features/batch-api
52178448 */
52188449 queueRequest?: boolean;
84508450+ /**
84518451+ * Establish websocket connections, only works for supported models
84528452+ */
84538453+ websocket?: boolean;
84548454+ /**
84558455+ * Tag your requests to group and view them in Cloudflare dashboard.
84568456+ *
84578457+ * Rules:
84588458+ * Tags must only contain letters, numbers, and the symbols: : - . / @
84598459+ * Each tag can have maximum 50 characters.
84608460+ * Maximum 5 tags are allowed each request.
84618461+ * Duplicate tags will removed.
84628462+ */
84638463+ tags: string[];
52198464 gateway?: GatewayOptions;
52208465 returnRawResponse?: boolean;
52218466 prefix?: string;
52228467 extraHeaders?: object;
52235223-};
52245224-type ConversionResponse = {
52255225- name: string;
52265226- mimeType: string;
52275227- format: "markdown";
52285228- tokens: number;
52295229- data: string;
52308468};
52318469type AiModelsSearchParams = {
52328470 author?: string;
···52648502 autorag(autoragId: string): AutoRAG;
52658503 run<Name extends keyof AiModelList, Options extends AiOptions, InputOptions extends AiModelList[Name]["inputs"]>(model: Name, inputs: InputOptions, options?: Options): Promise<Options extends {
52668504 returnRawResponse: true;
85058505+ } | {
85068506+ websocket: true;
52678507 } ? Response : InputOptions extends {
52688508 stream: true;
52698509 } ? ReadableStream : AiModelList[Name]["postProcessedOutputs"]>;
52708510 models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>;
52715271- toMarkdown(files: {
52725272- name: string;
52735273- blob: Blob;
52745274- }[], options?: {
52755275- gateway?: GatewayOptions;
52765276- extraHeaders?: object;
52775277- }): Promise<ConversionResponse[]>;
52785278- toMarkdown(files: {
52795279- name: string;
52805280- blob: Blob;
52815281- }, options?: {
52825282- gateway?: GatewayOptions;
52835283- extraHeaders?: object;
52845284- }): Promise<ConversionResponse>;
85118511+ toMarkdown(): ToMarkdownService;
85128512+ toMarkdown(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>;
85138513+ toMarkdown(files: MarkdownDocument, options?: ConversionRequestOptions): Promise<ConversionResponse>;
52858514}
52868515type GatewayRetries = {
52878516 maxAttempts?: 1 | 2 | 3 | 4 | 5;
···52998528 requestTimeoutMs?: number;
53008529 retries?: GatewayRetries;
53018530};
85318531+type UniversalGatewayOptions = Exclude<GatewayOptions, 'id'> & {
85328532+ /**
85338533+ ** @deprecated
85348534+ */
85358535+ id?: string;
85368536+};
53028537type AiGatewayPatchLog = {
53038538 score?: number | null;
53048539 feedback?: -1 | 1 | null;
···53678602 patchLog(logId: string, data: AiGatewayPatchLog): Promise<void>;
53688603 getLog(logId: string): Promise<AiGatewayLog>;
53698604 run(data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[], options?: {
53705370- gateway?: GatewayOptions;
86058605+ gateway?: UniversalGatewayOptions;
53718606 extraHeaders?: object;
53728607 }): Promise<Response>;
53738608 getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
···53978632 ranker?: string;
53988633 score_threshold?: number;
53998634 };
86358635+ reranking?: {
86368636+ enabled?: boolean;
86378637+ model?: string;
86388638+ };
54008639 rewrite_query?: boolean;
54018640};
54028641type AutoRagAiSearchRequest = AutoRagSearchRequest & {
54038642 stream?: boolean;
86438643+ system_prompt?: string;
54048644};
54058645type AutoRagAiSearchRequestStreaming = Omit<AutoRagAiSearchRequest, 'stream'> & {
54068646 stream: true;
···54768716 * breaks aspect ratio
54778717 */
54788718 fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze";
87198719+ /**
87208720+ * Image segmentation using artificial intelligence models. Sets pixels not
87218721+ * within selected segment area to transparent e.g "foreground" sets every
87228722+ * background pixel as transparent.
87238723+ */
87248724+ segment?: "foreground";
54798725 /**
54808726 * When cropping with fit: "cover", this defines the side or point that should
54818727 * be left uncropped. The value is either a string
···54888734 * preserve as much as possible around a point at 20% of the height of the
54898735 * source image.
54908736 */
54915491- gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates;
87378737+ gravity?: 'face' | 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates;
54928738 /**
54938739 * Background color to add underneath the image. Applies only to images with
54948740 * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…),
···57759021 *
57769022 * @example 395747
57779023 */
57785778- asn: number;
90249024+ asn?: number;
57799025 /**
57809026 * The organization which owns the ASN of the incoming request.
57819027 *
57829028 * @example "Google Cloud"
57839029 */
57845784- asOrganization: string;
90309030+ asOrganization?: string;
57859031 /**
57869032 * The original value of the `Accept-Encoding` header if Cloudflare modified it.
57879033 *
···59059151 * This field is only present if you have Cloudflare for SaaS enabled on your account
59069152 * and you have followed the [required steps to enable it]((https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/)).
59079153 */
59085908- hostMetadata: HostMetadata;
91549154+ hostMetadata?: HostMetadata;
59099155}
59109156interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
59119157 /**
···61929438 */
61939439 sql_duration_ms: number;
61949440 };
94419441+ /**
94429442+ * Number of total attempts to execute the query, due to automatic retries.
94439443+ * Note: All other fields in the response like `timings` only apply to the last attempt.
94449444+ */
94459445+ total_attempts?: number;
61959446}
61969447interface D1Response {
61979448 success: true;
···62099460// Indicates that the first query should go to the primary, and the rest queries
62109461// using the same D1DatabaseSession will go to any replica that is consistent with
62119462// the bookmark maintained by the session (returned by the first query).
62126212-"first-primary"
94639463+'first-primary'
62139464// Indicates that the first query can go anywhere (primary or replica), and the rest queries
62149465// using the same D1DatabaseSession will go to any replica that is consistent with
62159466// the bookmark maintained by the session (returned by the first query).
62166216- | "first-unconstrained";
94679467+ | 'first-unconstrained';
62179468type D1SessionBookmark = string;
62189469declare abstract class D1Database {
62199470 prepare(query: string): D1PreparedStatement;
···63319582 };
63329583 export { _EmailMessage as EmailMessage };
63339584}
95859585+/**
95869586+ * Hello World binding to serve as an explanatory example. DO NOT USE
95879587+ */
95889588+interface HelloWorldBinding {
95899589+ /**
95909590+ * Retrieve the current stored value
95919591+ */
95929592+ get(): Promise<{
95939593+ value: string;
95949594+ ms?: number;
95959595+ }>;
95969596+ /**
95979597+ * Set a new stored value
95989598+ */
95999599+ set(value: string): Promise<void>;
96009600+}
63349601interface Hyperdrive {
63359602 /**
63369603 * Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
···64089675 fit?: 'scale-down' | 'contain' | 'pad' | 'squeeze' | 'cover' | 'crop';
64099676 flip?: 'h' | 'v' | 'hv';
64109677 gamma?: number;
64116411- gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | {
96789678+ segment?: 'foreground';
96799679+ gravity?: 'face' | 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | {
64129680 x?: number;
64139681 y?: number;
64149682 mode: 'remainder' | 'box-center';
···64169684 rotate?: 0 | 90 | 180 | 270;
64179685 saturation?: number;
64189686 sharpen?: number;
64196419- trim?: "border" | {
96879687+ trim?: 'border' | {
64209688 top?: number;
64219689 bottom?: number;
64229690 left?: number;
···64389706 bottom?: number;
64399707 right?: number;
64409708};
97099709+type ImageInputOptions = {
97109710+ encoding?: 'base64';
97119711+};
64419712type ImageOutputOptions = {
64429713 format: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/avif' | 'rgb' | 'rgba';
64439714 quality?: number;
64449715 background?: string;
97169716+ anim?: boolean;
64459717};
64469718interface ImagesBinding {
64479719 /**
···64499721 * @throws {@link ImagesError} with code 9412 if input is not an image
64509722 * @param stream The image bytes
64519723 */
64526452- info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>;
97249724+ info(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): Promise<ImageInfoResponse>;
64539725 /**
64549726 * Begin applying a series of transformations to an image
64559727 * @param stream The image bytes
64569728 * @returns A transform handle
64579729 */
64586458- input(stream: ReadableStream<Uint8Array>): ImageTransformer;
97309730+ input(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): ImageTransformer;
64599731}
64609732interface ImageTransformer {
64619733 /**
···64789750 */
64799751 output(options: ImageOutputOptions): Promise<ImageTransformationResult>;
64809752}
97539753+type ImageTransformationOutputOptions = {
97549754+ encoding?: 'base64';
97559755+};
64819756interface ImageTransformationResult {
64829757 /**
64839758 * The image as a response, ready to store in cache or return to users
···64909765 /**
64919766 * The bytes of the response
64929767 */
64936493- image(): ReadableStream<Uint8Array>;
97689768+ image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>;
64949769}
64959770interface ImagesError extends Error {
64969771 readonly code: number;
64979772 readonly message: string;
64989773 readonly stack?: string;
64999774}
97759775+/**
97769776+ * Media binding for transforming media streams.
97779777+ * Provides the entry point for media transformation operations.
97789778+ */
97799779+interface MediaBinding {
97809780+ /**
97819781+ * Creates a media transformer from an input stream.
97829782+ * @param media - The input media bytes
97839783+ * @returns A MediaTransformer instance for applying transformations
97849784+ */
97859785+ input(media: ReadableStream<Uint8Array>): MediaTransformer;
97869786+}
97879787+/**
97889788+ * Media transformer for applying transformation operations to media content.
97899789+ * Handles sizing, fitting, and other input transformation parameters.
97909790+ */
97919791+interface MediaTransformer {
97929792+ /**
97939793+ * Applies transformation options to the media content.
97949794+ * @param transform - Configuration for how the media should be transformed
97959795+ * @returns A generator for producing the transformed media output
97969796+ */
97979797+ transform(transform: MediaTransformationInputOptions): MediaTransformationGenerator;
97989798+}
97999799+/**
98009800+ * Generator for producing media transformation results.
98019801+ * Configures the output format and parameters for the transformed media.
98029802+ */
98039803+interface MediaTransformationGenerator {
98049804+ /**
98059805+ * Generates the final media output with specified options.
98069806+ * @param output - Configuration for the output format and parameters
98079807+ * @returns The final transformation result containing the transformed media
98089808+ */
98099809+ output(output: MediaTransformationOutputOptions): MediaTransformationResult;
98109810+}
98119811+/**
98129812+ * Result of a media transformation operation.
98139813+ * Provides multiple ways to access the transformed media content.
98149814+ */
98159815+interface MediaTransformationResult {
98169816+ /**
98179817+ * Returns the transformed media as a readable stream of bytes.
98189818+ * @returns A stream containing the transformed media data
98199819+ */
98209820+ media(): ReadableStream<Uint8Array>;
98219821+ /**
98229822+ * Returns the transformed media as an HTTP response object.
98239823+ * @returns The transformed media as a Response, ready to store in cache or return to users
98249824+ */
98259825+ response(): Response;
98269826+ /**
98279827+ * Returns the MIME type of the transformed media.
98289828+ * @returns The content type string (e.g., 'image/jpeg', 'video/mp4')
98299829+ */
98309830+ contentType(): string;
98319831+}
98329832+/**
98339833+ * Configuration options for transforming media input.
98349834+ * Controls how the media should be resized and fitted.
98359835+ */
98369836+type MediaTransformationInputOptions = {
98379837+ /** How the media should be resized to fit the specified dimensions */
98389838+ fit?: 'contain' | 'cover' | 'scale-down';
98399839+ /** Target width in pixels */
98409840+ width?: number;
98419841+ /** Target height in pixels */
98429842+ height?: number;
98439843+};
98449844+/**
98459845+ * Configuration options for Media Transformations output.
98469846+ * Controls the format, timing, and type of the generated output.
98479847+ */
98489848+type MediaTransformationOutputOptions = {
98499849+ /**
98509850+ * Output mode determining the type of media to generate
98519851+ */
98529852+ mode?: 'video' | 'spritesheet' | 'frame' | 'audio';
98539853+ /** Whether to include audio in the output */
98549854+ audio?: boolean;
98559855+ /**
98569856+ * Starting timestamp for frame extraction or start time for clips. (e.g. '2s').
98579857+ */
98589858+ time?: string;
98599859+ /**
98609860+ * Duration for video clips, audio extraction, and spritesheet generation (e.g. '5s').
98619861+ */
98629862+ duration?: string;
98639863+ /**
98649864+ * Number of frames in the spritesheet.
98659865+ */
98669866+ imageCount?: number;
98679867+ /**
98689868+ * Output format for the generated media.
98699869+ */
98709870+ format?: 'jpg' | 'png' | 'm4a';
98719871+};
98729872+/**
98739873+ * Error object for media transformation operations.
98749874+ * Extends the standard Error interface with additional media-specific information.
98759875+ */
98769876+interface MediaError extends Error {
98779877+ readonly code: number;
98789878+ readonly message: string;
98799879+ readonly stack?: string;
98809880+}
98819881+declare module 'cloudflare:node' {
98829882+ interface NodeStyleServer {
98839883+ listen(...args: unknown[]): this;
98849884+ address(): {
98859885+ port?: number | null | undefined;
98869886+ };
98879887+ }
98889888+ export function httpServerHandler(port: number): ExportedHandler;
98899889+ export function httpServerHandler(options: {
98909890+ port: number;
98919891+ }): ExportedHandler;
98929892+ export function httpServerHandler(server: NodeStyleServer): ExportedHandler;
98939893+}
65009894type Params<P extends string = any> = Record<P, string | string[]>;
65019895type EventContext<Env, P extends string, Data> = {
65029896 request: Request<unknown, IncomingRequestCfProperties<unknown>>;
···670710101 // Base type for all other types providing RPC-like interfaces.
670810102 // Rewrites all methods/properties to be `MethodOrProperty`s, while preserving callable types.
670910103 // `Reserved` names (e.g. stub method names like `dup()`) and symbols can't be accessed over RPC.
67106710- export type Provider<T extends object, Reserved extends string = never> = MaybeCallableProvider<T> & {
67116711- [K in Exclude<keyof T, Reserved | symbol | keyof StubBase<never>>]: MethodOrProperty<T[K]>;
67126712- };
1010410104+ export type Provider<T extends object, Reserved extends string = never> = MaybeCallableProvider<T> & Pick<{
1010510105+ [K in keyof T]: MethodOrProperty<T[K]>;
1010610106+ }, Exclude<keyof T, Reserved | symbol | keyof StubBase<never>>>;
671310107}
671410108declare namespace Cloudflare {
1010910109+ // Type of `env`.
1011010110+ //
1011110111+ // The specific project can extend `Env` by redeclaring it in project-specific files. Typescript
1011210112+ // will merge all declarations.
1011310113+ //
1011410114+ // You can use `wrangler types` to generate the `Env` type automatically.
671510115 interface Env {
671610116 }
1011710117+ // Project-specific parameters used to inform types.
1011810118+ //
1011910119+ // This interface is, again, intended to be declared in project-specific files, and then that
1012010120+ // declaration will be merged with this one.
1012110121+ //
1012210122+ // A project should have a declaration like this:
1012310123+ //
1012410124+ // interface GlobalProps {
1012510125+ // // Declares the main module's exports. Used to populate Cloudflare.Exports aka the type
1012610126+ // // of `ctx.exports`.
1012710127+ // mainModule: typeof import("my-main-module");
1012810128+ //
1012910129+ // // Declares which of the main module's exports are configured with durable storage, and
1013010130+ // // thus should behave as Durable Object namsepace bindings.
1013110131+ // durableNamespaces: "MyDurableObject" | "AnotherDurableObject";
1013210132+ // }
1013310133+ //
1013410134+ // You can use `wrangler types` to generate `GlobalProps` automatically.
1013510135+ interface GlobalProps {
1013610136+ }
1013710137+ // Evaluates to the type of a property in GlobalProps, defaulting to `Default` if it is not
1013810138+ // present.
1013910139+ type GlobalProp<K extends string, Default> = K extends keyof GlobalProps ? GlobalProps[K] : Default;
1014010140+ // The type of the program's main module exports, if known. Requires `GlobalProps` to declare the
1014110141+ // `mainModule` property.
1014210142+ type MainModule = GlobalProp<"mainModule", {}>;
1014310143+ // The type of ctx.exports, which contains loopback bindings for all top-level exports.
1014410144+ type Exports = {
1014510145+ [K in keyof MainModule]: LoopbackForExport<MainModule[K]>
1014610146+ // If the export is listed in `durableNamespaces`, then it is also a
1014710147+ // DurableObjectNamespace.
1014810148+ & (K extends GlobalProp<"durableNamespaces", never> ? MainModule[K] extends new (...args: any[]) => infer DoInstance ? DoInstance extends Rpc.DurableObjectBranded ? DurableObjectNamespace<DoInstance> : DurableObjectNamespace<undefined> : DurableObjectNamespace<undefined> : {});
1014910149+ };
671710150}
67186718-declare module 'cloudflare:workers' {
1015110151+declare namespace CloudflareWorkersModule {
671910152 export type RpcStub<T extends Rpc.Stubable> = Rpc.Stub<T>;
672010153 export const RpcStub: {
672110154 new <T extends Rpc.Stubable>(value: T): Rpc.Stub<T>;
···672410157 [Rpc.__RPC_TARGET_BRAND]: never;
672510158 }
672610159 // `protected` fields don't appear in `keyof`s, so can't be accessed over RPC
67276727- export abstract class WorkerEntrypoint<Env = unknown> implements Rpc.WorkerEntrypointBranded {
1016010160+ export abstract class WorkerEntrypoint<Env = Cloudflare.Env, Props = {}> implements Rpc.WorkerEntrypointBranded {
672810161 [Rpc.__WORKER_ENTRYPOINT_BRAND]: never;
67296729- protected ctx: ExecutionContext;
1016210162+ protected ctx: ExecutionContext<Props>;
673010163 protected env: Env;
673110164 constructor(ctx: ExecutionContext, env: Env);
1016510165+ email?(message: ForwardableEmailMessage): void | Promise<void>;
673210166 fetch?(request: Request): Response | Promise<Response>;
67336733- tail?(events: TraceItem[]): void | Promise<void>;
67346734- trace?(traces: TraceItem[]): void | Promise<void>;
67356735- scheduled?(controller: ScheduledController): void | Promise<void>;
673610167 queue?(batch: MessageBatch<unknown>): void | Promise<void>;
1016810168+ scheduled?(controller: ScheduledController): void | Promise<void>;
1016910169+ tail?(events: TraceItem[]): void | Promise<void>;
1017010170+ tailStream?(event: TailStream.TailEvent<TailStream.Onset>): TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>;
673710171 test?(controller: TestController): void | Promise<void>;
1017210172+ trace?(traces: TraceItem[]): void | Promise<void>;
673810173 }
67396739- export abstract class DurableObject<Env = unknown> implements Rpc.DurableObjectBranded {
1017410174+ export abstract class DurableObject<Env = Cloudflare.Env, Props = {}> implements Rpc.DurableObjectBranded {
674010175 [Rpc.__DURABLE_OBJECT_BRAND]: never;
67416741- protected ctx: DurableObjectState;
1017610176+ protected ctx: DurableObjectState<Props>;
674210177 protected env: Env;
674310178 constructor(ctx: DurableObjectState, env: Env);
67446744- fetch?(request: Request): Response | Promise<Response>;
674510179 alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise<void>;
1018010180+ fetch?(request: Request): Response | Promise<Response>;
674610181 webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise<void>;
674710182 webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise<void>;
674810183 webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
···678810223 constructor(ctx: ExecutionContext, env: Env);
678910224 run(event: Readonly<WorkflowEvent<T>>, step: WorkflowStep): Promise<unknown>;
679010225 }
1022610226+ export function waitUntil(promise: Promise<unknown>): void;
1022710227+ export function withEnv(newEnv: unknown, fn: () => unknown): unknown;
1022810228+ export function withExports(newExports: unknown, fn: () => unknown): unknown;
1022910229+ export function withEnvAndExports(newEnv: unknown, newExports: unknown, fn: () => unknown): unknown;
679110230 export const env: Cloudflare.Env;
1023110231+ export const exports: Cloudflare.Exports;
1023210232+}
1023310233+declare module 'cloudflare:workers' {
1023410234+ export = CloudflareWorkersModule;
679210235}
679310236interface SecretsStoreSecret {
679410237 /**
···680110244 function _connect(address: string | SocketAddress, options?: SocketOptions): Socket;
680210245 export { _connect as connect };
680310246}
1024710247+type MarkdownDocument = {
1024810248+ name: string;
1024910249+ blob: Blob;
1025010250+};
1025110251+type ConversionResponse = {
1025210252+ name: string;
1025310253+ mimeType: string;
1025410254+ format: 'markdown';
1025510255+ tokens: number;
1025610256+ data: string;
1025710257+} | {
1025810258+ name: string;
1025910259+ mimeType: string;
1026010260+ format: 'error';
1026110261+ error: string;
1026210262+};
1026310263+type ImageConversionOptions = {
1026410264+ descriptionLanguage?: 'en' | 'es' | 'fr' | 'it' | 'pt' | 'de';
1026510265+};
1026610266+type EmbeddedImageConversionOptions = ImageConversionOptions & {
1026710267+ convert?: boolean;
1026810268+ maxConvertedImages?: number;
1026910269+};
1027010270+type ConversionOptions = {
1027110271+ html?: {
1027210272+ images?: EmbeddedImageConversionOptions & {
1027310273+ convertOGImage?: boolean;
1027410274+ };
1027510275+ };
1027610276+ docx?: {
1027710277+ images?: EmbeddedImageConversionOptions;
1027810278+ };
1027910279+ image?: ImageConversionOptions;
1028010280+ pdf?: {
1028110281+ images?: EmbeddedImageConversionOptions;
1028210282+ metadata?: boolean;
1028310283+ };
1028410284+};
1028510285+type ConversionRequestOptions = {
1028610286+ gateway?: GatewayOptions;
1028710287+ extraHeaders?: object;
1028810288+ conversionOptions?: ConversionOptions;
1028910289+};
1029010290+type SupportedFileFormat = {
1029110291+ mimeType: string;
1029210292+ extension: string;
1029310293+};
1029410294+declare abstract class ToMarkdownService {
1029510295+ transform(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>;
1029610296+ transform(files: MarkdownDocument, options?: ConversionRequestOptions): Promise<ConversionResponse>;
1029710297+ supported(): Promise<SupportedFileFormat[]>;
1029810298+}
680410299declare namespace TailStream {
680510300 interface Header {
680610301 readonly name: string;
···681010305 readonly type: "fetch";
681110306 readonly method: string;
681210307 readonly url: string;
68136813- readonly cfJson: string;
1030810308+ readonly cfJson?: object;
681410309 readonly headers: Header[];
681510310 }
681610311 interface JsRpcEventInfo {
681710312 readonly type: "jsrpc";
68186818- readonly methodName: string;
681910313 }
682010314 interface ScheduledEventInfo {
682110315 readonly type: "scheduled";
···685610350 readonly type: "hibernatableWebSocket";
685710351 readonly info: HibernatableWebSocketEventInfoClose | HibernatableWebSocketEventInfoError | HibernatableWebSocketEventInfoMessage;
685810352 }
68596859- interface Resume {
68606860- readonly type: "resume";
68616861- readonly attachment?: any;
68626862- }
686310353 interface CustomEventInfo {
686410354 readonly type: "custom";
686510355 }
···687310363 readonly tag?: string;
687410364 readonly message?: string;
687510365 }
68766876- interface Trigger {
68776877- readonly traceId: string;
68786878- readonly invocationId: string;
68796879- readonly spanId: string;
68806880- }
688110366 interface Onset {
688210367 readonly type: "onset";
1036810368+ readonly attributes: Attribute[];
1036910369+ // id for the span being opened by this Onset event.
1037010370+ readonly spanId: string;
688310371 readonly dispatchNamespace?: string;
688410372 readonly entrypoint?: string;
688510373 readonly executionModel: string;
688610374 readonly scriptName?: string;
688710375 readonly scriptTags?: string[];
688810376 readonly scriptVersion?: ScriptVersion;
68896889- readonly trigger?: Trigger;
68906890- readonly info: FetchEventInfo | JsRpcEventInfo | ScheduledEventInfo | AlarmEventInfo | QueueEventInfo | EmailEventInfo | TraceEventInfo | HibernatableWebSocketEventInfo | Resume | CustomEventInfo;
1037710377+ readonly info: FetchEventInfo | JsRpcEventInfo | ScheduledEventInfo | AlarmEventInfo | QueueEventInfo | EmailEventInfo | TraceEventInfo | HibernatableWebSocketEventInfo | CustomEventInfo;
689110378 }
689210379 interface Outcome {
689310380 readonly type: "outcome";
···689510382 readonly cpuTime: number;
689610383 readonly wallTime: number;
689710384 }
68986898- interface Hibernate {
68996899- readonly type: "hibernate";
69006900- }
690110385 interface SpanOpen {
690210386 readonly type: "spanOpen";
690310387 readonly name: string;
1038810388+ // id for the span being opened by this SpanOpen event.
1038910389+ readonly spanId: string;
690410390 readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes;
690510391 }
690610392 interface SpanClose {
···692110407 interface Log {
692210408 readonly type: "log";
692310409 readonly level: "debug" | "error" | "info" | "log" | "warn";
69246924- readonly message: string;
1041010410+ readonly message: object;
692510411 }
1041210412+ // This marks the worker handler return information.
1041310413+ // This is separate from Outcome because the worker invocation can live for a long time after
1041410414+ // returning. For example - Websockets that return an http upgrade response but then continue
1041510415+ // streaming information or SSE http connections.
692610416 interface Return {
692710417 readonly type: "return";
692810418 readonly info?: FetchResponseInfo;
692910419 }
69306930- interface Link {
69316931- readonly type: "link";
69326932- readonly label?: string;
69336933- readonly traceId: string;
69346934- readonly invocationId: string;
69356935- readonly spanId: string;
69366936- }
693710420 interface Attribute {
693810421 readonly name: string;
693910422 readonly value: string | string[] | boolean | boolean[] | number | number[] | bigint | bigint[];
···694210425 readonly type: "attributes";
694310426 readonly info: Attribute[];
694410427 }
69456945- interface TailEvent {
1042810428+ type EventType = Onset | Outcome | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Attributes;
1042910429+ // Context in which this trace event lives.
1043010430+ interface SpanContext {
1043110431+ // Single id for the entire top-level invocation
1043210432+ // This should be a new traceId for the first worker stage invoked in the eyeball request and then
1043310433+ // same-account service-bindings should reuse the same traceId but cross-account service-bindings
1043410434+ // should use a new traceId.
694610435 readonly traceId: string;
1043610436+ // spanId in which this event is handled
1043710437+ // for Onset and SpanOpen events this would be the parent span id
1043810438+ // for Outcome and SpanClose these this would be the span id of the opening Onset and SpanOpen events
1043910439+ // For Hibernate and Mark this would be the span under which they were emitted.
1044010440+ // spanId is not set ONLY if:
1044110441+ // 1. This is an Onset event
1044210442+ // 2. We are not inherting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation)
1044310443+ readonly spanId?: string;
1044410444+ }
1044510445+ interface TailEvent<Event extends EventType> {
1044610446+ // invocation id of the currently invoked worker stage.
1044710447+ // invocation id will always be unique to every Onset event and will be the same until the Outcome event.
694710448 readonly invocationId: string;
69486948- readonly spanId: string;
1044910449+ // Inherited spanContext for this event.
1045010450+ readonly spanContext: SpanContext;
694910451 readonly timestamp: Date;
695010452 readonly sequence: number;
69516951- readonly event: Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes;
1045310453+ readonly event: Event;
695210454 }
69536953- type TailEventHandler = (event: TailEvent) => void | Promise<void>;
69546954- type TailEventHandlerName = "outcome" | "hibernate" | "spanOpen" | "spanClose" | "diagnosticChannel" | "exception" | "log" | "return" | "link" | "attributes";
69556955- type TailEventHandlerObject = Record<TailEventHandlerName, TailEventHandler>;
1045510455+ type TailEventHandler<Event extends EventType = EventType> = (event: TailEvent<Event>) => void | Promise<void>;
1045610456+ type TailEventHandlerObject = {
1045710457+ outcome?: TailEventHandler<Outcome>;
1045810458+ spanOpen?: TailEventHandler<SpanOpen>;
1045910459+ spanClose?: TailEventHandler<SpanClose>;
1046010460+ diagnosticChannel?: TailEventHandler<DiagnosticChannelEvent>;
1046110461+ exception?: TailEventHandler<Exception>;
1046210462+ log?: TailEventHandler<Log>;
1046310463+ return?: TailEventHandler<Return>;
1046410464+ attributes?: TailEventHandler<Attributes>;
1046510465+ };
695610466 type TailEventHandlerType = TailEventHandler | TailEventHandlerObject;
695710467}
695810468// Copyright (c) 2022-2023 Cloudflare, Inc.
···697610486 *
697710487 * This list is expected to grow as support for more operations are released.
697810488 */
69796979-type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
1048910489+type VectorizeVectorMetadataFilterOp = '$eq' | '$ne' | '$lt' | '$lte' | '$gt' | '$gte';
1049010490+type VectorizeVectorMetadataFilterCollectionOp = '$in' | '$nin';
698010491/**
698110492 * Filter criteria for vector metadata used to limit the retrieved query result set.
698210493 */
698310494type VectorizeVectorMetadataFilter = {
698410495 [field: string]: Exclude<VectorizeVectorMetadataValue, string[]> | null | {
698510496 [Op in VectorizeVectorMetadataFilterOp]?: Exclude<VectorizeVectorMetadataValue, string[]> | null;
1049710497+ } | {
1049810498+ [Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<VectorizeVectorMetadataValue, string[]>[];
698610499 };
698710500};
698810501/**
···729210805 | 'complete' | 'waiting' // instance is hibernating and waiting for sleep or event to finish
729310806 | 'waitingForPause' // instance is finishing the current work to pause
729410807 | 'unknown';
72957295- error?: string;
72967296- output?: object;
1080810808+ error?: {
1080910809+ name: string;
1081010810+ message: string;
1081110811+ };
1081210812+ output?: unknown;
729710813};
729810814interface WorkflowError {
729910815 code?: number;