@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.
@@ -3569,6 +3569,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3569
3569
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3570
3570
  */
3571
3571
  extensions: string | null;
3572
+ /**
3573
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3574
+ *
3575
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3576
+ */
3577
+ binaryType: "blob" | "arraybuffer";
3572
3578
  }
3573
3579
  declare const WebSocketPair: {
3574
3580
  new (): {
@@ -3817,21 +3823,17 @@ declare abstract class Performance {
3817
3823
  get timeOrigin(): number;
3818
3824
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3819
3825
  now(): number;
3826
+ /**
3827
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3828
+ *
3829
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3830
+ */
3831
+ toJSON(): object;
3820
3832
  }
3821
3833
  // AI Search V2 API Error Interfaces
3822
3834
  interface AiSearchInternalError extends Error {}
3823
3835
  interface AiSearchNotFoundError extends Error {}
3824
3836
  interface AiSearchNameNotSetError extends Error {}
3825
- // Filter types (shared with AutoRAG for compatibility)
3826
- type ComparisonFilter = {
3827
- key: string;
3828
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3829
- value: string | number | boolean;
3830
- };
3831
- type CompoundFilter = {
3832
- type: "and" | "or";
3833
- filters: ComparisonFilter[];
3834
- };
3835
3837
  // AI Search V2 Request Types
3836
3838
  type AiSearchSearchRequest = {
3837
3839
  messages: Array<{
@@ -3845,7 +3847,7 @@ type AiSearchSearchRequest = {
3845
3847
  match_threshold?: number;
3846
3848
  /** Maximum number of results (1-50, default 10) */
3847
3849
  max_num_results?: number;
3848
- filters?: CompoundFilter | ComparisonFilter;
3850
+ filters?: VectorizeVectorMetadataFilter;
3849
3851
  /** Context expansion (0-3, default 0) */
3850
3852
  context_expansion?: number;
3851
3853
  [key: string]: unknown;
@@ -3879,7 +3881,7 @@ type AiSearchChatCompletionsRequest = {
3879
3881
  retrieval_type?: "vector" | "keyword" | "hybrid";
3880
3882
  match_threshold?: number;
3881
3883
  max_num_results?: number;
3882
- filters?: CompoundFilter | ComparisonFilter;
3884
+ filters?: VectorizeVectorMetadataFilter;
3883
3885
  context_expansion?: number;
3884
3886
  [key: string]: unknown;
3885
3887
  };
@@ -9710,6 +9712,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9710
9712
  * @see AiSearchNameNotSetError
9711
9713
  */
9712
9714
  interface AutoRAGNameNotSetError extends Error {}
9715
+ type ComparisonFilter = {
9716
+ key: string;
9717
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9718
+ value: string | number | boolean;
9719
+ };
9720
+ type CompoundFilter = {
9721
+ type: "and" | "or";
9722
+ filters: ComparisonFilter[];
9723
+ };
9713
9724
  /**
9714
9725
  * @deprecated AutoRAG has been replaced by AI Search.
9715
9726
  * Use AiSearchSearchRequest with the new API instead.
@@ -11929,15 +11940,18 @@ declare namespace CloudflareWorkersModule {
11929
11940
  timestamp: Date;
11930
11941
  type: string;
11931
11942
  };
11943
+ export type WorkflowStepContext = {
11944
+ attempt: number;
11945
+ };
11932
11946
  export abstract class WorkflowStep {
11933
11947
  do<T extends Rpc.Serializable<T>>(
11934
11948
  name: string,
11935
- callback: () => Promise<T>,
11949
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11936
11950
  ): Promise<T>;
11937
11951
  do<T extends Rpc.Serializable<T>>(
11938
11952
  name: string,
11939
11953
  config: WorkflowStepConfig,
11940
- callback: () => Promise<T>,
11954
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11941
11955
  ): Promise<T>;
11942
11956
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11943
11957
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12035,6 +12049,7 @@ type ConversionOptions = {
12035
12049
  convertOGImage?: boolean;
12036
12050
  };
12037
12051
  hostname?: string;
12052
+ cssSelector?: string;
12038
12053
  };
12039
12054
  docx?: {
12040
12055
  images?: EmbeddedImageConversionOptions;
@@ -3578,6 +3578,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3578
3578
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3579
3579
  */
3580
3580
  extensions: string | null;
3581
+ /**
3582
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3583
+ *
3584
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3585
+ */
3586
+ binaryType: "blob" | "arraybuffer";
3581
3587
  }
3582
3588
  export declare const WebSocketPair: {
3583
3589
  new (): {
@@ -3826,21 +3832,17 @@ export declare abstract class Performance {
3826
3832
  get timeOrigin(): number;
3827
3833
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3828
3834
  now(): number;
3835
+ /**
3836
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3837
+ *
3838
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3839
+ */
3840
+ toJSON(): object;
3829
3841
  }
3830
3842
  // AI Search V2 API Error Interfaces
3831
3843
  export interface AiSearchInternalError extends Error {}
3832
3844
  export interface AiSearchNotFoundError extends Error {}
3833
3845
  export interface AiSearchNameNotSetError extends Error {}
3834
- // Filter types (shared with AutoRAG for compatibility)
3835
- export type ComparisonFilter = {
3836
- key: string;
3837
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3838
- value: string | number | boolean;
3839
- };
3840
- export type CompoundFilter = {
3841
- type: "and" | "or";
3842
- filters: ComparisonFilter[];
3843
- };
3844
3846
  // AI Search V2 Request Types
3845
3847
  export type AiSearchSearchRequest = {
3846
3848
  messages: Array<{
@@ -3854,7 +3856,7 @@ export type AiSearchSearchRequest = {
3854
3856
  match_threshold?: number;
3855
3857
  /** Maximum number of results (1-50, default 10) */
3856
3858
  max_num_results?: number;
3857
- filters?: CompoundFilter | ComparisonFilter;
3859
+ filters?: VectorizeVectorMetadataFilter;
3858
3860
  /** Context expansion (0-3, default 0) */
3859
3861
  context_expansion?: number;
3860
3862
  [key: string]: unknown;
@@ -3888,7 +3890,7 @@ export type AiSearchChatCompletionsRequest = {
3888
3890
  retrieval_type?: "vector" | "keyword" | "hybrid";
3889
3891
  match_threshold?: number;
3890
3892
  max_num_results?: number;
3891
- filters?: CompoundFilter | ComparisonFilter;
3893
+ filters?: VectorizeVectorMetadataFilter;
3892
3894
  context_expansion?: number;
3893
3895
  [key: string]: unknown;
3894
3896
  };
@@ -9722,6 +9724,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9722
9724
  * @see AiSearchNameNotSetError
9723
9725
  */
9724
9726
  export interface AutoRAGNameNotSetError extends Error {}
9727
+ export type ComparisonFilter = {
9728
+ key: string;
9729
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9730
+ value: string | number | boolean;
9731
+ };
9732
+ export type CompoundFilter = {
9733
+ type: "and" | "or";
9734
+ filters: ComparisonFilter[];
9735
+ };
9725
9736
  /**
9726
9737
  * @deprecated AutoRAG has been replaced by AI Search.
9727
9738
  * Use AiSearchSearchRequest with the new API instead.
@@ -11897,15 +11908,18 @@ export declare namespace CloudflareWorkersModule {
11897
11908
  timestamp: Date;
11898
11909
  type: string;
11899
11910
  };
11911
+ export type WorkflowStepContext = {
11912
+ attempt: number;
11913
+ };
11900
11914
  export abstract class WorkflowStep {
11901
11915
  do<T extends Rpc.Serializable<T>>(
11902
11916
  name: string,
11903
- callback: () => Promise<T>,
11917
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11904
11918
  ): Promise<T>;
11905
11919
  do<T extends Rpc.Serializable<T>>(
11906
11920
  name: string,
11907
11921
  config: WorkflowStepConfig,
11908
- callback: () => Promise<T>,
11922
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11909
11923
  ): Promise<T>;
11910
11924
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11911
11925
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11993,6 +12007,7 @@ export type ConversionOptions = {
11993
12007
  convertOGImage?: boolean;
11994
12008
  };
11995
12009
  hostname?: string;
12010
+ cssSelector?: string;
11996
12011
  };
11997
12012
  docx?: {
11998
12013
  images?: EmbeddedImageConversionOptions;
@@ -3589,6 +3589,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3589
3589
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3590
3590
  */
3591
3591
  extensions: string | null;
3592
+ /**
3593
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3594
+ *
3595
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3596
+ */
3597
+ binaryType: "blob" | "arraybuffer";
3592
3598
  }
3593
3599
  declare const WebSocketPair: {
3594
3600
  new (): {
@@ -3837,21 +3843,17 @@ declare abstract class Performance {
3837
3843
  get timeOrigin(): number;
3838
3844
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3839
3845
  now(): number;
3846
+ /**
3847
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3848
+ *
3849
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3850
+ */
3851
+ toJSON(): object;
3840
3852
  }
3841
3853
  // AI Search V2 API Error Interfaces
3842
3854
  interface AiSearchInternalError extends Error {}
3843
3855
  interface AiSearchNotFoundError extends Error {}
3844
3856
  interface AiSearchNameNotSetError extends Error {}
3845
- // Filter types (shared with AutoRAG for compatibility)
3846
- type ComparisonFilter = {
3847
- key: string;
3848
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3849
- value: string | number | boolean;
3850
- };
3851
- type CompoundFilter = {
3852
- type: "and" | "or";
3853
- filters: ComparisonFilter[];
3854
- };
3855
3857
  // AI Search V2 Request Types
3856
3858
  type AiSearchSearchRequest = {
3857
3859
  messages: Array<{
@@ -3865,7 +3867,7 @@ type AiSearchSearchRequest = {
3865
3867
  match_threshold?: number;
3866
3868
  /** Maximum number of results (1-50, default 10) */
3867
3869
  max_num_results?: number;
3868
- filters?: CompoundFilter | ComparisonFilter;
3870
+ filters?: VectorizeVectorMetadataFilter;
3869
3871
  /** Context expansion (0-3, default 0) */
3870
3872
  context_expansion?: number;
3871
3873
  [key: string]: unknown;
@@ -3899,7 +3901,7 @@ type AiSearchChatCompletionsRequest = {
3899
3901
  retrieval_type?: "vector" | "keyword" | "hybrid";
3900
3902
  match_threshold?: number;
3901
3903
  max_num_results?: number;
3902
- filters?: CompoundFilter | ComparisonFilter;
3904
+ filters?: VectorizeVectorMetadataFilter;
3903
3905
  context_expansion?: number;
3904
3906
  [key: string]: unknown;
3905
3907
  };
@@ -9730,6 +9732,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9730
9732
  * @see AiSearchNameNotSetError
9731
9733
  */
9732
9734
  interface AutoRAGNameNotSetError extends Error {}
9735
+ type ComparisonFilter = {
9736
+ key: string;
9737
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9738
+ value: string | number | boolean;
9739
+ };
9740
+ type CompoundFilter = {
9741
+ type: "and" | "or";
9742
+ filters: ComparisonFilter[];
9743
+ };
9733
9744
  /**
9734
9745
  * @deprecated AutoRAG has been replaced by AI Search.
9735
9746
  * Use AiSearchSearchRequest with the new API instead.
@@ -11949,15 +11960,18 @@ declare namespace CloudflareWorkersModule {
11949
11960
  timestamp: Date;
11950
11961
  type: string;
11951
11962
  };
11963
+ export type WorkflowStepContext = {
11964
+ attempt: number;
11965
+ };
11952
11966
  export abstract class WorkflowStep {
11953
11967
  do<T extends Rpc.Serializable<T>>(
11954
11968
  name: string,
11955
- callback: () => Promise<T>,
11969
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11956
11970
  ): Promise<T>;
11957
11971
  do<T extends Rpc.Serializable<T>>(
11958
11972
  name: string,
11959
11973
  config: WorkflowStepConfig,
11960
- callback: () => Promise<T>,
11974
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11961
11975
  ): Promise<T>;
11962
11976
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11963
11977
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12055,6 +12069,7 @@ type ConversionOptions = {
12055
12069
  convertOGImage?: boolean;
12056
12070
  };
12057
12071
  hostname?: string;
12072
+ cssSelector?: string;
12058
12073
  };
12059
12074
  docx?: {
12060
12075
  images?: EmbeddedImageConversionOptions;
@@ -3598,6 +3598,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3598
3598
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3599
3599
  */
3600
3600
  extensions: string | null;
3601
+ /**
3602
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3603
+ *
3604
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3605
+ */
3606
+ binaryType: "blob" | "arraybuffer";
3601
3607
  }
3602
3608
  export declare const WebSocketPair: {
3603
3609
  new (): {
@@ -3846,21 +3852,17 @@ export declare abstract class Performance {
3846
3852
  get timeOrigin(): number;
3847
3853
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3848
3854
  now(): number;
3855
+ /**
3856
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3857
+ *
3858
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3859
+ */
3860
+ toJSON(): object;
3849
3861
  }
3850
3862
  // AI Search V2 API Error Interfaces
3851
3863
  export interface AiSearchInternalError extends Error {}
3852
3864
  export interface AiSearchNotFoundError extends Error {}
3853
3865
  export interface AiSearchNameNotSetError extends Error {}
3854
- // Filter types (shared with AutoRAG for compatibility)
3855
- export type ComparisonFilter = {
3856
- key: string;
3857
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3858
- value: string | number | boolean;
3859
- };
3860
- export type CompoundFilter = {
3861
- type: "and" | "or";
3862
- filters: ComparisonFilter[];
3863
- };
3864
3866
  // AI Search V2 Request Types
3865
3867
  export type AiSearchSearchRequest = {
3866
3868
  messages: Array<{
@@ -3874,7 +3876,7 @@ export type AiSearchSearchRequest = {
3874
3876
  match_threshold?: number;
3875
3877
  /** Maximum number of results (1-50, default 10) */
3876
3878
  max_num_results?: number;
3877
- filters?: CompoundFilter | ComparisonFilter;
3879
+ filters?: VectorizeVectorMetadataFilter;
3878
3880
  /** Context expansion (0-3, default 0) */
3879
3881
  context_expansion?: number;
3880
3882
  [key: string]: unknown;
@@ -3908,7 +3910,7 @@ export type AiSearchChatCompletionsRequest = {
3908
3910
  retrieval_type?: "vector" | "keyword" | "hybrid";
3909
3911
  match_threshold?: number;
3910
3912
  max_num_results?: number;
3911
- filters?: CompoundFilter | ComparisonFilter;
3913
+ filters?: VectorizeVectorMetadataFilter;
3912
3914
  context_expansion?: number;
3913
3915
  [key: string]: unknown;
3914
3916
  };
@@ -9742,6 +9744,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9742
9744
  * @see AiSearchNameNotSetError
9743
9745
  */
9744
9746
  export interface AutoRAGNameNotSetError extends Error {}
9747
+ export type ComparisonFilter = {
9748
+ key: string;
9749
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9750
+ value: string | number | boolean;
9751
+ };
9752
+ export type CompoundFilter = {
9753
+ type: "and" | "or";
9754
+ filters: ComparisonFilter[];
9755
+ };
9745
9756
  /**
9746
9757
  * @deprecated AutoRAG has been replaced by AI Search.
9747
9758
  * Use AiSearchSearchRequest with the new API instead.
@@ -11917,15 +11928,18 @@ export declare namespace CloudflareWorkersModule {
11917
11928
  timestamp: Date;
11918
11929
  type: string;
11919
11930
  };
11931
+ export type WorkflowStepContext = {
11932
+ attempt: number;
11933
+ };
11920
11934
  export abstract class WorkflowStep {
11921
11935
  do<T extends Rpc.Serializable<T>>(
11922
11936
  name: string,
11923
- callback: () => Promise<T>,
11937
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11924
11938
  ): Promise<T>;
11925
11939
  do<T extends Rpc.Serializable<T>>(
11926
11940
  name: string,
11927
11941
  config: WorkflowStepConfig,
11928
- callback: () => Promise<T>,
11942
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11929
11943
  ): Promise<T>;
11930
11944
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11931
11945
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12013,6 +12027,7 @@ export type ConversionOptions = {
12013
12027
  convertOGImage?: boolean;
12014
12028
  };
12015
12029
  hostname?: string;
12030
+ cssSelector?: string;
12016
12031
  };
12017
12032
  docx?: {
12018
12033
  images?: EmbeddedImageConversionOptions;
@@ -3594,6 +3594,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
3594
3594
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3595
3595
  */
3596
3596
  extensions: string | null;
3597
+ /**
3598
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3599
+ *
3600
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3601
+ */
3602
+ binaryType: "blob" | "arraybuffer";
3597
3603
  }
3598
3604
  declare const WebSocketPair: {
3599
3605
  new (): {
@@ -3842,21 +3848,17 @@ declare abstract class Performance {
3842
3848
  get timeOrigin(): number;
3843
3849
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3844
3850
  now(): number;
3851
+ /**
3852
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3853
+ *
3854
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3855
+ */
3856
+ toJSON(): object;
3845
3857
  }
3846
3858
  // AI Search V2 API Error Interfaces
3847
3859
  interface AiSearchInternalError extends Error {}
3848
3860
  interface AiSearchNotFoundError extends Error {}
3849
3861
  interface AiSearchNameNotSetError extends Error {}
3850
- // Filter types (shared with AutoRAG for compatibility)
3851
- type ComparisonFilter = {
3852
- key: string;
3853
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3854
- value: string | number | boolean;
3855
- };
3856
- type CompoundFilter = {
3857
- type: "and" | "or";
3858
- filters: ComparisonFilter[];
3859
- };
3860
3862
  // AI Search V2 Request Types
3861
3863
  type AiSearchSearchRequest = {
3862
3864
  messages: Array<{
@@ -3870,7 +3872,7 @@ type AiSearchSearchRequest = {
3870
3872
  match_threshold?: number;
3871
3873
  /** Maximum number of results (1-50, default 10) */
3872
3874
  max_num_results?: number;
3873
- filters?: CompoundFilter | ComparisonFilter;
3875
+ filters?: VectorizeVectorMetadataFilter;
3874
3876
  /** Context expansion (0-3, default 0) */
3875
3877
  context_expansion?: number;
3876
3878
  [key: string]: unknown;
@@ -3904,7 +3906,7 @@ type AiSearchChatCompletionsRequest = {
3904
3906
  retrieval_type?: "vector" | "keyword" | "hybrid";
3905
3907
  match_threshold?: number;
3906
3908
  max_num_results?: number;
3907
- filters?: CompoundFilter | ComparisonFilter;
3909
+ filters?: VectorizeVectorMetadataFilter;
3908
3910
  context_expansion?: number;
3909
3911
  [key: string]: unknown;
3910
3912
  };
@@ -9735,6 +9737,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9735
9737
  * @see AiSearchNameNotSetError
9736
9738
  */
9737
9739
  interface AutoRAGNameNotSetError extends Error {}
9740
+ type ComparisonFilter = {
9741
+ key: string;
9742
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9743
+ value: string | number | boolean;
9744
+ };
9745
+ type CompoundFilter = {
9746
+ type: "and" | "or";
9747
+ filters: ComparisonFilter[];
9748
+ };
9738
9749
  /**
9739
9750
  * @deprecated AutoRAG has been replaced by AI Search.
9740
9751
  * Use AiSearchSearchRequest with the new API instead.
@@ -11954,15 +11965,18 @@ declare namespace CloudflareWorkersModule {
11954
11965
  timestamp: Date;
11955
11966
  type: string;
11956
11967
  };
11968
+ export type WorkflowStepContext = {
11969
+ attempt: number;
11970
+ };
11957
11971
  export abstract class WorkflowStep {
11958
11972
  do<T extends Rpc.Serializable<T>>(
11959
11973
  name: string,
11960
- callback: () => Promise<T>,
11974
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11961
11975
  ): Promise<T>;
11962
11976
  do<T extends Rpc.Serializable<T>>(
11963
11977
  name: string,
11964
11978
  config: WorkflowStepConfig,
11965
- callback: () => Promise<T>,
11979
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11966
11980
  ): Promise<T>;
11967
11981
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11968
11982
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12060,6 +12074,7 @@ type ConversionOptions = {
12060
12074
  convertOGImage?: boolean;
12061
12075
  };
12062
12076
  hostname?: string;
12077
+ cssSelector?: string;
12063
12078
  };
12064
12079
  docx?: {
12065
12080
  images?: EmbeddedImageConversionOptions;
@@ -3603,6 +3603,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
3603
3603
  * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
3604
3604
  */
3605
3605
  extensions: string | null;
3606
+ /**
3607
+ * The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
3608
+ *
3609
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
3610
+ */
3611
+ binaryType: "blob" | "arraybuffer";
3606
3612
  }
3607
3613
  export declare const WebSocketPair: {
3608
3614
  new (): {
@@ -3851,21 +3857,17 @@ export declare abstract class Performance {
3851
3857
  get timeOrigin(): number;
3852
3858
  /* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
3853
3859
  now(): number;
3860
+ /**
3861
+ * The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
3862
+ *
3863
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
3864
+ */
3865
+ toJSON(): object;
3854
3866
  }
3855
3867
  // AI Search V2 API Error Interfaces
3856
3868
  export interface AiSearchInternalError extends Error {}
3857
3869
  export interface AiSearchNotFoundError extends Error {}
3858
3870
  export interface AiSearchNameNotSetError extends Error {}
3859
- // Filter types (shared with AutoRAG for compatibility)
3860
- export type ComparisonFilter = {
3861
- key: string;
3862
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3863
- value: string | number | boolean;
3864
- };
3865
- export type CompoundFilter = {
3866
- type: "and" | "or";
3867
- filters: ComparisonFilter[];
3868
- };
3869
3871
  // AI Search V2 Request Types
3870
3872
  export type AiSearchSearchRequest = {
3871
3873
  messages: Array<{
@@ -3879,7 +3881,7 @@ export type AiSearchSearchRequest = {
3879
3881
  match_threshold?: number;
3880
3882
  /** Maximum number of results (1-50, default 10) */
3881
3883
  max_num_results?: number;
3882
- filters?: CompoundFilter | ComparisonFilter;
3884
+ filters?: VectorizeVectorMetadataFilter;
3883
3885
  /** Context expansion (0-3, default 0) */
3884
3886
  context_expansion?: number;
3885
3887
  [key: string]: unknown;
@@ -3913,7 +3915,7 @@ export type AiSearchChatCompletionsRequest = {
3913
3915
  retrieval_type?: "vector" | "keyword" | "hybrid";
3914
3916
  match_threshold?: number;
3915
3917
  max_num_results?: number;
3916
- filters?: CompoundFilter | ComparisonFilter;
3918
+ filters?: VectorizeVectorMetadataFilter;
3917
3919
  context_expansion?: number;
3918
3920
  [key: string]: unknown;
3919
3921
  };
@@ -9747,6 +9749,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9747
9749
  * @see AiSearchNameNotSetError
9748
9750
  */
9749
9751
  export interface AutoRAGNameNotSetError extends Error {}
9752
+ export type ComparisonFilter = {
9753
+ key: string;
9754
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9755
+ value: string | number | boolean;
9756
+ };
9757
+ export type CompoundFilter = {
9758
+ type: "and" | "or";
9759
+ filters: ComparisonFilter[];
9760
+ };
9750
9761
  /**
9751
9762
  * @deprecated AutoRAG has been replaced by AI Search.
9752
9763
  * Use AiSearchSearchRequest with the new API instead.
@@ -11922,15 +11933,18 @@ export declare namespace CloudflareWorkersModule {
11922
11933
  timestamp: Date;
11923
11934
  type: string;
11924
11935
  };
11936
+ export type WorkflowStepContext = {
11937
+ attempt: number;
11938
+ };
11925
11939
  export abstract class WorkflowStep {
11926
11940
  do<T extends Rpc.Serializable<T>>(
11927
11941
  name: string,
11928
- callback: () => Promise<T>,
11942
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11929
11943
  ): Promise<T>;
11930
11944
  do<T extends Rpc.Serializable<T>>(
11931
11945
  name: string,
11932
11946
  config: WorkflowStepConfig,
11933
- callback: () => Promise<T>,
11947
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11934
11948
  ): Promise<T>;
11935
11949
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11936
11950
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12018,6 +12032,7 @@ export type ConversionOptions = {
12018
12032
  convertOGImage?: boolean;
12019
12033
  };
12020
12034
  hostname?: string;
12035
+ cssSelector?: string;
12021
12036
  };
12022
12037
  docx?: {
12023
12038
  images?: EmbeddedImageConversionOptions;