personal web client for Bluesky
typescript solidjs bluesky atcute

chore: ignore worker-configuration from prettier

mary.my.id f879eec2 6f22b3aa

verified
+1
.prettierignore
··· 1 pnpm-lock.yaml
··· 1 pnpm-lock.yaml 2 + worker-configuration.d.ts
+3987 -471
worker-configuration.d.ts
··· 1 /* eslint-disable */ 2 - // Generated by Wrangler by running `wrangler types` (hash: 869ac3b4ce0f52ba3b2e0bc70c49089e) 3 - // Runtime types generated with workerd@1.20250617.0 2025-08-25 4 declare namespace Cloudflare { 5 interface Env { 6 } 7 } 8 interface Env extends Cloudflare.Env {} ··· 26 // noinspection JSUnusedGlobalSymbols 27 declare var onmessage: never; 28 /** 29 - * An abnormal event (called an exception) which occurs as a result of calling a method or accessing a property of a web API. 30 * 31 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException) 32 */ 33 declare class DOMException extends Error { 34 constructor(message?: string, name?: string); 35 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) */ 36 readonly message: string; 37 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) */ 38 readonly name: string; 39 /** 40 * @deprecated 41 * 42 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code) ··· 80 declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> { 81 EventTarget: typeof EventTarget; 82 } 83 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */ 84 interface Console { 85 "assert"(condition?: boolean, ...data: any[]): void; 86 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */ 87 clear(): void; 88 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */ 89 count(label?: string): void; 90 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) */ 91 countReset(label?: string): void; 92 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */ 93 debug(...data: any[]): void; 94 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) */ 95 dir(item?: any, options?: any): void; 96 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) */ 97 dirxml(...data: any[]): void; 98 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) */ 99 error(...data: any[]): void; 100 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */ 101 group(...data: any[]): void; 102 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) */ 103 groupCollapsed(...data: any[]): void; 104 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) */ 105 groupEnd(): void; 106 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */ 107 info(...data: any[]): void; 108 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) */ 109 log(...data: any[]): void; 110 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) */ 111 table(tabularData?: any, properties?: string[]): void; 112 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */ 113 time(label?: string): void; 114 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) */ 115 timeEnd(label?: string): void; 116 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) */ 117 timeLog(label?: string, ...data: any[]): void; 118 timeStamp(label?: string): void; 119 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */ 120 trace(...data: any[]): void; 121 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) */ 122 warn(...data: any[]): void; 123 } 124 declare const console: Console; ··· 192 function validate(bytes: BufferSource): boolean; 193 } 194 /** 195 - * This ServiceWorker API interface represents the global execution context of a service worker. 196 * Available only in secure contexts. 197 * 198 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope) ··· 238 ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy; 239 CountQueuingStrategy: typeof CountQueuingStrategy; 240 ErrorEvent: typeof ErrorEvent; 241 EventSource: typeof EventSource; 242 ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest; 243 ReadableStreamDefaultController: typeof ReadableStreamDefaultController; ··· 279 declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void; 280 declare function removeEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void; 281 /** 282 - * 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. 283 * 284 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) 285 */ ··· 337 declare const navigator: Navigator; 338 interface TestController { 339 } 340 - interface ExecutionContext { 341 waitUntil(promise: Promise<any>): void; 342 passThroughOnException(): void; 343 - props: any; 344 } 345 type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: Env, ctx: ExecutionContext) => Response | Promise<Response>; 346 type ExportedHandlerTailHandler<Env = unknown> = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>; 347 type ExportedHandlerTraceHandler<Env = unknown> = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>; 348 - type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>; 349 type ExportedHandlerScheduledHandler<Env = unknown> = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise<void>; 350 type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (batch: MessageBatch<Message>, env: Env, ctx: ExecutionContext) => void | Promise<void>; 351 type ExportedHandlerTestHandler<Env = unknown> = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise<void>; ··· 362 interface StructuredSerializeOptions { 363 transfer?: any[]; 364 } 365 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) */ 366 - declare abstract class PromiseRejectionEvent extends Event { 367 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) */ 368 - readonly promise: Promise<any>; 369 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) */ 370 - readonly reason: any; 371 - } 372 declare abstract class Navigator { 373 - sendBeacon(url: string, body?: (ReadableStream | string | (ArrayBuffer | ArrayBufferView) | Blob | FormData | URLSearchParams | URLSearchParams)): boolean; 374 readonly userAgent: string; 375 readonly hardwareConcurrency: number; 376 readonly language: string; 377 readonly languages: string[]; 378 } 379 - /** 380 - * The Workers runtime supports a subset of the Performance API, used to measure timing and performance, 381 - * as well as timing of subrequests and other operations. 382 - * 383 - * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/) 384 - */ 385 - interface Performance { 386 - /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */ 387 - readonly timeOrigin: number; 388 - /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */ 389 - now(): number; 390 - } 391 interface AlarmInvocationInfo { 392 readonly isRetry: boolean; 393 readonly retryCount: number; ··· 411 equals(other: DurableObjectId): boolean; 412 readonly name?: string; 413 } 414 - interface DurableObjectNamespace<T extends Rpc.DurableObjectBranded | undefined = undefined> { 415 newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId; 416 idFromName(name: string): DurableObjectId; 417 idFromString(id: string): DurableObjectId; 418 get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub<T>; 419 jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace<T>; 420 } 421 type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; ··· 426 interface DurableObjectNamespaceGetDurableObjectOptions { 427 locationHint?: DurableObjectLocationHint; 428 } 429 - interface DurableObjectState { 430 waitUntil(promise: Promise<any>): void; 431 readonly id: DurableObjectId; 432 readonly storage: DurableObjectStorage; 433 container?: Container; ··· 470 deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>; 471 sync(): Promise<void>; 472 sql: SqlStorage; 473 transactionSync<T>(closure: () => T): T; 474 getCurrentBookmark(): Promise<string>; 475 getBookmarkForTime(timestamp: number | Date): Promise<string>; ··· 515 blobs?: ((ArrayBuffer | string) | null)[]; 516 } 517 /** 518 - * An event which takes place in the DOM. 519 * 520 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event) 521 */ 522 declare class Event { 523 constructor(type: string, init?: EventInit); 524 /** 525 - * Returns the type of event, e.g. "click", "hashchange", or "submit". 526 * 527 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type) 528 */ 529 get type(): string; 530 /** 531 - * Returns the event's phase, which is one of NONE, CAPTURING_PHASE, AT_TARGET, and BUBBLING_PHASE. 532 * 533 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) 534 */ 535 get eventPhase(): number; 536 /** 537 - * 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. 538 * 539 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed) 540 */ 541 get composed(): boolean; 542 /** 543 - * 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. 544 * 545 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles) 546 */ 547 get bubbles(): boolean; 548 /** 549 - * 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. 550 * 551 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable) 552 */ 553 get cancelable(): boolean; 554 /** 555 - * Returns true if preventDefault() was invoked successfully to indicate cancelation, and false otherwise. 556 * 557 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) 558 */ 559 get defaultPrevented(): boolean; 560 /** 561 * @deprecated 562 * 563 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue) 564 */ 565 get returnValue(): boolean; 566 /** 567 - * Returns the object whose event listener's callback is currently being invoked. 568 * 569 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget) 570 */ 571 get currentTarget(): EventTarget | undefined; 572 /** 573 - * Returns the object to which event is dispatched (its target). 574 * 575 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target) 576 */ 577 get target(): EventTarget | undefined; 578 /** 579 * @deprecated 580 * 581 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement) 582 */ 583 get srcElement(): EventTarget | undefined; 584 /** 585 - * Returns the event's timestamp as the number of milliseconds measured relative to the time origin. 586 * 587 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) 588 */ 589 get timeStamp(): number; 590 /** 591 - * Returns true if event was dispatched by the user agent, and false otherwise. 592 * 593 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) 594 */ 595 get isTrusted(): boolean; 596 /** 597 * @deprecated 598 * 599 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) 600 */ 601 get cancelBubble(): boolean; 602 /** 603 * @deprecated 604 * 605 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) 606 */ 607 set cancelBubble(value: boolean); 608 /** 609 - * 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. 610 * 611 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation) 612 */ 613 stopImmediatePropagation(): void; 614 /** 615 - * 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. 616 * 617 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault) 618 */ 619 preventDefault(): void; 620 /** 621 - * When dispatched in a tree, invoking this method prevents event from reaching any objects other than the current object. 622 * 623 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation) 624 */ 625 stopPropagation(): void; 626 /** 627 - * 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. 628 * 629 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath) 630 */ ··· 645 } 646 type EventListenerOrEventListenerObject<EventType extends Event = Event> = EventListener<EventType> | EventListenerObject<EventType>; 647 /** 648 - * EventTarget is a DOM interface implemented by objects that can receive events and may have listeners for them. 649 * 650 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget) 651 */ 652 declare class EventTarget<EventMap extends Record<string, Event> = Record<string, Event>> { 653 constructor(); 654 /** 655 - * 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. 656 - * 657 - * 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. 658 - * 659 - * 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. 660 - * 661 - * 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. 662 - * 663 - * When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. 664 - * 665 - * If an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted. 666 - * 667 - * The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture. 668 * 669 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) 670 */ 671 addEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void; 672 /** 673 - * Removes the event listener in target's event listener list with the same type, callback, and options. 674 * 675 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) 676 */ 677 removeEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void; 678 /** 679 - * 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. 680 * 681 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) 682 */ ··· 695 handleEvent: (event: Event) => any | undefined; 696 } 697 /** 698 - * A controller object that allows you to abort one or more DOM requests as and when desired. 699 * 700 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController) 701 */ 702 declare class AbortController { 703 constructor(); 704 /** 705 - * Returns the AbortSignal object associated with this object. 706 * 707 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal) 708 */ 709 get signal(): AbortSignal; 710 /** 711 - * 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. 712 * 713 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort) 714 */ 715 abort(reason?: any): void; 716 } 717 /** 718 - * 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. 719 * 720 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal) 721 */ 722 declare abstract class AbortSignal extends EventTarget { 723 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) */ 724 static abort(reason?: any): AbortSignal; 725 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) */ 726 static timeout(delay: number): AbortSignal; 727 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) */ 728 static any(signals: AbortSignal[]): AbortSignal; 729 /** 730 - * Returns true if this AbortSignal's AbortController has signaled to abort, and false otherwise. 731 * 732 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted) 733 */ 734 get aborted(): boolean; 735 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) */ 736 get reason(): any; 737 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */ 738 get onabort(): any | null; 739 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */ 740 set onabort(value: any | null); 741 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */ 742 throwIfAborted(): void; 743 } 744 interface Scheduler { ··· 748 signal?: AbortSignal; 749 } 750 /** 751 - * 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. 752 * 753 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent) 754 */ 755 declare abstract class ExtendableEvent extends Event { 756 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) */ 757 waitUntil(promise: Promise<any>): void; 758 } 759 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) */ 760 declare class CustomEvent<T = any> extends Event { 761 constructor(type: string, init?: CustomEventCustomEventInit); 762 /** 763 - * Returns any custom data event was created with. Typically used for synthetic events. 764 * 765 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) 766 */ ··· 773 detail?: any; 774 } 775 /** 776 - * 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. 777 * 778 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob) 779 */ 780 declare class Blob { 781 constructor(type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[], options?: BlobOptions); 782 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) */ 783 get size(): number; 784 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) */ 785 get type(): string; 786 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) */ 787 slice(start?: number, end?: number, type?: string): Blob; 788 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */ 789 arrayBuffer(): Promise<ArrayBuffer>; 790 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */ 791 bytes(): Promise<Uint8Array>; 792 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */ 793 text(): Promise<string>; 794 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */ 795 stream(): ReadableStream; 796 } 797 interface BlobOptions { 798 type?: string; 799 } 800 /** 801 - * Provides information about files and allows JavaScript in a web page to access their content. 802 * 803 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File) 804 */ 805 declare class File extends Blob { 806 constructor(bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined, name: string, options?: FileOptions); 807 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) */ 808 get name(): string; 809 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */ 810 get lastModified(): number; 811 } 812 interface FileOptions { ··· 819 * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/) 820 */ 821 declare abstract class CacheStorage { 822 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) */ 823 open(cacheName: string): Promise<Cache>; 824 readonly default: Cache; 825 } ··· 849 */ 850 declare abstract class Crypto { 851 /** 852 * Available only in secure contexts. 853 * 854 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle) 855 */ 856 get subtle(): SubtleCrypto; 857 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) */ 858 getRandomValues<T extends Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array>(buffer: T): T; 859 /** 860 * Available only in secure contexts. 861 * 862 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID) ··· 865 DigestStream: typeof DigestStream; 866 } 867 /** 868 - * 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). 869 * Available only in secure contexts. 870 * 871 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto) 872 */ 873 declare abstract class SubtleCrypto { 874 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) */ 875 encrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, plainText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 876 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) */ 877 decrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, cipherText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 878 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) */ 879 sign(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 880 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) */ 881 verify(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, signature: ArrayBuffer | ArrayBufferView, data: ArrayBuffer | ArrayBufferView): Promise<boolean>; 882 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) */ 883 digest(algorithm: string | SubtleCryptoHashAlgorithm, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 884 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) */ 885 generateKey(algorithm: string | SubtleCryptoGenerateKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey | CryptoKeyPair>; 886 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) */ 887 deriveKey(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 888 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) */ 889 deriveBits(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>; 890 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) */ 891 importKey(format: string, keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey, algorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 892 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) */ 893 exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>; 894 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) */ 895 wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm): Promise<ArrayBuffer>; 896 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) */ 897 unwrapKey(format: string, wrappedKey: ArrayBuffer | ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | SubtleCryptoEncryptAlgorithm, unwrappedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 898 timingSafeEqual(a: ArrayBuffer | ArrayBufferView, b: ArrayBuffer | ArrayBufferView): boolean; 899 } 900 /** 901 - * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. 902 * Available only in secure contexts. 903 * 904 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey) 905 */ 906 declare abstract class CryptoKey { 907 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) */ 908 readonly type: string; 909 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) */ 910 readonly extractable: boolean; 911 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) */ 912 readonly algorithm: CryptoKeyKeyAlgorithm | CryptoKeyAesKeyAlgorithm | CryptoKeyHmacKeyAlgorithm | CryptoKeyRsaKeyAlgorithm | CryptoKeyEllipticKeyAlgorithm | CryptoKeyArbitraryKeyAlgorithm; 913 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */ 914 readonly usages: string[]; 915 } 916 interface CryptoKeyPair { ··· 1017 get bytesWritten(): number | bigint; 1018 } 1019 /** 1020 - * 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. 1021 * 1022 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder) 1023 */ 1024 declare class TextDecoder { 1025 constructor(label?: string, options?: TextDecoderConstructorOptions); 1026 /** 1027 - * 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. 1028 - * 1029 - * ``` 1030 - * var string = "", decoder = new TextDecoder(encoding), buffer; 1031 - * while(buffer = next_chunk()) { 1032 - * string += decoder.decode(buffer, {stream:true}); 1033 - * } 1034 - * string += decoder.decode(); // end-of-queue 1035 - * ``` 1036 - * 1037 - * If the error mode is "fatal" and encoding's decoder returns error, throws a TypeError. 1038 * 1039 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) 1040 */ ··· 1044 get ignoreBOM(): boolean; 1045 } 1046 /** 1047 - * 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. 1048 * 1049 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder) 1050 */ 1051 declare class TextEncoder { 1052 constructor(); 1053 /** 1054 - * Returns the result of running UTF-8's encoder. 1055 * 1056 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode) 1057 */ 1058 encode(input?: string): Uint8Array; 1059 /** 1060 - * 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. 1061 * 1062 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto) 1063 */ 1064 - encodeInto(input: string, buffer: ArrayBuffer | ArrayBufferView): TextEncoderEncodeIntoResult; 1065 get encoding(): string; 1066 } 1067 interface TextDecoderConstructorOptions { ··· 1076 written: number; 1077 } 1078 /** 1079 - * Events providing information related to errors in scripts or in files. 1080 * 1081 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) 1082 */ 1083 declare class ErrorEvent extends Event { 1084 constructor(type: string, init?: ErrorEventErrorEventInit); 1085 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */ 1086 get filename(): string; 1087 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */ 1088 get message(): string; 1089 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */ 1090 get lineno(): number; 1091 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */ 1092 get colno(): number; 1093 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */ 1094 get error(): any; 1095 } 1096 interface ErrorEventErrorEventInit { ··· 1101 error?: any; 1102 } 1103 /** 1104 - * 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". 1105 * 1106 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData) 1107 */ 1108 declare class FormData { 1109 constructor(); 1110 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */ 1111 append(name: string, value: string): void; 1112 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) */ 1113 append(name: string, value: Blob, filename?: string): void; 1114 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) */ 1115 delete(name: string): void; 1116 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) */ 1117 get(name: string): (File | string) | null; 1118 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) */ 1119 getAll(name: string): (File | string)[]; 1120 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) */ 1121 has(name: string): boolean; 1122 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */ 1123 set(name: string, value: string): void; 1124 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) */ 1125 set(name: string, value: Blob, filename?: string): void; 1126 /* Returns an array of key, value pairs for every entry in the list. */ 1127 entries(): IterableIterator<[ ··· 1209 append(content: string, options?: ContentOptions): DocumentEnd; 1210 } 1211 /** 1212 - * 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. 1213 * 1214 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent) 1215 */ 1216 declare abstract class FetchEvent extends ExtendableEvent { 1217 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) */ 1218 readonly request: Request; 1219 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) */ 1220 respondWith(promise: Response | Promise<Response>): void; 1221 passThroughOnException(): void; 1222 } 1223 type HeadersInit = Headers | Iterable<Iterable<string>> | Record<string, string>; 1224 /** 1225 - * 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. 1226 * 1227 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers) 1228 */ 1229 declare class Headers { 1230 constructor(init?: HeadersInit); 1231 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) */ 1232 get(name: string): string | null; 1233 getAll(name: string): string[]; 1234 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) */ 1235 getSetCookie(): string[]; 1236 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) */ 1237 has(name: string): boolean; 1238 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) */ 1239 set(name: string, value: string): void; 1240 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) */ 1241 append(name: string, value: string): void; 1242 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) */ 1243 delete(name: string): void; 1244 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: Headers) => void, thisArg?: This): void; 1245 /* Returns an iterator allowing to go through all key/value pairs contained in this object. */ ··· 1276 blob(): Promise<Blob>; 1277 } 1278 /** 1279 - * This Fetch API interface represents the response to a request. 1280 * 1281 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response) 1282 */ ··· 1288 json(any: any, maybeInit?: (ResponseInit | Response)): Response; 1289 }; 1290 /** 1291 - * This Fetch API interface represents the response to a request. 1292 * 1293 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response) 1294 */ 1295 interface Response extends Body { 1296 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) */ 1297 clone(): Response; 1298 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) */ 1299 status: number; 1300 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) */ 1301 statusText: string; 1302 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) */ 1303 headers: Headers; 1304 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) */ 1305 ok: boolean; 1306 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) */ 1307 redirected: boolean; 1308 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) */ 1309 url: string; 1310 webSocket: WebSocket | null; 1311 cf: any | undefined; 1312 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type) */ 1313 type: "default" | "error"; 1314 } 1315 interface ResponseInit { ··· 1322 } 1323 type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> = Request<CfHostMetadata, Cf> | string; 1324 /** 1325 - * This Fetch API interface represents a resource request. 1326 * 1327 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request) 1328 */ ··· 1331 new <CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>(input: RequestInfo<CfProperties> | URL, init?: RequestInit<Cf>): Request<CfHostMetadata, Cf>; 1332 }; 1333 /** 1334 - * This Fetch API interface represents a resource request. 1335 * 1336 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request) 1337 */ 1338 interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> extends Body { 1339 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) */ 1340 clone(): Request<CfHostMetadata, Cf>; 1341 /** 1342 - * Returns request's HTTP method, which is "GET" by default. 1343 * 1344 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method) 1345 */ 1346 method: string; 1347 /** 1348 - * Returns the URL of request as a string. 1349 * 1350 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url) 1351 */ 1352 url: string; 1353 /** 1354 - * 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. 1355 * 1356 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers) 1357 */ 1358 headers: Headers; 1359 /** 1360 - * 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. 1361 * 1362 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect) 1363 */ 1364 redirect: string; 1365 fetcher: Fetcher | null; 1366 /** 1367 - * Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler. 1368 * 1369 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal) 1370 */ 1371 signal: AbortSignal; 1372 cf: Cf | undefined; 1373 /** 1374 - * 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] 1375 * 1376 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity) 1377 */ 1378 integrity: string; 1379 /** 1380 - * Returns a boolean indicating whether or not request can outlive the global in which it was created. 1381 * 1382 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive) 1383 */ 1384 keepalive: boolean; 1385 /** 1386 - * Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. 1387 * 1388 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache) 1389 */ 1390 - cache?: "no-store"; 1391 } 1392 interface RequestInit<Cf = CfProperties> { 1393 /* A string to set request's method. */ ··· 1401 fetcher?: (Fetcher | null); 1402 cf?: Cf; 1403 /* A string indicating how the request will interact with the browser's cache to set request's cache. */ 1404 - cache?: "no-store"; 1405 /* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ 1406 integrity?: string; 1407 /* An AbortSignal to set request's signal. */ 1408 signal?: (AbortSignal | null); 1409 encodeResponseBody?: "automatic" | "manual"; 1410 } 1411 - type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> = Fetcher<T>; 1412 type Fetcher<T extends Rpc.EntrypointBranded | undefined = undefined, Reserved extends string = never> = (T extends Rpc.EntrypointBranded ? Rpc.Provider<T, Reserved | "fetch" | "connect"> : unknown) & { 1413 fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; 1414 connect(address: SocketAddress | string, options?: SocketOptions): Socket; ··· 1734 value?: undefined; 1735 }; 1736 /** 1737 - * 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. 1738 * 1739 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream) 1740 */ 1741 interface ReadableStream<R = any> { 1742 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */ 1743 get locked(): boolean; 1744 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */ 1745 cancel(reason?: any): Promise<void>; 1746 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */ 1747 getReader(): ReadableStreamDefaultReader<R>; 1748 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) */ 1749 getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader; 1750 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) */ 1751 pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>; 1752 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) */ 1753 pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>; 1754 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) */ 1755 tee(): [ 1756 ReadableStream<R>, 1757 ReadableStream<R> ··· 1760 [Symbol.asyncIterator](options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>; 1761 } 1762 /** 1763 - * 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. 1764 * 1765 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream) 1766 */ ··· 1769 new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>; 1770 new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; 1771 }; 1772 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) */ 1773 declare class ReadableStreamDefaultReader<R = any> { 1774 constructor(stream: ReadableStream); 1775 get closed(): Promise<void>; 1776 cancel(reason?: any): Promise<void>; 1777 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) */ 1778 read(): Promise<ReadableStreamReadResult<R>>; 1779 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) */ 1780 releaseLock(): void; 1781 } 1782 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) */ 1783 declare class ReadableStreamBYOBReader { 1784 constructor(stream: ReadableStream); 1785 get closed(): Promise<void>; 1786 cancel(reason?: any): Promise<void>; 1787 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) */ 1788 read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>; 1789 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) */ 1790 releaseLock(): void; 1791 readAtLeast<T extends ArrayBufferView>(minElements: number, view: T): Promise<ReadableStreamReadResult<T>>; 1792 } ··· 1801 */ 1802 mode: "byob"; 1803 } 1804 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */ 1805 declare abstract class ReadableStreamBYOBRequest { 1806 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */ 1807 get view(): Uint8Array | null; 1808 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */ 1809 respond(bytesWritten: number): void; 1810 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) */ 1811 respondWithNewView(view: ArrayBuffer | ArrayBufferView): void; 1812 get atLeast(): number | null; 1813 } 1814 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */ 1815 declare abstract class ReadableStreamDefaultController<R = any> { 1816 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */ 1817 get desiredSize(): number | null; 1818 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */ 1819 close(): void; 1820 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) */ 1821 enqueue(chunk?: R): void; 1822 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) */ 1823 error(reason: any): void; 1824 } 1825 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */ 1826 declare abstract class ReadableByteStreamController { 1827 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */ 1828 get byobRequest(): ReadableStreamBYOBRequest | null; 1829 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */ 1830 get desiredSize(): number | null; 1831 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) */ 1832 close(): void; 1833 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) */ 1834 enqueue(chunk: ArrayBuffer | ArrayBufferView): void; 1835 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) */ 1836 error(reason: any): void; 1837 } 1838 /** 1839 - * 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. 1840 * 1841 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController) 1842 */ 1843 declare abstract class WritableStreamDefaultController { 1844 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */ 1845 get signal(): AbortSignal; 1846 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */ 1847 error(reason?: any): void; 1848 } 1849 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */ 1850 declare abstract class TransformStreamDefaultController<O = any> { 1851 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */ 1852 get desiredSize(): number | null; 1853 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */ 1854 enqueue(chunk?: O): void; 1855 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) */ 1856 error(reason: any): void; 1857 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */ 1858 terminate(): void; 1859 } 1860 interface ReadableWritablePair<R = any, W = any> { ··· 1867 readable: ReadableStream<R>; 1868 } 1869 /** 1870 - * 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. 1871 * 1872 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream) 1873 */ 1874 declare class WritableStream<W = any> { 1875 constructor(underlyingSink?: UnderlyingSink, queuingStrategy?: QueuingStrategy); 1876 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) */ 1877 get locked(): boolean; 1878 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) */ 1879 abort(reason?: any): Promise<void>; 1880 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) */ 1881 close(): Promise<void>; 1882 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) */ 1883 getWriter(): WritableStreamDefaultWriter<W>; 1884 } 1885 /** 1886 - * 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. 1887 * 1888 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter) 1889 */ 1890 declare class WritableStreamDefaultWriter<W = any> { 1891 constructor(stream: WritableStream); 1892 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) */ 1893 get closed(): Promise<void>; 1894 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) */ 1895 get ready(): Promise<void>; 1896 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) */ 1897 get desiredSize(): number | null; 1898 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) */ 1899 abort(reason?: any): Promise<void>; 1900 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) */ 1901 close(): Promise<void>; 1902 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) */ 1903 write(chunk?: W): Promise<void>; 1904 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) */ 1905 releaseLock(): void; 1906 } 1907 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) */ 1908 declare class TransformStream<I = any, O = any> { 1909 constructor(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>); 1910 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) */ 1911 get readable(): ReadableStream<O>; 1912 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) */ 1913 get writable(): WritableStream<I>; 1914 } 1915 declare class FixedLengthStream extends IdentityTransformStream { ··· 1924 interface ReadableStreamValuesOptions { 1925 preventCancel?: boolean; 1926 } 1927 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) */ 1928 declare class CompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> { 1929 constructor(format: "gzip" | "deflate" | "deflate-raw"); 1930 } 1931 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) */ 1932 declare class DecompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> { 1933 constructor(format: "gzip" | "deflate" | "deflate-raw"); 1934 } 1935 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) */ 1936 declare class TextEncoderStream extends TransformStream<string, Uint8Array> { 1937 constructor(); 1938 get encoding(): string; 1939 } 1940 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) */ 1941 declare class TextDecoderStream extends TransformStream<ArrayBuffer | ArrayBufferView, string> { 1942 constructor(label?: string, options?: TextDecoderStreamTextDecoderStreamInit); 1943 get encoding(): string; ··· 1949 ignoreBOM?: boolean; 1950 } 1951 /** 1952 - * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. 1953 * 1954 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy) 1955 */ 1956 declare class ByteLengthQueuingStrategy implements QueuingStrategy<ArrayBufferView> { 1957 constructor(init: QueuingStrategyInit); 1958 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) */ 1959 get highWaterMark(): number; 1960 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */ 1961 get size(): (chunk?: any) => number; 1962 } 1963 /** 1964 - * This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. 1965 * 1966 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy) 1967 */ 1968 declare class CountQueuingStrategy implements QueuingStrategy { 1969 constructor(init: QueuingStrategyInit); 1970 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) */ 1971 get highWaterMark(): number; 1972 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */ 1973 get size(): (chunk?: any) => number; ··· 2000 readonly scriptVersion?: ScriptVersion; 2001 readonly dispatchNamespace?: string; 2002 readonly scriptTags?: string[]; 2003 readonly outcome: string; 2004 readonly executionModel: string; 2005 readonly truncated: boolean; ··· 2085 fromTrace(item: TraceItem): TraceMetrics; 2086 } 2087 /** 2088 - * The URL interface represents an object providing static methods used for creating object URLs. 2089 * 2090 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL) 2091 */ 2092 declare class URL { 2093 constructor(url: string | URL, base?: string | URL); 2094 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) */ 2095 get origin(): string; 2096 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */ 2097 get href(): string; 2098 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) */ 2099 set href(value: string); 2100 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */ 2101 get protocol(): string; 2102 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) */ 2103 set protocol(value: string); 2104 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */ 2105 get username(): string; 2106 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) */ 2107 set username(value: string); 2108 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */ 2109 get password(): string; 2110 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) */ 2111 set password(value: string); 2112 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */ 2113 get host(): string; 2114 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) */ 2115 set host(value: string); 2116 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */ 2117 get hostname(): string; 2118 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) */ 2119 set hostname(value: string); 2120 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */ 2121 get port(): string; 2122 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) */ 2123 set port(value: string); 2124 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */ 2125 get pathname(): string; 2126 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) */ 2127 set pathname(value: string); 2128 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */ 2129 get search(): string; 2130 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) */ 2131 set search(value: string); 2132 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */ 2133 get hash(): string; 2134 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) */ 2135 set hash(value: string); 2136 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) */ 2137 get searchParams(): URLSearchParams; 2138 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) */ 2139 toJSON(): string; 2140 /*function toString() { [native code] }*/ 2141 toString(): string; 2142 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) */ 2143 static canParse(url: string, base?: string): boolean; 2144 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) */ 2145 static parse(url: string, base?: string): URL | null; 2146 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) */ 2147 static createObjectURL(object: File | Blob): string; 2148 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) */ 2149 static revokeObjectURL(object_url: string): void; 2150 } 2151 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) */ 2152 declare class URLSearchParams { 2153 constructor(init?: (Iterable<Iterable<string>> | Record<string, string> | string)); 2154 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) */ 2155 get size(): number; 2156 /** 2157 - * Appends a specified key/value pair as a new search parameter. 2158 * 2159 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append) 2160 */ 2161 append(name: string, value: string): void; 2162 /** 2163 - * Deletes the given search parameter, and its associated value, from the list of all search parameters. 2164 * 2165 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) 2166 */ 2167 delete(name: string, value?: string): void; 2168 /** 2169 - * Returns the first value associated to the given search parameter. 2170 * 2171 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get) 2172 */ 2173 get(name: string): string | null; 2174 /** 2175 - * Returns all the values association with a given search parameter. 2176 * 2177 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll) 2178 */ 2179 getAll(name: string): string[]; 2180 /** 2181 - * Returns a Boolean indicating if such a search parameter exists. 2182 * 2183 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) 2184 */ 2185 has(name: string, value?: string): boolean; 2186 /** 2187 - * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. 2188 * 2189 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set) 2190 */ 2191 set(name: string, value: string): void; 2192 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) */ 2193 sort(): void; 2194 /* Returns an array of key, value pairs for every entry in the search params. */ 2195 entries(): IterableIterator<[ ··· 2201 /* Returns a list of values in the search params. */ 2202 values(): IterableIterator<string>; 2203 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: URLSearchParams) => void, thisArg?: This): void; 2204 - /*function toString() { [native code] } Returns a string containing a query string suitable for use in a URL. Does not include the question mark. */ 2205 toString(): string; 2206 [Symbol.iterator](): IterableIterator<[ 2207 key: string, ··· 2252 ignoreCase?: boolean; 2253 } 2254 /** 2255 - * 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. 2256 * 2257 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent) 2258 */ 2259 declare class CloseEvent extends Event { 2260 constructor(type: string, initializer?: CloseEventInit); 2261 /** 2262 - * Returns the WebSocket connection close code provided by the server. 2263 * 2264 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code) 2265 */ 2266 readonly code: number; 2267 /** 2268 - * Returns the WebSocket connection close reason provided by the server. 2269 * 2270 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason) 2271 */ 2272 readonly reason: string; 2273 /** 2274 - * Returns true if the connection closed cleanly; false otherwise. 2275 * 2276 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean) 2277 */ ··· 2282 reason?: string; 2283 wasClean?: boolean; 2284 } 2285 - /** 2286 - * A message received by a target object. 2287 - * 2288 - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent) 2289 - */ 2290 - declare class MessageEvent extends Event { 2291 - constructor(type: string, initializer: MessageEventInit); 2292 - /** 2293 - * Returns the data of the message. 2294 - * 2295 - * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data) 2296 - */ 2297 - readonly data: ArrayBuffer | string; 2298 - } 2299 - interface MessageEventInit { 2300 - data: ArrayBuffer | string; 2301 - } 2302 type WebSocketEventMap = { 2303 close: CloseEvent; 2304 message: MessageEvent; ··· 2306 error: ErrorEvent; 2307 }; 2308 /** 2309 - * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. 2310 * 2311 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket) 2312 */ ··· 2323 readonly CLOSED: number; 2324 }; 2325 /** 2326 - * Provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection. 2327 * 2328 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket) 2329 */ 2330 interface WebSocket extends EventTarget<WebSocketEventMap> { 2331 accept(): void; 2332 /** 2333 - * Transmits data using the WebSocket connection. data can be a string, a Blob, an ArrayBuffer, or an ArrayBufferView. 2334 * 2335 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send) 2336 */ 2337 send(message: (ArrayBuffer | ArrayBufferView) | string): void; 2338 /** 2339 - * Closes the WebSocket connection, optionally using code as the the WebSocket connection close code and reason as the the WebSocket connection close reason. 2340 * 2341 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close) 2342 */ ··· 2344 serializeAttachment(attachment: any): void; 2345 deserializeAttachment(): any | null; 2346 /** 2347 - * Returns the state of the WebSocket object's connection. It can have the values described below. 2348 * 2349 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState) 2350 */ 2351 readyState: number; 2352 /** 2353 - * Returns the URL that was used to establish the WebSocket connection. 2354 * 2355 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url) 2356 */ 2357 url: string | null; 2358 /** 2359 - * 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. 2360 * 2361 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol) 2362 */ 2363 protocol: string | null; 2364 /** 2365 - * Returns the extensions selected by the server, if any. 2366 * 2367 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions) 2368 */ ··· 2425 remoteAddress?: string; 2426 localAddress?: string; 2427 } 2428 - /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) */ 2429 declare class EventSource extends EventTarget { 2430 constructor(url: string, init?: EventSourceEventSourceInit); 2431 /** 2432 - * Aborts any instances of the fetch algorithm started for this EventSource object, and sets the readyState attribute to CLOSED. 2433 * 2434 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close) 2435 */ 2436 close(): void; 2437 /** 2438 - * Returns the URL providing the event stream. 2439 * 2440 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url) 2441 */ 2442 get url(): string; 2443 /** 2444 - * Returns true if the credentials mode for connection requests to the URL providing the event stream is set to "include", and false otherwise. 2445 * 2446 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials) 2447 */ 2448 get withCredentials(): boolean; 2449 /** 2450 - * Returns the state of this EventSource object's connection. It can have the values described below. 2451 * 2452 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState) 2453 */ ··· 2480 destroy(error?: any): Promise<void>; 2481 signal(signo: number): void; 2482 getTcpPort(port: number): Fetcher; 2483 } 2484 interface ContainerStartupOptions { 2485 entrypoint?: string[]; 2486 enableInternet: boolean; 2487 env?: Record<string, string>; 2488 } 2489 type AiImageClassificationInput = { 2490 image: number[]; ··· 2537 description: string; 2538 }; 2539 declare abstract class BaseAiImageTextToText { 2540 inputs: AiImageTextToTextInput; 2541 postProcessedOutputs: AiImageTextToTextOutput; 2542 } ··· 2670 tools?: AiTextGenerationToolInput[] | AiTextGenerationToolLegacyInput[] | (object & NonNullable<unknown>); 2671 functions?: AiTextGenerationFunctionsInput[]; 2672 }; 2673 type AiTextGenerationOutput = { 2674 response?: string; 2675 - tool_calls?: { 2676 - name: string; 2677 - arguments: unknown; 2678 - }[]; 2679 }; 2680 declare abstract class BaseAiTextGeneration { 2681 inputs: AiTextGenerationInput; ··· 2722 inputs: AiTranslationInput; 2723 postProcessedOutputs: AiTranslationOutput; 2724 } 2725 type Ai_Cf_Baai_Bge_Base_En_V1_5_Input = { 2726 text: string | string[]; 2727 /** ··· 2750 * The pooling method used in the embedding process. 2751 */ 2752 pooling?: "mean" | "cls"; 2753 - } | AsyncResponse; 2754 - interface AsyncResponse { 2755 /** 2756 * The async request id that can be used to obtain the results. 2757 */ ··· 2827 * The translated text in the target language 2828 */ 2829 translated_text?: string; 2830 - } | AsyncResponse; 2831 declare abstract class Base_Ai_Cf_Meta_M2M100_1_2B { 2832 inputs: Ai_Cf_Meta_M2M100_1_2B_Input; 2833 postProcessedOutputs: Ai_Cf_Meta_M2M100_1_2B_Output; ··· 2860 * The pooling method used in the embedding process. 2861 */ 2862 pooling?: "mean" | "cls"; 2863 - } | AsyncResponse; 2864 declare abstract class Base_Ai_Cf_Baai_Bge_Small_En_V1_5 { 2865 inputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Input; 2866 postProcessedOutputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Output; ··· 2893 * The pooling method used in the embedding process. 2894 */ 2895 pooling?: "mean" | "cls"; 2896 - } | AsyncResponse; 2897 declare abstract class Base_Ai_Cf_Baai_Bge_Large_En_V1_5 { 2898 inputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Input; 2899 postProcessedOutputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Output; ··· 3079 inputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input; 3080 postProcessedOutputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output; 3081 } 3082 - type Ai_Cf_Baai_Bge_M3_Input = BGEM3InputQueryAndContexts | BGEM3InputEmbedding | { 3083 /** 3084 * Batch of the embeddings requests to run using async-queue 3085 */ 3086 - requests: (BGEM3InputQueryAndContexts1 | BGEM3InputEmbedding1)[]; 3087 }; 3088 - interface BGEM3InputQueryAndContexts { 3089 /** 3090 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts 3091 */ ··· 3104 */ 3105 truncate_inputs?: boolean; 3106 } 3107 - interface BGEM3InputEmbedding { 3108 text: string | string[]; 3109 /** 3110 * When provided with too long context should the model error out or truncate the context to fit? 3111 */ 3112 truncate_inputs?: boolean; 3113 } 3114 - interface BGEM3InputQueryAndContexts1 { 3115 /** 3116 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts 3117 */ ··· 3130 */ 3131 truncate_inputs?: boolean; 3132 } 3133 - interface BGEM3InputEmbedding1 { 3134 text: string | string[]; 3135 /** 3136 * When provided with too long context should the model error out or truncate the context to fit? 3137 */ 3138 truncate_inputs?: boolean; 3139 } 3140 - type Ai_Cf_Baai_Bge_M3_Output = BGEM3OuputQuery | BGEM3OutputEmbeddingForContexts | BGEM3OuputEmbedding | AsyncResponse; 3141 - interface BGEM3OuputQuery { 3142 response?: { 3143 /** 3144 * Index of the context in the request ··· 3150 score?: number; 3151 }[]; 3152 } 3153 - interface BGEM3OutputEmbeddingForContexts { 3154 response?: number[][]; 3155 shape?: number[]; 3156 /** ··· 3158 */ 3159 pooling?: "mean" | "cls"; 3160 } 3161 - interface BGEM3OuputEmbedding { 3162 shape?: number[]; 3163 /** 3164 * Embeddings of the requested text values ··· 3168 * The pooling method used in the embedding process. 3169 */ 3170 pooling?: "mean" | "cls"; 3171 } 3172 declare abstract class Base_Ai_Cf_Baai_Bge_M3 { 3173 inputs: Ai_Cf_Baai_Bge_M3_Input; ··· 3193 inputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input; 3194 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Output; 3195 } 3196 - type Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input = Prompt | Messages; 3197 - interface Prompt { 3198 /** 3199 * The input text prompt for the model to generate a response. 3200 */ ··· 3245 */ 3246 lora?: string; 3247 } 3248 - interface Messages { 3249 /** 3250 * An array of message objects representing the conversation history. 3251 */ ··· 3436 inputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input; 3437 postProcessedOutputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Output; 3438 } 3439 - 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; 3440 - interface Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt { 3441 /** 3442 * The input text prompt for the model to generate a response. 3443 */ ··· 3446 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 3447 */ 3448 lora?: string; 3449 - response_format?: JSONMode; 3450 /** 3451 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 3452 */ ··· 3488 */ 3489 presence_penalty?: number; 3490 } 3491 - interface JSONMode { 3492 type?: "json_object" | "json_schema"; 3493 json_schema?: unknown; 3494 } 3495 - interface Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages { 3496 /** 3497 * An array of message objects representing the conversation history. 3498 */ ··· 3597 }; 3598 }; 3599 })[]; 3600 - response_format?: JSONMode; 3601 /** 3602 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 3603 */ ··· 3639 */ 3640 presence_penalty?: number; 3641 } 3642 - interface AsyncBatch { 3643 requests?: { 3644 /** 3645 * 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. ··· 3681 * Increases the likelihood of the model introducing new topics. 3682 */ 3683 presence_penalty?: number; 3684 - response_format?: JSONMode; 3685 }[]; 3686 } 3687 type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output = { 3688 /** 3689 * The generated text response from the model ··· 3719 */ 3720 name?: string; 3721 }[]; 3722 - } | AsyncResponse; 3723 declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast { 3724 inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input; 3725 postProcessedOutputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output; ··· 3793 /** 3794 * A query you wish to perform against the provided contexts. 3795 */ 3796 - query: string; 3797 /** 3798 * Number of returned results starting with the best score. 3799 */ ··· 3824 inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input; 3825 postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output; 3826 } 3827 - type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input = Qwen2_5_Coder_32B_Instruct_Prompt | Qwen2_5_Coder_32B_Instruct_Messages; 3828 - interface Qwen2_5_Coder_32B_Instruct_Prompt { 3829 /** 3830 * The input text prompt for the model to generate a response. 3831 */ ··· 3834 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 3835 */ 3836 lora?: string; 3837 - response_format?: JSONMode; 3838 /** 3839 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 3840 */ ··· 3876 */ 3877 presence_penalty?: number; 3878 } 3879 - interface Qwen2_5_Coder_32B_Instruct_Messages { 3880 /** 3881 * An array of message objects representing the conversation history. 3882 */ ··· 3981 }; 3982 }; 3983 })[]; 3984 - response_format?: JSONMode; 3985 /** 3986 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 3987 */ ··· 4023 */ 4024 presence_penalty?: number; 4025 } 4026 type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output = { 4027 /** 4028 * The generated text response from the model ··· 4063 inputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input; 4064 postProcessedOutputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output; 4065 } 4066 - type Ai_Cf_Qwen_Qwq_32B_Input = Qwen_Qwq_32B_Prompt | Qwen_Qwq_32B_Messages; 4067 - interface Qwen_Qwq_32B_Prompt { 4068 /** 4069 * The input text prompt for the model to generate a response. 4070 */ ··· 4114 */ 4115 presence_penalty?: number; 4116 } 4117 - interface Qwen_Qwq_32B_Messages { 4118 /** 4119 * An array of message objects representing the conversation history. 4120 */ ··· 4329 inputs: Ai_Cf_Qwen_Qwq_32B_Input; 4330 postProcessedOutputs: Ai_Cf_Qwen_Qwq_32B_Output; 4331 } 4332 - 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; 4333 - interface Mistral_Small_3_1_24B_Instruct_Prompt { 4334 /** 4335 * The input text prompt for the model to generate a response. 4336 */ ··· 4380 */ 4381 presence_penalty?: number; 4382 } 4383 - interface Mistral_Small_3_1_24B_Instruct_Messages { 4384 /** 4385 * An array of message objects representing the conversation history. 4386 */ ··· 4595 inputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input; 4596 postProcessedOutputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output; 4597 } 4598 - type Ai_Cf_Google_Gemma_3_12B_It_Input = Google_Gemma_3_12B_It_Prompt | Google_Gemma_3_12B_It_Messages; 4599 - interface Google_Gemma_3_12B_It_Prompt { 4600 /** 4601 * The input text prompt for the model to generate a response. 4602 */ ··· 4646 */ 4647 presence_penalty?: number; 4648 } 4649 - interface Google_Gemma_3_12B_It_Messages { 4650 /** 4651 * An array of message objects representing the conversation history. 4652 */ ··· 4667 */ 4668 url?: string; 4669 }; 4670 - }[] | { 4671 - /** 4672 - * Type of the content provided 4673 - */ 4674 - type?: string; 4675 - text?: string; 4676 - image_url?: { 4677 - /** 4678 - * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted 4679 - */ 4680 - url?: string; 4681 - }; 4682 - }; 4683 }[]; 4684 functions?: { 4685 name: string; ··· 4857 inputs: Ai_Cf_Google_Gemma_3_12B_It_Input; 4858 postProcessedOutputs: Ai_Cf_Google_Gemma_3_12B_It_Output; 4859 } 4860 - type Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input = Ai_Cf_Meta_Llama_4_Prompt | Ai_Cf_Meta_Llama_4_Messages; 4861 - interface Ai_Cf_Meta_Llama_4_Prompt { 4862 /** 4863 * The input text prompt for the model to generate a response. 4864 */ ··· 4867 * JSON schema that should be fulfilled for the response. 4868 */ 4869 guided_json?: object; 4870 - response_format?: JSONMode; 4871 /** 4872 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 4873 */ ··· 4909 */ 4910 presence_penalty?: number; 4911 } 4912 - interface Ai_Cf_Meta_Llama_4_Messages { 4913 /** 4914 * An array of message objects representing the conversation history. 4915 */ ··· 5039 }; 5040 }; 5041 })[]; 5042 - response_format?: JSONMode; 5043 /** 5044 * JSON schema that should be fufilled for the response. 5045 */ ··· 5138 inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input; 5139 postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output; 5140 } 5141 interface AiModels { 5142 "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification; 5143 "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage; ··· 5146 "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage; 5147 "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage; 5148 "@cf/myshell-ai/melotts": BaseAiTextToSpeech; 5149 "@cf/microsoft/resnet-50": BaseAiImageClassification; 5150 - "@cf/facebook/detr-resnet-50": BaseAiObjectDetection; 5151 "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration; 5152 "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration; 5153 "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration; ··· 5181 "@cf/meta/llama-3-8b-instruct": BaseAiTextGeneration; 5182 "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration; 5183 "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration; 5184 - "@hf/meta-llama/meta-llama-3-8b-instruct": BaseAiTextGeneration; 5185 - "@cf/meta/llama-3.1-8b-instruct": BaseAiTextGeneration; 5186 "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration; 5187 "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration; 5188 "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration; 5189 "@cf/meta/llama-3.2-1b-instruct": BaseAiTextGeneration; 5190 "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": BaseAiTextGeneration; 5191 "@cf/facebook/bart-large-cnn": BaseAiSummarization; 5192 "@cf/llava-hf/llava-1.5-7b-hf": BaseAiImageToText; 5193 "@cf/baai/bge-base-en-v1.5": Base_Ai_Cf_Baai_Bge_Base_En_V1_5; ··· 5209 "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct; 5210 "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It; 5211 "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct; 5212 } 5213 type AiOptions = { 5214 /** ··· 5216 * https://developers.cloudflare.com/workers-ai/features/batch-api 5217 */ 5218 queueRequest?: boolean; 5219 gateway?: GatewayOptions; 5220 returnRawResponse?: boolean; 5221 prefix?: string; 5222 extraHeaders?: object; 5223 - }; 5224 - type ConversionResponse = { 5225 - name: string; 5226 - mimeType: string; 5227 - format: "markdown"; 5228 - tokens: number; 5229 - data: string; 5230 }; 5231 type AiModelsSearchParams = { 5232 author?: string; ··· 5264 autorag(autoragId: string): AutoRAG; 5265 run<Name extends keyof AiModelList, Options extends AiOptions, InputOptions extends AiModelList[Name]["inputs"]>(model: Name, inputs: InputOptions, options?: Options): Promise<Options extends { 5266 returnRawResponse: true; 5267 } ? Response : InputOptions extends { 5268 stream: true; 5269 } ? ReadableStream : AiModelList[Name]["postProcessedOutputs"]>; 5270 models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>; 5271 - toMarkdown(files: { 5272 - name: string; 5273 - blob: Blob; 5274 - }[], options?: { 5275 - gateway?: GatewayOptions; 5276 - extraHeaders?: object; 5277 - }): Promise<ConversionResponse[]>; 5278 - toMarkdown(files: { 5279 - name: string; 5280 - blob: Blob; 5281 - }, options?: { 5282 - gateway?: GatewayOptions; 5283 - extraHeaders?: object; 5284 - }): Promise<ConversionResponse>; 5285 } 5286 type GatewayRetries = { 5287 maxAttempts?: 1 | 2 | 3 | 4 | 5; ··· 5299 requestTimeoutMs?: number; 5300 retries?: GatewayRetries; 5301 }; 5302 type AiGatewayPatchLog = { 5303 score?: number | null; 5304 feedback?: -1 | 1 | null; ··· 5367 patchLog(logId: string, data: AiGatewayPatchLog): Promise<void>; 5368 getLog(logId: string): Promise<AiGatewayLog>; 5369 run(data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[], options?: { 5370 - gateway?: GatewayOptions; 5371 extraHeaders?: object; 5372 }): Promise<Response>; 5373 getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line ··· 5397 ranker?: string; 5398 score_threshold?: number; 5399 }; 5400 rewrite_query?: boolean; 5401 }; 5402 type AutoRagAiSearchRequest = AutoRagSearchRequest & { 5403 stream?: boolean; 5404 }; 5405 type AutoRagAiSearchRequestStreaming = Omit<AutoRagAiSearchRequest, 'stream'> & { 5406 stream: true; ··· 5476 * breaks aspect ratio 5477 */ 5478 fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze"; 5479 /** 5480 * When cropping with fit: "cover", this defines the side or point that should 5481 * be left uncropped. The value is either a string ··· 5488 * preserve as much as possible around a point at 20% of the height of the 5489 * source image. 5490 */ 5491 - gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates; 5492 /** 5493 * Background color to add underneath the image. Applies only to images with 5494 * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…), ··· 5775 * 5776 * @example 395747 5777 */ 5778 - asn: number; 5779 /** 5780 * The organization which owns the ASN of the incoming request. 5781 * 5782 * @example "Google Cloud" 5783 */ 5784 - asOrganization: string; 5785 /** 5786 * The original value of the `Accept-Encoding` header if Cloudflare modified it. 5787 * ··· 5905 * This field is only present if you have Cloudflare for SaaS enabled on your account 5906 * and you have followed the [required steps to enable it]((https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/)). 5907 */ 5908 - hostMetadata: HostMetadata; 5909 } 5910 interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield { 5911 /** ··· 6192 */ 6193 sql_duration_ms: number; 6194 }; 6195 } 6196 interface D1Response { 6197 success: true; ··· 6209 // Indicates that the first query should go to the primary, and the rest queries 6210 // using the same D1DatabaseSession will go to any replica that is consistent with 6211 // the bookmark maintained by the session (returned by the first query). 6212 - "first-primary" 6213 // Indicates that the first query can go anywhere (primary or replica), and the rest queries 6214 // using the same D1DatabaseSession will go to any replica that is consistent with 6215 // the bookmark maintained by the session (returned by the first query). 6216 - | "first-unconstrained"; 6217 type D1SessionBookmark = string; 6218 declare abstract class D1Database { 6219 prepare(query: string): D1PreparedStatement; ··· 6331 }; 6332 export { _EmailMessage as EmailMessage }; 6333 } 6334 interface Hyperdrive { 6335 /** 6336 * Connect directly to Hyperdrive as if it's your database, returning a TCP socket. ··· 6408 fit?: 'scale-down' | 'contain' | 'pad' | 'squeeze' | 'cover' | 'crop'; 6409 flip?: 'h' | 'v' | 'hv'; 6410 gamma?: number; 6411 - gravity?: 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | { 6412 x?: number; 6413 y?: number; 6414 mode: 'remainder' | 'box-center'; ··· 6416 rotate?: 0 | 90 | 180 | 270; 6417 saturation?: number; 6418 sharpen?: number; 6419 - trim?: "border" | { 6420 top?: number; 6421 bottom?: number; 6422 left?: number; ··· 6438 bottom?: number; 6439 right?: number; 6440 }; 6441 type ImageOutputOptions = { 6442 format: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/avif' | 'rgb' | 'rgba'; 6443 quality?: number; 6444 background?: string; 6445 }; 6446 interface ImagesBinding { 6447 /** ··· 6449 * @throws {@link ImagesError} with code 9412 if input is not an image 6450 * @param stream The image bytes 6451 */ 6452 - info(stream: ReadableStream<Uint8Array>): Promise<ImageInfoResponse>; 6453 /** 6454 * Begin applying a series of transformations to an image 6455 * @param stream The image bytes 6456 * @returns A transform handle 6457 */ 6458 - input(stream: ReadableStream<Uint8Array>): ImageTransformer; 6459 } 6460 interface ImageTransformer { 6461 /** ··· 6478 */ 6479 output(options: ImageOutputOptions): Promise<ImageTransformationResult>; 6480 } 6481 interface ImageTransformationResult { 6482 /** 6483 * The image as a response, ready to store in cache or return to users ··· 6490 /** 6491 * The bytes of the response 6492 */ 6493 - image(): ReadableStream<Uint8Array>; 6494 } 6495 interface ImagesError extends Error { 6496 readonly code: number; 6497 readonly message: string; 6498 readonly stack?: string; 6499 } 6500 type Params<P extends string = any> = Record<P, string | string[]>; 6501 type EventContext<Env, P extends string, Data> = { 6502 request: Request<unknown, IncomingRequestCfProperties<unknown>>; ··· 6707 // Base type for all other types providing RPC-like interfaces. 6708 // Rewrites all methods/properties to be `MethodOrProperty`s, while preserving callable types. 6709 // `Reserved` names (e.g. stub method names like `dup()`) and symbols can't be accessed over RPC. 6710 - export type Provider<T extends object, Reserved extends string = never> = MaybeCallableProvider<T> & { 6711 - [K in Exclude<keyof T, Reserved | symbol | keyof StubBase<never>>]: MethodOrProperty<T[K]>; 6712 - }; 6713 } 6714 declare namespace Cloudflare { 6715 interface Env { 6716 } 6717 } 6718 - declare module 'cloudflare:workers' { 6719 export type RpcStub<T extends Rpc.Stubable> = Rpc.Stub<T>; 6720 export const RpcStub: { 6721 new <T extends Rpc.Stubable>(value: T): Rpc.Stub<T>; ··· 6724 [Rpc.__RPC_TARGET_BRAND]: never; 6725 } 6726 // `protected` fields don't appear in `keyof`s, so can't be accessed over RPC 6727 - export abstract class WorkerEntrypoint<Env = unknown> implements Rpc.WorkerEntrypointBranded { 6728 [Rpc.__WORKER_ENTRYPOINT_BRAND]: never; 6729 - protected ctx: ExecutionContext; 6730 protected env: Env; 6731 constructor(ctx: ExecutionContext, env: Env); 6732 fetch?(request: Request): Response | Promise<Response>; 6733 - tail?(events: TraceItem[]): void | Promise<void>; 6734 - trace?(traces: TraceItem[]): void | Promise<void>; 6735 - scheduled?(controller: ScheduledController): void | Promise<void>; 6736 queue?(batch: MessageBatch<unknown>): void | Promise<void>; 6737 test?(controller: TestController): void | Promise<void>; 6738 } 6739 - export abstract class DurableObject<Env = unknown> implements Rpc.DurableObjectBranded { 6740 [Rpc.__DURABLE_OBJECT_BRAND]: never; 6741 - protected ctx: DurableObjectState; 6742 protected env: Env; 6743 constructor(ctx: DurableObjectState, env: Env); 6744 - fetch?(request: Request): Response | Promise<Response>; 6745 alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise<void>; 6746 webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise<void>; 6747 webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise<void>; 6748 webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>; ··· 6788 constructor(ctx: ExecutionContext, env: Env); 6789 run(event: Readonly<WorkflowEvent<T>>, step: WorkflowStep): Promise<unknown>; 6790 } 6791 export const env: Cloudflare.Env; 6792 } 6793 interface SecretsStoreSecret { 6794 /** ··· 6801 function _connect(address: string | SocketAddress, options?: SocketOptions): Socket; 6802 export { _connect as connect }; 6803 } 6804 declare namespace TailStream { 6805 interface Header { 6806 readonly name: string; ··· 6810 readonly type: "fetch"; 6811 readonly method: string; 6812 readonly url: string; 6813 - readonly cfJson: string; 6814 readonly headers: Header[]; 6815 } 6816 interface JsRpcEventInfo { 6817 readonly type: "jsrpc"; 6818 - readonly methodName: string; 6819 } 6820 interface ScheduledEventInfo { 6821 readonly type: "scheduled"; ··· 6856 readonly type: "hibernatableWebSocket"; 6857 readonly info: HibernatableWebSocketEventInfoClose | HibernatableWebSocketEventInfoError | HibernatableWebSocketEventInfoMessage; 6858 } 6859 - interface Resume { 6860 - readonly type: "resume"; 6861 - readonly attachment?: any; 6862 - } 6863 interface CustomEventInfo { 6864 readonly type: "custom"; 6865 } ··· 6873 readonly tag?: string; 6874 readonly message?: string; 6875 } 6876 - interface Trigger { 6877 - readonly traceId: string; 6878 - readonly invocationId: string; 6879 - readonly spanId: string; 6880 - } 6881 interface Onset { 6882 readonly type: "onset"; 6883 readonly dispatchNamespace?: string; 6884 readonly entrypoint?: string; 6885 readonly executionModel: string; 6886 readonly scriptName?: string; 6887 readonly scriptTags?: string[]; 6888 readonly scriptVersion?: ScriptVersion; 6889 - readonly trigger?: Trigger; 6890 - readonly info: FetchEventInfo | JsRpcEventInfo | ScheduledEventInfo | AlarmEventInfo | QueueEventInfo | EmailEventInfo | TraceEventInfo | HibernatableWebSocketEventInfo | Resume | CustomEventInfo; 6891 } 6892 interface Outcome { 6893 readonly type: "outcome"; ··· 6895 readonly cpuTime: number; 6896 readonly wallTime: number; 6897 } 6898 - interface Hibernate { 6899 - readonly type: "hibernate"; 6900 - } 6901 interface SpanOpen { 6902 readonly type: "spanOpen"; 6903 readonly name: string; 6904 readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes; 6905 } 6906 interface SpanClose { ··· 6921 interface Log { 6922 readonly type: "log"; 6923 readonly level: "debug" | "error" | "info" | "log" | "warn"; 6924 - readonly message: string; 6925 } 6926 interface Return { 6927 readonly type: "return"; 6928 readonly info?: FetchResponseInfo; 6929 } 6930 - interface Link { 6931 - readonly type: "link"; 6932 - readonly label?: string; 6933 - readonly traceId: string; 6934 - readonly invocationId: string; 6935 - readonly spanId: string; 6936 - } 6937 interface Attribute { 6938 readonly name: string; 6939 readonly value: string | string[] | boolean | boolean[] | number | number[] | bigint | bigint[]; ··· 6942 readonly type: "attributes"; 6943 readonly info: Attribute[]; 6944 } 6945 - interface TailEvent { 6946 readonly traceId: string; 6947 readonly invocationId: string; 6948 - readonly spanId: string; 6949 readonly timestamp: Date; 6950 readonly sequence: number; 6951 - readonly event: Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes; 6952 } 6953 - type TailEventHandler = (event: TailEvent) => void | Promise<void>; 6954 - type TailEventHandlerName = "outcome" | "hibernate" | "spanOpen" | "spanClose" | "diagnosticChannel" | "exception" | "log" | "return" | "link" | "attributes"; 6955 - type TailEventHandlerObject = Record<TailEventHandlerName, TailEventHandler>; 6956 type TailEventHandlerType = TailEventHandler | TailEventHandlerObject; 6957 } 6958 // Copyright (c) 2022-2023 Cloudflare, Inc. ··· 6976 * 6977 * This list is expected to grow as support for more operations are released. 6978 */ 6979 - type VectorizeVectorMetadataFilterOp = "$eq" | "$ne"; 6980 /** 6981 * Filter criteria for vector metadata used to limit the retrieved query result set. 6982 */ 6983 type VectorizeVectorMetadataFilter = { 6984 [field: string]: Exclude<VectorizeVectorMetadataValue, string[]> | null | { 6985 [Op in VectorizeVectorMetadataFilterOp]?: Exclude<VectorizeVectorMetadataValue, string[]> | null; 6986 }; 6987 }; 6988 /** ··· 7292 | 'complete' | 'waiting' // instance is hibernating and waiting for sleep or event to finish 7293 | 'waitingForPause' // instance is finishing the current work to pause 7294 | 'unknown'; 7295 - error?: string; 7296 - output?: object; 7297 }; 7298 interface WorkflowError { 7299 code?: number;
··· 1 /* eslint-disable */ 2 + // Generated by Wrangler by running `wrangler types` (hash: eeaa8440f56ab30c6a4f65cb191015f2) 3 + // Runtime types generated with workerd@1.20251202.0 2025-08-16 4 declare namespace Cloudflare { 5 + interface GlobalProps { 6 + mainModule: typeof import("./server/index"); 7 + } 8 interface Env { 9 + VITE_APP_NAME: string; 10 } 11 } 12 interface Env extends Cloudflare.Env {} ··· 30 // noinspection JSUnusedGlobalSymbols 31 declare var onmessage: never; 32 /** 33 + * 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. 34 * 35 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException) 36 */ 37 declare class DOMException extends Error { 38 constructor(message?: string, name?: string); 39 + /** 40 + * The **`message`** read-only property of the a message or description associated with the given error name. 41 + * 42 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/message) 43 + */ 44 readonly message: string; 45 + /** 46 + * The **`name`** read-only property of the one of the strings associated with an error name. 47 + * 48 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/name) 49 + */ 50 readonly name: string; 51 /** 52 + * The **`code`** read-only property of the DOMException interface returns one of the legacy error code constants, or `0` if none match. 53 * @deprecated 54 * 55 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMException/code) ··· 93 declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEventMap> { 94 EventTarget: typeof EventTarget; 95 } 96 + /* The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). * 97 + * The **`console`** object provides access to the debugging console (e.g., the Web console in Firefox). 98 + * 99 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) 100 + */ 101 interface Console { 102 "assert"(condition?: boolean, ...data: any[]): void; 103 + /** 104 + * The **`console.clear()`** static method clears the console if possible. 105 + * 106 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) 107 + */ 108 clear(): void; 109 + /** 110 + * The **`console.count()`** static method logs the number of times that this particular call to `count()` has been called. 111 + * 112 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) 113 + */ 114 count(label?: string): void; 115 + /** 116 + * The **`console.countReset()`** static method resets counter used with console/count_static. 117 + * 118 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static) 119 + */ 120 countReset(label?: string): void; 121 + /** 122 + * The **`console.debug()`** static method outputs a message to the console at the 'debug' log level. 123 + * 124 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) 125 + */ 126 debug(...data: any[]): void; 127 + /** 128 + * The **`console.dir()`** static method displays a list of the properties of the specified JavaScript object. 129 + * 130 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dir_static) 131 + */ 132 dir(item?: any, options?: any): void; 133 + /** 134 + * The **`console.dirxml()`** static method displays an interactive tree of the descendant elements of the specified XML/HTML element. 135 + * 136 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/dirxml_static) 137 + */ 138 dirxml(...data: any[]): void; 139 + /** 140 + * The **`console.error()`** static method outputs a message to the console at the 'error' log level. 141 + * 142 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/error_static) 143 + */ 144 error(...data: any[]): void; 145 + /** 146 + * 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. 147 + * 148 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) 149 + */ 150 group(...data: any[]): void; 151 + /** 152 + * The **`console.groupCollapsed()`** static method creates a new inline group in the console. 153 + * 154 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static) 155 + */ 156 groupCollapsed(...data: any[]): void; 157 + /** 158 + * The **`console.groupEnd()`** static method exits the current inline group in the console. 159 + * 160 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static) 161 + */ 162 groupEnd(): void; 163 + /** 164 + * The **`console.info()`** static method outputs a message to the console at the 'info' log level. 165 + * 166 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) 167 + */ 168 info(...data: any[]): void; 169 + /** 170 + * The **`console.log()`** static method outputs a message to the console. 171 + * 172 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/log_static) 173 + */ 174 log(...data: any[]): void; 175 + /** 176 + * The **`console.table()`** static method displays tabular data as a table. 177 + * 178 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/table_static) 179 + */ 180 table(tabularData?: any, properties?: string[]): void; 181 + /** 182 + * The **`console.time()`** static method starts a timer you can use to track how long an operation takes. 183 + * 184 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) 185 + */ 186 time(label?: string): void; 187 + /** 188 + * The **`console.timeEnd()`** static method stops a timer that was previously started by calling console/time_static. 189 + * 190 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static) 191 + */ 192 timeEnd(label?: string): void; 193 + /** 194 + * The **`console.timeLog()`** static method logs the current value of a timer that was previously started by calling console/time_static. 195 + * 196 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static) 197 + */ 198 timeLog(label?: string, ...data: any[]): void; 199 timeStamp(label?: string): void; 200 + /** 201 + * The **`console.trace()`** static method outputs a stack trace to the console. 202 + * 203 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) 204 + */ 205 trace(...data: any[]): void; 206 + /** 207 + * The **`console.warn()`** static method outputs a warning message to the console at the 'warning' log level. 208 + * 209 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/warn_static) 210 + */ 211 warn(...data: any[]): void; 212 } 213 declare const console: Console; ··· 281 function validate(bytes: BufferSource): boolean; 282 } 283 /** 284 + * The **`ServiceWorkerGlobalScope`** interface of the Service Worker API represents the global execution context of a service worker. 285 * Available only in secure contexts. 286 * 287 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope) ··· 327 ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy; 328 CountQueuingStrategy: typeof CountQueuingStrategy; 329 ErrorEvent: typeof ErrorEvent; 330 + MessageChannel: typeof MessageChannel; 331 + MessagePort: typeof MessagePort; 332 EventSource: typeof EventSource; 333 ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest; 334 ReadableStreamDefaultController: typeof ReadableStreamDefaultController; ··· 370 declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void; 371 declare function removeEventListener<Type extends keyof WorkerGlobalScopeEventMap>(type: Type, handler: EventListenerOrEventListenerObject<WorkerGlobalScopeEventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void; 372 /** 373 + * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. 374 * 375 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) 376 */ ··· 428 declare const navigator: Navigator; 429 interface TestController { 430 } 431 + interface ExecutionContext<Props = unknown> { 432 waitUntil(promise: Promise<any>): void; 433 passThroughOnException(): void; 434 + readonly props: Props; 435 } 436 type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>, env: Env, ctx: ExecutionContext) => Response | Promise<Response>; 437 type ExportedHandlerTailHandler<Env = unknown> = (events: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>; 438 type ExportedHandlerTraceHandler<Env = unknown> = (traces: TraceItem[], env: Env, ctx: ExecutionContext) => void | Promise<void>; 439 + type ExportedHandlerTailStreamHandler<Env = unknown> = (event: TailStream.TailEvent<TailStream.Onset>, env: Env, ctx: ExecutionContext) => TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>; 440 type ExportedHandlerScheduledHandler<Env = unknown> = (controller: ScheduledController, env: Env, ctx: ExecutionContext) => void | Promise<void>; 441 type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (batch: MessageBatch<Message>, env: Env, ctx: ExecutionContext) => void | Promise<void>; 442 type ExportedHandlerTestHandler<Env = unknown> = (controller: TestController, env: Env, ctx: ExecutionContext) => void | Promise<void>; ··· 453 interface StructuredSerializeOptions { 454 transfer?: any[]; 455 } 456 declare abstract class Navigator { 457 + sendBeacon(url: string, body?: BodyInit): boolean; 458 readonly userAgent: string; 459 readonly hardwareConcurrency: number; 460 readonly language: string; 461 readonly languages: string[]; 462 } 463 interface AlarmInvocationInfo { 464 readonly isRetry: boolean; 465 readonly retryCount: number; ··· 483 equals(other: DurableObjectId): boolean; 484 readonly name?: string; 485 } 486 + declare abstract class DurableObjectNamespace<T extends Rpc.DurableObjectBranded | undefined = undefined> { 487 newUniqueId(options?: DurableObjectNamespaceNewUniqueIdOptions): DurableObjectId; 488 idFromName(name: string): DurableObjectId; 489 idFromString(id: string): DurableObjectId; 490 get(id: DurableObjectId, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub<T>; 491 + getByName(name: string, options?: DurableObjectNamespaceGetDurableObjectOptions): DurableObjectStub<T>; 492 jurisdiction(jurisdiction: DurableObjectJurisdiction): DurableObjectNamespace<T>; 493 } 494 type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; ··· 499 interface DurableObjectNamespaceGetDurableObjectOptions { 500 locationHint?: DurableObjectLocationHint; 501 } 502 + interface DurableObjectClass<_T extends Rpc.DurableObjectBranded | undefined = undefined> { 503 + } 504 + interface DurableObjectState<Props = unknown> { 505 waitUntil(promise: Promise<any>): void; 506 + readonly props: Props; 507 readonly id: DurableObjectId; 508 readonly storage: DurableObjectStorage; 509 container?: Container; ··· 546 deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>; 547 sync(): Promise<void>; 548 sql: SqlStorage; 549 + kv: SyncKvStorage; 550 transactionSync<T>(closure: () => T): T; 551 getCurrentBookmark(): Promise<string>; 552 getBookmarkForTime(timestamp: number | Date): Promise<string>; ··· 592 blobs?: ((ArrayBuffer | string) | null)[]; 593 } 594 /** 595 + * The **`Event`** interface represents an event which takes place on an `EventTarget`. 596 * 597 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event) 598 */ 599 declare class Event { 600 constructor(type: string, init?: EventInit); 601 /** 602 + * The **`type`** read-only property of the Event interface returns a string containing the event's type. 603 * 604 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type) 605 */ 606 get type(): string; 607 /** 608 + * The **`eventPhase`** read-only property of the being evaluated. 609 * 610 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) 611 */ 612 get eventPhase(): number; 613 /** 614 + * The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM. 615 * 616 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed) 617 */ 618 get composed(): boolean; 619 /** 620 + * The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not. 621 * 622 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles) 623 */ 624 get bubbles(): boolean; 625 /** 626 + * 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. 627 * 628 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable) 629 */ 630 get cancelable(): boolean; 631 /** 632 + * 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. 633 * 634 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) 635 */ 636 get defaultPrevented(): boolean; 637 /** 638 + * The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not. 639 * @deprecated 640 * 641 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue) 642 */ 643 get returnValue(): boolean; 644 /** 645 + * The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached. 646 * 647 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget) 648 */ 649 get currentTarget(): EventTarget | undefined; 650 /** 651 + * The read-only **`target`** property of the dispatched. 652 * 653 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target) 654 */ 655 get target(): EventTarget | undefined; 656 /** 657 + * The deprecated **`Event.srcElement`** is an alias for the Event.target property. 658 * @deprecated 659 * 660 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement) 661 */ 662 get srcElement(): EventTarget | undefined; 663 /** 664 + * The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created. 665 * 666 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) 667 */ 668 get timeStamp(): number; 669 /** 670 + * 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. 671 * 672 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) 673 */ 674 get isTrusted(): boolean; 675 /** 676 + * The **`cancelBubble`** property of the Event interface is deprecated. 677 * @deprecated 678 * 679 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) 680 */ 681 get cancelBubble(): boolean; 682 /** 683 + * The **`cancelBubble`** property of the Event interface is deprecated. 684 * @deprecated 685 * 686 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble) 687 */ 688 set cancelBubble(value: boolean); 689 /** 690 + * 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. 691 * 692 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopImmediatePropagation) 693 */ 694 stopImmediatePropagation(): void; 695 /** 696 + * 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. 697 * 698 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/preventDefault) 699 */ 700 preventDefault(): void; 701 /** 702 + * The **`stopPropagation()`** method of the Event interface prevents further propagation of the current event in the capturing and bubbling phases. 703 * 704 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/stopPropagation) 705 */ 706 stopPropagation(): void; 707 /** 708 + * 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. 709 * 710 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composedPath) 711 */ ··· 726 } 727 type EventListenerOrEventListenerObject<EventType extends Event = Event> = EventListener<EventType> | EventListenerObject<EventType>; 728 /** 729 + * The **`EventTarget`** interface is implemented by objects that can receive events and may have listeners for them. 730 * 731 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget) 732 */ 733 declare class EventTarget<EventMap extends Record<string, Event> = Record<string, Event>> { 734 constructor(); 735 /** 736 + * The **`addEventListener()`** method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target. 737 * 738 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener) 739 */ 740 addEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetAddEventListenerOptions | boolean): void; 741 /** 742 + * The **`removeEventListener()`** method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. 743 * 744 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/removeEventListener) 745 */ 746 removeEventListener<Type extends keyof EventMap>(type: Type, handler: EventListenerOrEventListenerObject<EventMap[Type]>, options?: EventTargetEventListenerOptions | boolean): void; 747 /** 748 + * The **`dispatchEvent()`** method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. 749 * 750 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventTarget/dispatchEvent) 751 */ ··· 764 handleEvent: (event: Event) => any | undefined; 765 } 766 /** 767 + * The **`AbortController`** interface represents a controller object that allows you to abort one or more Web requests as and when desired. 768 * 769 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController) 770 */ 771 declare class AbortController { 772 constructor(); 773 /** 774 + * 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. 775 * 776 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal) 777 */ 778 get signal(): AbortSignal; 779 /** 780 + * The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed. 781 * 782 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/abort) 783 */ 784 abort(reason?: any): void; 785 } 786 /** 787 + * 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. 788 * 789 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal) 790 */ 791 declare abstract class AbortSignal extends EventTarget { 792 + /** 793 + * The **`AbortSignal.abort()`** static method returns an AbortSignal that is already set as aborted (and which does not trigger an AbortSignal/abort_event event). 794 + * 795 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_static) 796 + */ 797 static abort(reason?: any): AbortSignal; 798 + /** 799 + * The **`AbortSignal.timeout()`** static method returns an AbortSignal that will automatically abort after a specified time. 800 + * 801 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/timeout_static) 802 + */ 803 static timeout(delay: number): AbortSignal; 804 + /** 805 + * The **`AbortSignal.any()`** static method takes an iterable of abort signals and returns an AbortSignal. 806 + * 807 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/any_static) 808 + */ 809 static any(signals: AbortSignal[]): AbortSignal; 810 /** 811 + * 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`). 812 * 813 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted) 814 */ 815 get aborted(): boolean; 816 + /** 817 + * The **`reason`** read-only property returns a JavaScript value that indicates the abort reason. 818 + * 819 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason) 820 + */ 821 get reason(): any; 822 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */ 823 get onabort(): any | null; 824 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */ 825 set onabort(value: any | null); 826 + /** 827 + * The **`throwIfAborted()`** method throws the signal's abort AbortSignal.reason if the signal has been aborted; otherwise it does nothing. 828 + * 829 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) 830 + */ 831 throwIfAborted(): void; 832 } 833 interface Scheduler { ··· 837 signal?: AbortSignal; 838 } 839 /** 840 + * The **`ExtendableEvent`** interface extends the lifetime of the `install` and `activate` events dispatched on the global scope as part of the service worker lifecycle. 841 * 842 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent) 843 */ 844 declare abstract class ExtendableEvent extends Event { 845 + /** 846 + * The **`ExtendableEvent.waitUntil()`** method tells the event dispatcher that work is ongoing. 847 + * 848 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ExtendableEvent/waitUntil) 849 + */ 850 waitUntil(promise: Promise<any>): void; 851 } 852 + /** 853 + * The **`CustomEvent`** interface represents events initialized by an application for any purpose. 854 + * 855 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent) 856 + */ 857 declare class CustomEvent<T = any> extends Event { 858 constructor(type: string, init?: CustomEventCustomEventInit); 859 /** 860 + * The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event. 861 * 862 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) 863 */ ··· 870 detail?: any; 871 } 872 /** 873 + * 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. 874 * 875 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob) 876 */ 877 declare class Blob { 878 constructor(type?: ((ArrayBuffer | ArrayBufferView) | string | Blob)[], options?: BlobOptions); 879 + /** 880 + * The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes. 881 + * 882 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size) 883 + */ 884 get size(): number; 885 + /** 886 + * The **`type`** read-only property of the Blob interface returns the MIME type of the file. 887 + * 888 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type) 889 + */ 890 get type(): string; 891 + /** 892 + * 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. 893 + * 894 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/slice) 895 + */ 896 slice(start?: number, end?: number, type?: string): Blob; 897 + /** 898 + * 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. 899 + * 900 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) 901 + */ 902 arrayBuffer(): Promise<ArrayBuffer>; 903 + /** 904 + * 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. 905 + * 906 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) 907 + */ 908 bytes(): Promise<Uint8Array>; 909 + /** 910 + * The **`text()`** method of the string containing the contents of the blob, interpreted as UTF-8. 911 + * 912 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) 913 + */ 914 text(): Promise<string>; 915 + /** 916 + * The **`stream()`** method of the Blob interface returns a ReadableStream which upon reading returns the data contained within the `Blob`. 917 + * 918 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) 919 + */ 920 stream(): ReadableStream; 921 } 922 interface BlobOptions { 923 type?: string; 924 } 925 /** 926 + * The **`File`** interface provides information about files and allows JavaScript in a web page to access their content. 927 * 928 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File) 929 */ 930 declare class File extends Blob { 931 constructor(bits: ((ArrayBuffer | ArrayBufferView) | string | Blob)[] | undefined, name: string, options?: FileOptions); 932 + /** 933 + * The **`name`** read-only property of the File interface returns the name of the file represented by a File object. 934 + * 935 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name) 936 + */ 937 get name(): string; 938 + /** 939 + * 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). 940 + * 941 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) 942 + */ 943 get lastModified(): number; 944 } 945 interface FileOptions { ··· 952 * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/cache/) 953 */ 954 declare abstract class CacheStorage { 955 + /** 956 + * The **`open()`** method of the the Cache object matching the `cacheName`. 957 + * 958 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CacheStorage/open) 959 + */ 960 open(cacheName: string): Promise<Cache>; 961 readonly default: Cache; 962 } ··· 986 */ 987 declare abstract class Crypto { 988 /** 989 + * The **`Crypto.subtle`** read-only property returns a cryptographic operations. 990 * Available only in secure contexts. 991 * 992 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle) 993 */ 994 get subtle(): SubtleCrypto; 995 + /** 996 + * The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values. 997 + * 998 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues) 999 + */ 1000 getRandomValues<T extends Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array | BigInt64Array | BigUint64Array>(buffer: T): T; 1001 /** 1002 + * The **`randomUUID()`** method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator. 1003 * Available only in secure contexts. 1004 * 1005 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID) ··· 1008 DigestStream: typeof DigestStream; 1009 } 1010 /** 1011 + * The **`SubtleCrypto`** interface of the Web Crypto API provides a number of low-level cryptographic functions. 1012 * Available only in secure contexts. 1013 * 1014 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto) 1015 */ 1016 declare abstract class SubtleCrypto { 1017 + /** 1018 + * The **`encrypt()`** method of the SubtleCrypto interface encrypts data. 1019 + * 1020 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/encrypt) 1021 + */ 1022 encrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, plainText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 1023 + /** 1024 + * The **`decrypt()`** method of the SubtleCrypto interface decrypts some encrypted data. 1025 + * 1026 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt) 1027 + */ 1028 decrypt(algorithm: string | SubtleCryptoEncryptAlgorithm, key: CryptoKey, cipherText: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 1029 + /** 1030 + * The **`sign()`** method of the SubtleCrypto interface generates a digital signature. 1031 + * 1032 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/sign) 1033 + */ 1034 sign(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 1035 + /** 1036 + * The **`verify()`** method of the SubtleCrypto interface verifies a digital signature. 1037 + * 1038 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/verify) 1039 + */ 1040 verify(algorithm: string | SubtleCryptoSignAlgorithm, key: CryptoKey, signature: ArrayBuffer | ArrayBufferView, data: ArrayBuffer | ArrayBufferView): Promise<boolean>; 1041 + /** 1042 + * The **`digest()`** method of the SubtleCrypto interface generates a _digest_ of the given data, using the specified hash function. 1043 + * 1044 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest) 1045 + */ 1046 digest(algorithm: string | SubtleCryptoHashAlgorithm, data: ArrayBuffer | ArrayBufferView): Promise<ArrayBuffer>; 1047 + /** 1048 + * The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms). 1049 + * 1050 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey) 1051 + */ 1052 generateKey(algorithm: string | SubtleCryptoGenerateKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey | CryptoKeyPair>; 1053 + /** 1054 + * The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key. 1055 + * 1056 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey) 1057 + */ 1058 deriveKey(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, derivedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 1059 + /** 1060 + * The **`deriveBits()`** method of the key. 1061 + * 1062 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveBits) 1063 + */ 1064 deriveBits(algorithm: string | SubtleCryptoDeriveKeyAlgorithm, baseKey: CryptoKey, length?: number | null): Promise<ArrayBuffer>; 1065 + /** 1066 + * 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. 1067 + * 1068 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey) 1069 + */ 1070 importKey(format: string, keyData: (ArrayBuffer | ArrayBufferView) | JsonWebKey, algorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 1071 + /** 1072 + * 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. 1073 + * 1074 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/exportKey) 1075 + */ 1076 exportKey(format: string, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>; 1077 + /** 1078 + * The **`wrapKey()`** method of the SubtleCrypto interface 'wraps' a key. 1079 + * 1080 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/wrapKey) 1081 + */ 1082 wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | SubtleCryptoEncryptAlgorithm): Promise<ArrayBuffer>; 1083 + /** 1084 + * The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key. 1085 + * 1086 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey) 1087 + */ 1088 unwrapKey(format: string, wrappedKey: ArrayBuffer | ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | SubtleCryptoEncryptAlgorithm, unwrappedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>; 1089 timingSafeEqual(a: ArrayBuffer | ArrayBufferView, b: ArrayBuffer | ArrayBufferView): boolean; 1090 } 1091 /** 1092 + * 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. 1093 * Available only in secure contexts. 1094 * 1095 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey) 1096 */ 1097 declare abstract class CryptoKey { 1098 + /** 1099 + * The read-only **`type`** property of the CryptoKey interface indicates which kind of key is represented by the object. 1100 + * 1101 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/type) 1102 + */ 1103 readonly type: string; 1104 + /** 1105 + * The read-only **`extractable`** property of the CryptoKey interface indicates whether or not the key may be extracted using `SubtleCrypto.exportKey()` or `SubtleCrypto.wrapKey()`. 1106 + * 1107 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/extractable) 1108 + */ 1109 readonly extractable: boolean; 1110 + /** 1111 + * 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. 1112 + * 1113 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/algorithm) 1114 + */ 1115 readonly algorithm: CryptoKeyKeyAlgorithm | CryptoKeyAesKeyAlgorithm | CryptoKeyHmacKeyAlgorithm | CryptoKeyRsaKeyAlgorithm | CryptoKeyEllipticKeyAlgorithm | CryptoKeyArbitraryKeyAlgorithm; 1116 + /** 1117 + * The read-only **`usages`** property of the CryptoKey interface indicates what can be done with the key. 1118 + * 1119 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) 1120 + */ 1121 readonly usages: string[]; 1122 } 1123 interface CryptoKeyPair { ··· 1224 get bytesWritten(): number | bigint; 1225 } 1226 /** 1227 + * The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as `UTF-8`, `ISO-8859-2`, `KOI8-R`, `GBK`, etc. 1228 * 1229 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder) 1230 */ 1231 declare class TextDecoder { 1232 constructor(label?: string, options?: TextDecoderConstructorOptions); 1233 /** 1234 + * The **`TextDecoder.decode()`** method returns a string containing text decoded from the buffer passed as a parameter. 1235 * 1236 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoder/decode) 1237 */ ··· 1241 get ignoreBOM(): boolean; 1242 } 1243 /** 1244 + * The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes. 1245 * 1246 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder) 1247 */ 1248 declare class TextEncoder { 1249 constructor(); 1250 /** 1251 + * 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. 1252 * 1253 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encode) 1254 */ 1255 encode(input?: string): Uint8Array; 1256 /** 1257 + * 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. 1258 * 1259 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto) 1260 */ 1261 + encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult; 1262 get encoding(): string; 1263 } 1264 interface TextDecoderConstructorOptions { ··· 1273 written: number; 1274 } 1275 /** 1276 + * The **`ErrorEvent`** interface represents events providing information related to errors in scripts or in files. 1277 * 1278 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent) 1279 */ 1280 declare class ErrorEvent extends Event { 1281 constructor(type: string, init?: ErrorEventErrorEventInit); 1282 + /** 1283 + * The **`filename`** read-only property of the ErrorEvent interface returns a string containing the name of the script file in which the error occurred. 1284 + * 1285 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) 1286 + */ 1287 get filename(): string; 1288 + /** 1289 + * The **`message`** read-only property of the ErrorEvent interface returns a string containing a human-readable error message describing the problem. 1290 + * 1291 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) 1292 + */ 1293 get message(): string; 1294 + /** 1295 + * 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. 1296 + * 1297 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) 1298 + */ 1299 get lineno(): number; 1300 + /** 1301 + * 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. 1302 + * 1303 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) 1304 + */ 1305 get colno(): number; 1306 + /** 1307 + * 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. 1308 + * 1309 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) 1310 + */ 1311 get error(): any; 1312 } 1313 interface ErrorEventErrorEventInit { ··· 1318 error?: any; 1319 } 1320 /** 1321 + * The **`MessageEvent`** interface represents a message received by a target object. 1322 + * 1323 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent) 1324 + */ 1325 + declare class MessageEvent extends Event { 1326 + constructor(type: string, initializer: MessageEventInit); 1327 + /** 1328 + * 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. 1329 + * 1330 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/data) 1331 + */ 1332 + readonly data: any; 1333 + /** 1334 + * The **`origin`** read-only property of the origin of the message emitter. 1335 + * 1336 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/origin) 1337 + */ 1338 + readonly origin: string | null; 1339 + /** 1340 + * The **`lastEventId`** read-only property of the unique ID for the event. 1341 + * 1342 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/lastEventId) 1343 + */ 1344 + readonly lastEventId: string; 1345 + /** 1346 + * The **`source`** read-only property of the a WindowProxy, MessagePort, or a `MessageEventSource` (which can be a WindowProxy, message emitter. 1347 + * 1348 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/source) 1349 + */ 1350 + readonly source: MessagePort | null; 1351 + /** 1352 + * The **`ports`** read-only property of the containing all MessagePort objects sent with the message, in order. 1353 + * 1354 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent/ports) 1355 + */ 1356 + readonly ports: MessagePort[]; 1357 + } 1358 + interface MessageEventInit { 1359 + data: ArrayBuffer | string; 1360 + } 1361 + /** 1362 + * The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. 1363 + * 1364 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent) 1365 + */ 1366 + declare abstract class PromiseRejectionEvent extends Event { 1367 + /** 1368 + * The PromiseRejectionEvent interface's **`promise`** read-only property indicates the JavaScript rejected. 1369 + * 1370 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/promise) 1371 + */ 1372 + readonly promise: Promise<any>; 1373 + /** 1374 + * The PromiseRejectionEvent **`reason`** read-only property is any JavaScript value or Object which provides the reason passed into Promise.reject(). 1375 + * 1376 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PromiseRejectionEvent/reason) 1377 + */ 1378 + readonly reason: any; 1379 + } 1380 + /** 1381 + * 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. 1382 * 1383 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData) 1384 */ 1385 declare class FormData { 1386 constructor(); 1387 + /** 1388 + * 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. 1389 + * 1390 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) 1391 + */ 1392 append(name: string, value: string): void; 1393 + /** 1394 + * 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. 1395 + * 1396 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/append) 1397 + */ 1398 append(name: string, value: Blob, filename?: string): void; 1399 + /** 1400 + * The **`delete()`** method of the FormData interface deletes a key and its value(s) from a `FormData` object. 1401 + * 1402 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/delete) 1403 + */ 1404 delete(name: string): void; 1405 + /** 1406 + * The **`get()`** method of the FormData interface returns the first value associated with a given key from within a `FormData` object. 1407 + * 1408 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get) 1409 + */ 1410 get(name: string): (File | string) | null; 1411 + /** 1412 + * The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object. 1413 + * 1414 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll) 1415 + */ 1416 getAll(name: string): (File | string)[]; 1417 + /** 1418 + * The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key. 1419 + * 1420 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/has) 1421 + */ 1422 has(name: string): boolean; 1423 + /** 1424 + * 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. 1425 + * 1426 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) 1427 + */ 1428 set(name: string, value: string): void; 1429 + /** 1430 + * 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. 1431 + * 1432 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/set) 1433 + */ 1434 set(name: string, value: Blob, filename?: string): void; 1435 /* Returns an array of key, value pairs for every entry in the list. */ 1436 entries(): IterableIterator<[ ··· 1518 append(content: string, options?: ContentOptions): DocumentEnd; 1519 } 1520 /** 1521 + * This is the event type for `fetch` events dispatched on the ServiceWorkerGlobalScope. 1522 * 1523 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent) 1524 */ 1525 declare abstract class FetchEvent extends ExtendableEvent { 1526 + /** 1527 + * The **`request`** read-only property of the the event handler. 1528 + * 1529 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/request) 1530 + */ 1531 readonly request: Request; 1532 + /** 1533 + * The **`respondWith()`** method of allows you to provide a promise for a Response yourself. 1534 + * 1535 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/FetchEvent/respondWith) 1536 + */ 1537 respondWith(promise: Response | Promise<Response>): void; 1538 passThroughOnException(): void; 1539 } 1540 type HeadersInit = Headers | Iterable<Iterable<string>> | Record<string, string>; 1541 /** 1542 + * The **`Headers`** interface of the Fetch API allows you to perform various actions on HTTP request and response headers. 1543 * 1544 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers) 1545 */ 1546 declare class Headers { 1547 constructor(init?: HeadersInit); 1548 + /** 1549 + * 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. 1550 + * 1551 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/get) 1552 + */ 1553 get(name: string): string | null; 1554 getAll(name: string): string[]; 1555 + /** 1556 + * The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response. 1557 + * 1558 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie) 1559 + */ 1560 getSetCookie(): string[]; 1561 + /** 1562 + * The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header. 1563 + * 1564 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/has) 1565 + */ 1566 has(name: string): boolean; 1567 + /** 1568 + * 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. 1569 + * 1570 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/set) 1571 + */ 1572 set(name: string, value: string): void; 1573 + /** 1574 + * 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. 1575 + * 1576 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/append) 1577 + */ 1578 append(name: string, value: string): void; 1579 + /** 1580 + * The **`delete()`** method of the Headers interface deletes a header from the current `Headers` object. 1581 + * 1582 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/delete) 1583 + */ 1584 delete(name: string): void; 1585 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: Headers) => void, thisArg?: This): void; 1586 /* Returns an iterator allowing to go through all key/value pairs contained in this object. */ ··· 1617 blob(): Promise<Blob>; 1618 } 1619 /** 1620 + * The **`Response`** interface of the Fetch API represents the response to a request. 1621 * 1622 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response) 1623 */ ··· 1629 json(any: any, maybeInit?: (ResponseInit | Response)): Response; 1630 }; 1631 /** 1632 + * The **`Response`** interface of the Fetch API represents the response to a request. 1633 * 1634 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response) 1635 */ 1636 interface Response extends Body { 1637 + /** 1638 + * The **`clone()`** method of the Response interface creates a clone of a response object, identical in every way, but stored in a different variable. 1639 + * 1640 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/clone) 1641 + */ 1642 clone(): Response; 1643 + /** 1644 + * The **`status`** read-only property of the Response interface contains the HTTP status codes of the response. 1645 + * 1646 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status) 1647 + */ 1648 status: number; 1649 + /** 1650 + * The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status. 1651 + * 1652 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText) 1653 + */ 1654 statusText: string; 1655 + /** 1656 + * The **`headers`** read-only property of the with the response. 1657 + * 1658 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers) 1659 + */ 1660 headers: Headers; 1661 + /** 1662 + * 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. 1663 + * 1664 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok) 1665 + */ 1666 ok: boolean; 1667 + /** 1668 + * 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. 1669 + * 1670 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected) 1671 + */ 1672 redirected: boolean; 1673 + /** 1674 + * The **`url`** read-only property of the Response interface contains the URL of the response. 1675 + * 1676 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url) 1677 + */ 1678 url: string; 1679 webSocket: WebSocket | null; 1680 cf: any | undefined; 1681 + /** 1682 + * The **`type`** read-only property of the Response interface contains the type of the response. 1683 + * 1684 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/type) 1685 + */ 1686 type: "default" | "error"; 1687 } 1688 interface ResponseInit { ··· 1695 } 1696 type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> = Request<CfHostMetadata, Cf> | string; 1697 /** 1698 + * The **`Request`** interface of the Fetch API represents a resource request. 1699 * 1700 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request) 1701 */ ··· 1704 new <CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>>(input: RequestInfo<CfProperties> | URL, init?: RequestInit<Cf>): Request<CfHostMetadata, Cf>; 1705 }; 1706 /** 1707 + * The **`Request`** interface of the Fetch API represents a resource request. 1708 * 1709 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request) 1710 */ 1711 interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> extends Body { 1712 + /** 1713 + * The **`clone()`** method of the Request interface creates a copy of the current `Request` object. 1714 + * 1715 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/clone) 1716 + */ 1717 clone(): Request<CfHostMetadata, Cf>; 1718 /** 1719 + * The **`method`** read-only property of the `POST`, etc.) A String indicating the method of the request. 1720 * 1721 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method) 1722 */ 1723 method: string; 1724 /** 1725 + * The **`url`** read-only property of the Request interface contains the URL of the request. 1726 * 1727 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url) 1728 */ 1729 url: string; 1730 /** 1731 + * The **`headers`** read-only property of the with the request. 1732 * 1733 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers) 1734 */ 1735 headers: Headers; 1736 /** 1737 + * The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled. 1738 * 1739 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect) 1740 */ 1741 redirect: string; 1742 fetcher: Fetcher | null; 1743 /** 1744 + * The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request. 1745 * 1746 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal) 1747 */ 1748 signal: AbortSignal; 1749 cf: Cf | undefined; 1750 /** 1751 + * The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request. 1752 * 1753 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity) 1754 */ 1755 integrity: string; 1756 /** 1757 + * 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. 1758 * 1759 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive) 1760 */ 1761 keepalive: boolean; 1762 /** 1763 + * The **`cache`** read-only property of the Request interface contains the cache mode of the request. 1764 * 1765 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache) 1766 */ 1767 + cache?: "no-store" | "no-cache"; 1768 } 1769 interface RequestInit<Cf = CfProperties> { 1770 /* A string to set request's method. */ ··· 1778 fetcher?: (Fetcher | null); 1779 cf?: Cf; 1780 /* A string indicating how the request will interact with the browser's cache to set request's cache. */ 1781 + cache?: "no-store" | "no-cache"; 1782 /* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */ 1783 integrity?: string; 1784 /* An AbortSignal to set request's signal. */ 1785 signal?: (AbortSignal | null); 1786 encodeResponseBody?: "automatic" | "manual"; 1787 } 1788 + 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>; 1789 type Fetcher<T extends Rpc.EntrypointBranded | undefined = undefined, Reserved extends string = never> = (T extends Rpc.EntrypointBranded ? Rpc.Provider<T, Reserved | "fetch" | "connect"> : unknown) & { 1790 fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; 1791 connect(address: SocketAddress | string, options?: SocketOptions): Socket; ··· 2111 value?: undefined; 2112 }; 2113 /** 2114 + * The `ReadableStream` interface of the Streams API represents a readable stream of byte data. 2115 * 2116 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream) 2117 */ 2118 interface ReadableStream<R = any> { 2119 + /** 2120 + * The **`locked`** read-only property of the ReadableStream interface returns whether or not the readable stream is locked to a reader. 2121 + * 2122 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) 2123 + */ 2124 get locked(): boolean; 2125 + /** 2126 + * The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled. 2127 + * 2128 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) 2129 + */ 2130 cancel(reason?: any): Promise<void>; 2131 + /** 2132 + * The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. 2133 + * 2134 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) 2135 + */ 2136 getReader(): ReadableStreamDefaultReader<R>; 2137 + /** 2138 + * The **`getReader()`** method of the ReadableStream interface creates a reader and locks the stream to it. 2139 + * 2140 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/getReader) 2141 + */ 2142 getReader(options: ReadableStreamGetReaderOptions): ReadableStreamBYOBReader; 2143 + /** 2144 + * 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. 2145 + * 2146 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeThrough) 2147 + */ 2148 pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>; 2149 + /** 2150 + * 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. 2151 + * 2152 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/pipeTo) 2153 + */ 2154 pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>; 2155 + /** 2156 + * The **`tee()`** method of the two-element array containing the two resulting branches as new ReadableStream instances. 2157 + * 2158 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/tee) 2159 + */ 2160 tee(): [ 2161 ReadableStream<R>, 2162 ReadableStream<R> ··· 2165 [Symbol.asyncIterator](options?: ReadableStreamValuesOptions): AsyncIterableIterator<R>; 2166 } 2167 /** 2168 + * The `ReadableStream` interface of the Streams API represents a readable stream of byte data. 2169 * 2170 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream) 2171 */ ··· 2174 new (underlyingSource: UnderlyingByteSource, strategy?: QueuingStrategy<Uint8Array>): ReadableStream<Uint8Array>; 2175 new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>; 2176 }; 2177 + /** 2178 + * 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). 2179 + * 2180 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader) 2181 + */ 2182 declare class ReadableStreamDefaultReader<R = any> { 2183 constructor(stream: ReadableStream); 2184 get closed(): Promise<void>; 2185 cancel(reason?: any): Promise<void>; 2186 + /** 2187 + * The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue. 2188 + * 2189 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/read) 2190 + */ 2191 read(): Promise<ReadableStreamReadResult<R>>; 2192 + /** 2193 + * The **`releaseLock()`** method of the ReadableStreamDefaultReader interface releases the reader's lock on the stream. 2194 + * 2195 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultReader/releaseLock) 2196 + */ 2197 releaseLock(): void; 2198 } 2199 + /** 2200 + * The `ReadableStreamBYOBReader` interface of the Streams API defines a reader for a ReadableStream that supports zero-copy reading from an underlying byte source. 2201 + * 2202 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader) 2203 + */ 2204 declare class ReadableStreamBYOBReader { 2205 constructor(stream: ReadableStream); 2206 get closed(): Promise<void>; 2207 cancel(reason?: any): Promise<void>; 2208 + /** 2209 + * 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. 2210 + * 2211 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/read) 2212 + */ 2213 read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>; 2214 + /** 2215 + * The **`releaseLock()`** method of the ReadableStreamBYOBReader interface releases the reader's lock on the stream. 2216 + * 2217 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBReader/releaseLock) 2218 + */ 2219 releaseLock(): void; 2220 readAtLeast<T extends ArrayBufferView>(minElements: number, view: T): Promise<ReadableStreamReadResult<T>>; 2221 } ··· 2230 */ 2231 mode: "byob"; 2232 } 2233 + /** 2234 + * 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). 2235 + * 2236 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) 2237 + */ 2238 declare abstract class ReadableStreamBYOBRequest { 2239 + /** 2240 + * The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view. 2241 + * 2242 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) 2243 + */ 2244 get view(): Uint8Array | null; 2245 + /** 2246 + * 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. 2247 + * 2248 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) 2249 + */ 2250 respond(bytesWritten: number): void; 2251 + /** 2252 + * 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. 2253 + * 2254 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respondWithNewView) 2255 + */ 2256 respondWithNewView(view: ArrayBuffer | ArrayBufferView): void; 2257 get atLeast(): number | null; 2258 } 2259 + /** 2260 + * The **`ReadableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a ReadableStream's state and internal queue. 2261 + * 2262 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) 2263 + */ 2264 declare abstract class ReadableStreamDefaultController<R = any> { 2265 + /** 2266 + * The **`desiredSize`** read-only property of the required to fill the stream's internal queue. 2267 + * 2268 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) 2269 + */ 2270 get desiredSize(): number | null; 2271 + /** 2272 + * The **`close()`** method of the ReadableStreamDefaultController interface closes the associated stream. 2273 + * 2274 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) 2275 + */ 2276 close(): void; 2277 + /** 2278 + * The **`enqueue()`** method of the ```js-nolint enqueue(chunk) ``` - `chunk` - : The chunk to enqueue. 2279 + * 2280 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/enqueue) 2281 + */ 2282 enqueue(chunk?: R): void; 2283 + /** 2284 + * The **`error()`** method of the with the associated stream to error. 2285 + * 2286 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/error) 2287 + */ 2288 error(reason: any): void; 2289 } 2290 + /** 2291 + * The **`ReadableByteStreamController`** interface of the Streams API represents a controller for a readable byte stream. 2292 + * 2293 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) 2294 + */ 2295 declare abstract class ReadableByteStreamController { 2296 + /** 2297 + * The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests. 2298 + * 2299 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) 2300 + */ 2301 get byobRequest(): ReadableStreamBYOBRequest | null; 2302 + /** 2303 + * 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'. 2304 + * 2305 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) 2306 + */ 2307 get desiredSize(): number | null; 2308 + /** 2309 + * The **`close()`** method of the ReadableByteStreamController interface closes the associated stream. 2310 + * 2311 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/close) 2312 + */ 2313 close(): void; 2314 + /** 2315 + * 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). 2316 + * 2317 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/enqueue) 2318 + */ 2319 enqueue(chunk: ArrayBuffer | ArrayBufferView): void; 2320 + /** 2321 + * The **`error()`** method of the ReadableByteStreamController interface causes any future interactions with the associated stream to error with the specified reason. 2322 + * 2323 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/error) 2324 + */ 2325 error(reason: any): void; 2326 } 2327 /** 2328 + * The **`WritableStreamDefaultController`** interface of the Streams API represents a controller allowing control of a WritableStream's state. 2329 * 2330 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController) 2331 */ 2332 declare abstract class WritableStreamDefaultController { 2333 + /** 2334 + * The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller. 2335 + * 2336 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) 2337 + */ 2338 get signal(): AbortSignal; 2339 + /** 2340 + * The **`error()`** method of the with the associated stream to error. 2341 + * 2342 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) 2343 + */ 2344 error(reason?: any): void; 2345 } 2346 + /** 2347 + * The **`TransformStreamDefaultController`** interface of the Streams API provides methods to manipulate the associated ReadableStream and WritableStream. 2348 + * 2349 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) 2350 + */ 2351 declare abstract class TransformStreamDefaultController<O = any> { 2352 + /** 2353 + * The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream. 2354 + * 2355 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) 2356 + */ 2357 get desiredSize(): number | null; 2358 + /** 2359 + * The **`enqueue()`** method of the TransformStreamDefaultController interface enqueues the given chunk in the readable side of the stream. 2360 + * 2361 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) 2362 + */ 2363 enqueue(chunk?: O): void; 2364 + /** 2365 + * The **`error()`** method of the TransformStreamDefaultController interface errors both sides of the stream. 2366 + * 2367 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/error) 2368 + */ 2369 error(reason: any): void; 2370 + /** 2371 + * The **`terminate()`** method of the TransformStreamDefaultController interface closes the readable side and errors the writable side of the stream. 2372 + * 2373 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) 2374 + */ 2375 terminate(): void; 2376 } 2377 interface ReadableWritablePair<R = any, W = any> { ··· 2384 readable: ReadableStream<R>; 2385 } 2386 /** 2387 + * The **`WritableStream`** interface of the Streams API provides a standard abstraction for writing streaming data to a destination, known as a sink. 2388 * 2389 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream) 2390 */ 2391 declare class WritableStream<W = any> { 2392 constructor(underlyingSink?: UnderlyingSink, queuingStrategy?: QueuingStrategy); 2393 + /** 2394 + * The **`locked`** read-only property of the WritableStream interface returns a boolean indicating whether the `WritableStream` is locked to a writer. 2395 + * 2396 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked) 2397 + */ 2398 get locked(): boolean; 2399 + /** 2400 + * 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. 2401 + * 2402 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/abort) 2403 + */ 2404 abort(reason?: any): Promise<void>; 2405 + /** 2406 + * The **`close()`** method of the WritableStream interface closes the associated stream. 2407 + * 2408 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/close) 2409 + */ 2410 close(): Promise<void>; 2411 + /** 2412 + * The **`getWriter()`** method of the WritableStream interface returns a new instance of WritableStreamDefaultWriter and locks the stream to that instance. 2413 + * 2414 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/getWriter) 2415 + */ 2416 getWriter(): WritableStreamDefaultWriter<W>; 2417 } 2418 /** 2419 + * 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. 2420 * 2421 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter) 2422 */ 2423 declare class WritableStreamDefaultWriter<W = any> { 2424 constructor(stream: WritableStream); 2425 + /** 2426 + * The **`closed`** read-only property of the the stream errors or the writer's lock is released. 2427 + * 2428 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed) 2429 + */ 2430 get closed(): Promise<void>; 2431 + /** 2432 + * 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. 2433 + * 2434 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready) 2435 + */ 2436 get ready(): Promise<void>; 2437 + /** 2438 + * The **`desiredSize`** read-only property of the to fill the stream's internal queue. 2439 + * 2440 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize) 2441 + */ 2442 get desiredSize(): number | null; 2443 + /** 2444 + * 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. 2445 + * 2446 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/abort) 2447 + */ 2448 abort(reason?: any): Promise<void>; 2449 + /** 2450 + * The **`close()`** method of the stream. 2451 + * 2452 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/close) 2453 + */ 2454 close(): Promise<void>; 2455 + /** 2456 + * The **`write()`** method of the operation. 2457 + * 2458 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/write) 2459 + */ 2460 write(chunk?: W): Promise<void>; 2461 + /** 2462 + * The **`releaseLock()`** method of the corresponding stream. 2463 + * 2464 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/releaseLock) 2465 + */ 2466 releaseLock(): void; 2467 } 2468 + /** 2469 + * The **`TransformStream`** interface of the Streams API represents a concrete implementation of the pipe chain _transform stream_ concept. 2470 + * 2471 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream) 2472 + */ 2473 declare class TransformStream<I = any, O = any> { 2474 constructor(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>); 2475 + /** 2476 + * The **`readable`** read-only property of the TransformStream interface returns the ReadableStream instance controlled by this `TransformStream`. 2477 + * 2478 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable) 2479 + */ 2480 get readable(): ReadableStream<O>; 2481 + /** 2482 + * The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`. 2483 + * 2484 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable) 2485 + */ 2486 get writable(): WritableStream<I>; 2487 } 2488 declare class FixedLengthStream extends IdentityTransformStream { ··· 2497 interface ReadableStreamValuesOptions { 2498 preventCancel?: boolean; 2499 } 2500 + /** 2501 + * The **`CompressionStream`** interface of the Compression Streams API is an API for compressing a stream of data. 2502 + * 2503 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CompressionStream) 2504 + */ 2505 declare class CompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> { 2506 constructor(format: "gzip" | "deflate" | "deflate-raw"); 2507 } 2508 + /** 2509 + * The **`DecompressionStream`** interface of the Compression Streams API is an API for decompressing a stream of data. 2510 + * 2511 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/DecompressionStream) 2512 + */ 2513 declare class DecompressionStream extends TransformStream<ArrayBuffer | ArrayBufferView, Uint8Array> { 2514 constructor(format: "gzip" | "deflate" | "deflate-raw"); 2515 } 2516 + /** 2517 + * The **`TextEncoderStream`** interface of the Encoding API converts a stream of strings into bytes in the UTF-8 encoding. 2518 + * 2519 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoderStream) 2520 + */ 2521 declare class TextEncoderStream extends TransformStream<string, Uint8Array> { 2522 constructor(); 2523 get encoding(): string; 2524 } 2525 + /** 2526 + * 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. 2527 + * 2528 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextDecoderStream) 2529 + */ 2530 declare class TextDecoderStream extends TransformStream<ArrayBuffer | ArrayBufferView, string> { 2531 constructor(label?: string, options?: TextDecoderStreamTextDecoderStreamInit); 2532 get encoding(): string; ··· 2538 ignoreBOM?: boolean; 2539 } 2540 /** 2541 + * The **`ByteLengthQueuingStrategy`** interface of the Streams API provides a built-in byte length queuing strategy that can be used when constructing streams. 2542 * 2543 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy) 2544 */ 2545 declare class ByteLengthQueuingStrategy implements QueuingStrategy<ArrayBufferView> { 2546 constructor(init: QueuingStrategyInit); 2547 + /** 2548 + * The read-only **`ByteLengthQueuingStrategy.highWaterMark`** property returns the total number of bytes that can be contained in the internal queue before backpressure is applied. 2549 + * 2550 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/highWaterMark) 2551 + */ 2552 get highWaterMark(): number; 2553 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ByteLengthQueuingStrategy/size) */ 2554 get size(): (chunk?: any) => number; 2555 } 2556 /** 2557 + * The **`CountQueuingStrategy`** interface of the Streams API provides a built-in chunk counting queuing strategy that can be used when constructing streams. 2558 * 2559 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy) 2560 */ 2561 declare class CountQueuingStrategy implements QueuingStrategy { 2562 constructor(init: QueuingStrategyInit); 2563 + /** 2564 + * The read-only **`CountQueuingStrategy.highWaterMark`** property returns the total number of chunks that can be contained in the internal queue before backpressure is applied. 2565 + * 2566 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/highWaterMark) 2567 + */ 2568 get highWaterMark(): number; 2569 /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */ 2570 get size(): (chunk?: any) => number; ··· 2597 readonly scriptVersion?: ScriptVersion; 2598 readonly dispatchNamespace?: string; 2599 readonly scriptTags?: string[]; 2600 + readonly durableObjectId?: string; 2601 readonly outcome: string; 2602 readonly executionModel: string; 2603 readonly truncated: boolean; ··· 2683 fromTrace(item: TraceItem): TraceMetrics; 2684 } 2685 /** 2686 + * The **`URL`** interface is used to parse, construct, normalize, and encode URL. 2687 * 2688 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL) 2689 */ 2690 declare class URL { 2691 constructor(url: string | URL, base?: string | URL); 2692 + /** 2693 + * The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL. 2694 + * 2695 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin) 2696 + */ 2697 get origin(): string; 2698 + /** 2699 + * The **`href`** property of the URL interface is a string containing the whole URL. 2700 + * 2701 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) 2702 + */ 2703 get href(): string; 2704 + /** 2705 + * The **`href`** property of the URL interface is a string containing the whole URL. 2706 + * 2707 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href) 2708 + */ 2709 set href(value: string); 2710 + /** 2711 + * The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`. 2712 + * 2713 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) 2714 + */ 2715 get protocol(): string; 2716 + /** 2717 + * The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`. 2718 + * 2719 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol) 2720 + */ 2721 set protocol(value: string); 2722 + /** 2723 + * The **`username`** property of the URL interface is a string containing the username component of the URL. 2724 + * 2725 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) 2726 + */ 2727 get username(): string; 2728 + /** 2729 + * The **`username`** property of the URL interface is a string containing the username component of the URL. 2730 + * 2731 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username) 2732 + */ 2733 set username(value: string); 2734 + /** 2735 + * The **`password`** property of the URL interface is a string containing the password component of the URL. 2736 + * 2737 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) 2738 + */ 2739 get password(): string; 2740 + /** 2741 + * The **`password`** property of the URL interface is a string containing the password component of the URL. 2742 + * 2743 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password) 2744 + */ 2745 set password(value: string); 2746 + /** 2747 + * 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. 2748 + * 2749 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) 2750 + */ 2751 get host(): string; 2752 + /** 2753 + * 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. 2754 + * 2755 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host) 2756 + */ 2757 set host(value: string); 2758 + /** 2759 + * The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. 2760 + * 2761 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) 2762 + */ 2763 get hostname(): string; 2764 + /** 2765 + * The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL. 2766 + * 2767 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname) 2768 + */ 2769 set hostname(value: string); 2770 + /** 2771 + * The **`port`** property of the URL interface is a string containing the port number of the URL. 2772 + * 2773 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) 2774 + */ 2775 get port(): string; 2776 + /** 2777 + * The **`port`** property of the URL interface is a string containing the port number of the URL. 2778 + * 2779 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port) 2780 + */ 2781 set port(value: string); 2782 + /** 2783 + * The **`pathname`** property of the URL interface represents a location in a hierarchical structure. 2784 + * 2785 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) 2786 + */ 2787 get pathname(): string; 2788 + /** 2789 + * The **`pathname`** property of the URL interface represents a location in a hierarchical structure. 2790 + * 2791 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname) 2792 + */ 2793 set pathname(value: string); 2794 + /** 2795 + * 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. 2796 + * 2797 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) 2798 + */ 2799 get search(): string; 2800 + /** 2801 + * 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. 2802 + * 2803 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search) 2804 + */ 2805 set search(value: string); 2806 + /** 2807 + * The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL. 2808 + * 2809 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) 2810 + */ 2811 get hash(): string; 2812 + /** 2813 + * The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL. 2814 + * 2815 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash) 2816 + */ 2817 set hash(value: string); 2818 + /** 2819 + * The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL. 2820 + * 2821 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams) 2822 + */ 2823 get searchParams(): URLSearchParams; 2824 + /** 2825 + * 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. 2826 + * 2827 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON) 2828 + */ 2829 toJSON(): string; 2830 /*function toString() { [native code] }*/ 2831 toString(): string; 2832 + /** 2833 + * 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. 2834 + * 2835 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static) 2836 + */ 2837 static canParse(url: string, base?: string): boolean; 2838 + /** 2839 + * The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters. 2840 + * 2841 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static) 2842 + */ 2843 static parse(url: string, base?: string): URL | null; 2844 + /** 2845 + * The **`createObjectURL()`** static method of the URL interface creates a string containing a URL representing the object given in the parameter. 2846 + * 2847 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static) 2848 + */ 2849 static createObjectURL(object: File | Blob): string; 2850 + /** 2851 + * 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. 2852 + * 2853 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static) 2854 + */ 2855 static revokeObjectURL(object_url: string): void; 2856 } 2857 + /** 2858 + * The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL. 2859 + * 2860 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams) 2861 + */ 2862 declare class URLSearchParams { 2863 constructor(init?: (Iterable<Iterable<string>> | Record<string, string> | string)); 2864 + /** 2865 + * The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries. 2866 + * 2867 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/size) 2868 + */ 2869 get size(): number; 2870 /** 2871 + * The **`append()`** method of the URLSearchParams interface appends a specified key/value pair as a new search parameter. 2872 * 2873 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/append) 2874 */ 2875 append(name: string, value: string): void; 2876 /** 2877 + * The **`delete()`** method of the URLSearchParams interface deletes specified parameters and their associated value(s) from the list of all search parameters. 2878 * 2879 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete) 2880 */ 2881 delete(name: string, value?: string): void; 2882 /** 2883 + * The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter. 2884 * 2885 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/get) 2886 */ 2887 get(name: string): string | null; 2888 /** 2889 + * The **`getAll()`** method of the URLSearchParams interface returns all the values associated with a given search parameter as an array. 2890 * 2891 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/getAll) 2892 */ 2893 getAll(name: string): string[]; 2894 /** 2895 + * The **`has()`** method of the URLSearchParams interface returns a boolean value that indicates whether the specified parameter is in the search parameters. 2896 * 2897 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has) 2898 */ 2899 has(name: string, value?: string): boolean; 2900 /** 2901 + * The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value. 2902 * 2903 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/set) 2904 */ 2905 set(name: string, value: string): void; 2906 + /** 2907 + * The **`URLSearchParams.sort()`** method sorts all key/value pairs contained in this object in place and returns `undefined`. 2908 + * 2909 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/sort) 2910 + */ 2911 sort(): void; 2912 /* Returns an array of key, value pairs for every entry in the search params. */ 2913 entries(): IterableIterator<[ ··· 2919 /* Returns a list of values in the search params. */ 2920 values(): IterableIterator<string>; 2921 forEach<This = unknown>(callback: (this: This, value: string, key: string, parent: URLSearchParams) => void, thisArg?: This): void; 2922 + /*function toString() { [native code] }*/ 2923 toString(): string; 2924 [Symbol.iterator](): IterableIterator<[ 2925 key: string, ··· 2970 ignoreCase?: boolean; 2971 } 2972 /** 2973 + * A `CloseEvent` is sent to clients using WebSockets when the connection is closed. 2974 * 2975 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent) 2976 */ 2977 declare class CloseEvent extends Event { 2978 constructor(type: string, initializer?: CloseEventInit); 2979 /** 2980 + * The **`code`** read-only property of the CloseEvent interface returns a WebSocket connection close code indicating the reason the connection was closed. 2981 * 2982 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/code) 2983 */ 2984 readonly code: number; 2985 /** 2986 + * 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. 2987 * 2988 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/reason) 2989 */ 2990 readonly reason: string; 2991 /** 2992 + * The **`wasClean`** read-only property of the CloseEvent interface returns `true` if the connection closed cleanly. 2993 * 2994 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/CloseEvent/wasClean) 2995 */ ··· 3000 reason?: string; 3001 wasClean?: boolean; 3002 } 3003 type WebSocketEventMap = { 3004 close: CloseEvent; 3005 message: MessageEvent; ··· 3007 error: ErrorEvent; 3008 }; 3009 /** 3010 + * 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. 3011 * 3012 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket) 3013 */ ··· 3024 readonly CLOSED: number; 3025 }; 3026 /** 3027 + * 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. 3028 * 3029 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket) 3030 */ 3031 interface WebSocket extends EventTarget<WebSocketEventMap> { 3032 accept(): void; 3033 /** 3034 + * 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. 3035 * 3036 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/send) 3037 */ 3038 send(message: (ArrayBuffer | ArrayBufferView) | string): void; 3039 /** 3040 + * The **`WebSocket.close()`** method closes the already `CLOSED`, this method does nothing. 3041 * 3042 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/close) 3043 */ ··· 3045 serializeAttachment(attachment: any): void; 3046 deserializeAttachment(): any | null; 3047 /** 3048 + * The **`WebSocket.readyState`** read-only property returns the current state of the WebSocket connection. 3049 * 3050 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState) 3051 */ 3052 readyState: number; 3053 /** 3054 + * The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor. 3055 * 3056 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url) 3057 */ 3058 url: string | null; 3059 /** 3060 + * 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. 3061 * 3062 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol) 3063 */ 3064 protocol: string | null; 3065 /** 3066 + * The **`WebSocket.extensions`** read-only property returns the extensions selected by the server. 3067 * 3068 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions) 3069 */ ··· 3126 remoteAddress?: string; 3127 localAddress?: string; 3128 } 3129 + /** 3130 + * The **`EventSource`** interface is web content's interface to server-sent events. 3131 + * 3132 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource) 3133 + */ 3134 declare class EventSource extends EventTarget { 3135 constructor(url: string, init?: EventSourceEventSourceInit); 3136 /** 3137 + * The **`close()`** method of the EventSource interface closes the connection, if one is made, and sets the ```js-nolint close() ``` None. 3138 * 3139 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/close) 3140 */ 3141 close(): void; 3142 /** 3143 + * The **`url`** read-only property of the URL of the source. 3144 * 3145 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/url) 3146 */ 3147 get url(): string; 3148 /** 3149 + * The **`withCredentials`** read-only property of the the `EventSource` object was instantiated with CORS credentials set. 3150 * 3151 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/withCredentials) 3152 */ 3153 get withCredentials(): boolean; 3154 /** 3155 + * The **`readyState`** read-only property of the connection. 3156 * 3157 * [MDN Reference](https://developer.mozilla.org/docs/Web/API/EventSource/readyState) 3158 */ ··· 3185 destroy(error?: any): Promise<void>; 3186 signal(signo: number): void; 3187 getTcpPort(port: number): Fetcher; 3188 + setInactivityTimeout(durationMs: number | bigint): Promise<void>; 3189 } 3190 interface ContainerStartupOptions { 3191 entrypoint?: string[]; 3192 enableInternet: boolean; 3193 env?: Record<string, string>; 3194 + hardTimeout?: (number | bigint); 3195 + } 3196 + /** 3197 + * 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. 3198 + * 3199 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort) 3200 + */ 3201 + declare abstract class MessagePort extends EventTarget { 3202 + /** 3203 + * The **`postMessage()`** method of the transfers ownership of objects to other browsing contexts. 3204 + * 3205 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/postMessage) 3206 + */ 3207 + postMessage(data?: any, options?: (any[] | MessagePortPostMessageOptions)): void; 3208 + /** 3209 + * The **`close()`** method of the MessagePort interface disconnects the port, so it is no longer active. 3210 + * 3211 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/close) 3212 + */ 3213 + close(): void; 3214 + /** 3215 + * The **`start()`** method of the MessagePort interface starts the sending of messages queued on the port. 3216 + * 3217 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessagePort/start) 3218 + */ 3219 + start(): void; 3220 + get onmessage(): any | null; 3221 + set onmessage(value: any | null); 3222 + } 3223 + /** 3224 + * 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. 3225 + * 3226 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel) 3227 + */ 3228 + declare class MessageChannel { 3229 + constructor(); 3230 + /** 3231 + * The **`port1`** read-only property of the the port attached to the context that originated the channel. 3232 + * 3233 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1) 3234 + */ 3235 + readonly port1: MessagePort; 3236 + /** 3237 + * 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. 3238 + * 3239 + * [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2) 3240 + */ 3241 + readonly port2: MessagePort; 3242 + } 3243 + interface MessagePortPostMessageOptions { 3244 + transfer?: any[]; 3245 + } 3246 + 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; 3247 + type LoopbackServiceStub<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> = Fetcher<T> & (T extends CloudflareWorkersModule.WorkerEntrypoint<any, infer Props> ? (opts: { 3248 + props?: Props; 3249 + }) => Fetcher<T> : (opts: { 3250 + props?: any; 3251 + }) => Fetcher<T>); 3252 + type LoopbackDurableObjectClass<T extends Rpc.DurableObjectBranded | undefined = undefined> = DurableObjectClass<T> & (T extends CloudflareWorkersModule.DurableObject<any, infer Props> ? (opts: { 3253 + props?: Props; 3254 + }) => DurableObjectClass<T> : (opts: { 3255 + props?: any; 3256 + }) => DurableObjectClass<T>); 3257 + interface SyncKvStorage { 3258 + get<T = unknown>(key: string): T | undefined; 3259 + list<T = unknown>(options?: SyncKvListOptions): Iterable<[ 3260 + string, 3261 + T 3262 + ]>; 3263 + put<T>(key: string, value: T): void; 3264 + delete(key: string): boolean; 3265 + } 3266 + interface SyncKvListOptions { 3267 + start?: string; 3268 + startAfter?: string; 3269 + end?: string; 3270 + prefix?: string; 3271 + reverse?: boolean; 3272 + limit?: number; 3273 + } 3274 + interface WorkerStub { 3275 + getEntrypoint<T extends Rpc.WorkerEntrypointBranded | undefined>(name?: string, options?: WorkerStubEntrypointOptions): Fetcher<T>; 3276 + } 3277 + interface WorkerStubEntrypointOptions { 3278 + props?: any; 3279 + } 3280 + interface WorkerLoader { 3281 + get(name: string, getCode: () => WorkerLoaderWorkerCode | Promise<WorkerLoaderWorkerCode>): WorkerStub; 3282 + } 3283 + interface WorkerLoaderModule { 3284 + js?: string; 3285 + cjs?: string; 3286 + text?: string; 3287 + data?: ArrayBuffer; 3288 + json?: any; 3289 + py?: string; 3290 + wasm?: ArrayBuffer; 3291 + } 3292 + interface WorkerLoaderWorkerCode { 3293 + compatibilityDate: string; 3294 + compatibilityFlags?: string[]; 3295 + allowExperimental?: boolean; 3296 + mainModule: string; 3297 + modules: Record<string, WorkerLoaderModule | string>; 3298 + env?: any; 3299 + globalOutbound?: (Fetcher | null); 3300 + tails?: Fetcher[]; 3301 + streamingTails?: Fetcher[]; 3302 + } 3303 + /** 3304 + * The Workers runtime supports a subset of the Performance API, used to measure timing and performance, 3305 + * as well as timing of subrequests and other operations. 3306 + * 3307 + * [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/) 3308 + */ 3309 + declare abstract class Performance { 3310 + /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancetimeorigin) */ 3311 + get timeOrigin(): number; 3312 + /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */ 3313 + now(): number; 3314 } 3315 type AiImageClassificationInput = { 3316 image: number[]; ··· 3363 description: string; 3364 }; 3365 declare abstract class BaseAiImageTextToText { 3366 + inputs: AiImageTextToTextInput; 3367 + postProcessedOutputs: AiImageTextToTextOutput; 3368 + } 3369 + type AiMultimodalEmbeddingsInput = { 3370 + image: string; 3371 + text: string[]; 3372 + }; 3373 + type AiIMultimodalEmbeddingsOutput = { 3374 + data: number[][]; 3375 + shape: number[]; 3376 + }; 3377 + declare abstract class BaseAiMultimodalEmbeddings { 3378 inputs: AiImageTextToTextInput; 3379 postProcessedOutputs: AiImageTextToTextOutput; 3380 } ··· 3508 tools?: AiTextGenerationToolInput[] | AiTextGenerationToolLegacyInput[] | (object & NonNullable<unknown>); 3509 functions?: AiTextGenerationFunctionsInput[]; 3510 }; 3511 + type AiTextGenerationToolLegacyOutput = { 3512 + name: string; 3513 + arguments: unknown; 3514 + }; 3515 + type AiTextGenerationToolOutput = { 3516 + id: string; 3517 + type: "function"; 3518 + function: { 3519 + name: string; 3520 + arguments: string; 3521 + }; 3522 + }; 3523 + type UsageTags = { 3524 + prompt_tokens: number; 3525 + completion_tokens: number; 3526 + total_tokens: number; 3527 + }; 3528 type AiTextGenerationOutput = { 3529 response?: string; 3530 + tool_calls?: AiTextGenerationToolLegacyOutput[] & AiTextGenerationToolOutput[]; 3531 + usage?: UsageTags; 3532 }; 3533 declare abstract class BaseAiTextGeneration { 3534 inputs: AiTextGenerationInput; ··· 3575 inputs: AiTranslationInput; 3576 postProcessedOutputs: AiTranslationOutput; 3577 } 3578 + /** 3579 + * Workers AI support for OpenAI's Responses API 3580 + * Reference: https://github.com/openai/openai-node/blob/master/src/resources/responses/responses.ts 3581 + * 3582 + * It's a stripped down version from its source. 3583 + * It currently supports basic function calling, json mode and accepts images as input. 3584 + * 3585 + * It does not include types for WebSearch, CodeInterpreter, FileInputs, MCP, CustomTools. 3586 + * We plan to add those incrementally as model + platform capabilities evolve. 3587 + */ 3588 + type ResponsesInput = { 3589 + background?: boolean | null; 3590 + conversation?: string | ResponseConversationParam | null; 3591 + include?: Array<ResponseIncludable> | null; 3592 + input?: string | ResponseInput; 3593 + instructions?: string | null; 3594 + max_output_tokens?: number | null; 3595 + parallel_tool_calls?: boolean | null; 3596 + previous_response_id?: string | null; 3597 + prompt_cache_key?: string; 3598 + reasoning?: Reasoning | null; 3599 + safety_identifier?: string; 3600 + service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null; 3601 + stream?: boolean | null; 3602 + stream_options?: StreamOptions | null; 3603 + temperature?: number | null; 3604 + text?: ResponseTextConfig; 3605 + tool_choice?: ToolChoiceOptions | ToolChoiceFunction; 3606 + tools?: Array<Tool>; 3607 + top_p?: number | null; 3608 + truncation?: "auto" | "disabled" | null; 3609 + }; 3610 + type ResponsesOutput = { 3611 + id?: string; 3612 + created_at?: number; 3613 + output_text?: string; 3614 + error?: ResponseError | null; 3615 + incomplete_details?: ResponseIncompleteDetails | null; 3616 + instructions?: string | Array<ResponseInputItem> | null; 3617 + object?: "response"; 3618 + output?: Array<ResponseOutputItem>; 3619 + parallel_tool_calls?: boolean; 3620 + temperature?: number | null; 3621 + tool_choice?: ToolChoiceOptions | ToolChoiceFunction; 3622 + tools?: Array<Tool>; 3623 + top_p?: number | null; 3624 + max_output_tokens?: number | null; 3625 + previous_response_id?: string | null; 3626 + prompt?: ResponsePrompt | null; 3627 + reasoning?: Reasoning | null; 3628 + safety_identifier?: string; 3629 + service_tier?: "auto" | "default" | "flex" | "scale" | "priority" | null; 3630 + status?: ResponseStatus; 3631 + text?: ResponseTextConfig; 3632 + truncation?: "auto" | "disabled" | null; 3633 + usage?: ResponseUsage; 3634 + }; 3635 + type EasyInputMessage = { 3636 + content: string | ResponseInputMessageContentList; 3637 + role: "user" | "assistant" | "system" | "developer"; 3638 + type?: "message"; 3639 + }; 3640 + type ResponsesFunctionTool = { 3641 + name: string; 3642 + parameters: { 3643 + [key: string]: unknown; 3644 + } | null; 3645 + strict: boolean | null; 3646 + type: "function"; 3647 + description?: string | null; 3648 + }; 3649 + type ResponseIncompleteDetails = { 3650 + reason?: "max_output_tokens" | "content_filter"; 3651 + }; 3652 + type ResponsePrompt = { 3653 + id: string; 3654 + variables?: { 3655 + [key: string]: string | ResponseInputText | ResponseInputImage; 3656 + } | null; 3657 + version?: string | null; 3658 + }; 3659 + type Reasoning = { 3660 + effort?: ReasoningEffort | null; 3661 + generate_summary?: "auto" | "concise" | "detailed" | null; 3662 + summary?: "auto" | "concise" | "detailed" | null; 3663 + }; 3664 + type ResponseContent = ResponseInputText | ResponseInputImage | ResponseOutputText | ResponseOutputRefusal | ResponseContentReasoningText; 3665 + type ResponseContentReasoningText = { 3666 + text: string; 3667 + type: "reasoning_text"; 3668 + }; 3669 + type ResponseConversationParam = { 3670 + id: string; 3671 + }; 3672 + type ResponseCreatedEvent = { 3673 + response: Response; 3674 + sequence_number: number; 3675 + type: "response.created"; 3676 + }; 3677 + type ResponseCustomToolCallOutput = { 3678 + call_id: string; 3679 + output: string | Array<ResponseInputText | ResponseInputImage>; 3680 + type: "custom_tool_call_output"; 3681 + id?: string; 3682 + }; 3683 + type ResponseError = { 3684 + 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"; 3685 + message: string; 3686 + }; 3687 + type ResponseErrorEvent = { 3688 + code: string | null; 3689 + message: string; 3690 + param: string | null; 3691 + sequence_number: number; 3692 + type: "error"; 3693 + }; 3694 + type ResponseFailedEvent = { 3695 + response: Response; 3696 + sequence_number: number; 3697 + type: "response.failed"; 3698 + }; 3699 + type ResponseFormatText = { 3700 + type: "text"; 3701 + }; 3702 + type ResponseFormatJSONObject = { 3703 + type: "json_object"; 3704 + }; 3705 + type ResponseFormatTextConfig = ResponseFormatText | ResponseFormatTextJSONSchemaConfig | ResponseFormatJSONObject; 3706 + type ResponseFormatTextJSONSchemaConfig = { 3707 + name: string; 3708 + schema: { 3709 + [key: string]: unknown; 3710 + }; 3711 + type: "json_schema"; 3712 + description?: string; 3713 + strict?: boolean | null; 3714 + }; 3715 + type ResponseFunctionCallArgumentsDeltaEvent = { 3716 + delta: string; 3717 + item_id: string; 3718 + output_index: number; 3719 + sequence_number: number; 3720 + type: "response.function_call_arguments.delta"; 3721 + }; 3722 + type ResponseFunctionCallArgumentsDoneEvent = { 3723 + arguments: string; 3724 + item_id: string; 3725 + name: string; 3726 + output_index: number; 3727 + sequence_number: number; 3728 + type: "response.function_call_arguments.done"; 3729 + }; 3730 + type ResponseFunctionCallOutputItem = ResponseInputTextContent | ResponseInputImageContent; 3731 + type ResponseFunctionCallOutputItemList = Array<ResponseFunctionCallOutputItem>; 3732 + type ResponseFunctionToolCall = { 3733 + arguments: string; 3734 + call_id: string; 3735 + name: string; 3736 + type: "function_call"; 3737 + id?: string; 3738 + status?: "in_progress" | "completed" | "incomplete"; 3739 + }; 3740 + interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall { 3741 + id: string; 3742 + } 3743 + type ResponseFunctionToolCallOutputItem = { 3744 + id: string; 3745 + call_id: string; 3746 + output: string | Array<ResponseInputText | ResponseInputImage>; 3747 + type: "function_call_output"; 3748 + status?: "in_progress" | "completed" | "incomplete"; 3749 + }; 3750 + type ResponseIncludable = "message.input_image.image_url" | "message.output_text.logprobs"; 3751 + type ResponseIncompleteEvent = { 3752 + response: Response; 3753 + sequence_number: number; 3754 + type: "response.incomplete"; 3755 + }; 3756 + type ResponseInput = Array<ResponseInputItem>; 3757 + type ResponseInputContent = ResponseInputText | ResponseInputImage; 3758 + type ResponseInputImage = { 3759 + detail: "low" | "high" | "auto"; 3760 + type: "input_image"; 3761 + /** 3762 + * Base64 encoded image 3763 + */ 3764 + image_url?: string | null; 3765 + }; 3766 + type ResponseInputImageContent = { 3767 + type: "input_image"; 3768 + detail?: "low" | "high" | "auto" | null; 3769 + /** 3770 + * Base64 encoded image 3771 + */ 3772 + image_url?: string | null; 3773 + }; 3774 + type ResponseInputItem = EasyInputMessage | ResponseInputItemMessage | ResponseOutputMessage | ResponseFunctionToolCall | ResponseInputItemFunctionCallOutput | ResponseReasoningItem; 3775 + type ResponseInputItemFunctionCallOutput = { 3776 + call_id: string; 3777 + output: string | ResponseFunctionCallOutputItemList; 3778 + type: "function_call_output"; 3779 + id?: string | null; 3780 + status?: "in_progress" | "completed" | "incomplete" | null; 3781 + }; 3782 + type ResponseInputItemMessage = { 3783 + content: ResponseInputMessageContentList; 3784 + role: "user" | "system" | "developer"; 3785 + status?: "in_progress" | "completed" | "incomplete"; 3786 + type?: "message"; 3787 + }; 3788 + type ResponseInputMessageContentList = Array<ResponseInputContent>; 3789 + type ResponseInputMessageItem = { 3790 + id: string; 3791 + content: ResponseInputMessageContentList; 3792 + role: "user" | "system" | "developer"; 3793 + status?: "in_progress" | "completed" | "incomplete"; 3794 + type?: "message"; 3795 + }; 3796 + type ResponseInputText = { 3797 + text: string; 3798 + type: "input_text"; 3799 + }; 3800 + type ResponseInputTextContent = { 3801 + text: string; 3802 + type: "input_text"; 3803 + }; 3804 + type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem; 3805 + type ResponseOutputItem = ResponseOutputMessage | ResponseFunctionToolCall | ResponseReasoningItem; 3806 + type ResponseOutputItemAddedEvent = { 3807 + item: ResponseOutputItem; 3808 + output_index: number; 3809 + sequence_number: number; 3810 + type: "response.output_item.added"; 3811 + }; 3812 + type ResponseOutputItemDoneEvent = { 3813 + item: ResponseOutputItem; 3814 + output_index: number; 3815 + sequence_number: number; 3816 + type: "response.output_item.done"; 3817 + }; 3818 + type ResponseOutputMessage = { 3819 + id: string; 3820 + content: Array<ResponseOutputText | ResponseOutputRefusal>; 3821 + role: "assistant"; 3822 + status: "in_progress" | "completed" | "incomplete"; 3823 + type: "message"; 3824 + }; 3825 + type ResponseOutputRefusal = { 3826 + refusal: string; 3827 + type: "refusal"; 3828 + }; 3829 + type ResponseOutputText = { 3830 + text: string; 3831 + type: "output_text"; 3832 + logprobs?: Array<Logprob>; 3833 + }; 3834 + type ResponseReasoningItem = { 3835 + id: string; 3836 + summary: Array<ResponseReasoningSummaryItem>; 3837 + type: "reasoning"; 3838 + content?: Array<ResponseReasoningContentItem>; 3839 + encrypted_content?: string | null; 3840 + status?: "in_progress" | "completed" | "incomplete"; 3841 + }; 3842 + type ResponseReasoningSummaryItem = { 3843 + text: string; 3844 + type: "summary_text"; 3845 + }; 3846 + type ResponseReasoningContentItem = { 3847 + text: string; 3848 + type: "reasoning_text"; 3849 + }; 3850 + type ResponseReasoningTextDeltaEvent = { 3851 + content_index: number; 3852 + delta: string; 3853 + item_id: string; 3854 + output_index: number; 3855 + sequence_number: number; 3856 + type: "response.reasoning_text.delta"; 3857 + }; 3858 + type ResponseReasoningTextDoneEvent = { 3859 + content_index: number; 3860 + item_id: string; 3861 + output_index: number; 3862 + sequence_number: number; 3863 + text: string; 3864 + type: "response.reasoning_text.done"; 3865 + }; 3866 + type ResponseRefusalDeltaEvent = { 3867 + content_index: number; 3868 + delta: string; 3869 + item_id: string; 3870 + output_index: number; 3871 + sequence_number: number; 3872 + type: "response.refusal.delta"; 3873 + }; 3874 + type ResponseRefusalDoneEvent = { 3875 + content_index: number; 3876 + item_id: string; 3877 + output_index: number; 3878 + refusal: string; 3879 + sequence_number: number; 3880 + type: "response.refusal.done"; 3881 + }; 3882 + type ResponseStatus = "completed" | "failed" | "in_progress" | "cancelled" | "queued" | "incomplete"; 3883 + type ResponseStreamEvent = ResponseCompletedEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent; 3884 + type ResponseCompletedEvent = { 3885 + response: Response; 3886 + sequence_number: number; 3887 + type: "response.completed"; 3888 + }; 3889 + type ResponseTextConfig = { 3890 + format?: ResponseFormatTextConfig; 3891 + verbosity?: "low" | "medium" | "high" | null; 3892 + }; 3893 + type ResponseTextDeltaEvent = { 3894 + content_index: number; 3895 + delta: string; 3896 + item_id: string; 3897 + logprobs: Array<Logprob>; 3898 + output_index: number; 3899 + sequence_number: number; 3900 + type: "response.output_text.delta"; 3901 + }; 3902 + type ResponseTextDoneEvent = { 3903 + content_index: number; 3904 + item_id: string; 3905 + logprobs: Array<Logprob>; 3906 + output_index: number; 3907 + sequence_number: number; 3908 + text: string; 3909 + type: "response.output_text.done"; 3910 + }; 3911 + type Logprob = { 3912 + token: string; 3913 + logprob: number; 3914 + top_logprobs?: Array<TopLogprob>; 3915 + }; 3916 + type TopLogprob = { 3917 + token?: string; 3918 + logprob?: number; 3919 + }; 3920 + type ResponseUsage = { 3921 + input_tokens: number; 3922 + output_tokens: number; 3923 + total_tokens: number; 3924 + }; 3925 + type Tool = ResponsesFunctionTool; 3926 + type ToolChoiceFunction = { 3927 + name: string; 3928 + type: "function"; 3929 + }; 3930 + type ToolChoiceOptions = "none"; 3931 + type ReasoningEffort = "minimal" | "low" | "medium" | "high" | null; 3932 + type StreamOptions = { 3933 + include_obfuscation?: boolean; 3934 + }; 3935 type Ai_Cf_Baai_Bge_Base_En_V1_5_Input = { 3936 text: string | string[]; 3937 /** ··· 3960 * The pooling method used in the embedding process. 3961 */ 3962 pooling?: "mean" | "cls"; 3963 + } | Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse; 3964 + interface Ai_Cf_Baai_Bge_Base_En_V1_5_AsyncResponse { 3965 /** 3966 * The async request id that can be used to obtain the results. 3967 */ ··· 4037 * The translated text in the target language 4038 */ 4039 translated_text?: string; 4040 + } | Ai_Cf_Meta_M2M100_1_2B_AsyncResponse; 4041 + interface Ai_Cf_Meta_M2M100_1_2B_AsyncResponse { 4042 + /** 4043 + * The async request id that can be used to obtain the results. 4044 + */ 4045 + request_id?: string; 4046 + } 4047 declare abstract class Base_Ai_Cf_Meta_M2M100_1_2B { 4048 inputs: Ai_Cf_Meta_M2M100_1_2B_Input; 4049 postProcessedOutputs: Ai_Cf_Meta_M2M100_1_2B_Output; ··· 4076 * The pooling method used in the embedding process. 4077 */ 4078 pooling?: "mean" | "cls"; 4079 + } | Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse; 4080 + interface Ai_Cf_Baai_Bge_Small_En_V1_5_AsyncResponse { 4081 + /** 4082 + * The async request id that can be used to obtain the results. 4083 + */ 4084 + request_id?: string; 4085 + } 4086 declare abstract class Base_Ai_Cf_Baai_Bge_Small_En_V1_5 { 4087 inputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Input; 4088 postProcessedOutputs: Ai_Cf_Baai_Bge_Small_En_V1_5_Output; ··· 4115 * The pooling method used in the embedding process. 4116 */ 4117 pooling?: "mean" | "cls"; 4118 + } | Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse; 4119 + interface Ai_Cf_Baai_Bge_Large_En_V1_5_AsyncResponse { 4120 + /** 4121 + * The async request id that can be used to obtain the results. 4122 + */ 4123 + request_id?: string; 4124 + } 4125 declare abstract class Base_Ai_Cf_Baai_Bge_Large_En_V1_5 { 4126 inputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Input; 4127 postProcessedOutputs: Ai_Cf_Baai_Bge_Large_En_V1_5_Output; ··· 4307 inputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Input; 4308 postProcessedOutputs: Ai_Cf_Openai_Whisper_Large_V3_Turbo_Output; 4309 } 4310 + type Ai_Cf_Baai_Bge_M3_Input = Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts | Ai_Cf_Baai_Bge_M3_Input_Embedding | { 4311 /** 4312 * Batch of the embeddings requests to run using async-queue 4313 */ 4314 + requests: (Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 | Ai_Cf_Baai_Bge_M3_Input_Embedding_1)[]; 4315 }; 4316 + interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts { 4317 /** 4318 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts 4319 */ ··· 4332 */ 4333 truncate_inputs?: boolean; 4334 } 4335 + interface Ai_Cf_Baai_Bge_M3_Input_Embedding { 4336 text: string | string[]; 4337 /** 4338 * When provided with too long context should the model error out or truncate the context to fit? 4339 */ 4340 truncate_inputs?: boolean; 4341 } 4342 + interface Ai_Cf_Baai_Bge_M3_Input_QueryAnd_Contexts_1 { 4343 /** 4344 * A query you wish to perform against the provided contexts. If no query is provided the model with respond with embeddings for contexts 4345 */ ··· 4358 */ 4359 truncate_inputs?: boolean; 4360 } 4361 + interface Ai_Cf_Baai_Bge_M3_Input_Embedding_1 { 4362 text: string | string[]; 4363 /** 4364 * When provided with too long context should the model error out or truncate the context to fit? 4365 */ 4366 truncate_inputs?: boolean; 4367 } 4368 + 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; 4369 + interface Ai_Cf_Baai_Bge_M3_Ouput_Query { 4370 response?: { 4371 /** 4372 * Index of the context in the request ··· 4378 score?: number; 4379 }[]; 4380 } 4381 + interface Ai_Cf_Baai_Bge_M3_Output_EmbeddingFor_Contexts { 4382 response?: number[][]; 4383 shape?: number[]; 4384 /** ··· 4386 */ 4387 pooling?: "mean" | "cls"; 4388 } 4389 + interface Ai_Cf_Baai_Bge_M3_Ouput_Embedding { 4390 shape?: number[]; 4391 /** 4392 * Embeddings of the requested text values ··· 4396 * The pooling method used in the embedding process. 4397 */ 4398 pooling?: "mean" | "cls"; 4399 + } 4400 + interface Ai_Cf_Baai_Bge_M3_AsyncResponse { 4401 + /** 4402 + * The async request id that can be used to obtain the results. 4403 + */ 4404 + request_id?: string; 4405 } 4406 declare abstract class Base_Ai_Cf_Baai_Bge_M3 { 4407 inputs: Ai_Cf_Baai_Bge_M3_Input; ··· 4427 inputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Input; 4428 postProcessedOutputs: Ai_Cf_Black_Forest_Labs_Flux_1_Schnell_Output; 4429 } 4430 + 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; 4431 + interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Prompt { 4432 /** 4433 * The input text prompt for the model to generate a response. 4434 */ ··· 4479 */ 4480 lora?: string; 4481 } 4482 + interface Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Messages { 4483 /** 4484 * An array of message objects representing the conversation history. 4485 */ ··· 4670 inputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Input; 4671 postProcessedOutputs: Ai_Cf_Meta_Llama_3_2_11B_Vision_Instruct_Output; 4672 } 4673 + 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; 4674 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Prompt { 4675 /** 4676 * The input text prompt for the model to generate a response. 4677 */ ··· 4680 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 4681 */ 4682 lora?: string; 4683 + response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode; 4684 /** 4685 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 4686 */ ··· 4722 */ 4723 presence_penalty?: number; 4724 } 4725 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode { 4726 type?: "json_object" | "json_schema"; 4727 json_schema?: unknown; 4728 } 4729 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Messages { 4730 /** 4731 * An array of message objects representing the conversation history. 4732 */ ··· 4831 }; 4832 }; 4833 })[]; 4834 + response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1; 4835 /** 4836 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 4837 */ ··· 4873 */ 4874 presence_penalty?: number; 4875 } 4876 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_1 { 4877 + type?: "json_object" | "json_schema"; 4878 + json_schema?: unknown; 4879 + } 4880 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Async_Batch { 4881 requests?: { 4882 /** 4883 * 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. ··· 4919 * Increases the likelihood of the model introducing new topics. 4920 */ 4921 presence_penalty?: number; 4922 + response_format?: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2; 4923 }[]; 4924 } 4925 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_JSON_Mode_2 { 4926 + type?: "json_object" | "json_schema"; 4927 + json_schema?: unknown; 4928 + } 4929 type Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output = { 4930 /** 4931 * The generated text response from the model ··· 4961 */ 4962 name?: string; 4963 }[]; 4964 + } | string | Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse; 4965 + interface Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_AsyncResponse { 4966 + /** 4967 + * The async request id that can be used to obtain the results. 4968 + */ 4969 + request_id?: string; 4970 + } 4971 declare abstract class Base_Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast { 4972 inputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Input; 4973 postProcessedOutputs: Ai_Cf_Meta_Llama_3_3_70B_Instruct_Fp8_Fast_Output; ··· 5041 /** 5042 * A query you wish to perform against the provided contexts. 5043 */ 5044 /** 5045 * Number of returned results starting with the best score. 5046 */ ··· 5071 inputs: Ai_Cf_Baai_Bge_Reranker_Base_Input; 5072 postProcessedOutputs: Ai_Cf_Baai_Bge_Reranker_Base_Output; 5073 } 5074 + 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; 5075 + interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Prompt { 5076 /** 5077 * The input text prompt for the model to generate a response. 5078 */ ··· 5081 * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 5082 */ 5083 lora?: string; 5084 + response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode; 5085 /** 5086 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 5087 */ ··· 5123 */ 5124 presence_penalty?: number; 5125 } 5126 + interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode { 5127 + type?: "json_object" | "json_schema"; 5128 + json_schema?: unknown; 5129 + } 5130 + interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Messages { 5131 /** 5132 * An array of message objects representing the conversation history. 5133 */ ··· 5232 }; 5233 }; 5234 })[]; 5235 + response_format?: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1; 5236 /** 5237 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 5238 */ ··· 5274 */ 5275 presence_penalty?: number; 5276 } 5277 + interface Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_JSON_Mode_1 { 5278 + type?: "json_object" | "json_schema"; 5279 + json_schema?: unknown; 5280 + } 5281 type Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output = { 5282 /** 5283 * The generated text response from the model ··· 5318 inputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Input; 5319 postProcessedOutputs: Ai_Cf_Qwen_Qwen2_5_Coder_32B_Instruct_Output; 5320 } 5321 + type Ai_Cf_Qwen_Qwq_32B_Input = Ai_Cf_Qwen_Qwq_32B_Prompt | Ai_Cf_Qwen_Qwq_32B_Messages; 5322 + interface Ai_Cf_Qwen_Qwq_32B_Prompt { 5323 /** 5324 * The input text prompt for the model to generate a response. 5325 */ ··· 5369 */ 5370 presence_penalty?: number; 5371 } 5372 + interface Ai_Cf_Qwen_Qwq_32B_Messages { 5373 /** 5374 * An array of message objects representing the conversation history. 5375 */ ··· 5584 inputs: Ai_Cf_Qwen_Qwq_32B_Input; 5585 postProcessedOutputs: Ai_Cf_Qwen_Qwq_32B_Output; 5586 } 5587 + 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; 5588 + interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Prompt { 5589 /** 5590 * The input text prompt for the model to generate a response. 5591 */ ··· 5635 */ 5636 presence_penalty?: number; 5637 } 5638 + interface Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Messages { 5639 /** 5640 * An array of message objects representing the conversation history. 5641 */ ··· 5850 inputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Input; 5851 postProcessedOutputs: Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct_Output; 5852 } 5853 + 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; 5854 + interface Ai_Cf_Google_Gemma_3_12B_It_Prompt { 5855 /** 5856 * The input text prompt for the model to generate a response. 5857 */ ··· 5901 */ 5902 presence_penalty?: number; 5903 } 5904 + interface Ai_Cf_Google_Gemma_3_12B_It_Messages { 5905 /** 5906 * An array of message objects representing the conversation history. 5907 */ ··· 5922 */ 5923 url?: string; 5924 }; 5925 + }[]; 5926 }[]; 5927 functions?: { 5928 name: string; ··· 6100 inputs: Ai_Cf_Google_Gemma_3_12B_It_Input; 6101 postProcessedOutputs: Ai_Cf_Google_Gemma_3_12B_It_Output; 6102 } 6103 + 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; 6104 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt { 6105 /** 6106 * The input text prompt for the model to generate a response. 6107 */ ··· 6110 * JSON schema that should be fulfilled for the response. 6111 */ 6112 guided_json?: object; 6113 + response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode; 6114 /** 6115 * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6116 */ ··· 6152 */ 6153 presence_penalty?: number; 6154 } 6155 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode { 6156 + type?: "json_object" | "json_schema"; 6157 + json_schema?: unknown; 6158 + } 6159 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages { 6160 /** 6161 * An array of message objects representing the conversation history. 6162 */ ··· 6286 }; 6287 }; 6288 })[]; 6289 + response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode; 6290 + /** 6291 + * JSON schema that should be fufilled for the response. 6292 + */ 6293 + guided_json?: object; 6294 + /** 6295 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6296 + */ 6297 + raw?: boolean; 6298 + /** 6299 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6300 + */ 6301 + stream?: boolean; 6302 + /** 6303 + * The maximum number of tokens to generate in the response. 6304 + */ 6305 + max_tokens?: number; 6306 + /** 6307 + * Controls the randomness of the output; higher values produce more random results. 6308 + */ 6309 + temperature?: number; 6310 + /** 6311 + * 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. 6312 + */ 6313 + top_p?: number; 6314 + /** 6315 + * 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. 6316 + */ 6317 + top_k?: number; 6318 + /** 6319 + * Random seed for reproducibility of the generation. 6320 + */ 6321 + seed?: number; 6322 + /** 6323 + * Penalty for repeated tokens; higher values discourage repetition. 6324 + */ 6325 + repetition_penalty?: number; 6326 + /** 6327 + * Decreases the likelihood of the model repeating the same lines verbatim. 6328 + */ 6329 + frequency_penalty?: number; 6330 + /** 6331 + * Increases the likelihood of the model introducing new topics. 6332 + */ 6333 + presence_penalty?: number; 6334 + } 6335 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Async_Batch { 6336 + requests: (Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner | Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner)[]; 6337 + } 6338 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Prompt_Inner { 6339 + /** 6340 + * The input text prompt for the model to generate a response. 6341 + */ 6342 + prompt: string; 6343 + /** 6344 + * JSON schema that should be fulfilled for the response. 6345 + */ 6346 + guided_json?: object; 6347 + response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode; 6348 + /** 6349 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6350 + */ 6351 + raw?: boolean; 6352 + /** 6353 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6354 + */ 6355 + stream?: boolean; 6356 + /** 6357 + * The maximum number of tokens to generate in the response. 6358 + */ 6359 + max_tokens?: number; 6360 + /** 6361 + * Controls the randomness of the output; higher values produce more random results. 6362 + */ 6363 + temperature?: number; 6364 + /** 6365 + * 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. 6366 + */ 6367 + top_p?: number; 6368 + /** 6369 + * 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. 6370 + */ 6371 + top_k?: number; 6372 + /** 6373 + * Random seed for reproducibility of the generation. 6374 + */ 6375 + seed?: number; 6376 + /** 6377 + * Penalty for repeated tokens; higher values discourage repetition. 6378 + */ 6379 + repetition_penalty?: number; 6380 + /** 6381 + * Decreases the likelihood of the model repeating the same lines verbatim. 6382 + */ 6383 + frequency_penalty?: number; 6384 + /** 6385 + * Increases the likelihood of the model introducing new topics. 6386 + */ 6387 + presence_penalty?: number; 6388 + } 6389 + interface Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Messages_Inner { 6390 + /** 6391 + * An array of message objects representing the conversation history. 6392 + */ 6393 + messages: { 6394 + /** 6395 + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). 6396 + */ 6397 + role?: string; 6398 + /** 6399 + * The tool call id. If you don't know what to put here you can fall back to 000000001 6400 + */ 6401 + tool_call_id?: string; 6402 + content?: string | { 6403 + /** 6404 + * Type of the content provided 6405 + */ 6406 + type?: string; 6407 + text?: string; 6408 + image_url?: { 6409 + /** 6410 + * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted 6411 + */ 6412 + url?: string; 6413 + }; 6414 + }[] | { 6415 + /** 6416 + * Type of the content provided 6417 + */ 6418 + type?: string; 6419 + text?: string; 6420 + image_url?: { 6421 + /** 6422 + * image uri with data (e.g. data:image/jpeg;base64,/9j/...). HTTP URL will not be accepted 6423 + */ 6424 + url?: string; 6425 + }; 6426 + }; 6427 + }[]; 6428 + functions?: { 6429 + name: string; 6430 + code: string; 6431 + }[]; 6432 + /** 6433 + * A list of tools available for the assistant to use. 6434 + */ 6435 + tools?: ({ 6436 + /** 6437 + * The name of the tool. More descriptive the better. 6438 + */ 6439 + name: string; 6440 + /** 6441 + * A brief description of what the tool does. 6442 + */ 6443 + description: string; 6444 + /** 6445 + * Schema defining the parameters accepted by the tool. 6446 + */ 6447 + parameters: { 6448 + /** 6449 + * The type of the parameters object (usually 'object'). 6450 + */ 6451 + type: string; 6452 + /** 6453 + * List of required parameter names. 6454 + */ 6455 + required?: string[]; 6456 + /** 6457 + * Definitions of each parameter. 6458 + */ 6459 + properties: { 6460 + [k: string]: { 6461 + /** 6462 + * The data type of the parameter. 6463 + */ 6464 + type: string; 6465 + /** 6466 + * A description of the expected parameter. 6467 + */ 6468 + description: string; 6469 + }; 6470 + }; 6471 + }; 6472 + } | { 6473 + /** 6474 + * Specifies the type of tool (e.g., 'function'). 6475 + */ 6476 + type: string; 6477 + /** 6478 + * Details of the function tool. 6479 + */ 6480 + function: { 6481 + /** 6482 + * The name of the function. 6483 + */ 6484 + name: string; 6485 + /** 6486 + * A brief description of what the function does. 6487 + */ 6488 + description: string; 6489 + /** 6490 + * Schema defining the parameters accepted by the function. 6491 + */ 6492 + parameters: { 6493 + /** 6494 + * The type of the parameters object (usually 'object'). 6495 + */ 6496 + type: string; 6497 + /** 6498 + * List of required parameter names. 6499 + */ 6500 + required?: string[]; 6501 + /** 6502 + * Definitions of each parameter. 6503 + */ 6504 + properties: { 6505 + [k: string]: { 6506 + /** 6507 + * The data type of the parameter. 6508 + */ 6509 + type: string; 6510 + /** 6511 + * A description of the expected parameter. 6512 + */ 6513 + description: string; 6514 + }; 6515 + }; 6516 + }; 6517 + }; 6518 + })[]; 6519 + response_format?: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_JSON_Mode; 6520 /** 6521 * JSON schema that should be fufilled for the response. 6522 */ ··· 6615 inputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Input; 6616 postProcessedOutputs: Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct_Output; 6617 } 6618 + 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; 6619 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt { 6620 + /** 6621 + * The input text prompt for the model to generate a response. 6622 + */ 6623 + prompt: string; 6624 + /** 6625 + * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 6626 + */ 6627 + lora?: string; 6628 + response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode; 6629 + /** 6630 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6631 + */ 6632 + raw?: boolean; 6633 + /** 6634 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6635 + */ 6636 + stream?: boolean; 6637 + /** 6638 + * The maximum number of tokens to generate in the response. 6639 + */ 6640 + max_tokens?: number; 6641 + /** 6642 + * Controls the randomness of the output; higher values produce more random results. 6643 + */ 6644 + temperature?: number; 6645 + /** 6646 + * 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. 6647 + */ 6648 + top_p?: number; 6649 + /** 6650 + * 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. 6651 + */ 6652 + top_k?: number; 6653 + /** 6654 + * Random seed for reproducibility of the generation. 6655 + */ 6656 + seed?: number; 6657 + /** 6658 + * Penalty for repeated tokens; higher values discourage repetition. 6659 + */ 6660 + repetition_penalty?: number; 6661 + /** 6662 + * Decreases the likelihood of the model repeating the same lines verbatim. 6663 + */ 6664 + frequency_penalty?: number; 6665 + /** 6666 + * Increases the likelihood of the model introducing new topics. 6667 + */ 6668 + presence_penalty?: number; 6669 + } 6670 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode { 6671 + type?: "json_object" | "json_schema"; 6672 + json_schema?: unknown; 6673 + } 6674 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages { 6675 + /** 6676 + * An array of message objects representing the conversation history. 6677 + */ 6678 + messages: { 6679 + /** 6680 + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). 6681 + */ 6682 + role: string; 6683 + /** 6684 + * The content of the message as a string. 6685 + */ 6686 + content: string; 6687 + }[]; 6688 + functions?: { 6689 + name: string; 6690 + code: string; 6691 + }[]; 6692 + /** 6693 + * A list of tools available for the assistant to use. 6694 + */ 6695 + tools?: ({ 6696 + /** 6697 + * The name of the tool. More descriptive the better. 6698 + */ 6699 + name: string; 6700 + /** 6701 + * A brief description of what the tool does. 6702 + */ 6703 + description: string; 6704 + /** 6705 + * Schema defining the parameters accepted by the tool. 6706 + */ 6707 + parameters: { 6708 + /** 6709 + * The type of the parameters object (usually 'object'). 6710 + */ 6711 + type: string; 6712 + /** 6713 + * List of required parameter names. 6714 + */ 6715 + required?: string[]; 6716 + /** 6717 + * Definitions of each parameter. 6718 + */ 6719 + properties: { 6720 + [k: string]: { 6721 + /** 6722 + * The data type of the parameter. 6723 + */ 6724 + type: string; 6725 + /** 6726 + * A description of the expected parameter. 6727 + */ 6728 + description: string; 6729 + }; 6730 + }; 6731 + }; 6732 + } | { 6733 + /** 6734 + * Specifies the type of tool (e.g., 'function'). 6735 + */ 6736 + type: string; 6737 + /** 6738 + * Details of the function tool. 6739 + */ 6740 + function: { 6741 + /** 6742 + * The name of the function. 6743 + */ 6744 + name: string; 6745 + /** 6746 + * A brief description of what the function does. 6747 + */ 6748 + description: string; 6749 + /** 6750 + * Schema defining the parameters accepted by the function. 6751 + */ 6752 + parameters: { 6753 + /** 6754 + * The type of the parameters object (usually 'object'). 6755 + */ 6756 + type: string; 6757 + /** 6758 + * List of required parameter names. 6759 + */ 6760 + required?: string[]; 6761 + /** 6762 + * Definitions of each parameter. 6763 + */ 6764 + properties: { 6765 + [k: string]: { 6766 + /** 6767 + * The data type of the parameter. 6768 + */ 6769 + type: string; 6770 + /** 6771 + * A description of the expected parameter. 6772 + */ 6773 + description: string; 6774 + }; 6775 + }; 6776 + }; 6777 + }; 6778 + })[]; 6779 + response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1; 6780 + /** 6781 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6782 + */ 6783 + raw?: boolean; 6784 + /** 6785 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6786 + */ 6787 + stream?: boolean; 6788 + /** 6789 + * The maximum number of tokens to generate in the response. 6790 + */ 6791 + max_tokens?: number; 6792 + /** 6793 + * Controls the randomness of the output; higher values produce more random results. 6794 + */ 6795 + temperature?: number; 6796 + /** 6797 + * 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. 6798 + */ 6799 + top_p?: number; 6800 + /** 6801 + * 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. 6802 + */ 6803 + top_k?: number; 6804 + /** 6805 + * Random seed for reproducibility of the generation. 6806 + */ 6807 + seed?: number; 6808 + /** 6809 + * Penalty for repeated tokens; higher values discourage repetition. 6810 + */ 6811 + repetition_penalty?: number; 6812 + /** 6813 + * Decreases the likelihood of the model repeating the same lines verbatim. 6814 + */ 6815 + frequency_penalty?: number; 6816 + /** 6817 + * Increases the likelihood of the model introducing new topics. 6818 + */ 6819 + presence_penalty?: number; 6820 + } 6821 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_1 { 6822 + type?: "json_object" | "json_schema"; 6823 + json_schema?: unknown; 6824 + } 6825 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Async_Batch { 6826 + requests: (Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 | Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1)[]; 6827 + } 6828 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Prompt_1 { 6829 + /** 6830 + * The input text prompt for the model to generate a response. 6831 + */ 6832 + prompt: string; 6833 + /** 6834 + * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 6835 + */ 6836 + lora?: string; 6837 + response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2; 6838 + /** 6839 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6840 + */ 6841 + raw?: boolean; 6842 + /** 6843 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6844 + */ 6845 + stream?: boolean; 6846 + /** 6847 + * The maximum number of tokens to generate in the response. 6848 + */ 6849 + max_tokens?: number; 6850 + /** 6851 + * Controls the randomness of the output; higher values produce more random results. 6852 + */ 6853 + temperature?: number; 6854 + /** 6855 + * 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. 6856 + */ 6857 + top_p?: number; 6858 + /** 6859 + * 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. 6860 + */ 6861 + top_k?: number; 6862 + /** 6863 + * Random seed for reproducibility of the generation. 6864 + */ 6865 + seed?: number; 6866 + /** 6867 + * Penalty for repeated tokens; higher values discourage repetition. 6868 + */ 6869 + repetition_penalty?: number; 6870 + /** 6871 + * Decreases the likelihood of the model repeating the same lines verbatim. 6872 + */ 6873 + frequency_penalty?: number; 6874 + /** 6875 + * Increases the likelihood of the model introducing new topics. 6876 + */ 6877 + presence_penalty?: number; 6878 + } 6879 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_2 { 6880 + type?: "json_object" | "json_schema"; 6881 + json_schema?: unknown; 6882 + } 6883 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Messages_1 { 6884 + /** 6885 + * An array of message objects representing the conversation history. 6886 + */ 6887 + messages: { 6888 + /** 6889 + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). 6890 + */ 6891 + role: string; 6892 + /** 6893 + * The content of the message as a string. 6894 + */ 6895 + content: string; 6896 + }[]; 6897 + functions?: { 6898 + name: string; 6899 + code: string; 6900 + }[]; 6901 + /** 6902 + * A list of tools available for the assistant to use. 6903 + */ 6904 + tools?: ({ 6905 + /** 6906 + * The name of the tool. More descriptive the better. 6907 + */ 6908 + name: string; 6909 + /** 6910 + * A brief description of what the tool does. 6911 + */ 6912 + description: string; 6913 + /** 6914 + * Schema defining the parameters accepted by the tool. 6915 + */ 6916 + parameters: { 6917 + /** 6918 + * The type of the parameters object (usually 'object'). 6919 + */ 6920 + type: string; 6921 + /** 6922 + * List of required parameter names. 6923 + */ 6924 + required?: string[]; 6925 + /** 6926 + * Definitions of each parameter. 6927 + */ 6928 + properties: { 6929 + [k: string]: { 6930 + /** 6931 + * The data type of the parameter. 6932 + */ 6933 + type: string; 6934 + /** 6935 + * A description of the expected parameter. 6936 + */ 6937 + description: string; 6938 + }; 6939 + }; 6940 + }; 6941 + } | { 6942 + /** 6943 + * Specifies the type of tool (e.g., 'function'). 6944 + */ 6945 + type: string; 6946 + /** 6947 + * Details of the function tool. 6948 + */ 6949 + function: { 6950 + /** 6951 + * The name of the function. 6952 + */ 6953 + name: string; 6954 + /** 6955 + * A brief description of what the function does. 6956 + */ 6957 + description: string; 6958 + /** 6959 + * Schema defining the parameters accepted by the function. 6960 + */ 6961 + parameters: { 6962 + /** 6963 + * The type of the parameters object (usually 'object'). 6964 + */ 6965 + type: string; 6966 + /** 6967 + * List of required parameter names. 6968 + */ 6969 + required?: string[]; 6970 + /** 6971 + * Definitions of each parameter. 6972 + */ 6973 + properties: { 6974 + [k: string]: { 6975 + /** 6976 + * The data type of the parameter. 6977 + */ 6978 + type: string; 6979 + /** 6980 + * A description of the expected parameter. 6981 + */ 6982 + description: string; 6983 + }; 6984 + }; 6985 + }; 6986 + }; 6987 + })[]; 6988 + response_format?: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3; 6989 + /** 6990 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 6991 + */ 6992 + raw?: boolean; 6993 + /** 6994 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 6995 + */ 6996 + stream?: boolean; 6997 + /** 6998 + * The maximum number of tokens to generate in the response. 6999 + */ 7000 + max_tokens?: number; 7001 + /** 7002 + * Controls the randomness of the output; higher values produce more random results. 7003 + */ 7004 + temperature?: number; 7005 + /** 7006 + * 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. 7007 + */ 7008 + top_p?: number; 7009 + /** 7010 + * 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. 7011 + */ 7012 + top_k?: number; 7013 + /** 7014 + * Random seed for reproducibility of the generation. 7015 + */ 7016 + seed?: number; 7017 + /** 7018 + * Penalty for repeated tokens; higher values discourage repetition. 7019 + */ 7020 + repetition_penalty?: number; 7021 + /** 7022 + * Decreases the likelihood of the model repeating the same lines verbatim. 7023 + */ 7024 + frequency_penalty?: number; 7025 + /** 7026 + * Increases the likelihood of the model introducing new topics. 7027 + */ 7028 + presence_penalty?: number; 7029 + } 7030 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_JSON_Mode_3 { 7031 + type?: "json_object" | "json_schema"; 7032 + json_schema?: unknown; 7033 + } 7034 + 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; 7035 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Chat_Completion_Response { 7036 + /** 7037 + * Unique identifier for the completion 7038 + */ 7039 + id?: string; 7040 + /** 7041 + * Object type identifier 7042 + */ 7043 + object?: "chat.completion"; 7044 + /** 7045 + * Unix timestamp of when the completion was created 7046 + */ 7047 + created?: number; 7048 + /** 7049 + * Model used for the completion 7050 + */ 7051 + model?: string; 7052 + /** 7053 + * List of completion choices 7054 + */ 7055 + choices?: { 7056 + /** 7057 + * Index of the choice in the list 7058 + */ 7059 + index?: number; 7060 + /** 7061 + * The message generated by the model 7062 + */ 7063 + message?: { 7064 + /** 7065 + * Role of the message author 7066 + */ 7067 + role: string; 7068 + /** 7069 + * The content of the message 7070 + */ 7071 + content: string; 7072 + /** 7073 + * Internal reasoning content (if available) 7074 + */ 7075 + reasoning_content?: string; 7076 + /** 7077 + * Tool calls made by the assistant 7078 + */ 7079 + tool_calls?: { 7080 + /** 7081 + * Unique identifier for the tool call 7082 + */ 7083 + id: string; 7084 + /** 7085 + * Type of tool call 7086 + */ 7087 + type: "function"; 7088 + function: { 7089 + /** 7090 + * Name of the function to call 7091 + */ 7092 + name: string; 7093 + /** 7094 + * JSON string of arguments for the function 7095 + */ 7096 + arguments: string; 7097 + }; 7098 + }[]; 7099 + }; 7100 + /** 7101 + * Reason why the model stopped generating 7102 + */ 7103 + finish_reason?: string; 7104 + /** 7105 + * Stop reason (may be null) 7106 + */ 7107 + stop_reason?: string | null; 7108 + /** 7109 + * Log probabilities (if requested) 7110 + */ 7111 + logprobs?: {} | null; 7112 + }[]; 7113 + /** 7114 + * Usage statistics for the inference request 7115 + */ 7116 + usage?: { 7117 + /** 7118 + * Total number of tokens in input 7119 + */ 7120 + prompt_tokens?: number; 7121 + /** 7122 + * Total number of tokens in output 7123 + */ 7124 + completion_tokens?: number; 7125 + /** 7126 + * Total number of input and output tokens 7127 + */ 7128 + total_tokens?: number; 7129 + }; 7130 + /** 7131 + * Log probabilities for the prompt (if requested) 7132 + */ 7133 + prompt_logprobs?: {} | null; 7134 + } 7135 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Text_Completion_Response { 7136 + /** 7137 + * Unique identifier for the completion 7138 + */ 7139 + id?: string; 7140 + /** 7141 + * Object type identifier 7142 + */ 7143 + object?: "text_completion"; 7144 + /** 7145 + * Unix timestamp of when the completion was created 7146 + */ 7147 + created?: number; 7148 + /** 7149 + * Model used for the completion 7150 + */ 7151 + model?: string; 7152 + /** 7153 + * List of completion choices 7154 + */ 7155 + choices?: { 7156 + /** 7157 + * Index of the choice in the list 7158 + */ 7159 + index: number; 7160 + /** 7161 + * The generated text completion 7162 + */ 7163 + text: string; 7164 + /** 7165 + * Reason why the model stopped generating 7166 + */ 7167 + finish_reason: string; 7168 + /** 7169 + * Stop reason (may be null) 7170 + */ 7171 + stop_reason?: string | null; 7172 + /** 7173 + * Log probabilities (if requested) 7174 + */ 7175 + logprobs?: {} | null; 7176 + /** 7177 + * Log probabilities for the prompt (if requested) 7178 + */ 7179 + prompt_logprobs?: {} | null; 7180 + }[]; 7181 + /** 7182 + * Usage statistics for the inference request 7183 + */ 7184 + usage?: { 7185 + /** 7186 + * Total number of tokens in input 7187 + */ 7188 + prompt_tokens?: number; 7189 + /** 7190 + * Total number of tokens in output 7191 + */ 7192 + completion_tokens?: number; 7193 + /** 7194 + * Total number of input and output tokens 7195 + */ 7196 + total_tokens?: number; 7197 + }; 7198 + } 7199 + interface Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_AsyncResponse { 7200 + /** 7201 + * The async request id that can be used to obtain the results. 7202 + */ 7203 + request_id?: string; 7204 + } 7205 + declare abstract class Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8 { 7206 + inputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Input; 7207 + postProcessedOutputs: Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8_Output; 7208 + } 7209 + interface Ai_Cf_Deepgram_Nova_3_Input { 7210 + audio: { 7211 + body: object; 7212 + contentType: string; 7213 + }; 7214 + /** 7215 + * 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. 7216 + */ 7217 + custom_topic_mode?: "extended" | "strict"; 7218 + /** 7219 + * Custom topics you want the model to detect within your input audio or text if present Submit up to 100 7220 + */ 7221 + custom_topic?: string; 7222 + /** 7223 + * 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 7224 + */ 7225 + custom_intent_mode?: "extended" | "strict"; 7226 + /** 7227 + * Custom intents you want the model to detect within your input audio if present 7228 + */ 7229 + custom_intent?: string; 7230 + /** 7231 + * Identifies and extracts key entities from content in submitted audio 7232 + */ 7233 + detect_entities?: boolean; 7234 + /** 7235 + * Identifies the dominant language spoken in submitted audio 7236 + */ 7237 + detect_language?: boolean; 7238 + /** 7239 + * Recognize speaker changes. Each word in the transcript will be assigned a speaker number starting at 0 7240 + */ 7241 + diarize?: boolean; 7242 + /** 7243 + * Identify and extract key entities from content in submitted audio 7244 + */ 7245 + dictation?: boolean; 7246 + /** 7247 + * Specify the expected encoding of your submitted audio 7248 + */ 7249 + encoding?: "linear16" | "flac" | "mulaw" | "amr-nb" | "amr-wb" | "opus" | "speex" | "g729"; 7250 + /** 7251 + * Arbitrary key-value pairs that are attached to the API response for usage in downstream processing 7252 + */ 7253 + extra?: string; 7254 + /** 7255 + * Filler Words can help transcribe interruptions in your audio, like 'uh' and 'um' 7256 + */ 7257 + filler_words?: boolean; 7258 + /** 7259 + * Key term prompting can boost or suppress specialized terminology and brands. 7260 + */ 7261 + keyterm?: string; 7262 + /** 7263 + * Keywords can boost or suppress specialized terminology and brands. 7264 + */ 7265 + keywords?: string; 7266 + /** 7267 + * 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. 7268 + */ 7269 + language?: string; 7270 + /** 7271 + * Spoken measurements will be converted to their corresponding abbreviations. 7272 + */ 7273 + measurements?: boolean; 7274 + /** 7275 + * 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. 7276 + */ 7277 + mip_opt_out?: boolean; 7278 + /** 7279 + * Mode of operation for the model representing broad area of topic that will be talked about in the supplied audio 7280 + */ 7281 + mode?: "general" | "medical" | "finance"; 7282 + /** 7283 + * Transcribe each audio channel independently. 7284 + */ 7285 + multichannel?: boolean; 7286 + /** 7287 + * Numerals converts numbers from written format to numerical format. 7288 + */ 7289 + numerals?: boolean; 7290 + /** 7291 + * Splits audio into paragraphs to improve transcript readability. 7292 + */ 7293 + paragraphs?: boolean; 7294 + /** 7295 + * Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely. 7296 + */ 7297 + profanity_filter?: boolean; 7298 + /** 7299 + * Add punctuation and capitalization to the transcript. 7300 + */ 7301 + punctuate?: boolean; 7302 + /** 7303 + * Redaction removes sensitive information from your transcripts. 7304 + */ 7305 + redact?: string; 7306 + /** 7307 + * Search for terms or phrases in submitted audio and replaces them. 7308 + */ 7309 + replace?: string; 7310 + /** 7311 + * Search for terms or phrases in submitted audio. 7312 + */ 7313 + search?: string; 7314 + /** 7315 + * Recognizes the sentiment throughout a transcript or text. 7316 + */ 7317 + sentiment?: boolean; 7318 + /** 7319 + * Apply formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability. 7320 + */ 7321 + smart_format?: boolean; 7322 + /** 7323 + * Detect topics throughout a transcript or text. 7324 + */ 7325 + topics?: boolean; 7326 + /** 7327 + * Segments speech into meaningful semantic units. 7328 + */ 7329 + utterances?: boolean; 7330 + /** 7331 + * Seconds to wait before detecting a pause between words in submitted audio. 7332 + */ 7333 + utt_split?: number; 7334 + /** 7335 + * The number of channels in the submitted audio 7336 + */ 7337 + channels?: number; 7338 + /** 7339 + * 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. 7340 + */ 7341 + interim_results?: boolean; 7342 + /** 7343 + * 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 7344 + */ 7345 + endpointing?: string; 7346 + /** 7347 + * Indicates that speech has started. You'll begin receiving Speech Started messages upon speech starting. Note: Supported only for webosockets. 7348 + */ 7349 + vad_events?: boolean; 7350 + /** 7351 + * 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. 7352 + */ 7353 + utterance_end_ms?: boolean; 7354 + } 7355 + interface Ai_Cf_Deepgram_Nova_3_Output { 7356 + results?: { 7357 + channels?: { 7358 + alternatives?: { 7359 + confidence?: number; 7360 + transcript?: string; 7361 + words?: { 7362 + confidence?: number; 7363 + end?: number; 7364 + start?: number; 7365 + word?: string; 7366 + }[]; 7367 + }[]; 7368 + }[]; 7369 + summary?: { 7370 + result?: string; 7371 + short?: string; 7372 + }; 7373 + sentiments?: { 7374 + segments?: { 7375 + text?: string; 7376 + start_word?: number; 7377 + end_word?: number; 7378 + sentiment?: string; 7379 + sentiment_score?: number; 7380 + }[]; 7381 + average?: { 7382 + sentiment?: string; 7383 + sentiment_score?: number; 7384 + }; 7385 + }; 7386 + }; 7387 + } 7388 + declare abstract class Base_Ai_Cf_Deepgram_Nova_3 { 7389 + inputs: Ai_Cf_Deepgram_Nova_3_Input; 7390 + postProcessedOutputs: Ai_Cf_Deepgram_Nova_3_Output; 7391 + } 7392 + interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input { 7393 + queries?: string | string[]; 7394 + /** 7395 + * Optional instruction for the task 7396 + */ 7397 + instruction?: string; 7398 + documents?: string | string[]; 7399 + text?: string | string[]; 7400 + } 7401 + interface Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output { 7402 + data?: number[][]; 7403 + shape?: number[]; 7404 + } 7405 + declare abstract class Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B { 7406 + inputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Input; 7407 + postProcessedOutputs: Ai_Cf_Qwen_Qwen3_Embedding_0_6B_Output; 7408 + } 7409 + type Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input = { 7410 + /** 7411 + * readable stream with audio data and content-type specified for that data 7412 + */ 7413 + audio: { 7414 + body: object; 7415 + contentType: string; 7416 + }; 7417 + /** 7418 + * type of data PCM data that's sent to the inference server as raw array 7419 + */ 7420 + dtype?: "uint8" | "float32" | "float64"; 7421 + } | { 7422 + /** 7423 + * base64 encoded audio data 7424 + */ 7425 + audio: string; 7426 + /** 7427 + * type of data PCM data that's sent to the inference server as raw array 7428 + */ 7429 + dtype?: "uint8" | "float32" | "float64"; 7430 + }; 7431 + interface Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output { 7432 + /** 7433 + * if true, end-of-turn was detected 7434 + */ 7435 + is_complete?: boolean; 7436 + /** 7437 + * probability of the end-of-turn detection 7438 + */ 7439 + probability?: number; 7440 + } 7441 + declare abstract class Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2 { 7442 + inputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Input; 7443 + postProcessedOutputs: Ai_Cf_Pipecat_Ai_Smart_Turn_V2_Output; 7444 + } 7445 + declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_120B { 7446 + inputs: ResponsesInput; 7447 + postProcessedOutputs: ResponsesOutput; 7448 + } 7449 + declare abstract class Base_Ai_Cf_Openai_Gpt_Oss_20B { 7450 + inputs: ResponsesInput; 7451 + postProcessedOutputs: ResponsesOutput; 7452 + } 7453 + interface Ai_Cf_Leonardo_Phoenix_1_0_Input { 7454 + /** 7455 + * A text description of the image you want to generate. 7456 + */ 7457 + prompt: string; 7458 + /** 7459 + * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt 7460 + */ 7461 + guidance?: number; 7462 + /** 7463 + * Random seed for reproducibility of the image generation 7464 + */ 7465 + seed?: number; 7466 + /** 7467 + * The height of the generated image in pixels 7468 + */ 7469 + height?: number; 7470 + /** 7471 + * The width of the generated image in pixels 7472 + */ 7473 + width?: number; 7474 + /** 7475 + * The number of diffusion steps; higher values can improve quality but take longer 7476 + */ 7477 + num_steps?: number; 7478 + /** 7479 + * Specify what to exclude from the generated images 7480 + */ 7481 + negative_prompt?: string; 7482 + } 7483 + /** 7484 + * The generated image in JPEG format 7485 + */ 7486 + type Ai_Cf_Leonardo_Phoenix_1_0_Output = string; 7487 + declare abstract class Base_Ai_Cf_Leonardo_Phoenix_1_0 { 7488 + inputs: Ai_Cf_Leonardo_Phoenix_1_0_Input; 7489 + postProcessedOutputs: Ai_Cf_Leonardo_Phoenix_1_0_Output; 7490 + } 7491 + interface Ai_Cf_Leonardo_Lucid_Origin_Input { 7492 + /** 7493 + * A text description of the image you want to generate. 7494 + */ 7495 + prompt: string; 7496 + /** 7497 + * Controls how closely the generated image should adhere to the prompt; higher values make the image more aligned with the prompt 7498 + */ 7499 + guidance?: number; 7500 + /** 7501 + * Random seed for reproducibility of the image generation 7502 + */ 7503 + seed?: number; 7504 + /** 7505 + * The height of the generated image in pixels 7506 + */ 7507 + height?: number; 7508 + /** 7509 + * The width of the generated image in pixels 7510 + */ 7511 + width?: number; 7512 + /** 7513 + * The number of diffusion steps; higher values can improve quality but take longer 7514 + */ 7515 + num_steps?: number; 7516 + /** 7517 + * The number of diffusion steps; higher values can improve quality but take longer 7518 + */ 7519 + steps?: number; 7520 + } 7521 + interface Ai_Cf_Leonardo_Lucid_Origin_Output { 7522 + /** 7523 + * The generated image in Base64 format. 7524 + */ 7525 + image?: string; 7526 + } 7527 + declare abstract class Base_Ai_Cf_Leonardo_Lucid_Origin { 7528 + inputs: Ai_Cf_Leonardo_Lucid_Origin_Input; 7529 + postProcessedOutputs: Ai_Cf_Leonardo_Lucid_Origin_Output; 7530 + } 7531 + interface Ai_Cf_Deepgram_Aura_1_Input { 7532 + /** 7533 + * Speaker used to produce the audio. 7534 + */ 7535 + speaker?: "angus" | "asteria" | "arcas" | "orion" | "orpheus" | "athena" | "luna" | "zeus" | "perseus" | "helios" | "hera" | "stella"; 7536 + /** 7537 + * Encoding of the output audio. 7538 + */ 7539 + encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac"; 7540 + /** 7541 + * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. 7542 + */ 7543 + container?: "none" | "wav" | "ogg"; 7544 + /** 7545 + * The text content to be converted to speech 7546 + */ 7547 + text: string; 7548 + /** 7549 + * 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 7550 + */ 7551 + sample_rate?: number; 7552 + /** 7553 + * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. 7554 + */ 7555 + bit_rate?: number; 7556 + } 7557 + /** 7558 + * The generated audio in MP3 format 7559 + */ 7560 + type Ai_Cf_Deepgram_Aura_1_Output = string; 7561 + declare abstract class Base_Ai_Cf_Deepgram_Aura_1 { 7562 + inputs: Ai_Cf_Deepgram_Aura_1_Input; 7563 + postProcessedOutputs: Ai_Cf_Deepgram_Aura_1_Output; 7564 + } 7565 + interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input { 7566 + /** 7567 + * Input text to translate. Can be a single string or a list of strings. 7568 + */ 7569 + text: string | string[]; 7570 + /** 7571 + * Target langauge to translate to 7572 + */ 7573 + 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"; 7574 + } 7575 + interface Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output { 7576 + /** 7577 + * Translated texts 7578 + */ 7579 + translations: string[]; 7580 + } 7581 + declare abstract class Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B { 7582 + inputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Input; 7583 + postProcessedOutputs: Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B_Output; 7584 + } 7585 + 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; 7586 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt { 7587 + /** 7588 + * The input text prompt for the model to generate a response. 7589 + */ 7590 + prompt: string; 7591 + /** 7592 + * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 7593 + */ 7594 + lora?: string; 7595 + response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode; 7596 + /** 7597 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 7598 + */ 7599 + raw?: boolean; 7600 + /** 7601 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 7602 + */ 7603 + stream?: boolean; 7604 + /** 7605 + * The maximum number of tokens to generate in the response. 7606 + */ 7607 + max_tokens?: number; 7608 + /** 7609 + * Controls the randomness of the output; higher values produce more random results. 7610 + */ 7611 + temperature?: number; 7612 + /** 7613 + * 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. 7614 + */ 7615 + top_p?: number; 7616 + /** 7617 + * 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. 7618 + */ 7619 + top_k?: number; 7620 + /** 7621 + * Random seed for reproducibility of the generation. 7622 + */ 7623 + seed?: number; 7624 + /** 7625 + * Penalty for repeated tokens; higher values discourage repetition. 7626 + */ 7627 + repetition_penalty?: number; 7628 + /** 7629 + * Decreases the likelihood of the model repeating the same lines verbatim. 7630 + */ 7631 + frequency_penalty?: number; 7632 + /** 7633 + * Increases the likelihood of the model introducing new topics. 7634 + */ 7635 + presence_penalty?: number; 7636 + } 7637 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode { 7638 + type?: "json_object" | "json_schema"; 7639 + json_schema?: unknown; 7640 + } 7641 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages { 7642 + /** 7643 + * An array of message objects representing the conversation history. 7644 + */ 7645 + messages: { 7646 + /** 7647 + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). 7648 + */ 7649 + role: string; 7650 + /** 7651 + * The content of the message as a string. 7652 + */ 7653 + content: string; 7654 + }[]; 7655 + functions?: { 7656 + name: string; 7657 + code: string; 7658 + }[]; 7659 + /** 7660 + * A list of tools available for the assistant to use. 7661 + */ 7662 + tools?: ({ 7663 + /** 7664 + * The name of the tool. More descriptive the better. 7665 + */ 7666 + name: string; 7667 + /** 7668 + * A brief description of what the tool does. 7669 + */ 7670 + description: string; 7671 + /** 7672 + * Schema defining the parameters accepted by the tool. 7673 + */ 7674 + parameters: { 7675 + /** 7676 + * The type of the parameters object (usually 'object'). 7677 + */ 7678 + type: string; 7679 + /** 7680 + * List of required parameter names. 7681 + */ 7682 + required?: string[]; 7683 + /** 7684 + * Definitions of each parameter. 7685 + */ 7686 + properties: { 7687 + [k: string]: { 7688 + /** 7689 + * The data type of the parameter. 7690 + */ 7691 + type: string; 7692 + /** 7693 + * A description of the expected parameter. 7694 + */ 7695 + description: string; 7696 + }; 7697 + }; 7698 + }; 7699 + } | { 7700 + /** 7701 + * Specifies the type of tool (e.g., 'function'). 7702 + */ 7703 + type: string; 7704 + /** 7705 + * Details of the function tool. 7706 + */ 7707 + function: { 7708 + /** 7709 + * The name of the function. 7710 + */ 7711 + name: string; 7712 + /** 7713 + * A brief description of what the function does. 7714 + */ 7715 + description: string; 7716 + /** 7717 + * Schema defining the parameters accepted by the function. 7718 + */ 7719 + parameters: { 7720 + /** 7721 + * The type of the parameters object (usually 'object'). 7722 + */ 7723 + type: string; 7724 + /** 7725 + * List of required parameter names. 7726 + */ 7727 + required?: string[]; 7728 + /** 7729 + * Definitions of each parameter. 7730 + */ 7731 + properties: { 7732 + [k: string]: { 7733 + /** 7734 + * The data type of the parameter. 7735 + */ 7736 + type: string; 7737 + /** 7738 + * A description of the expected parameter. 7739 + */ 7740 + description: string; 7741 + }; 7742 + }; 7743 + }; 7744 + }; 7745 + })[]; 7746 + response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1; 7747 + /** 7748 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 7749 + */ 7750 + raw?: boolean; 7751 + /** 7752 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 7753 + */ 7754 + stream?: boolean; 7755 + /** 7756 + * The maximum number of tokens to generate in the response. 7757 + */ 7758 + max_tokens?: number; 7759 + /** 7760 + * Controls the randomness of the output; higher values produce more random results. 7761 + */ 7762 + temperature?: number; 7763 + /** 7764 + * 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. 7765 + */ 7766 + top_p?: number; 7767 + /** 7768 + * 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. 7769 + */ 7770 + top_k?: number; 7771 + /** 7772 + * Random seed for reproducibility of the generation. 7773 + */ 7774 + seed?: number; 7775 + /** 7776 + * Penalty for repeated tokens; higher values discourage repetition. 7777 + */ 7778 + repetition_penalty?: number; 7779 + /** 7780 + * Decreases the likelihood of the model repeating the same lines verbatim. 7781 + */ 7782 + frequency_penalty?: number; 7783 + /** 7784 + * Increases the likelihood of the model introducing new topics. 7785 + */ 7786 + presence_penalty?: number; 7787 + } 7788 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_1 { 7789 + type?: "json_object" | "json_schema"; 7790 + json_schema?: unknown; 7791 + } 7792 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Async_Batch { 7793 + requests: (Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1 | Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1)[]; 7794 + } 7795 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Prompt_1 { 7796 + /** 7797 + * The input text prompt for the model to generate a response. 7798 + */ 7799 + prompt: string; 7800 + /** 7801 + * Name of the LoRA (Low-Rank Adaptation) model to fine-tune the base model. 7802 + */ 7803 + lora?: string; 7804 + response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2; 7805 + /** 7806 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 7807 + */ 7808 + raw?: boolean; 7809 + /** 7810 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 7811 + */ 7812 + stream?: boolean; 7813 + /** 7814 + * The maximum number of tokens to generate in the response. 7815 + */ 7816 + max_tokens?: number; 7817 + /** 7818 + * Controls the randomness of the output; higher values produce more random results. 7819 + */ 7820 + temperature?: number; 7821 + /** 7822 + * 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. 7823 + */ 7824 + top_p?: number; 7825 + /** 7826 + * 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. 7827 + */ 7828 + top_k?: number; 7829 + /** 7830 + * Random seed for reproducibility of the generation. 7831 + */ 7832 + seed?: number; 7833 + /** 7834 + * Penalty for repeated tokens; higher values discourage repetition. 7835 + */ 7836 + repetition_penalty?: number; 7837 + /** 7838 + * Decreases the likelihood of the model repeating the same lines verbatim. 7839 + */ 7840 + frequency_penalty?: number; 7841 + /** 7842 + * Increases the likelihood of the model introducing new topics. 7843 + */ 7844 + presence_penalty?: number; 7845 + } 7846 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_2 { 7847 + type?: "json_object" | "json_schema"; 7848 + json_schema?: unknown; 7849 + } 7850 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Messages_1 { 7851 + /** 7852 + * An array of message objects representing the conversation history. 7853 + */ 7854 + messages: { 7855 + /** 7856 + * The role of the message sender (e.g., 'user', 'assistant', 'system', 'tool'). 7857 + */ 7858 + role: string; 7859 + /** 7860 + * The content of the message as a string. 7861 + */ 7862 + content: string; 7863 + }[]; 7864 + functions?: { 7865 + name: string; 7866 + code: string; 7867 + }[]; 7868 + /** 7869 + * A list of tools available for the assistant to use. 7870 + */ 7871 + tools?: ({ 7872 + /** 7873 + * The name of the tool. More descriptive the better. 7874 + */ 7875 + name: string; 7876 + /** 7877 + * A brief description of what the tool does. 7878 + */ 7879 + description: string; 7880 + /** 7881 + * Schema defining the parameters accepted by the tool. 7882 + */ 7883 + parameters: { 7884 + /** 7885 + * The type of the parameters object (usually 'object'). 7886 + */ 7887 + type: string; 7888 + /** 7889 + * List of required parameter names. 7890 + */ 7891 + required?: string[]; 7892 + /** 7893 + * Definitions of each parameter. 7894 + */ 7895 + properties: { 7896 + [k: string]: { 7897 + /** 7898 + * The data type of the parameter. 7899 + */ 7900 + type: string; 7901 + /** 7902 + * A description of the expected parameter. 7903 + */ 7904 + description: string; 7905 + }; 7906 + }; 7907 + }; 7908 + } | { 7909 + /** 7910 + * Specifies the type of tool (e.g., 'function'). 7911 + */ 7912 + type: string; 7913 + /** 7914 + * Details of the function tool. 7915 + */ 7916 + function: { 7917 + /** 7918 + * The name of the function. 7919 + */ 7920 + name: string; 7921 + /** 7922 + * A brief description of what the function does. 7923 + */ 7924 + description: string; 7925 + /** 7926 + * Schema defining the parameters accepted by the function. 7927 + */ 7928 + parameters: { 7929 + /** 7930 + * The type of the parameters object (usually 'object'). 7931 + */ 7932 + type: string; 7933 + /** 7934 + * List of required parameter names. 7935 + */ 7936 + required?: string[]; 7937 + /** 7938 + * Definitions of each parameter. 7939 + */ 7940 + properties: { 7941 + [k: string]: { 7942 + /** 7943 + * The data type of the parameter. 7944 + */ 7945 + type: string; 7946 + /** 7947 + * A description of the expected parameter. 7948 + */ 7949 + description: string; 7950 + }; 7951 + }; 7952 + }; 7953 + }; 7954 + })[]; 7955 + response_format?: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3; 7956 + /** 7957 + * If true, a chat template is not applied and you must adhere to the specific model's expected formatting. 7958 + */ 7959 + raw?: boolean; 7960 + /** 7961 + * If true, the response will be streamed back incrementally using SSE, Server Sent Events. 7962 + */ 7963 + stream?: boolean; 7964 + /** 7965 + * The maximum number of tokens to generate in the response. 7966 + */ 7967 + max_tokens?: number; 7968 + /** 7969 + * Controls the randomness of the output; higher values produce more random results. 7970 + */ 7971 + temperature?: number; 7972 + /** 7973 + * 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. 7974 + */ 7975 + top_p?: number; 7976 + /** 7977 + * 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. 7978 + */ 7979 + top_k?: number; 7980 + /** 7981 + * Random seed for reproducibility of the generation. 7982 + */ 7983 + seed?: number; 7984 + /** 7985 + * Penalty for repeated tokens; higher values discourage repetition. 7986 + */ 7987 + repetition_penalty?: number; 7988 + /** 7989 + * Decreases the likelihood of the model repeating the same lines verbatim. 7990 + */ 7991 + frequency_penalty?: number; 7992 + /** 7993 + * Increases the likelihood of the model introducing new topics. 7994 + */ 7995 + presence_penalty?: number; 7996 + } 7997 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_JSON_Mode_3 { 7998 + type?: "json_object" | "json_schema"; 7999 + json_schema?: unknown; 8000 + } 8001 + 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; 8002 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Chat_Completion_Response { 8003 + /** 8004 + * Unique identifier for the completion 8005 + */ 8006 + id?: string; 8007 + /** 8008 + * Object type identifier 8009 + */ 8010 + object?: "chat.completion"; 8011 + /** 8012 + * Unix timestamp of when the completion was created 8013 + */ 8014 + created?: number; 8015 + /** 8016 + * Model used for the completion 8017 + */ 8018 + model?: string; 8019 + /** 8020 + * List of completion choices 8021 + */ 8022 + choices?: { 8023 + /** 8024 + * Index of the choice in the list 8025 + */ 8026 + index?: number; 8027 + /** 8028 + * The message generated by the model 8029 + */ 8030 + message?: { 8031 + /** 8032 + * Role of the message author 8033 + */ 8034 + role: string; 8035 + /** 8036 + * The content of the message 8037 + */ 8038 + content: string; 8039 + /** 8040 + * Internal reasoning content (if available) 8041 + */ 8042 + reasoning_content?: string; 8043 + /** 8044 + * Tool calls made by the assistant 8045 + */ 8046 + tool_calls?: { 8047 + /** 8048 + * Unique identifier for the tool call 8049 + */ 8050 + id: string; 8051 + /** 8052 + * Type of tool call 8053 + */ 8054 + type: "function"; 8055 + function: { 8056 + /** 8057 + * Name of the function to call 8058 + */ 8059 + name: string; 8060 + /** 8061 + * JSON string of arguments for the function 8062 + */ 8063 + arguments: string; 8064 + }; 8065 + }[]; 8066 + }; 8067 + /** 8068 + * Reason why the model stopped generating 8069 + */ 8070 + finish_reason?: string; 8071 + /** 8072 + * Stop reason (may be null) 8073 + */ 8074 + stop_reason?: string | null; 8075 + /** 8076 + * Log probabilities (if requested) 8077 + */ 8078 + logprobs?: {} | null; 8079 + }[]; 8080 + /** 8081 + * Usage statistics for the inference request 8082 + */ 8083 + usage?: { 8084 + /** 8085 + * Total number of tokens in input 8086 + */ 8087 + prompt_tokens?: number; 8088 + /** 8089 + * Total number of tokens in output 8090 + */ 8091 + completion_tokens?: number; 8092 + /** 8093 + * Total number of input and output tokens 8094 + */ 8095 + total_tokens?: number; 8096 + }; 8097 + /** 8098 + * Log probabilities for the prompt (if requested) 8099 + */ 8100 + prompt_logprobs?: {} | null; 8101 + } 8102 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Text_Completion_Response { 8103 + /** 8104 + * Unique identifier for the completion 8105 + */ 8106 + id?: string; 8107 + /** 8108 + * Object type identifier 8109 + */ 8110 + object?: "text_completion"; 8111 + /** 8112 + * Unix timestamp of when the completion was created 8113 + */ 8114 + created?: number; 8115 + /** 8116 + * Model used for the completion 8117 + */ 8118 + model?: string; 8119 + /** 8120 + * List of completion choices 8121 + */ 8122 + choices?: { 8123 + /** 8124 + * Index of the choice in the list 8125 + */ 8126 + index: number; 8127 + /** 8128 + * The generated text completion 8129 + */ 8130 + text: string; 8131 + /** 8132 + * Reason why the model stopped generating 8133 + */ 8134 + finish_reason: string; 8135 + /** 8136 + * Stop reason (may be null) 8137 + */ 8138 + stop_reason?: string | null; 8139 + /** 8140 + * Log probabilities (if requested) 8141 + */ 8142 + logprobs?: {} | null; 8143 + /** 8144 + * Log probabilities for the prompt (if requested) 8145 + */ 8146 + prompt_logprobs?: {} | null; 8147 + }[]; 8148 + /** 8149 + * Usage statistics for the inference request 8150 + */ 8151 + usage?: { 8152 + /** 8153 + * Total number of tokens in input 8154 + */ 8155 + prompt_tokens?: number; 8156 + /** 8157 + * Total number of tokens in output 8158 + */ 8159 + completion_tokens?: number; 8160 + /** 8161 + * Total number of input and output tokens 8162 + */ 8163 + total_tokens?: number; 8164 + }; 8165 + } 8166 + interface Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_AsyncResponse { 8167 + /** 8168 + * The async request id that can be used to obtain the results. 8169 + */ 8170 + request_id?: string; 8171 + } 8172 + declare abstract class Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It { 8173 + inputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Input; 8174 + postProcessedOutputs: Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It_Output; 8175 + } 8176 + interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Input { 8177 + /** 8178 + * Input text to embed. Can be a single string or a list of strings. 8179 + */ 8180 + text: string | string[]; 8181 + } 8182 + interface Ai_Cf_Pfnet_Plamo_Embedding_1B_Output { 8183 + /** 8184 + * Embedding vectors, where each vector is a list of floats. 8185 + */ 8186 + data: number[][]; 8187 + /** 8188 + * Shape of the embedding data as [number_of_embeddings, embedding_dimension]. 8189 + * 8190 + * @minItems 2 8191 + * @maxItems 2 8192 + */ 8193 + shape: [ 8194 + number, 8195 + number 8196 + ]; 8197 + } 8198 + declare abstract class Base_Ai_Cf_Pfnet_Plamo_Embedding_1B { 8199 + inputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Input; 8200 + postProcessedOutputs: Ai_Cf_Pfnet_Plamo_Embedding_1B_Output; 8201 + } 8202 + interface Ai_Cf_Deepgram_Flux_Input { 8203 + /** 8204 + * Encoding of the audio stream. Currently only supports raw signed little-endian 16-bit PCM. 8205 + */ 8206 + encoding: "linear16"; 8207 + /** 8208 + * Sample rate of the audio stream in Hz. 8209 + */ 8210 + sample_rate: string; 8211 + /** 8212 + * 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. 8213 + */ 8214 + eager_eot_threshold?: string; 8215 + /** 8216 + * End-of-turn confidence required to finish a turn. Valid Values 0.5 - 0.9. 8217 + */ 8218 + eot_threshold?: string; 8219 + /** 8220 + * A turn will be finished when this much time has passed after speech, regardless of EOT confidence. 8221 + */ 8222 + eot_timeout_ms?: string; 8223 + /** 8224 + * Keyterm prompting can improve recognition of specialized terminology. Pass multiple keyterm query parameters to boost multiple keyterms. 8225 + */ 8226 + keyterm?: string; 8227 + /** 8228 + * 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 8229 + */ 8230 + mip_opt_out?: "true" | "false"; 8231 + /** 8232 + * Label your requests for the purpose of identification during usage reporting 8233 + */ 8234 + tag?: string; 8235 + } 8236 + /** 8237 + * Output will be returned as websocket messages. 8238 + */ 8239 + interface Ai_Cf_Deepgram_Flux_Output { 8240 + /** 8241 + * The unique identifier of the request (uuid) 8242 + */ 8243 + request_id?: string; 8244 + /** 8245 + * Starts at 0 and increments for each message the server sends to the client. 8246 + */ 8247 + sequence_id?: number; 8248 + /** 8249 + * The type of event being reported. 8250 + */ 8251 + event?: "Update" | "StartOfTurn" | "EagerEndOfTurn" | "TurnResumed" | "EndOfTurn"; 8252 + /** 8253 + * The index of the current turn 8254 + */ 8255 + turn_index?: number; 8256 + /** 8257 + * Start time in seconds of the audio range that was transcribed 8258 + */ 8259 + audio_window_start?: number; 8260 + /** 8261 + * End time in seconds of the audio range that was transcribed 8262 + */ 8263 + audio_window_end?: number; 8264 + /** 8265 + * Text that was said over the course of the current turn 8266 + */ 8267 + transcript?: string; 8268 + /** 8269 + * The words in the transcript 8270 + */ 8271 + words?: { 8272 + /** 8273 + * The individual punctuated, properly-cased word from the transcript 8274 + */ 8275 + word: string; 8276 + /** 8277 + * Confidence that this word was transcribed correctly 8278 + */ 8279 + confidence: number; 8280 + }[]; 8281 + /** 8282 + * Confidence that no more speech is coming in this turn 8283 + */ 8284 + end_of_turn_confidence?: number; 8285 + } 8286 + declare abstract class Base_Ai_Cf_Deepgram_Flux { 8287 + inputs: Ai_Cf_Deepgram_Flux_Input; 8288 + postProcessedOutputs: Ai_Cf_Deepgram_Flux_Output; 8289 + } 8290 + interface Ai_Cf_Deepgram_Aura_2_En_Input { 8291 + /** 8292 + * Speaker used to produce the audio. 8293 + */ 8294 + 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"; 8295 + /** 8296 + * Encoding of the output audio. 8297 + */ 8298 + encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac"; 8299 + /** 8300 + * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. 8301 + */ 8302 + container?: "none" | "wav" | "ogg"; 8303 + /** 8304 + * The text content to be converted to speech 8305 + */ 8306 + text: string; 8307 + /** 8308 + * 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 8309 + */ 8310 + sample_rate?: number; 8311 + /** 8312 + * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. 8313 + */ 8314 + bit_rate?: number; 8315 + } 8316 + /** 8317 + * The generated audio in MP3 format 8318 + */ 8319 + type Ai_Cf_Deepgram_Aura_2_En_Output = string; 8320 + declare abstract class Base_Ai_Cf_Deepgram_Aura_2_En { 8321 + inputs: Ai_Cf_Deepgram_Aura_2_En_Input; 8322 + postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_En_Output; 8323 + } 8324 + interface Ai_Cf_Deepgram_Aura_2_Es_Input { 8325 + /** 8326 + * Speaker used to produce the audio. 8327 + */ 8328 + speaker?: "sirio" | "nestor" | "carina" | "celeste" | "alvaro" | "diana" | "aquila" | "selena" | "estrella" | "javier"; 8329 + /** 8330 + * Encoding of the output audio. 8331 + */ 8332 + encoding?: "linear16" | "flac" | "mulaw" | "alaw" | "mp3" | "opus" | "aac"; 8333 + /** 8334 + * Container specifies the file format wrapper for the output audio. The available options depend on the encoding type.. 8335 + */ 8336 + container?: "none" | "wav" | "ogg"; 8337 + /** 8338 + * The text content to be converted to speech 8339 + */ 8340 + text: string; 8341 + /** 8342 + * 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 8343 + */ 8344 + sample_rate?: number; 8345 + /** 8346 + * The bitrate of the audio in bits per second. Choose from predefined ranges or specific values based on the encoding type. 8347 + */ 8348 + bit_rate?: number; 8349 + } 8350 + /** 8351 + * The generated audio in MP3 format 8352 + */ 8353 + type Ai_Cf_Deepgram_Aura_2_Es_Output = string; 8354 + declare abstract class Base_Ai_Cf_Deepgram_Aura_2_Es { 8355 + inputs: Ai_Cf_Deepgram_Aura_2_Es_Input; 8356 + postProcessedOutputs: Ai_Cf_Deepgram_Aura_2_Es_Output; 8357 + } 8358 interface AiModels { 8359 "@cf/huggingface/distilbert-sst-2-int8": BaseAiTextClassification; 8360 "@cf/stabilityai/stable-diffusion-xl-base-1.0": BaseAiTextToImage; ··· 8363 "@cf/lykon/dreamshaper-8-lcm": BaseAiTextToImage; 8364 "@cf/bytedance/stable-diffusion-xl-lightning": BaseAiTextToImage; 8365 "@cf/myshell-ai/melotts": BaseAiTextToSpeech; 8366 + "@cf/google/embeddinggemma-300m": BaseAiTextEmbeddings; 8367 "@cf/microsoft/resnet-50": BaseAiImageClassification; 8368 "@cf/meta/llama-2-7b-chat-int8": BaseAiTextGeneration; 8369 "@cf/mistral/mistral-7b-instruct-v0.1": BaseAiTextGeneration; 8370 "@cf/meta/llama-2-7b-chat-fp16": BaseAiTextGeneration; ··· 8398 "@cf/meta/llama-3-8b-instruct": BaseAiTextGeneration; 8399 "@cf/fblgit/una-cybertron-7b-v2-bf16": BaseAiTextGeneration; 8400 "@cf/meta/llama-3-8b-instruct-awq": BaseAiTextGeneration; 8401 "@cf/meta/llama-3.1-8b-instruct-fp8": BaseAiTextGeneration; 8402 "@cf/meta/llama-3.1-8b-instruct-awq": BaseAiTextGeneration; 8403 "@cf/meta/llama-3.2-3b-instruct": BaseAiTextGeneration; 8404 "@cf/meta/llama-3.2-1b-instruct": BaseAiTextGeneration; 8405 "@cf/deepseek-ai/deepseek-r1-distill-qwen-32b": BaseAiTextGeneration; 8406 + "@cf/ibm-granite/granite-4.0-h-micro": BaseAiTextGeneration; 8407 "@cf/facebook/bart-large-cnn": BaseAiSummarization; 8408 "@cf/llava-hf/llava-1.5-7b-hf": BaseAiImageToText; 8409 "@cf/baai/bge-base-en-v1.5": Base_Ai_Cf_Baai_Bge_Base_En_V1_5; ··· 8425 "@cf/mistralai/mistral-small-3.1-24b-instruct": Base_Ai_Cf_Mistralai_Mistral_Small_3_1_24B_Instruct; 8426 "@cf/google/gemma-3-12b-it": Base_Ai_Cf_Google_Gemma_3_12B_It; 8427 "@cf/meta/llama-4-scout-17b-16e-instruct": Base_Ai_Cf_Meta_Llama_4_Scout_17B_16E_Instruct; 8428 + "@cf/qwen/qwen3-30b-a3b-fp8": Base_Ai_Cf_Qwen_Qwen3_30B_A3B_Fp8; 8429 + "@cf/deepgram/nova-3": Base_Ai_Cf_Deepgram_Nova_3; 8430 + "@cf/qwen/qwen3-embedding-0.6b": Base_Ai_Cf_Qwen_Qwen3_Embedding_0_6B; 8431 + "@cf/pipecat-ai/smart-turn-v2": Base_Ai_Cf_Pipecat_Ai_Smart_Turn_V2; 8432 + "@cf/openai/gpt-oss-120b": Base_Ai_Cf_Openai_Gpt_Oss_120B; 8433 + "@cf/openai/gpt-oss-20b": Base_Ai_Cf_Openai_Gpt_Oss_20B; 8434 + "@cf/leonardo/phoenix-1.0": Base_Ai_Cf_Leonardo_Phoenix_1_0; 8435 + "@cf/leonardo/lucid-origin": Base_Ai_Cf_Leonardo_Lucid_Origin; 8436 + "@cf/deepgram/aura-1": Base_Ai_Cf_Deepgram_Aura_1; 8437 + "@cf/ai4bharat/indictrans2-en-indic-1B": Base_Ai_Cf_Ai4Bharat_Indictrans2_En_Indic_1B; 8438 + "@cf/aisingapore/gemma-sea-lion-v4-27b-it": Base_Ai_Cf_Aisingapore_Gemma_Sea_Lion_V4_27B_It; 8439 + "@cf/pfnet/plamo-embedding-1b": Base_Ai_Cf_Pfnet_Plamo_Embedding_1B; 8440 + "@cf/deepgram/flux": Base_Ai_Cf_Deepgram_Flux; 8441 + "@cf/deepgram/aura-2-en": Base_Ai_Cf_Deepgram_Aura_2_En; 8442 + "@cf/deepgram/aura-2-es": Base_Ai_Cf_Deepgram_Aura_2_Es; 8443 } 8444 type AiOptions = { 8445 /** ··· 8447 * https://developers.cloudflare.com/workers-ai/features/batch-api 8448 */ 8449 queueRequest?: boolean; 8450 + /** 8451 + * Establish websocket connections, only works for supported models 8452 + */ 8453 + websocket?: boolean; 8454 + /** 8455 + * Tag your requests to group and view them in Cloudflare dashboard. 8456 + * 8457 + * Rules: 8458 + * Tags must only contain letters, numbers, and the symbols: : - . / @ 8459 + * Each tag can have maximum 50 characters. 8460 + * Maximum 5 tags are allowed each request. 8461 + * Duplicate tags will removed. 8462 + */ 8463 + tags: string[]; 8464 gateway?: GatewayOptions; 8465 returnRawResponse?: boolean; 8466 prefix?: string; 8467 extraHeaders?: object; 8468 }; 8469 type AiModelsSearchParams = { 8470 author?: string; ··· 8502 autorag(autoragId: string): AutoRAG; 8503 run<Name extends keyof AiModelList, Options extends AiOptions, InputOptions extends AiModelList[Name]["inputs"]>(model: Name, inputs: InputOptions, options?: Options): Promise<Options extends { 8504 returnRawResponse: true; 8505 + } | { 8506 + websocket: true; 8507 } ? Response : InputOptions extends { 8508 stream: true; 8509 } ? ReadableStream : AiModelList[Name]["postProcessedOutputs"]>; 8510 models(params?: AiModelsSearchParams): Promise<AiModelsSearchObject[]>; 8511 + toMarkdown(): ToMarkdownService; 8512 + toMarkdown(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>; 8513 + toMarkdown(files: MarkdownDocument, options?: ConversionRequestOptions): Promise<ConversionResponse>; 8514 } 8515 type GatewayRetries = { 8516 maxAttempts?: 1 | 2 | 3 | 4 | 5; ··· 8528 requestTimeoutMs?: number; 8529 retries?: GatewayRetries; 8530 }; 8531 + type UniversalGatewayOptions = Exclude<GatewayOptions, 'id'> & { 8532 + /** 8533 + ** @deprecated 8534 + */ 8535 + id?: string; 8536 + }; 8537 type AiGatewayPatchLog = { 8538 score?: number | null; 8539 feedback?: -1 | 1 | null; ··· 8602 patchLog(logId: string, data: AiGatewayPatchLog): Promise<void>; 8603 getLog(logId: string): Promise<AiGatewayLog>; 8604 run(data: AIGatewayUniversalRequest | AIGatewayUniversalRequest[], options?: { 8605 + gateway?: UniversalGatewayOptions; 8606 extraHeaders?: object; 8607 }): Promise<Response>; 8608 getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line ··· 8632 ranker?: string; 8633 score_threshold?: number; 8634 }; 8635 + reranking?: { 8636 + enabled?: boolean; 8637 + model?: string; 8638 + }; 8639 rewrite_query?: boolean; 8640 }; 8641 type AutoRagAiSearchRequest = AutoRagSearchRequest & { 8642 stream?: boolean; 8643 + system_prompt?: string; 8644 }; 8645 type AutoRagAiSearchRequestStreaming = Omit<AutoRagAiSearchRequest, 'stream'> & { 8646 stream: true; ··· 8716 * breaks aspect ratio 8717 */ 8718 fit?: "scale-down" | "contain" | "cover" | "crop" | "pad" | "squeeze"; 8719 + /** 8720 + * Image segmentation using artificial intelligence models. Sets pixels not 8721 + * within selected segment area to transparent e.g "foreground" sets every 8722 + * background pixel as transparent. 8723 + */ 8724 + segment?: "foreground"; 8725 /** 8726 * When cropping with fit: "cover", this defines the side or point that should 8727 * be left uncropped. The value is either a string ··· 8734 * preserve as much as possible around a point at 20% of the height of the 8735 * source image. 8736 */ 8737 + gravity?: 'face' | 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | BasicImageTransformationsGravityCoordinates; 8738 /** 8739 * Background color to add underneath the image. Applies only to images with 8740 * transparency (such as PNG). Accepts any CSS color (#RRGGBB, rgba(…), ··· 9021 * 9022 * @example 395747 9023 */ 9024 + asn?: number; 9025 /** 9026 * The organization which owns the ASN of the incoming request. 9027 * 9028 * @example "Google Cloud" 9029 */ 9030 + asOrganization?: string; 9031 /** 9032 * The original value of the `Accept-Encoding` header if Cloudflare modified it. 9033 * ··· 9151 * This field is only present if you have Cloudflare for SaaS enabled on your account 9152 * and you have followed the [required steps to enable it]((https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/domain-support/custom-metadata/)). 9153 */ 9154 + hostMetadata?: HostMetadata; 9155 } 9156 interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield { 9157 /** ··· 9438 */ 9439 sql_duration_ms: number; 9440 }; 9441 + /** 9442 + * Number of total attempts to execute the query, due to automatic retries. 9443 + * Note: All other fields in the response like `timings` only apply to the last attempt. 9444 + */ 9445 + total_attempts?: number; 9446 } 9447 interface D1Response { 9448 success: true; ··· 9460 // Indicates that the first query should go to the primary, and the rest queries 9461 // using the same D1DatabaseSession will go to any replica that is consistent with 9462 // the bookmark maintained by the session (returned by the first query). 9463 + 'first-primary' 9464 // Indicates that the first query can go anywhere (primary or replica), and the rest queries 9465 // using the same D1DatabaseSession will go to any replica that is consistent with 9466 // the bookmark maintained by the session (returned by the first query). 9467 + | 'first-unconstrained'; 9468 type D1SessionBookmark = string; 9469 declare abstract class D1Database { 9470 prepare(query: string): D1PreparedStatement; ··· 9582 }; 9583 export { _EmailMessage as EmailMessage }; 9584 } 9585 + /** 9586 + * Hello World binding to serve as an explanatory example. DO NOT USE 9587 + */ 9588 + interface HelloWorldBinding { 9589 + /** 9590 + * Retrieve the current stored value 9591 + */ 9592 + get(): Promise<{ 9593 + value: string; 9594 + ms?: number; 9595 + }>; 9596 + /** 9597 + * Set a new stored value 9598 + */ 9599 + set(value: string): Promise<void>; 9600 + } 9601 interface Hyperdrive { 9602 /** 9603 * Connect directly to Hyperdrive as if it's your database, returning a TCP socket. ··· 9675 fit?: 'scale-down' | 'contain' | 'pad' | 'squeeze' | 'cover' | 'crop'; 9676 flip?: 'h' | 'v' | 'hv'; 9677 gamma?: number; 9678 + segment?: 'foreground'; 9679 + gravity?: 'face' | 'left' | 'right' | 'top' | 'bottom' | 'center' | 'auto' | 'entropy' | { 9680 x?: number; 9681 y?: number; 9682 mode: 'remainder' | 'box-center'; ··· 9684 rotate?: 0 | 90 | 180 | 270; 9685 saturation?: number; 9686 sharpen?: number; 9687 + trim?: 'border' | { 9688 top?: number; 9689 bottom?: number; 9690 left?: number; ··· 9706 bottom?: number; 9707 right?: number; 9708 }; 9709 + type ImageInputOptions = { 9710 + encoding?: 'base64'; 9711 + }; 9712 type ImageOutputOptions = { 9713 format: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/avif' | 'rgb' | 'rgba'; 9714 quality?: number; 9715 background?: string; 9716 + anim?: boolean; 9717 }; 9718 interface ImagesBinding { 9719 /** ··· 9721 * @throws {@link ImagesError} with code 9412 if input is not an image 9722 * @param stream The image bytes 9723 */ 9724 + info(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): Promise<ImageInfoResponse>; 9725 /** 9726 * Begin applying a series of transformations to an image 9727 * @param stream The image bytes 9728 * @returns A transform handle 9729 */ 9730 + input(stream: ReadableStream<Uint8Array>, options?: ImageInputOptions): ImageTransformer; 9731 } 9732 interface ImageTransformer { 9733 /** ··· 9750 */ 9751 output(options: ImageOutputOptions): Promise<ImageTransformationResult>; 9752 } 9753 + type ImageTransformationOutputOptions = { 9754 + encoding?: 'base64'; 9755 + }; 9756 interface ImageTransformationResult { 9757 /** 9758 * The image as a response, ready to store in cache or return to users ··· 9765 /** 9766 * The bytes of the response 9767 */ 9768 + image(options?: ImageTransformationOutputOptions): ReadableStream<Uint8Array>; 9769 } 9770 interface ImagesError extends Error { 9771 readonly code: number; 9772 readonly message: string; 9773 readonly stack?: string; 9774 } 9775 + /** 9776 + * Media binding for transforming media streams. 9777 + * Provides the entry point for media transformation operations. 9778 + */ 9779 + interface MediaBinding { 9780 + /** 9781 + * Creates a media transformer from an input stream. 9782 + * @param media - The input media bytes 9783 + * @returns A MediaTransformer instance for applying transformations 9784 + */ 9785 + input(media: ReadableStream<Uint8Array>): MediaTransformer; 9786 + } 9787 + /** 9788 + * Media transformer for applying transformation operations to media content. 9789 + * Handles sizing, fitting, and other input transformation parameters. 9790 + */ 9791 + interface MediaTransformer { 9792 + /** 9793 + * Applies transformation options to the media content. 9794 + * @param transform - Configuration for how the media should be transformed 9795 + * @returns A generator for producing the transformed media output 9796 + */ 9797 + transform(transform: MediaTransformationInputOptions): MediaTransformationGenerator; 9798 + } 9799 + /** 9800 + * Generator for producing media transformation results. 9801 + * Configures the output format and parameters for the transformed media. 9802 + */ 9803 + interface MediaTransformationGenerator { 9804 + /** 9805 + * Generates the final media output with specified options. 9806 + * @param output - Configuration for the output format and parameters 9807 + * @returns The final transformation result containing the transformed media 9808 + */ 9809 + output(output: MediaTransformationOutputOptions): MediaTransformationResult; 9810 + } 9811 + /** 9812 + * Result of a media transformation operation. 9813 + * Provides multiple ways to access the transformed media content. 9814 + */ 9815 + interface MediaTransformationResult { 9816 + /** 9817 + * Returns the transformed media as a readable stream of bytes. 9818 + * @returns A stream containing the transformed media data 9819 + */ 9820 + media(): ReadableStream<Uint8Array>; 9821 + /** 9822 + * Returns the transformed media as an HTTP response object. 9823 + * @returns The transformed media as a Response, ready to store in cache or return to users 9824 + */ 9825 + response(): Response; 9826 + /** 9827 + * Returns the MIME type of the transformed media. 9828 + * @returns The content type string (e.g., 'image/jpeg', 'video/mp4') 9829 + */ 9830 + contentType(): string; 9831 + } 9832 + /** 9833 + * Configuration options for transforming media input. 9834 + * Controls how the media should be resized and fitted. 9835 + */ 9836 + type MediaTransformationInputOptions = { 9837 + /** How the media should be resized to fit the specified dimensions */ 9838 + fit?: 'contain' | 'cover' | 'scale-down'; 9839 + /** Target width in pixels */ 9840 + width?: number; 9841 + /** Target height in pixels */ 9842 + height?: number; 9843 + }; 9844 + /** 9845 + * Configuration options for Media Transformations output. 9846 + * Controls the format, timing, and type of the generated output. 9847 + */ 9848 + type MediaTransformationOutputOptions = { 9849 + /** 9850 + * Output mode determining the type of media to generate 9851 + */ 9852 + mode?: 'video' | 'spritesheet' | 'frame' | 'audio'; 9853 + /** Whether to include audio in the output */ 9854 + audio?: boolean; 9855 + /** 9856 + * Starting timestamp for frame extraction or start time for clips. (e.g. '2s'). 9857 + */ 9858 + time?: string; 9859 + /** 9860 + * Duration for video clips, audio extraction, and spritesheet generation (e.g. '5s'). 9861 + */ 9862 + duration?: string; 9863 + /** 9864 + * Number of frames in the spritesheet. 9865 + */ 9866 + imageCount?: number; 9867 + /** 9868 + * Output format for the generated media. 9869 + */ 9870 + format?: 'jpg' | 'png' | 'm4a'; 9871 + }; 9872 + /** 9873 + * Error object for media transformation operations. 9874 + * Extends the standard Error interface with additional media-specific information. 9875 + */ 9876 + interface MediaError extends Error { 9877 + readonly code: number; 9878 + readonly message: string; 9879 + readonly stack?: string; 9880 + } 9881 + declare module 'cloudflare:node' { 9882 + interface NodeStyleServer { 9883 + listen(...args: unknown[]): this; 9884 + address(): { 9885 + port?: number | null | undefined; 9886 + }; 9887 + } 9888 + export function httpServerHandler(port: number): ExportedHandler; 9889 + export function httpServerHandler(options: { 9890 + port: number; 9891 + }): ExportedHandler; 9892 + export function httpServerHandler(server: NodeStyleServer): ExportedHandler; 9893 + } 9894 type Params<P extends string = any> = Record<P, string | string[]>; 9895 type EventContext<Env, P extends string, Data> = { 9896 request: Request<unknown, IncomingRequestCfProperties<unknown>>; ··· 10101 // Base type for all other types providing RPC-like interfaces. 10102 // Rewrites all methods/properties to be `MethodOrProperty`s, while preserving callable types. 10103 // `Reserved` names (e.g. stub method names like `dup()`) and symbols can't be accessed over RPC. 10104 + export type Provider<T extends object, Reserved extends string = never> = MaybeCallableProvider<T> & Pick<{ 10105 + [K in keyof T]: MethodOrProperty<T[K]>; 10106 + }, Exclude<keyof T, Reserved | symbol | keyof StubBase<never>>>; 10107 } 10108 declare namespace Cloudflare { 10109 + // Type of `env`. 10110 + // 10111 + // The specific project can extend `Env` by redeclaring it in project-specific files. Typescript 10112 + // will merge all declarations. 10113 + // 10114 + // You can use `wrangler types` to generate the `Env` type automatically. 10115 interface Env { 10116 } 10117 + // Project-specific parameters used to inform types. 10118 + // 10119 + // This interface is, again, intended to be declared in project-specific files, and then that 10120 + // declaration will be merged with this one. 10121 + // 10122 + // A project should have a declaration like this: 10123 + // 10124 + // interface GlobalProps { 10125 + // // Declares the main module's exports. Used to populate Cloudflare.Exports aka the type 10126 + // // of `ctx.exports`. 10127 + // mainModule: typeof import("my-main-module"); 10128 + // 10129 + // // Declares which of the main module's exports are configured with durable storage, and 10130 + // // thus should behave as Durable Object namsepace bindings. 10131 + // durableNamespaces: "MyDurableObject" | "AnotherDurableObject"; 10132 + // } 10133 + // 10134 + // You can use `wrangler types` to generate `GlobalProps` automatically. 10135 + interface GlobalProps { 10136 + } 10137 + // Evaluates to the type of a property in GlobalProps, defaulting to `Default` if it is not 10138 + // present. 10139 + type GlobalProp<K extends string, Default> = K extends keyof GlobalProps ? GlobalProps[K] : Default; 10140 + // The type of the program's main module exports, if known. Requires `GlobalProps` to declare the 10141 + // `mainModule` property. 10142 + type MainModule = GlobalProp<"mainModule", {}>; 10143 + // The type of ctx.exports, which contains loopback bindings for all top-level exports. 10144 + type Exports = { 10145 + [K in keyof MainModule]: LoopbackForExport<MainModule[K]> 10146 + // If the export is listed in `durableNamespaces`, then it is also a 10147 + // DurableObjectNamespace. 10148 + & (K extends GlobalProp<"durableNamespaces", never> ? MainModule[K] extends new (...args: any[]) => infer DoInstance ? DoInstance extends Rpc.DurableObjectBranded ? DurableObjectNamespace<DoInstance> : DurableObjectNamespace<undefined> : DurableObjectNamespace<undefined> : {}); 10149 + }; 10150 } 10151 + declare namespace CloudflareWorkersModule { 10152 export type RpcStub<T extends Rpc.Stubable> = Rpc.Stub<T>; 10153 export const RpcStub: { 10154 new <T extends Rpc.Stubable>(value: T): Rpc.Stub<T>; ··· 10157 [Rpc.__RPC_TARGET_BRAND]: never; 10158 } 10159 // `protected` fields don't appear in `keyof`s, so can't be accessed over RPC 10160 + export abstract class WorkerEntrypoint<Env = Cloudflare.Env, Props = {}> implements Rpc.WorkerEntrypointBranded { 10161 [Rpc.__WORKER_ENTRYPOINT_BRAND]: never; 10162 + protected ctx: ExecutionContext<Props>; 10163 protected env: Env; 10164 constructor(ctx: ExecutionContext, env: Env); 10165 + email?(message: ForwardableEmailMessage): void | Promise<void>; 10166 fetch?(request: Request): Response | Promise<Response>; 10167 queue?(batch: MessageBatch<unknown>): void | Promise<void>; 10168 + scheduled?(controller: ScheduledController): void | Promise<void>; 10169 + tail?(events: TraceItem[]): void | Promise<void>; 10170 + tailStream?(event: TailStream.TailEvent<TailStream.Onset>): TailStream.TailEventHandlerType | Promise<TailStream.TailEventHandlerType>; 10171 test?(controller: TestController): void | Promise<void>; 10172 + trace?(traces: TraceItem[]): void | Promise<void>; 10173 } 10174 + export abstract class DurableObject<Env = Cloudflare.Env, Props = {}> implements Rpc.DurableObjectBranded { 10175 [Rpc.__DURABLE_OBJECT_BRAND]: never; 10176 + protected ctx: DurableObjectState<Props>; 10177 protected env: Env; 10178 constructor(ctx: DurableObjectState, env: Env); 10179 alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise<void>; 10180 + fetch?(request: Request): Response | Promise<Response>; 10181 webSocketMessage?(ws: WebSocket, message: string | ArrayBuffer): void | Promise<void>; 10182 webSocketClose?(ws: WebSocket, code: number, reason: string, wasClean: boolean): void | Promise<void>; 10183 webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>; ··· 10223 constructor(ctx: ExecutionContext, env: Env); 10224 run(event: Readonly<WorkflowEvent<T>>, step: WorkflowStep): Promise<unknown>; 10225 } 10226 + export function waitUntil(promise: Promise<unknown>): void; 10227 + export function withEnv(newEnv: unknown, fn: () => unknown): unknown; 10228 + export function withExports(newExports: unknown, fn: () => unknown): unknown; 10229 + export function withEnvAndExports(newEnv: unknown, newExports: unknown, fn: () => unknown): unknown; 10230 export const env: Cloudflare.Env; 10231 + export const exports: Cloudflare.Exports; 10232 + } 10233 + declare module 'cloudflare:workers' { 10234 + export = CloudflareWorkersModule; 10235 } 10236 interface SecretsStoreSecret { 10237 /** ··· 10244 function _connect(address: string | SocketAddress, options?: SocketOptions): Socket; 10245 export { _connect as connect }; 10246 } 10247 + type MarkdownDocument = { 10248 + name: string; 10249 + blob: Blob; 10250 + }; 10251 + type ConversionResponse = { 10252 + name: string; 10253 + mimeType: string; 10254 + format: 'markdown'; 10255 + tokens: number; 10256 + data: string; 10257 + } | { 10258 + name: string; 10259 + mimeType: string; 10260 + format: 'error'; 10261 + error: string; 10262 + }; 10263 + type ImageConversionOptions = { 10264 + descriptionLanguage?: 'en' | 'es' | 'fr' | 'it' | 'pt' | 'de'; 10265 + }; 10266 + type EmbeddedImageConversionOptions = ImageConversionOptions & { 10267 + convert?: boolean; 10268 + maxConvertedImages?: number; 10269 + }; 10270 + type ConversionOptions = { 10271 + html?: { 10272 + images?: EmbeddedImageConversionOptions & { 10273 + convertOGImage?: boolean; 10274 + }; 10275 + }; 10276 + docx?: { 10277 + images?: EmbeddedImageConversionOptions; 10278 + }; 10279 + image?: ImageConversionOptions; 10280 + pdf?: { 10281 + images?: EmbeddedImageConversionOptions; 10282 + metadata?: boolean; 10283 + }; 10284 + }; 10285 + type ConversionRequestOptions = { 10286 + gateway?: GatewayOptions; 10287 + extraHeaders?: object; 10288 + conversionOptions?: ConversionOptions; 10289 + }; 10290 + type SupportedFileFormat = { 10291 + mimeType: string; 10292 + extension: string; 10293 + }; 10294 + declare abstract class ToMarkdownService { 10295 + transform(files: MarkdownDocument[], options?: ConversionRequestOptions): Promise<ConversionResponse[]>; 10296 + transform(files: MarkdownDocument, options?: ConversionRequestOptions): Promise<ConversionResponse>; 10297 + supported(): Promise<SupportedFileFormat[]>; 10298 + } 10299 declare namespace TailStream { 10300 interface Header { 10301 readonly name: string; ··· 10305 readonly type: "fetch"; 10306 readonly method: string; 10307 readonly url: string; 10308 + readonly cfJson?: object; 10309 readonly headers: Header[]; 10310 } 10311 interface JsRpcEventInfo { 10312 readonly type: "jsrpc"; 10313 } 10314 interface ScheduledEventInfo { 10315 readonly type: "scheduled"; ··· 10350 readonly type: "hibernatableWebSocket"; 10351 readonly info: HibernatableWebSocketEventInfoClose | HibernatableWebSocketEventInfoError | HibernatableWebSocketEventInfoMessage; 10352 } 10353 interface CustomEventInfo { 10354 readonly type: "custom"; 10355 } ··· 10363 readonly tag?: string; 10364 readonly message?: string; 10365 } 10366 interface Onset { 10367 readonly type: "onset"; 10368 + readonly attributes: Attribute[]; 10369 + // id for the span being opened by this Onset event. 10370 + readonly spanId: string; 10371 readonly dispatchNamespace?: string; 10372 readonly entrypoint?: string; 10373 readonly executionModel: string; 10374 readonly scriptName?: string; 10375 readonly scriptTags?: string[]; 10376 readonly scriptVersion?: ScriptVersion; 10377 + readonly info: FetchEventInfo | JsRpcEventInfo | ScheduledEventInfo | AlarmEventInfo | QueueEventInfo | EmailEventInfo | TraceEventInfo | HibernatableWebSocketEventInfo | CustomEventInfo; 10378 } 10379 interface Outcome { 10380 readonly type: "outcome"; ··· 10382 readonly cpuTime: number; 10383 readonly wallTime: number; 10384 } 10385 interface SpanOpen { 10386 readonly type: "spanOpen"; 10387 readonly name: string; 10388 + // id for the span being opened by this SpanOpen event. 10389 + readonly spanId: string; 10390 readonly info?: FetchEventInfo | JsRpcEventInfo | Attributes; 10391 } 10392 interface SpanClose { ··· 10407 interface Log { 10408 readonly type: "log"; 10409 readonly level: "debug" | "error" | "info" | "log" | "warn"; 10410 + readonly message: object; 10411 } 10412 + // This marks the worker handler return information. 10413 + // This is separate from Outcome because the worker invocation can live for a long time after 10414 + // returning. For example - Websockets that return an http upgrade response but then continue 10415 + // streaming information or SSE http connections. 10416 interface Return { 10417 readonly type: "return"; 10418 readonly info?: FetchResponseInfo; 10419 } 10420 interface Attribute { 10421 readonly name: string; 10422 readonly value: string | string[] | boolean | boolean[] | number | number[] | bigint | bigint[]; ··· 10425 readonly type: "attributes"; 10426 readonly info: Attribute[]; 10427 } 10428 + type EventType = Onset | Outcome | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Attributes; 10429 + // Context in which this trace event lives. 10430 + interface SpanContext { 10431 + // Single id for the entire top-level invocation 10432 + // This should be a new traceId for the first worker stage invoked in the eyeball request and then 10433 + // same-account service-bindings should reuse the same traceId but cross-account service-bindings 10434 + // should use a new traceId. 10435 readonly traceId: string; 10436 + // spanId in which this event is handled 10437 + // for Onset and SpanOpen events this would be the parent span id 10438 + // for Outcome and SpanClose these this would be the span id of the opening Onset and SpanOpen events 10439 + // For Hibernate and Mark this would be the span under which they were emitted. 10440 + // spanId is not set ONLY if: 10441 + // 1. This is an Onset event 10442 + // 2. We are not inherting any SpanContext. (e.g. this is a cross-account service binding or a new top-level invocation) 10443 + readonly spanId?: string; 10444 + } 10445 + interface TailEvent<Event extends EventType> { 10446 + // invocation id of the currently invoked worker stage. 10447 + // invocation id will always be unique to every Onset event and will be the same until the Outcome event. 10448 readonly invocationId: string; 10449 + // Inherited spanContext for this event. 10450 + readonly spanContext: SpanContext; 10451 readonly timestamp: Date; 10452 readonly sequence: number; 10453 + readonly event: Event; 10454 } 10455 + type TailEventHandler<Event extends EventType = EventType> = (event: TailEvent<Event>) => void | Promise<void>; 10456 + type TailEventHandlerObject = { 10457 + outcome?: TailEventHandler<Outcome>; 10458 + spanOpen?: TailEventHandler<SpanOpen>; 10459 + spanClose?: TailEventHandler<SpanClose>; 10460 + diagnosticChannel?: TailEventHandler<DiagnosticChannelEvent>; 10461 + exception?: TailEventHandler<Exception>; 10462 + log?: TailEventHandler<Log>; 10463 + return?: TailEventHandler<Return>; 10464 + attributes?: TailEventHandler<Attributes>; 10465 + }; 10466 type TailEventHandlerType = TailEventHandler | TailEventHandlerObject; 10467 } 10468 // Copyright (c) 2022-2023 Cloudflare, Inc. ··· 10486 * 10487 * This list is expected to grow as support for more operations are released. 10488 */ 10489 + type VectorizeVectorMetadataFilterOp = '$eq' | '$ne' | '$lt' | '$lte' | '$gt' | '$gte'; 10490 + type VectorizeVectorMetadataFilterCollectionOp = '$in' | '$nin'; 10491 /** 10492 * Filter criteria for vector metadata used to limit the retrieved query result set. 10493 */ 10494 type VectorizeVectorMetadataFilter = { 10495 [field: string]: Exclude<VectorizeVectorMetadataValue, string[]> | null | { 10496 [Op in VectorizeVectorMetadataFilterOp]?: Exclude<VectorizeVectorMetadataValue, string[]> | null; 10497 + } | { 10498 + [Op in VectorizeVectorMetadataFilterCollectionOp]?: Exclude<VectorizeVectorMetadataValue, string[]>[]; 10499 }; 10500 }; 10501 /** ··· 10805 | 'complete' | 'waiting' // instance is hibernating and waiting for sleep or event to finish 10806 | 'waitingForPause' // instance is finishing the current work to pause 10807 | 'unknown'; 10808 + error?: { 10809 + name: string; 10810 + message: string; 10811 + }; 10812 + output?: unknown; 10813 }; 10814 interface WorkflowError { 10815 code?: number;