1- /* eslint-disable */
2- // Generated by Wrangler by running `wrangler types` (hash: 23bfeb1ecdb06845b72c16f50728901d)
3- // Runtime types generated with [email protected] 2025-03-10 nodejs_compat 4- declare namespace Cloudflare {
5- interface Env {
6- ENVIRONMENT : "development" | "staging" | "production" ;
7- AUTORAG_NAME : "cloudflare-docs-autorag" ;
8- MCP_SERVER_NAME : "PLACEHOLDER" ;
9- MCP_SERVER_VERSION : "PLACEHOLDER" ;
10- MCP_OBJECT : DurableObjectNamespace < import ( "./src/index" ) . CloudflareDocumentationMCP > ;
11- MCP_METRICS : AnalyticsEngineDataset ;
12- AI : Ai ;
13- }
14- }
15- interface Env extends Cloudflare . Env { }
16-
1+ // Runtime types generated with [email protected] 2025-03-10 nodejs_compat 172// Begin runtime types
183/*! *****************************************************************************
194Copyright (c) Cloudflare. All rights reserved.
@@ -1603,11 +1588,11 @@ interface R2PutOptions {
16031588 onlyIf ?: ( R2Conditional | Headers ) ;
16041589 httpMetadata ?: ( R2HTTPMetadata | Headers ) ;
16051590 customMetadata ?: Record < string , string > ;
1606- md5 ?: ( ( ArrayBuffer | ArrayBufferView ) | string ) ;
1607- sha1 ?: ( ( ArrayBuffer | ArrayBufferView ) | string ) ;
1608- sha256 ?: ( ( ArrayBuffer | ArrayBufferView ) | string ) ;
1609- sha384 ?: ( ( ArrayBuffer | ArrayBufferView ) | string ) ;
1610- sha512 ?: ( ( ArrayBuffer | ArrayBufferView ) | string ) ;
1591+ md5 ?: ( ArrayBuffer | string ) ;
1592+ sha1 ?: ( ArrayBuffer | string ) ;
1593+ sha256 ?: ( ArrayBuffer | string ) ;
1594+ sha384 ?: ( ArrayBuffer | string ) ;
1595+ sha512 ?: ( ArrayBuffer | string ) ;
16111596 storageClass ?: string ;
16121597 ssecKey ?: ( ArrayBuffer | string ) ;
16131598}
@@ -2202,7 +2187,7 @@ declare class URLSearchParams {
22022187 ] > ;
22032188}
22042189declare class URLPattern {
2205- constructor ( input ?: ( string | URLPatternInit ) , baseURL ?: ( string | URLPatternOptions ) , patternOptions ?: URLPatternOptions ) ;
2190+ constructor ( input ?: ( string | URLPatternURLPatternInit ) , baseURL ?: ( string | URLPatternURLPatternOptions ) , patternOptions ?: URLPatternURLPatternOptions ) ;
22062191 get protocol ( ) : string ;
22072192 get username ( ) : string ;
22082193 get password ( ) : string ;
@@ -2211,10 +2196,10 @@ declare class URLPattern {
22112196 get pathname ( ) : string ;
22122197 get search ( ) : string ;
22132198 get hash ( ) : string ;
2214- test ( input ?: ( string | URLPatternInit ) , baseURL ?: string ) : boolean ;
2215- exec ( input ?: ( string | URLPatternInit ) , baseURL ?: string ) : URLPatternResult | null ;
2199+ test ( input ?: ( string | URLPatternURLPatternInit ) , baseURL ?: string ) : boolean ;
2200+ exec ( input ?: ( string | URLPatternURLPatternInit ) , baseURL ?: string ) : URLPatternURLPatternResult | null ;
22162201}
2217- interface URLPatternInit {
2202+ interface URLPatternURLPatternInit {
22182203 protocol ?: string ;
22192204 username ?: string ;
22202205 password ?: string ;
@@ -2225,22 +2210,22 @@ interface URLPatternInit {
22252210 hash ?: string ;
22262211 baseURL ?: string ;
22272212}
2228- interface URLPatternComponentResult {
2213+ interface URLPatternURLPatternComponentResult {
22292214 input : string ;
22302215 groups : Record < string , string > ;
22312216}
2232- interface URLPatternResult {
2233- inputs : ( string | URLPatternInit ) [ ] ;
2234- protocol : URLPatternComponentResult ;
2235- username : URLPatternComponentResult ;
2236- password : URLPatternComponentResult ;
2237- hostname : URLPatternComponentResult ;
2238- port : URLPatternComponentResult ;
2239- pathname : URLPatternComponentResult ;
2240- search : URLPatternComponentResult ;
2241- hash : URLPatternComponentResult ;
2242- }
2243- interface URLPatternOptions {
2217+ interface URLPatternURLPatternResult {
2218+ inputs : ( string | URLPatternURLPatternInit ) [ ] ;
2219+ protocol : URLPatternURLPatternComponentResult ;
2220+ username : URLPatternURLPatternComponentResult ;
2221+ password : URLPatternURLPatternComponentResult ;
2222+ hostname : URLPatternURLPatternComponentResult ;
2223+ port : URLPatternURLPatternComponentResult ;
2224+ pathname : URLPatternURLPatternComponentResult ;
2225+ search : URLPatternURLPatternComponentResult ;
2226+ hash : URLPatternURLPatternComponentResult ;
2227+ }
2228+ interface URLPatternURLPatternOptions {
22442229 ignoreCase ?: boolean ;
22452230}
22462231/**
@@ -2396,8 +2381,6 @@ interface Socket {
23962381 get writable ( ) : WritableStream ;
23972382 get closed ( ) : Promise < void > ;
23982383 get opened ( ) : Promise < SocketInfo > ;
2399- get upgraded ( ) : boolean ;
2400- get secureTransport ( ) : "on" | "off" | "starttls" ;
24012384 close ( ) : Promise < void > ;
24022385 startTls ( options ?: TlsOptions ) : Socket ;
24032386}
@@ -3724,21 +3707,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
37243707 extraHeaders ?: object ;
37253708 } ) : Promise < ConversionResponse > ;
37263709}
3727- type GatewayRetries = {
3728- maxAttempts ?: 1 | 2 | 3 | 4 | 5 ;
3729- retryDelayMs ?: number ;
3730- backoff ?: 'constant' | 'linear' | 'exponential' ;
3731- } ;
37323710type GatewayOptions = {
37333711 id : string ;
37343712 cacheKey ?: string ;
37353713 cacheTtl ?: number ;
37363714 skipCache ?: boolean ;
37373715 metadata ?: Record < string , number | string | boolean | null | bigint > ;
37383716 collectLog ?: boolean ;
3739- eventId ?: string ;
3740- requestTimeoutMs ?: number ;
3741- retries ?: GatewayRetries ;
37423717} ;
37433718type AiGatewayPatchLog = {
37443719 score ?: number | null ;
@@ -3772,26 +3747,21 @@ type AiGatewayLog = {
37723747 response_head_complete : boolean ;
37733748 created_at : Date ;
37743749} ;
3775- type AIGatewayProviders = ' workers-ai' | ' anthropic' | ' aws-bedrock' | ' azure-openai' | ' google-vertex-ai' | ' huggingface' | ' openai' | ' perplexity-ai' | ' replicate' | ' groq' | ' cohere' | ' google-ai-studio' | ' mistral' | ' grok' | ' openrouter' | ' deepseek' | ' cerebras' | ' cartesia' | ' elevenlabs' | ' adobe-firefly' ;
3750+ type AIGatewayProviders = " workers-ai" | " anthropic" | " aws-bedrock" | " azure-openai" | " google-vertex-ai" | " huggingface" | " openai" | " perplexity-ai" | " replicate" | " groq" | " cohere" | " google-ai-studio" | " mistral" | " grok" | " openrouter" | " deepseek" | " cerebras" | " cartesia" | " elevenlabs" | " adobe-firefly" ;
37763751type AIGatewayHeaders = {
3777- ' cf-aig-metadata' : Record < string , number | string | boolean | null | bigint > | string ;
3778- ' cf-aig-custom-cost' : {
3752+ " cf-aig-metadata" : Record < string , number | string | boolean | null | bigint > | string ;
3753+ " cf-aig-custom-cost" : {
37793754 per_token_in ?: number ;
37803755 per_token_out ?: number ;
37813756 } | {
37823757 total_cost ?: number ;
37833758 } | string ;
3784- 'cf-aig-cache-ttl' : number | string ;
3785- 'cf-aig-skip-cache' : boolean | string ;
3786- 'cf-aig-cache-key' : string ;
3787- 'cf-aig-event-id' : string ;
3788- 'cf-aig-request-timeout' : number | string ;
3789- 'cf-aig-max-attempts' : number | string ;
3790- 'cf-aig-retry-delay' : number | string ;
3791- 'cf-aig-backoff' : string ;
3792- 'cf-aig-collect-log' : boolean | string ;
3759+ "cf-aig-cache-ttl" : number | string ;
3760+ "cf-aig-skip-cache" : boolean | string ;
3761+ "cf-aig-cache-key" : string ;
3762+ "cf-aig-collect-log" : boolean | string ;
37933763 Authorization : string ;
3794- ' Content-Type' : string ;
3764+ " Content-Type" : string ;
37953765 [ key : string ] : string | number | boolean | object ;
37963766} ;
37973767type AIGatewayUniversalRequest = {
@@ -3807,10 +3777,7 @@ interface AiGatewayLogNotFound extends Error {
38073777declare abstract class AiGateway {
38083778 patchLog ( logId : string , data : AiGatewayPatchLog ) : Promise < void > ;
38093779 getLog ( logId : string ) : Promise < AiGatewayLog > ;
3810- run ( data : AIGatewayUniversalRequest | AIGatewayUniversalRequest [ ] , options ?: {
3811- gateway ?: GatewayOptions ;
3812- extraHeaders ?: object ;
3813- } ) : Promise < Response > ;
3780+ run ( data : AIGatewayUniversalRequest | AIGatewayUniversalRequest [ ] ) : Promise < Response > ;
38143781 getUrl ( provider ?: AIGatewayProviders | string ) : Promise < string > ; // eslint-disable-line
38153782}
38163783interface AutoRAGInternalError extends Error {
@@ -3828,22 +3795,16 @@ type AutoRagSearchRequest = {
38283795 } ;
38293796 rewrite_query ?: boolean ;
38303797} ;
3831- type AutoRagAiSearchRequest = AutoRagSearchRequest & {
3832- stream ?: boolean ;
3833- } ;
3834- type AutoRagAiSearchRequestStreaming = Omit < AutoRagAiSearchRequest , 'stream' > & {
3835- stream : true ;
3836- } ;
38373798type AutoRagSearchResponse = {
3838- object : ' vector_store.search_results.page' ;
3799+ object : " vector_store.search_results.page" ;
38393800 search_query : string ;
38403801 data : {
38413802 file_id : string ;
38423803 filename : string ;
38433804 score : number ;
38443805 attributes : Record < string , string | number | boolean | null > ;
38453806 content : {
3846- type : ' text' ;
3807+ type : " text" ;
38473808 text : string ;
38483809 } [ ] ;
38493810 } [ ] ;
@@ -3855,9 +3816,7 @@ type AutoRagAiSearchResponse = AutoRagSearchResponse & {
38553816} ;
38563817declare abstract class AutoRAG {
38573818 search ( params : AutoRagSearchRequest ) : Promise < AutoRagSearchResponse > ;
3858- aiSearch ( params : AutoRagAiSearchRequestStreaming ) : Promise < Response > ;
3859- aiSearch ( params : AutoRagAiSearchRequest ) : Promise < AutoRagAiSearchResponse > ;
3860- aiSearch ( params : AutoRagAiSearchRequest ) : Promise < AutoRagAiSearchResponse | Response > ;
3819+ aiSearch ( params : AutoRagSearchRequest ) : Promise < AutoRagAiSearchResponse > ;
38613820}
38623821interface BasicImageTransformations {
38633822 /**
0 commit comments