@cloudflare/workers-types 4.20260305.0 → 4.20260306.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -293,6 +293,7 @@ export declare namespace WebAssembly {
293
293
  export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
294
294
  DOMException: typeof DOMException;
295
295
  WorkerGlobalScope: typeof WorkerGlobalScope;
296
+ EventTarget: typeof EventTarget;
296
297
  btoa(data: string): string;
297
298
  atob(data: string): string;
298
299
  setTimeout(callback: (...args: any[]) => void, msDelay?: number): number;
@@ -3726,6 +3727,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3726
3727
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3727
3728
  */
3728
3729
  extensions: string | null;
3730
+ /**
3731
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3732
+ *
3733
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3734
+ */
3735
+ binaryType: "blob" | "arraybuffer";
3729
3736
  }
3730
3737
  export declare const WebSocketPair: {
3731
3738
  new (): {
@@ -4251,6 +4258,12 @@ export declare abstract class Performance extends EventTarget {
4251
4258
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/setResourceTimingBufferSize)
4252
4259
  */
4253
4260
  setResourceTimingBufferSize(size: number): void;
4261
+ /**
4262
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
4263
+ *
4264
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
4265
+ */
4266
+ toJSON(): object;
4254
4267
  get nodeTiming(): PerformanceNodeTiming;
4255
4268
  eventLoopUtilization(): PerformanceEventLoopUtilization;
4256
4269
  markResourceTiming(): void;
@@ -4270,7 +4283,7 @@ export interface PerformanceNodeTiming extends PerformanceEntry {
4270
4283
  readonly loopExit: number;
4271
4284
  readonly idleTime: number;
4272
4285
  readonly uvMetricsInfo: UvMetricsInfo;
4273
- toJSON(): any;
4286
+ toJSON(): object;
4274
4287
  }
4275
4288
  export interface UvMetricsInfo {
4276
4289
  loopCount: number;
@@ -4290,7 +4303,7 @@ export declare class PerformanceMark extends PerformanceEntry {
4290
4303
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMark/detail)
4291
4304
  */
4292
4305
  get detail(): any;
4293
- toJSON(): any;
4306
+ toJSON(): object;
4294
4307
  }
4295
4308
  /**
4296
4309
  * **`PerformanceMeasure`** is an _abstract_ interface for PerformanceEntry objects with an PerformanceEntry.entryType of `'measure'`.
@@ -4304,7 +4317,7 @@ export declare abstract class PerformanceMeasure extends PerformanceEntry {
4304
4317
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceMeasure/detail)
4305
4318
  */
4306
4319
  get detail(): any;
4307
- toJSON(): any;
4320
+ toJSON(): object;
4308
4321
  }
4309
4322
  export interface PerformanceMarkOptions {
4310
4323
  detail?: any;
@@ -4376,7 +4389,7 @@ export declare abstract class PerformanceEntry {
4376
4389
  *
4377
4390
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/PerformanceEntry/toJSON)
4378
4391
  */
4379
- toJSON(): any;
4392
+ toJSON(): object;
4380
4393
  }
4381
4394
  /**
4382
4395
  * The **`PerformanceResourceTiming`** interface enables retrieval and analysis of detailed network timing data regarding the loading of an application's resources.
@@ -4543,16 +4556,6 @@ export interface EventCounts {
4543
4556
  export interface AiSearchInternalError extends Error {}
4544
4557
  export interface AiSearchNotFoundError extends Error {}
4545
4558
  export interface AiSearchNameNotSetError extends Error {}
4546
- // Filter types (shared with AutoRAG for compatibility)
4547
- export type ComparisonFilter = {
4548
- key: string;
4549
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
4550
- value: string | number | boolean;
4551
- };
4552
- export type CompoundFilter = {
4553
- type: "and" | "or";
4554
- filters: ComparisonFilter[];
4555
- };
4556
4559
  // AI Search V2 Request Types
4557
4560
  export type AiSearchSearchRequest = {
4558
4561
  messages: Array<{
@@ -4566,7 +4569,7 @@ export type AiSearchSearchRequest = {
4566
4569
  match_threshold?: number;
4567
4570
  /** Maximum number of results (1-50, default 10) */
4568
4571
  max_num_results?: number;
4569
- filters?: CompoundFilter | ComparisonFilter;
4572
+ filters?: VectorizeVectorMetadataFilter;
4570
4573
  /** Context expansion (0-3, default 0) */
4571
4574
  context_expansion?: number;
4572
4575
  [key: string]: unknown;
@@ -4600,7 +4603,7 @@ export type AiSearchChatCompletionsRequest = {
4600
4603
  retrieval_type?: "vector" | "keyword" | "hybrid";
4601
4604
  match_threshold?: number;
4602
4605
  max_num_results?: number;
4603
- filters?: CompoundFilter | ComparisonFilter;
4606
+ filters?: VectorizeVectorMetadataFilter;
4604
4607
  context_expansion?: number;
4605
4608
  [key: string]: unknown;
4606
4609
  };
@@ -10434,6 +10437,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
10434
10437
  * @see AiSearchNameNotSetError
10435
10438
  */
10436
10439
  export interface AutoRAGNameNotSetError extends Error {}
10440
+ export type ComparisonFilter = {
10441
+ key: string;
10442
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
10443
+ value: string | number | boolean;
10444
+ };
10445
+ export type CompoundFilter = {
10446
+ type: "and" | "or";
10447
+ filters: ComparisonFilter[];
10448
+ };
10437
10449
  /**
10438
10450
  * @deprecated AutoRAG has been replaced by AI Search.
10439
10451
  * Use AiSearchSearchRequest with the new API instead.
@@ -12609,15 +12621,18 @@ export declare namespace CloudflareWorkersModule {
12609
12621
  timestamp: Date;
12610
12622
  type: string;
12611
12623
  };
12624
+ export type WorkflowStepContext = {
12625
+ attempt: number;
12626
+ };
12612
12627
  export abstract class WorkflowStep {
12613
12628
  do<T extends Rpc.Serializable<T>>(
12614
12629
  name: string,
12615
- callback: () => Promise<T>,
12630
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
12616
12631
  ): Promise<T>;
12617
12632
  do<T extends Rpc.Serializable<T>>(
12618
12633
  name: string,
12619
12634
  config: WorkflowStepConfig,
12620
- callback: () => Promise<T>,
12635
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
12621
12636
  ): Promise<T>;
12622
12637
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
12623
12638
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12705,6 +12720,7 @@ export type ConversionOptions = {
12705
12720
  convertOGImage?: boolean;
12706
12721
  };
12707
12722
  hostname?: string;
12723
+ cssSelector?: string;
12708
12724
  };
12709
12725
  docx?: {
12710
12726
  images?: EmbeddedImageConversionOptions;
package/index.d.ts CHANGED
@@ -3493,6 +3493,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3493
3493
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3494
3494
  */
3495
3495
  readonly extensions: string | null;
3496
+ /**
3497
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3498
+ *
3499
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3500
+ */
3501
+ binaryType: "blob" | "arraybuffer";
3496
3502
  }
3497
3503
  declare const WebSocketPair: {
3498
3504
  new (): {
@@ -3741,21 +3747,17 @@ declare abstract class Performance {
3741
3747
  get timeOrigin(): number;
3742
3748
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3743
3749
  now(): number;
3750
+ /**
3751
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3752
+ *
3753
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3754
+ */
3755
+ toJSON(): object;
3744
3756
  }
3745
3757
  // AI Search V2 API Error Interfaces
3746
3758
  interface AiSearchInternalError extends Error {}
3747
3759
  interface AiSearchNotFoundError extends Error {}
3748
3760
  interface AiSearchNameNotSetError extends Error {}
3749
- // Filter types (shared with AutoRAG for compatibility)
3750
- type ComparisonFilter = {
3751
- key: string;
3752
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3753
- value: string | number | boolean;
3754
- };
3755
- type CompoundFilter = {
3756
- type: "and" | "or";
3757
- filters: ComparisonFilter[];
3758
- };
3759
3761
  // AI Search V2 Request Types
3760
3762
  type AiSearchSearchRequest = {
3761
3763
  messages: Array<{
@@ -3769,7 +3771,7 @@ type AiSearchSearchRequest = {
3769
3771
  match_threshold?: number;
3770
3772
  /** Maximum number of results (1-50, default 10) */
3771
3773
  max_num_results?: number;
3772
- filters?: CompoundFilter | ComparisonFilter;
3774
+ filters?: VectorizeVectorMetadataFilter;
3773
3775
  /** Context expansion (0-3, default 0) */
3774
3776
  context_expansion?: number;
3775
3777
  [key: string]: unknown;
@@ -3803,7 +3805,7 @@ type AiSearchChatCompletionsRequest = {
3803
3805
  retrieval_type?: "vector" | "keyword" | "hybrid";
3804
3806
  match_threshold?: number;
3805
3807
  max_num_results?: number;
3806
- filters?: CompoundFilter | ComparisonFilter;
3808
+ filters?: VectorizeVectorMetadataFilter;
3807
3809
  context_expansion?: number;
3808
3810
  [key: string]: unknown;
3809
3811
  };
@@ -9634,6 +9636,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9634
9636
  * @see AiSearchNameNotSetError
9635
9637
  */
9636
9638
  interface AutoRAGNameNotSetError extends Error {}
9639
+ type ComparisonFilter = {
9640
+ key: string;
9641
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9642
+ value: string | number | boolean;
9643
+ };
9644
+ type CompoundFilter = {
9645
+ type: "and" | "or";
9646
+ filters: ComparisonFilter[];
9647
+ };
9637
9648
  /**
9638
9649
  * @deprecated AutoRAG has been replaced by AI Search.
9639
9650
  * Use AiSearchSearchRequest with the new API instead.
@@ -11853,15 +11864,18 @@ declare namespace CloudflareWorkersModule {
11853
11864
  timestamp: Date;
11854
11865
  type: string;
11855
11866
  };
11867
+ export type WorkflowStepContext = {
11868
+ attempt: number;
11869
+ };
11856
11870
  export abstract class WorkflowStep {
11857
11871
  do<T extends Rpc.Serializable<T>>(
11858
11872
  name: string,
11859
- callback: () => Promise<T>,
11873
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11860
11874
  ): Promise<T>;
11861
11875
  do<T extends Rpc.Serializable<T>>(
11862
11876
  name: string,
11863
11877
  config: WorkflowStepConfig,
11864
- callback: () => Promise<T>,
11878
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11865
11879
  ): Promise<T>;
11866
11880
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11867
11881
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11959,6 +11973,7 @@ type ConversionOptions = {
11959
11973
  convertOGImage?: boolean;
11960
11974
  };
11961
11975
  hostname?: string;
11976
+ cssSelector?: string;
11962
11977
  };
11963
11978
  docx?: {
11964
11979
  images?: EmbeddedImageConversionOptions;
package/index.ts CHANGED
@@ -3502,6 +3502,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3502
3502
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3503
3503
  */
3504
3504
  readonly extensions: string | null;
3505
+ /**
3506
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3507
+ *
3508
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3509
+ */
3510
+ binaryType: "blob" | "arraybuffer";
3505
3511
  }
3506
3512
  export declare const WebSocketPair: {
3507
3513
  new (): {
@@ -3750,21 +3756,17 @@ export declare abstract class Performance {
3750
3756
  get timeOrigin(): number;
3751
3757
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3752
3758
  now(): number;
3759
+ /**
3760
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3761
+ *
3762
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3763
+ */
3764
+ toJSON(): object;
3753
3765
  }
3754
3766
  // AI Search V2 API Error Interfaces
3755
3767
  export interface AiSearchInternalError extends Error {}
3756
3768
  export interface AiSearchNotFoundError extends Error {}
3757
3769
  export interface AiSearchNameNotSetError extends Error {}
3758
- // Filter types (shared with AutoRAG for compatibility)
3759
- export type ComparisonFilter = {
3760
- key: string;
3761
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3762
- value: string | number | boolean;
3763
- };
3764
- export type CompoundFilter = {
3765
- type: "and" | "or";
3766
- filters: ComparisonFilter[];
3767
- };
3768
3770
  // AI Search V2 Request Types
3769
3771
  export type AiSearchSearchRequest = {
3770
3772
  messages: Array<{
@@ -3778,7 +3780,7 @@ export type AiSearchSearchRequest = {
3778
3780
  match_threshold?: number;
3779
3781
  /** Maximum number of results (1-50, default 10) */
3780
3782
  max_num_results?: number;
3781
- filters?: CompoundFilter | ComparisonFilter;
3783
+ filters?: VectorizeVectorMetadataFilter;
3782
3784
  /** Context expansion (0-3, default 0) */
3783
3785
  context_expansion?: number;
3784
3786
  [key: string]: unknown;
@@ -3812,7 +3814,7 @@ export type AiSearchChatCompletionsRequest = {
3812
3814
  retrieval_type?: "vector" | "keyword" | "hybrid";
3813
3815
  match_threshold?: number;
3814
3816
  max_num_results?: number;
3815
- filters?: CompoundFilter | ComparisonFilter;
3817
+ filters?: VectorizeVectorMetadataFilter;
3816
3818
  context_expansion?: number;
3817
3819
  [key: string]: unknown;
3818
3820
  };
@@ -9646,6 +9648,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9646
9648
  * @see AiSearchNameNotSetError
9647
9649
  */
9648
9650
  export interface AutoRAGNameNotSetError extends Error {}
9651
+ export type ComparisonFilter = {
9652
+ key: string;
9653
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9654
+ value: string | number | boolean;
9655
+ };
9656
+ export type CompoundFilter = {
9657
+ type: "and" | "or";
9658
+ filters: ComparisonFilter[];
9659
+ };
9649
9660
  /**
9650
9661
  * @deprecated AutoRAG has been replaced by AI Search.
9651
9662
  * Use AiSearchSearchRequest with the new API instead.
@@ -11821,15 +11832,18 @@ export declare namespace CloudflareWorkersModule {
11821
11832
  timestamp: Date;
11822
11833
  type: string;
11823
11834
  };
11835
+ export type WorkflowStepContext = {
11836
+ attempt: number;
11837
+ };
11824
11838
  export abstract class WorkflowStep {
11825
11839
  do<T extends Rpc.Serializable<T>>(
11826
11840
  name: string,
11827
- callback: () => Promise<T>,
11841
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11828
11842
  ): Promise<T>;
11829
11843
  do<T extends Rpc.Serializable<T>>(
11830
11844
  name: string,
11831
11845
  config: WorkflowStepConfig,
11832
- callback: () => Promise<T>,
11846
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11833
11847
  ): Promise<T>;
11834
11848
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11835
11849
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11917,6 +11931,7 @@ export type ConversionOptions = {
11917
11931
  convertOGImage?: boolean;
11918
11932
  };
11919
11933
  hostname?: string;
11934
+ cssSelector?: string;
11920
11935
  };
11921
11936
  docx?: {
11922
11937
  images?: EmbeddedImageConversionOptions;
package/latest/index.d.ts CHANGED
@@ -3613,6 +3613,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3613
3613
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3614
3614
  */
3615
3615
  extensions: string | null;
3616
+ /**
3617
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3618
+ *
3619
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3620
+ */
3621
+ binaryType: "blob" | "arraybuffer";
3616
3622
  }
3617
3623
  declare const WebSocketPair: {
3618
3624
  new (): {
@@ -3881,21 +3887,17 @@ declare abstract class Performance {
3881
3887
  get timeOrigin(): number;
3882
3888
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3883
3889
  now(): number;
3890
+ /**
3891
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3892
+ *
3893
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3894
+ */
3895
+ toJSON(): object;
3884
3896
  }
3885
3897
  // AI Search V2 API Error Interfaces
3886
3898
  interface AiSearchInternalError extends Error {}
3887
3899
  interface AiSearchNotFoundError extends Error {}
3888
3900
  interface AiSearchNameNotSetError extends Error {}
3889
- // Filter types (shared with AutoRAG for compatibility)
3890
- type ComparisonFilter = {
3891
- key: string;
3892
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3893
- value: string | number | boolean;
3894
- };
3895
- type CompoundFilter = {
3896
- type: "and" | "or";
3897
- filters: ComparisonFilter[];
3898
- };
3899
3901
  // AI Search V2 Request Types
3900
3902
  type AiSearchSearchRequest = {
3901
3903
  messages: Array<{
@@ -3909,7 +3911,7 @@ type AiSearchSearchRequest = {
3909
3911
  match_threshold?: number;
3910
3912
  /** Maximum number of results (1-50, default 10) */
3911
3913
  max_num_results?: number;
3912
- filters?: CompoundFilter | ComparisonFilter;
3914
+ filters?: VectorizeVectorMetadataFilter;
3913
3915
  /** Context expansion (0-3, default 0) */
3914
3916
  context_expansion?: number;
3915
3917
  [key: string]: unknown;
@@ -3943,7 +3945,7 @@ type AiSearchChatCompletionsRequest = {
3943
3945
  retrieval_type?: "vector" | "keyword" | "hybrid";
3944
3946
  match_threshold?: number;
3945
3947
  max_num_results?: number;
3946
- filters?: CompoundFilter | ComparisonFilter;
3948
+ filters?: VectorizeVectorMetadataFilter;
3947
3949
  context_expansion?: number;
3948
3950
  [key: string]: unknown;
3949
3951
  };
@@ -9774,6 +9776,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9774
9776
  * @see AiSearchNameNotSetError
9775
9777
  */
9776
9778
  interface AutoRAGNameNotSetError extends Error {}
9779
+ type ComparisonFilter = {
9780
+ key: string;
9781
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9782
+ value: string | number | boolean;
9783
+ };
9784
+ type CompoundFilter = {
9785
+ type: "and" | "or";
9786
+ filters: ComparisonFilter[];
9787
+ };
9777
9788
  /**
9778
9789
  * @deprecated AutoRAG has been replaced by AI Search.
9779
9790
  * Use AiSearchSearchRequest with the new API instead.
@@ -11993,15 +12004,18 @@ declare namespace CloudflareWorkersModule {
11993
12004
  timestamp: Date;
11994
12005
  type: string;
11995
12006
  };
12007
+ export type WorkflowStepContext = {
12008
+ attempt: number;
12009
+ };
11996
12010
  export abstract class WorkflowStep {
11997
12011
  do<T extends Rpc.Serializable<T>>(
11998
12012
  name: string,
11999
- callback: () => Promise<T>,
12013
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
12000
12014
  ): Promise<T>;
12001
12015
  do<T extends Rpc.Serializable<T>>(
12002
12016
  name: string,
12003
12017
  config: WorkflowStepConfig,
12004
- callback: () => Promise<T>,
12018
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
12005
12019
  ): Promise<T>;
12006
12020
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
12007
12021
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12099,6 +12113,7 @@ type ConversionOptions = {
12099
12113
  convertOGImage?: boolean;
12100
12114
  };
12101
12115
  hostname?: string;
12116
+ cssSelector?: string;
12102
12117
  };
12103
12118
  docx?: {
12104
12119
  images?: EmbeddedImageConversionOptions;
package/latest/index.ts CHANGED
@@ -3622,6 +3622,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3622
3622
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3623
3623
  */
3624
3624
  extensions: string | null;
3625
+ /**
3626
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3627
+ *
3628
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3629
+ */
3630
+ binaryType: "blob" | "arraybuffer";
3625
3631
  }
3626
3632
  export declare const WebSocketPair: {
3627
3633
  new (): {
@@ -3890,21 +3896,17 @@ export declare abstract class Performance {
3890
3896
  get timeOrigin(): number;
3891
3897
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3892
3898
  now(): number;
3899
+ /**
3900
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3901
+ *
3902
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3903
+ */
3904
+ toJSON(): object;
3893
3905
  }
3894
3906
  // AI Search V2 API Error Interfaces
3895
3907
  export interface AiSearchInternalError extends Error {}
3896
3908
  export interface AiSearchNotFoundError extends Error {}
3897
3909
  export interface AiSearchNameNotSetError extends Error {}
3898
- // Filter types (shared with AutoRAG for compatibility)
3899
- export type ComparisonFilter = {
3900
- key: string;
3901
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3902
- value: string | number | boolean;
3903
- };
3904
- export type CompoundFilter = {
3905
- type: "and" | "or";
3906
- filters: ComparisonFilter[];
3907
- };
3908
3910
  // AI Search V2 Request Types
3909
3911
  export type AiSearchSearchRequest = {
3910
3912
  messages: Array<{
@@ -3918,7 +3920,7 @@ export type AiSearchSearchRequest = {
3918
3920
  match_threshold?: number;
3919
3921
  /** Maximum number of results (1-50, default 10) */
3920
3922
  max_num_results?: number;
3921
- filters?: CompoundFilter | ComparisonFilter;
3923
+ filters?: VectorizeVectorMetadataFilter;
3922
3924
  /** Context expansion (0-3, default 0) */
3923
3925
  context_expansion?: number;
3924
3926
  [key: string]: unknown;
@@ -3952,7 +3954,7 @@ export type AiSearchChatCompletionsRequest = {
3952
3954
  retrieval_type?: "vector" | "keyword" | "hybrid";
3953
3955
  match_threshold?: number;
3954
3956
  max_num_results?: number;
3955
- filters?: CompoundFilter | ComparisonFilter;
3957
+ filters?: VectorizeVectorMetadataFilter;
3956
3958
  context_expansion?: number;
3957
3959
  [key: string]: unknown;
3958
3960
  };
@@ -9786,6 +9788,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9786
9788
  * @see AiSearchNameNotSetError
9787
9789
  */
9788
9790
  export interface AutoRAGNameNotSetError extends Error {}
9791
+ export type ComparisonFilter = {
9792
+ key: string;
9793
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9794
+ value: string | number | boolean;
9795
+ };
9796
+ export type CompoundFilter = {
9797
+ type: "and" | "or";
9798
+ filters: ComparisonFilter[];
9799
+ };
9789
9800
  /**
9790
9801
  * @deprecated AutoRAG has been replaced by AI Search.
9791
9802
  * Use AiSearchSearchRequest with the new API instead.
@@ -11961,15 +11972,18 @@ export declare namespace CloudflareWorkersModule {
11961
11972
  timestamp: Date;
11962
11973
  type: string;
11963
11974
  };
11975
+ export type WorkflowStepContext = {
11976
+ attempt: number;
11977
+ };
11964
11978
  export abstract class WorkflowStep {
11965
11979
  do<T extends Rpc.Serializable<T>>(
11966
11980
  name: string,
11967
- callback: () => Promise<T>,
11981
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11968
11982
  ): Promise<T>;
11969
11983
  do<T extends Rpc.Serializable<T>>(
11970
11984
  name: string,
11971
11985
  config: WorkflowStepConfig,
11972
- callback: () => Promise<T>,
11986
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11973
11987
  ): Promise<T>;
11974
11988
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11975
11989
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12057,6 +12071,7 @@ export type ConversionOptions = {
12057
12071
  convertOGImage?: boolean;
12058
12072
  };
12059
12073
  hostname?: string;
12074
+ cssSelector?: string;
12060
12075
  };
12061
12076
  docx?: {
12062
12077
  images?: EmbeddedImageConversionOptions;
package/oldest/index.d.ts CHANGED
@@ -3493,6 +3493,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3493
3493
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3494
3494
  */
3495
3495
  readonly extensions: string | null;
3496
+ /**
3497
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3498
+ *
3499
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3500
+ */
3501
+ binaryType: "blob" | "arraybuffer";
3496
3502
  }
3497
3503
  declare const WebSocketPair: {
3498
3504
  new (): {
@@ -3741,21 +3747,17 @@ declare abstract class Performance {
3741
3747
  get timeOrigin(): number;
3742
3748
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3743
3749
  now(): number;
3750
+ /**
3751
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3752
+ *
3753
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3754
+ */
3755
+ toJSON(): object;
3744
3756
  }
3745
3757
  // AI Search V2 API Error Interfaces
3746
3758
  interface AiSearchInternalError extends Error {}
3747
3759
  interface AiSearchNotFoundError extends Error {}
3748
3760
  interface AiSearchNameNotSetError extends Error {}
3749
- // Filter types (shared with AutoRAG for compatibility)
3750
- type ComparisonFilter = {
3751
- key: string;
3752
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3753
- value: string | number | boolean;
3754
- };
3755
- type CompoundFilter = {
3756
- type: "and" | "or";
3757
- filters: ComparisonFilter[];
3758
- };
3759
3761
  // AI Search V2 Request Types
3760
3762
  type AiSearchSearchRequest = {
3761
3763
  messages: Array<{
@@ -3769,7 +3771,7 @@ type AiSearchSearchRequest = {
3769
3771
  match_threshold?: number;
3770
3772
  /** Maximum number of results (1-50, default 10) */
3771
3773
  max_num_results?: number;
3772
- filters?: CompoundFilter | ComparisonFilter;
3774
+ filters?: VectorizeVectorMetadataFilter;
3773
3775
  /** Context expansion (0-3, default 0) */
3774
3776
  context_expansion?: number;
3775
3777
  [key: string]: unknown;
@@ -3803,7 +3805,7 @@ type AiSearchChatCompletionsRequest = {
3803
3805
  retrieval_type?: "vector" | "keyword" | "hybrid";
3804
3806
  match_threshold?: number;
3805
3807
  max_num_results?: number;
3806
- filters?: CompoundFilter | ComparisonFilter;
3808
+ filters?: VectorizeVectorMetadataFilter;
3807
3809
  context_expansion?: number;
3808
3810
  [key: string]: unknown;
3809
3811
  };
@@ -9634,6 +9636,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9634
9636
  * @see AiSearchNameNotSetError
9635
9637
  */
9636
9638
  interface AutoRAGNameNotSetError extends Error {}
9639
+ type ComparisonFilter = {
9640
+ key: string;
9641
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9642
+ value: string | number | boolean;
9643
+ };
9644
+ type CompoundFilter = {
9645
+ type: "and" | "or";
9646
+ filters: ComparisonFilter[];
9647
+ };
9637
9648
  /**
9638
9649
  * @deprecated AutoRAG has been replaced by AI Search.
9639
9650
  * Use AiSearchSearchRequest with the new API instead.
@@ -11853,15 +11864,18 @@ declare namespace CloudflareWorkersModule {
11853
11864
  timestamp: Date;
11854
11865
  type: string;
11855
11866
  };
11867
+ export type WorkflowStepContext = {
11868
+ attempt: number;
11869
+ };
11856
11870
  export abstract class WorkflowStep {
11857
11871
  do<T extends Rpc.Serializable<T>>(
11858
11872
  name: string,
11859
- callback: () => Promise<T>,
11873
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11860
11874
  ): Promise<T>;
11861
11875
  do<T extends Rpc.Serializable<T>>(
11862
11876
  name: string,
11863
11877
  config: WorkflowStepConfig,
11864
- callback: () => Promise<T>,
11878
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11865
11879
  ): Promise<T>;
11866
11880
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11867
11881
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11959,6 +11973,7 @@ type ConversionOptions = {
11959
11973
  convertOGImage?: boolean;
11960
11974
  };
11961
11975
  hostname?: string;
11976
+ cssSelector?: string;
11962
11977
  };
11963
11978
  docx?: {
11964
11979
  images?: EmbeddedImageConversionOptions;