1
1
/* eslint-disable */
2
- // Generated by Wrangler by running `wrangler types` (hash: bac47ddfd12d22e9196880962c11c32e )
3
- // Runtime types generated with workerd@1.20250424 .0 2025-04-04 nodejs_compat,nodejs_compat_populate_process_env
2
+ // Generated by Wrangler by running `wrangler types` (hash: ca760d12de7262d456686564019b2e17 )
3
+ // Runtime types generated with workerd@1.20250604 .0 2025-04-04 nodejs_compat,nodejs_compat_populate_process_env
4
4
declare namespace Cloudflare {
5
5
interface Env {
6
6
SUPERMEMORY_API_KEY : string ;
@@ -96,7 +96,7 @@ interface Console {
96
96
clear ( ) : void ;
97
97
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/count_static) */
98
98
count ( label ?: string ) : void ;
99
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countreset_static ) */
99
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/countReset_static ) */
100
100
countReset ( label ?: string ) : void ;
101
101
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/debug_static) */
102
102
debug ( ...data : any [ ] ) : void ;
@@ -108,9 +108,9 @@ interface Console {
108
108
error ( ...data : any [ ] ) : void ;
109
109
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/group_static) */
110
110
group ( ...data : any [ ] ) : void ;
111
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupcollapsed_static ) */
111
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupCollapsed_static ) */
112
112
groupCollapsed ( ...data : any [ ] ) : void ;
113
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupend_static ) */
113
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/groupEnd_static ) */
114
114
groupEnd ( ) : void ;
115
115
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/info_static) */
116
116
info ( ...data : any [ ] ) : void ;
@@ -120,9 +120,9 @@ interface Console {
120
120
table ( tabularData ?: any , properties ?: string [ ] ) : void ;
121
121
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/time_static) */
122
122
time ( label ?: string ) : void ;
123
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeend_static ) */
123
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeEnd_static ) */
124
124
timeEnd ( label ?: string ) : void ;
125
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timelog_static ) */
125
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/timeLog_static ) */
126
126
timeLog ( label ?: string , ...data : any [ ] ) : void ;
127
127
timeStamp ( label ?: string ) : void ;
128
128
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/trace_static) */
@@ -297,25 +297,25 @@ declare function dispatchEvent(event: WorkerGlobalScopeEventMap[keyof WorkerGlob
297
297
declare function btoa ( data : string ) : string ;
298
298
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/atob) */
299
299
declare function atob ( data : string ) : string ;
300
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
300
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ setTimeout) */
301
301
declare function setTimeout ( callback : ( ...args : any [ ] ) => void , msDelay ?: number ) : number ;
302
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setTimeout) */
302
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ setTimeout) */
303
303
declare function setTimeout < Args extends any [ ] > ( callback : ( ...args : Args ) => void , msDelay ?: number , ...args : Args ) : number ;
304
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearTimeout) */
304
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ clearTimeout) */
305
305
declare function clearTimeout ( timeoutId : number | null ) : void ;
306
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
306
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ setInterval) */
307
307
declare function setInterval ( callback : ( ...args : any [ ] ) => void , msDelay ?: number ) : number ;
308
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/setInterval) */
308
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ setInterval) */
309
309
declare function setInterval < Args extends any [ ] > ( callback : ( ...args : Args ) => void , msDelay ?: number , ...args : Args ) : number ;
310
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/clearInterval) */
310
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ clearInterval) */
311
311
declare function clearInterval ( timeoutId : number | null ) : void ;
312
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/queueMicrotask) */
312
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ queueMicrotask) */
313
313
declare function queueMicrotask ( task : Function ) : void ;
314
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/structuredClone) */
314
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ structuredClone) */
315
315
declare function structuredClone < T > ( value : T , options ?: StructuredSerializeOptions ) : T ;
316
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/reportError) */
316
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ reportError) */
317
317
declare function reportError ( error : any ) : void ;
318
- /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/fetch) */
318
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Window/ fetch) */
319
319
declare function fetch ( input : RequestInfo | URL , init ?: RequestInit < RequestInitCfProperties > ) : Promise < Response > ;
320
320
declare const self : ServiceWorkerGlobalScope ;
321
321
/**
@@ -794,6 +794,7 @@ declare class Blob {
794
794
slice ( start ?: number , end ?: number , type ?: string ) : Blob ;
795
795
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/arrayBuffer) */
796
796
arrayBuffer ( ) : Promise < ArrayBuffer > ;
797
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/bytes) */
797
798
bytes ( ) : Promise < Uint8Array > ;
798
799
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/text) */
799
800
text ( ) : Promise < string > ;
@@ -1088,10 +1089,15 @@ interface TextEncoderEncodeIntoResult {
1088
1089
*/
1089
1090
declare class ErrorEvent extends Event {
1090
1091
constructor ( type : string , init ?: ErrorEventErrorEventInit ) ;
1092
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/filename) */
1091
1093
get filename ( ) : string ;
1094
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/message) */
1092
1095
get message ( ) : string ;
1096
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/lineno) */
1093
1097
get lineno ( ) : number ;
1098
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/colno) */
1094
1099
get colno ( ) : number ;
1100
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
1095
1101
get error ( ) : any ;
1096
1102
}
1097
1103
interface ErrorEventErrorEventInit {
@@ -1265,6 +1271,7 @@ declare abstract class Body {
1265
1271
get bodyUsed ( ) : boolean ;
1266
1272
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
1267
1273
arrayBuffer ( ) : Promise < ArrayBuffer > ;
1274
+ /* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */
1268
1275
bytes ( ) : Promise < Uint8Array > ;
1269
1276
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/text) */
1270
1277
text ( ) : Promise < string > ;
@@ -1376,7 +1383,11 @@ interface Request<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> e
1376
1383
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
1377
1384
*/
1378
1385
integrity : string ;
1379
- /* Returns a boolean indicating whether or not request can outlive the global in which it was created. */
1386
+ /**
1387
+ * Returns a boolean indicating whether or not request can outlive the global in which it was created.
1388
+ *
1389
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
1390
+ */
1380
1391
keepalive : boolean ;
1381
1392
/**
1382
1393
* Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.
@@ -1576,6 +1587,7 @@ interface R2ObjectBody extends R2Object {
1576
1587
get body ( ) : ReadableStream ;
1577
1588
get bodyUsed ( ) : boolean ;
1578
1589
arrayBuffer ( ) : Promise < ArrayBuffer > ;
1590
+ bytes ( ) : Promise < Uint8Array > ;
1579
1591
text ( ) : Promise < string > ;
1580
1592
json < T > ( ) : Promise < T > ;
1581
1593
blob ( ) : Promise < Blob > ;
@@ -5182,6 +5194,7 @@ declare module 'cloudflare:workers' {
5182
5194
export type WorkflowSleepDuration = `${number } ${WorkflowDurationLabel } ${'s' | '' } ` | number ;
5183
5195
export type WorkflowDelayDuration = WorkflowSleepDuration ;
5184
5196
export type WorkflowTimeoutDuration = WorkflowSleepDuration ;
5197
+ export type WorkflowRetentionDuration = WorkflowSleepDuration ;
5185
5198
export type WorkflowBackoff = 'constant' | 'linear' | 'exponential' ;
5186
5199
export type WorkflowStepConfig = {
5187
5200
retries ?: {
@@ -5312,6 +5325,7 @@ declare namespace TailStream {
5312
5325
readonly type : "onset" ;
5313
5326
readonly dispatchNamespace ?: string ;
5314
5327
readonly entrypoint ?: string ;
5328
+ readonly executionModel : string ;
5315
5329
readonly scriptName ?: string ;
5316
5330
readonly scriptTags ?: string [ ] ;
5317
5331
readonly scriptVersion ?: ScriptVersion ;
@@ -5329,8 +5343,8 @@ declare namespace TailStream {
5329
5343
}
5330
5344
interface SpanOpen {
5331
5345
readonly type : "spanOpen" ;
5332
- readonly op ? : string ;
5333
- readonly info ?: FetchEventInfo | JsRpcEventInfo | Attribute [ ] ;
5346
+ readonly name : string ;
5347
+ readonly info ?: FetchEventInfo | JsRpcEventInfo | Attributes ;
5334
5348
}
5335
5349
interface SpanClose {
5336
5350
readonly type : "spanClose" ;
@@ -5354,7 +5368,7 @@ declare namespace TailStream {
5354
5368
}
5355
5369
interface Return {
5356
5370
readonly type : "return" ;
5357
- readonly info ?: FetchResponseInfo | Attribute [ ] ;
5371
+ readonly info ?: FetchResponseInfo ;
5358
5372
}
5359
5373
interface Link {
5360
5374
readonly type : "link" ;
@@ -5364,21 +5378,23 @@ declare namespace TailStream {
5364
5378
readonly spanId : string ;
5365
5379
}
5366
5380
interface Attribute {
5367
- readonly type : "attribute" ;
5368
5381
readonly name : string ;
5369
- readonly value : string | string [ ] | boolean | boolean [ ] | number | number [ ] ;
5382
+ readonly value : string | string [ ] | boolean | boolean [ ] | number | number [ ] | bigint | bigint [ ] ;
5383
+ }
5384
+ interface Attributes {
5385
+ readonly type : "attributes" ;
5386
+ readonly info : Attribute [ ] ;
5370
5387
}
5371
- type Mark = DiagnosticChannelEvent | Exception | Log | Return | Link | Attribute [ ] ;
5372
5388
interface TailEvent {
5373
5389
readonly traceId : string ;
5374
5390
readonly invocationId : string ;
5375
5391
readonly spanId : string ;
5376
5392
readonly timestamp : Date ;
5377
5393
readonly sequence : number ;
5378
- readonly event : Onset | Outcome | Hibernate | SpanOpen | SpanClose | Mark ;
5394
+ readonly event : Onset | Outcome | Hibernate | SpanOpen | SpanClose | DiagnosticChannelEvent | Exception | Log | Return | Link | Attributes ;
5379
5395
}
5380
5396
type TailEventHandler = ( event : TailEvent ) => void | Promise < void > ;
5381
- type TailEventHandlerName = "onset" | " outcome" | "hibernate" | "spanOpen" | "spanClose" | "diagnosticChannel" | "exception" | "log" | "return" | "link" | "attribute " ;
5397
+ type TailEventHandlerName = "outcome" | "hibernate" | "spanOpen" | "spanClose" | "diagnosticChannel" | "exception" | "log" | "return" | "link" | "attributes " ;
5382
5398
type TailEventHandlerObject = Record < TailEventHandlerName , TailEventHandler > ;
5383
5399
type TailEventHandlerType = TailEventHandler | TailEventHandlerObject ;
5384
5400
}
@@ -5692,6 +5708,7 @@ declare abstract class Workflow<PARAMS = unknown> {
5692
5708
*/
5693
5709
public createBatch ( batch : WorkflowInstanceCreateOptions < PARAMS > [ ] ) : Promise < WorkflowInstance [ ] > ;
5694
5710
}
5711
+
5695
5712
interface WorkflowInstanceCreateOptions < PARAMS = unknown > {
5696
5713
/**
5697
5714
* An id for your Workflow instance. Must be unique within the Workflow.
@@ -5701,6 +5718,14 @@ interface WorkflowInstanceCreateOptions<PARAMS = unknown> {
5701
5718
* The event payload the Workflow instance is triggered with
5702
5719
*/
5703
5720
params ?: PARAMS ;
5721
+ /**
5722
+ * The retention policy for Workflow instance.
5723
+ * Defaults to the maximum retention period available for the owner's account.
5724
+ */
5725
+ retention ?: {
5726
+ successRetention ?: WorkflowRetentionDuration ;
5727
+ errorRetention ?: WorkflowRetentionDuration ;
5728
+ } ;
5704
5729
}
5705
5730
type InstanceStatus = {
5706
5731
status : 'queued' // means that instance is waiting to be started (see concurrency limits)
0 commit comments