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
17
2
// Begin runtime types
18
3
/*! *****************************************************************************
19
4
Copyright (c) Cloudflare. All rights reserved.
@@ -1603,11 +1588,11 @@ interface R2PutOptions {
1603
1588
onlyIf ?: ( R2Conditional | Headers ) ;
1604
1589
httpMetadata ?: ( R2HTTPMetadata | Headers ) ;
1605
1590
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 ) ;
1611
1596
storageClass ?: string ;
1612
1597
ssecKey ?: ( ArrayBuffer | string ) ;
1613
1598
}
@@ -2202,7 +2187,7 @@ declare class URLSearchParams {
2202
2187
] > ;
2203
2188
}
2204
2189
declare class URLPattern {
2205
- constructor ( input ?: ( string | URLPatternInit ) , baseURL ?: ( string | URLPatternOptions ) , patternOptions ?: URLPatternOptions ) ;
2190
+ constructor ( input ?: ( string | URLPatternURLPatternInit ) , baseURL ?: ( string | URLPatternURLPatternOptions ) , patternOptions ?: URLPatternURLPatternOptions ) ;
2206
2191
get protocol ( ) : string ;
2207
2192
get username ( ) : string ;
2208
2193
get password ( ) : string ;
@@ -2211,10 +2196,10 @@ declare class URLPattern {
2211
2196
get pathname ( ) : string ;
2212
2197
get search ( ) : string ;
2213
2198
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 ;
2216
2201
}
2217
- interface URLPatternInit {
2202
+ interface URLPatternURLPatternInit {
2218
2203
protocol ?: string ;
2219
2204
username ?: string ;
2220
2205
password ?: string ;
@@ -2225,22 +2210,22 @@ interface URLPatternInit {
2225
2210
hash ?: string ;
2226
2211
baseURL ?: string ;
2227
2212
}
2228
- interface URLPatternComponentResult {
2213
+ interface URLPatternURLPatternComponentResult {
2229
2214
input : string ;
2230
2215
groups : Record < string , string > ;
2231
2216
}
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 {
2244
2229
ignoreCase ?: boolean ;
2245
2230
}
2246
2231
/**
@@ -2396,8 +2381,6 @@ interface Socket {
2396
2381
get writable ( ) : WritableStream ;
2397
2382
get closed ( ) : Promise < void > ;
2398
2383
get opened ( ) : Promise < SocketInfo > ;
2399
- get upgraded ( ) : boolean ;
2400
- get secureTransport ( ) : "on" | "off" | "starttls" ;
2401
2384
close ( ) : Promise < void > ;
2402
2385
startTls ( options ?: TlsOptions ) : Socket ;
2403
2386
}
@@ -3724,21 +3707,13 @@ declare abstract class Ai<AiModelList extends AiModelListType = AiModels> {
3724
3707
extraHeaders ?: object ;
3725
3708
} ) : Promise < ConversionResponse > ;
3726
3709
}
3727
- type GatewayRetries = {
3728
- maxAttempts ?: 1 | 2 | 3 | 4 | 5 ;
3729
- retryDelayMs ?: number ;
3730
- backoff ?: 'constant' | 'linear' | 'exponential' ;
3731
- } ;
3732
3710
type GatewayOptions = {
3733
3711
id : string ;
3734
3712
cacheKey ?: string ;
3735
3713
cacheTtl ?: number ;
3736
3714
skipCache ?: boolean ;
3737
3715
metadata ?: Record < string , number | string | boolean | null | bigint > ;
3738
3716
collectLog ?: boolean ;
3739
- eventId ?: string ;
3740
- requestTimeoutMs ?: number ;
3741
- retries ?: GatewayRetries ;
3742
3717
} ;
3743
3718
type AiGatewayPatchLog = {
3744
3719
score ?: number | null ;
@@ -3772,26 +3747,21 @@ type AiGatewayLog = {
3772
3747
response_head_complete : boolean ;
3773
3748
created_at : Date ;
3774
3749
} ;
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" ;
3776
3751
type 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" : {
3779
3754
per_token_in ?: number ;
3780
3755
per_token_out ?: number ;
3781
3756
} | {
3782
3757
total_cost ?: number ;
3783
3758
} | 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 ;
3793
3763
Authorization : string ;
3794
- ' Content-Type' : string ;
3764
+ " Content-Type" : string ;
3795
3765
[ key : string ] : string | number | boolean | object ;
3796
3766
} ;
3797
3767
type AIGatewayUniversalRequest = {
@@ -3807,10 +3777,7 @@ interface AiGatewayLogNotFound extends Error {
3807
3777
declare abstract class AiGateway {
3808
3778
patchLog ( logId : string , data : AiGatewayPatchLog ) : Promise < void > ;
3809
3779
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 > ;
3814
3781
getUrl ( provider ?: AIGatewayProviders | string ) : Promise < string > ; // eslint-disable-line
3815
3782
}
3816
3783
interface AutoRAGInternalError extends Error {
@@ -3828,22 +3795,16 @@ type AutoRagSearchRequest = {
3828
3795
} ;
3829
3796
rewrite_query ?: boolean ;
3830
3797
} ;
3831
- type AutoRagAiSearchRequest = AutoRagSearchRequest & {
3832
- stream ?: boolean ;
3833
- } ;
3834
- type AutoRagAiSearchRequestStreaming = Omit < AutoRagAiSearchRequest , 'stream' > & {
3835
- stream : true ;
3836
- } ;
3837
3798
type AutoRagSearchResponse = {
3838
- object : ' vector_store.search_results.page' ;
3799
+ object : " vector_store.search_results.page" ;
3839
3800
search_query : string ;
3840
3801
data : {
3841
3802
file_id : string ;
3842
3803
filename : string ;
3843
3804
score : number ;
3844
3805
attributes : Record < string , string | number | boolean | null > ;
3845
3806
content : {
3846
- type : ' text' ;
3807
+ type : " text" ;
3847
3808
text : string ;
3848
3809
} [ ] ;
3849
3810
} [ ] ;
@@ -3855,9 +3816,7 @@ type AutoRagAiSearchResponse = AutoRagSearchResponse & {
3855
3816
} ;
3856
3817
declare abstract class AutoRAG {
3857
3818
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 > ;
3861
3820
}
3862
3821
interface BasicImageTransformations {
3863
3822
/**
0 commit comments