@cloudflare/workers-types 4.20260305.1 → 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.
@@ -3758,16 +3758,6 @@ declare abstract class Performance {
3758
3758
  interface AiSearchInternalError extends Error {}
3759
3759
  interface AiSearchNotFoundError extends Error {}
3760
3760
  interface AiSearchNameNotSetError extends Error {}
3761
- // Filter types (shared with AutoRAG for compatibility)
3762
- type ComparisonFilter = {
3763
- key: string;
3764
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3765
- value: string | number | boolean;
3766
- };
3767
- type CompoundFilter = {
3768
- type: "and" | "or";
3769
- filters: ComparisonFilter[];
3770
- };
3771
3761
  // AI Search V2 Request Types
3772
3762
  type AiSearchSearchRequest = {
3773
3763
  messages: Array<{
@@ -3781,7 +3771,7 @@ type AiSearchSearchRequest = {
3781
3771
  match_threshold?: number;
3782
3772
  /** Maximum number of results (1-50, default 10) */
3783
3773
  max_num_results?: number;
3784
- filters?: CompoundFilter | ComparisonFilter;
3774
+ filters?: VectorizeVectorMetadataFilter;
3785
3775
  /** Context expansion (0-3, default 0) */
3786
3776
  context_expansion?: number;
3787
3777
  [key: string]: unknown;
@@ -3815,7 +3805,7 @@ type AiSearchChatCompletionsRequest = {
3815
3805
  retrieval_type?: "vector" | "keyword" | "hybrid";
3816
3806
  match_threshold?: number;
3817
3807
  max_num_results?: number;
3818
- filters?: CompoundFilter | ComparisonFilter;
3808
+ filters?: VectorizeVectorMetadataFilter;
3819
3809
  context_expansion?: number;
3820
3810
  [key: string]: unknown;
3821
3811
  };
@@ -9646,6 +9636,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9646
9636
  * @see AiSearchNameNotSetError
9647
9637
  */
9648
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
+ };
9649
9648
  /**
9650
9649
  * @deprecated AutoRAG has been replaced by AI Search.
9651
9650
  * Use AiSearchSearchRequest with the new API instead.
@@ -11865,15 +11864,18 @@ declare namespace CloudflareWorkersModule {
11865
11864
  timestamp: Date;
11866
11865
  type: string;
11867
11866
  };
11867
+ export type WorkflowStepContext = {
11868
+ attempt: number;
11869
+ };
11868
11870
  export abstract class WorkflowStep {
11869
11871
  do<T extends Rpc.Serializable<T>>(
11870
11872
  name: string,
11871
- callback: () => Promise<T>,
11873
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11872
11874
  ): Promise<T>;
11873
11875
  do<T extends Rpc.Serializable<T>>(
11874
11876
  name: string,
11875
11877
  config: WorkflowStepConfig,
11876
- callback: () => Promise<T>,
11878
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11877
11879
  ): Promise<T>;
11878
11880
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11879
11881
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11971,6 +11973,7 @@ type ConversionOptions = {
11971
11973
  convertOGImage?: boolean;
11972
11974
  };
11973
11975
  hostname?: string;
11976
+ cssSelector?: string;
11974
11977
  };
11975
11978
  docx?: {
11976
11979
  images?: EmbeddedImageConversionOptions;
@@ -3767,16 +3767,6 @@ export declare abstract class Performance {
3767
3767
  export interface AiSearchInternalError extends Error {}
3768
3768
  export interface AiSearchNotFoundError extends Error {}
3769
3769
  export interface AiSearchNameNotSetError extends Error {}
3770
- // Filter types (shared with AutoRAG for compatibility)
3771
- export type ComparisonFilter = {
3772
- key: string;
3773
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3774
- value: string | number | boolean;
3775
- };
3776
- export type CompoundFilter = {
3777
- type: "and" | "or";
3778
- filters: ComparisonFilter[];
3779
- };
3780
3770
  // AI Search V2 Request Types
3781
3771
  export type AiSearchSearchRequest = {
3782
3772
  messages: Array<{
@@ -3790,7 +3780,7 @@ export type AiSearchSearchRequest = {
3790
3780
  match_threshold?: number;
3791
3781
  /** Maximum number of results (1-50, default 10) */
3792
3782
  max_num_results?: number;
3793
- filters?: CompoundFilter | ComparisonFilter;
3783
+ filters?: VectorizeVectorMetadataFilter;
3794
3784
  /** Context expansion (0-3, default 0) */
3795
3785
  context_expansion?: number;
3796
3786
  [key: string]: unknown;
@@ -3824,7 +3814,7 @@ export type AiSearchChatCompletionsRequest = {
3824
3814
  retrieval_type?: "vector" | "keyword" | "hybrid";
3825
3815
  match_threshold?: number;
3826
3816
  max_num_results?: number;
3827
- filters?: CompoundFilter | ComparisonFilter;
3817
+ filters?: VectorizeVectorMetadataFilter;
3828
3818
  context_expansion?: number;
3829
3819
  [key: string]: unknown;
3830
3820
  };
@@ -9658,6 +9648,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9658
9648
  * @see AiSearchNameNotSetError
9659
9649
  */
9660
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
+ };
9661
9660
  /**
9662
9661
  * @deprecated AutoRAG has been replaced by AI Search.
9663
9662
  * Use AiSearchSearchRequest with the new API instead.
@@ -11833,15 +11832,18 @@ export declare namespace CloudflareWorkersModule {
11833
11832
  timestamp: Date;
11834
11833
  type: string;
11835
11834
  };
11835
+ export type WorkflowStepContext = {
11836
+ attempt: number;
11837
+ };
11836
11838
  export abstract class WorkflowStep {
11837
11839
  do<T extends Rpc.Serializable<T>>(
11838
11840
  name: string,
11839
- callback: () => Promise<T>,
11841
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11840
11842
  ): Promise<T>;
11841
11843
  do<T extends Rpc.Serializable<T>>(
11842
11844
  name: string,
11843
11845
  config: WorkflowStepConfig,
11844
- callback: () => Promise<T>,
11846
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11845
11847
  ): Promise<T>;
11846
11848
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11847
11849
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11929,6 +11931,7 @@ export type ConversionOptions = {
11929
11931
  convertOGImage?: boolean;
11930
11932
  };
11931
11933
  hostname?: string;
11934
+ cssSelector?: string;
11932
11935
  };
11933
11936
  docx?: {
11934
11937
  images?: EmbeddedImageConversionOptions;
@@ -3825,16 +3825,6 @@ declare abstract class Performance {
3825
3825
  interface AiSearchInternalError extends Error {}
3826
3826
  interface AiSearchNotFoundError extends Error {}
3827
3827
  interface AiSearchNameNotSetError extends Error {}
3828
- // Filter types (shared with AutoRAG for compatibility)
3829
- type ComparisonFilter = {
3830
- key: string;
3831
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3832
- value: string | number | boolean;
3833
- };
3834
- type CompoundFilter = {
3835
- type: "and" | "or";
3836
- filters: ComparisonFilter[];
3837
- };
3838
3828
  // AI Search V2 Request Types
3839
3829
  type AiSearchSearchRequest = {
3840
3830
  messages: Array<{
@@ -3848,7 +3838,7 @@ type AiSearchSearchRequest = {
3848
3838
  match_threshold?: number;
3849
3839
  /** Maximum number of results (1-50, default 10) */
3850
3840
  max_num_results?: number;
3851
- filters?: CompoundFilter | ComparisonFilter;
3841
+ filters?: VectorizeVectorMetadataFilter;
3852
3842
  /** Context expansion (0-3, default 0) */
3853
3843
  context_expansion?: number;
3854
3844
  [key: string]: unknown;
@@ -3882,7 +3872,7 @@ type AiSearchChatCompletionsRequest = {
3882
3872
  retrieval_type?: "vector" | "keyword" | "hybrid";
3883
3873
  match_threshold?: number;
3884
3874
  max_num_results?: number;
3885
- filters?: CompoundFilter | ComparisonFilter;
3875
+ filters?: VectorizeVectorMetadataFilter;
3886
3876
  context_expansion?: number;
3887
3877
  [key: string]: unknown;
3888
3878
  };
@@ -9713,6 +9703,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9713
9703
  * @see AiSearchNameNotSetError
9714
9704
  */
9715
9705
  interface AutoRAGNameNotSetError extends Error {}
9706
+ type ComparisonFilter = {
9707
+ key: string;
9708
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9709
+ value: string | number | boolean;
9710
+ };
9711
+ type CompoundFilter = {
9712
+ type: "and" | "or";
9713
+ filters: ComparisonFilter[];
9714
+ };
9716
9715
  /**
9717
9716
  * @deprecated AutoRAG has been replaced by AI Search.
9718
9717
  * Use AiSearchSearchRequest with the new API instead.
@@ -11932,15 +11931,18 @@ declare namespace CloudflareWorkersModule {
11932
11931
  timestamp: Date;
11933
11932
  type: string;
11934
11933
  };
11934
+ export type WorkflowStepContext = {
11935
+ attempt: number;
11936
+ };
11935
11937
  export abstract class WorkflowStep {
11936
11938
  do<T extends Rpc.Serializable<T>>(
11937
11939
  name: string,
11938
- callback: () => Promise<T>,
11940
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11939
11941
  ): Promise<T>;
11940
11942
  do<T extends Rpc.Serializable<T>>(
11941
11943
  name: string,
11942
11944
  config: WorkflowStepConfig,
11943
- callback: () => Promise<T>,
11945
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11944
11946
  ): Promise<T>;
11945
11947
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11946
11948
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12038,6 +12040,7 @@ type ConversionOptions = {
12038
12040
  convertOGImage?: boolean;
12039
12041
  };
12040
12042
  hostname?: string;
12043
+ cssSelector?: string;
12041
12044
  };
12042
12045
  docx?: {
12043
12046
  images?: EmbeddedImageConversionOptions;
@@ -3834,16 +3834,6 @@ export declare abstract class Performance {
3834
3834
  export interface AiSearchInternalError extends Error {}
3835
3835
  export interface AiSearchNotFoundError extends Error {}
3836
3836
  export interface AiSearchNameNotSetError extends Error {}
3837
- // Filter types (shared with AutoRAG for compatibility)
3838
- export type ComparisonFilter = {
3839
- key: string;
3840
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3841
- value: string | number | boolean;
3842
- };
3843
- export type CompoundFilter = {
3844
- type: "and" | "or";
3845
- filters: ComparisonFilter[];
3846
- };
3847
3837
  // AI Search V2 Request Types
3848
3838
  export type AiSearchSearchRequest = {
3849
3839
  messages: Array<{
@@ -3857,7 +3847,7 @@ export type AiSearchSearchRequest = {
3857
3847
  match_threshold?: number;
3858
3848
  /** Maximum number of results (1-50, default 10) */
3859
3849
  max_num_results?: number;
3860
- filters?: CompoundFilter | ComparisonFilter;
3850
+ filters?: VectorizeVectorMetadataFilter;
3861
3851
  /** Context expansion (0-3, default 0) */
3862
3852
  context_expansion?: number;
3863
3853
  [key: string]: unknown;
@@ -3891,7 +3881,7 @@ export type AiSearchChatCompletionsRequest = {
3891
3881
  retrieval_type?: "vector" | "keyword" | "hybrid";
3892
3882
  match_threshold?: number;
3893
3883
  max_num_results?: number;
3894
- filters?: CompoundFilter | ComparisonFilter;
3884
+ filters?: VectorizeVectorMetadataFilter;
3895
3885
  context_expansion?: number;
3896
3886
  [key: string]: unknown;
3897
3887
  };
@@ -9725,6 +9715,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9725
9715
  * @see AiSearchNameNotSetError
9726
9716
  */
9727
9717
  export interface AutoRAGNameNotSetError extends Error {}
9718
+ export type ComparisonFilter = {
9719
+ key: string;
9720
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9721
+ value: string | number | boolean;
9722
+ };
9723
+ export type CompoundFilter = {
9724
+ type: "and" | "or";
9725
+ filters: ComparisonFilter[];
9726
+ };
9728
9727
  /**
9729
9728
  * @deprecated AutoRAG has been replaced by AI Search.
9730
9729
  * Use AiSearchSearchRequest with the new API instead.
@@ -11900,15 +11899,18 @@ export declare namespace CloudflareWorkersModule {
11900
11899
  timestamp: Date;
11901
11900
  type: string;
11902
11901
  };
11902
+ export type WorkflowStepContext = {
11903
+ attempt: number;
11904
+ };
11903
11905
  export abstract class WorkflowStep {
11904
11906
  do<T extends Rpc.Serializable<T>>(
11905
11907
  name: string,
11906
- callback: () => Promise<T>,
11908
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11907
11909
  ): Promise<T>;
11908
11910
  do<T extends Rpc.Serializable<T>>(
11909
11911
  name: string,
11910
11912
  config: WorkflowStepConfig,
11911
- callback: () => Promise<T>,
11913
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11912
11914
  ): Promise<T>;
11913
11915
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11914
11916
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -11996,6 +11998,7 @@ export type ConversionOptions = {
11996
11998
  convertOGImage?: boolean;
11997
11999
  };
11998
12000
  hostname?: string;
12001
+ cssSelector?: string;
11999
12002
  };
12000
12003
  docx?: {
12001
12004
  images?: EmbeddedImageConversionOptions;
@@ -3833,16 +3833,6 @@ declare abstract class Performance {
3833
3833
  interface AiSearchInternalError extends Error {}
3834
3834
  interface AiSearchNotFoundError extends Error {}
3835
3835
  interface AiSearchNameNotSetError extends Error {}
3836
- // Filter types (shared with AutoRAG for compatibility)
3837
- type ComparisonFilter = {
3838
- key: string;
3839
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3840
- value: string | number | boolean;
3841
- };
3842
- type CompoundFilter = {
3843
- type: "and" | "or";
3844
- filters: ComparisonFilter[];
3845
- };
3846
3836
  // AI Search V2 Request Types
3847
3837
  type AiSearchSearchRequest = {
3848
3838
  messages: Array<{
@@ -3856,7 +3846,7 @@ type AiSearchSearchRequest = {
3856
3846
  match_threshold?: number;
3857
3847
  /** Maximum number of results (1-50, default 10) */
3858
3848
  max_num_results?: number;
3859
- filters?: CompoundFilter | ComparisonFilter;
3849
+ filters?: VectorizeVectorMetadataFilter;
3860
3850
  /** Context expansion (0-3, default 0) */
3861
3851
  context_expansion?: number;
3862
3852
  [key: string]: unknown;
@@ -3890,7 +3880,7 @@ type AiSearchChatCompletionsRequest = {
3890
3880
  retrieval_type?: "vector" | "keyword" | "hybrid";
3891
3881
  match_threshold?: number;
3892
3882
  max_num_results?: number;
3893
- filters?: CompoundFilter | ComparisonFilter;
3883
+ filters?: VectorizeVectorMetadataFilter;
3894
3884
  context_expansion?: number;
3895
3885
  [key: string]: unknown;
3896
3886
  };
@@ -9721,6 +9711,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9721
9711
  * @see AiSearchNameNotSetError
9722
9712
  */
9723
9713
  interface AutoRAGNameNotSetError extends Error {}
9714
+ type ComparisonFilter = {
9715
+ key: string;
9716
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9717
+ value: string | number | boolean;
9718
+ };
9719
+ type CompoundFilter = {
9720
+ type: "and" | "or";
9721
+ filters: ComparisonFilter[];
9722
+ };
9724
9723
  /**
9725
9724
  * @deprecated AutoRAG has been replaced by AI Search.
9726
9725
  * Use AiSearchSearchRequest with the new API instead.
@@ -11940,15 +11939,18 @@ declare namespace CloudflareWorkersModule {
11940
11939
  timestamp: Date;
11941
11940
  type: string;
11942
11941
  };
11942
+ export type WorkflowStepContext = {
11943
+ attempt: number;
11944
+ };
11943
11945
  export abstract class WorkflowStep {
11944
11946
  do<T extends Rpc.Serializable<T>>(
11945
11947
  name: string,
11946
- callback: () => Promise<T>,
11948
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11947
11949
  ): Promise<T>;
11948
11950
  do<T extends Rpc.Serializable<T>>(
11949
11951
  name: string,
11950
11952
  config: WorkflowStepConfig,
11951
- callback: () => Promise<T>,
11953
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11952
11954
  ): Promise<T>;
11953
11955
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11954
11956
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12046,6 +12048,7 @@ type ConversionOptions = {
12046
12048
  convertOGImage?: boolean;
12047
12049
  };
12048
12050
  hostname?: string;
12051
+ cssSelector?: string;
12049
12052
  };
12050
12053
  docx?: {
12051
12054
  images?: EmbeddedImageConversionOptions;
@@ -3842,16 +3842,6 @@ export declare abstract class Performance {
3842
3842
  export interface AiSearchInternalError extends Error {}
3843
3843
  export interface AiSearchNotFoundError extends Error {}
3844
3844
  export interface AiSearchNameNotSetError extends Error {}
3845
- // Filter types (shared with AutoRAG for compatibility)
3846
- export type ComparisonFilter = {
3847
- key: string;
3848
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3849
- value: string | number | boolean;
3850
- };
3851
- export type CompoundFilter = {
3852
- type: "and" | "or";
3853
- filters: ComparisonFilter[];
3854
- };
3855
3845
  // AI Search V2 Request Types
3856
3846
  export type AiSearchSearchRequest = {
3857
3847
  messages: Array<{
@@ -3865,7 +3855,7 @@ export type AiSearchSearchRequest = {
3865
3855
  match_threshold?: number;
3866
3856
  /** Maximum number of results (1-50, default 10) */
3867
3857
  max_num_results?: number;
3868
- filters?: CompoundFilter | ComparisonFilter;
3858
+ filters?: VectorizeVectorMetadataFilter;
3869
3859
  /** Context expansion (0-3, default 0) */
3870
3860
  context_expansion?: number;
3871
3861
  [key: string]: unknown;
@@ -3899,7 +3889,7 @@ export type AiSearchChatCompletionsRequest = {
3899
3889
  retrieval_type?: "vector" | "keyword" | "hybrid";
3900
3890
  match_threshold?: number;
3901
3891
  max_num_results?: number;
3902
- filters?: CompoundFilter | ComparisonFilter;
3892
+ filters?: VectorizeVectorMetadataFilter;
3903
3893
  context_expansion?: number;
3904
3894
  [key: string]: unknown;
3905
3895
  };
@@ -9733,6 +9723,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9733
9723
  * @see AiSearchNameNotSetError
9734
9724
  */
9735
9725
  export interface AutoRAGNameNotSetError extends Error {}
9726
+ export type ComparisonFilter = {
9727
+ key: string;
9728
+ type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
9729
+ value: string | number | boolean;
9730
+ };
9731
+ export type CompoundFilter = {
9732
+ type: "and" | "or";
9733
+ filters: ComparisonFilter[];
9734
+ };
9736
9735
  /**
9737
9736
  * @deprecated AutoRAG has been replaced by AI Search.
9738
9737
  * Use AiSearchSearchRequest with the new API instead.
@@ -11908,15 +11907,18 @@ export declare namespace CloudflareWorkersModule {
11908
11907
  timestamp: Date;
11909
11908
  type: string;
11910
11909
  };
11910
+ export type WorkflowStepContext = {
11911
+ attempt: number;
11912
+ };
11911
11913
  export abstract class WorkflowStep {
11912
11914
  do<T extends Rpc.Serializable<T>>(
11913
11915
  name: string,
11914
- callback: () => Promise<T>,
11916
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11915
11917
  ): Promise<T>;
11916
11918
  do<T extends Rpc.Serializable<T>>(
11917
11919
  name: string,
11918
11920
  config: WorkflowStepConfig,
11919
- callback: () => Promise<T>,
11921
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11920
11922
  ): Promise<T>;
11921
11923
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11922
11924
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12004,6 +12006,7 @@ export type ConversionOptions = {
12004
12006
  convertOGImage?: boolean;
12005
12007
  };
12006
12008
  hostname?: string;
12009
+ cssSelector?: string;
12007
12010
  };
12008
12011
  docx?: {
12009
12012
  images?: EmbeddedImageConversionOptions;
@@ -3834,16 +3834,6 @@ declare abstract class Performance {
3834
3834
  interface AiSearchInternalError extends Error {}
3835
3835
  interface AiSearchNotFoundError extends Error {}
3836
3836
  interface AiSearchNameNotSetError extends Error {}
3837
- // Filter types (shared with AutoRAG for compatibility)
3838
- type ComparisonFilter = {
3839
- key: string;
3840
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3841
- value: string | number | boolean;
3842
- };
3843
- type CompoundFilter = {
3844
- type: "and" | "or";
3845
- filters: ComparisonFilter[];
3846
- };
3847
3837
  // AI Search V2 Request Types
3848
3838
  type AiSearchSearchRequest = {
3849
3839
  messages: Array<{
@@ -3857,7 +3847,7 @@ type AiSearchSearchRequest = {
3857
3847
  match_threshold?: number;
3858
3848
  /** Maximum number of results (1-50, default 10) */
3859
3849
  max_num_results?: number;
3860
- filters?: CompoundFilter | ComparisonFilter;
3850
+ filters?: VectorizeVectorMetadataFilter;
3861
3851
  /** Context expansion (0-3, default 0) */
3862
3852
  context_expansion?: number;
3863
3853
  [key: string]: unknown;
@@ -3891,7 +3881,7 @@ type AiSearchChatCompletionsRequest = {
3891
3881
  retrieval_type?: "vector" | "keyword" | "hybrid";
3892
3882
  match_threshold?: number;
3893
3883
  max_num_results?: number;
3894
- filters?: CompoundFilter | ComparisonFilter;
3884
+ filters?: VectorizeVectorMetadataFilter;
3895
3885
  context_expansion?: number;
3896
3886
  [key: string]: unknown;
3897
3887
  };
@@ -9722,6 +9712,15 @@ interface AutoRAGUnauthorizedError extends Error {}
9722
9712
  * @see AiSearchNameNotSetError
9723
9713
  */
9724
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
+ };
9725
9724
  /**
9726
9725
  * @deprecated AutoRAG has been replaced by AI Search.
9727
9726
  * Use AiSearchSearchRequest with the new API instead.
@@ -11941,15 +11940,18 @@ declare namespace CloudflareWorkersModule {
11941
11940
  timestamp: Date;
11942
11941
  type: string;
11943
11942
  };
11943
+ export type WorkflowStepContext = {
11944
+ attempt: number;
11945
+ };
11944
11946
  export abstract class WorkflowStep {
11945
11947
  do<T extends Rpc.Serializable<T>>(
11946
11948
  name: string,
11947
- callback: () => Promise<T>,
11949
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11948
11950
  ): Promise<T>;
11949
11951
  do<T extends Rpc.Serializable<T>>(
11950
11952
  name: string,
11951
11953
  config: WorkflowStepConfig,
11952
- callback: () => Promise<T>,
11954
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11953
11955
  ): Promise<T>;
11954
11956
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11955
11957
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12047,6 +12049,7 @@ type ConversionOptions = {
12047
12049
  convertOGImage?: boolean;
12048
12050
  };
12049
12051
  hostname?: string;
12052
+ cssSelector?: string;
12050
12053
  };
12051
12054
  docx?: {
12052
12055
  images?: EmbeddedImageConversionOptions;
@@ -3843,16 +3843,6 @@ export declare abstract class Performance {
3843
3843
  export interface AiSearchInternalError extends Error {}
3844
3844
  export interface AiSearchNotFoundError extends Error {}
3845
3845
  export interface AiSearchNameNotSetError extends Error {}
3846
- // Filter types (shared with AutoRAG for compatibility)
3847
- export type ComparisonFilter = {
3848
- key: string;
3849
- type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
3850
- value: string | number | boolean;
3851
- };
3852
- export type CompoundFilter = {
3853
- type: "and" | "or";
3854
- filters: ComparisonFilter[];
3855
- };
3856
3846
  // AI Search V2 Request Types
3857
3847
  export type AiSearchSearchRequest = {
3858
3848
  messages: Array<{
@@ -3866,7 +3856,7 @@ export type AiSearchSearchRequest = {
3866
3856
  match_threshold?: number;
3867
3857
  /** Maximum number of results (1-50, default 10) */
3868
3858
  max_num_results?: number;
3869
- filters?: CompoundFilter | ComparisonFilter;
3859
+ filters?: VectorizeVectorMetadataFilter;
3870
3860
  /** Context expansion (0-3, default 0) */
3871
3861
  context_expansion?: number;
3872
3862
  [key: string]: unknown;
@@ -3900,7 +3890,7 @@ export type AiSearchChatCompletionsRequest = {
3900
3890
  retrieval_type?: "vector" | "keyword" | "hybrid";
3901
3891
  match_threshold?: number;
3902
3892
  max_num_results?: number;
3903
- filters?: CompoundFilter | ComparisonFilter;
3893
+ filters?: VectorizeVectorMetadataFilter;
3904
3894
  context_expansion?: number;
3905
3895
  [key: string]: unknown;
3906
3896
  };
@@ -9734,6 +9724,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
9734
9724
  * @see AiSearchNameNotSetError
9735
9725
  */
9736
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
+ };
9737
9736
  /**
9738
9737
  * @deprecated AutoRAG has been replaced by AI Search.
9739
9738
  * Use AiSearchSearchRequest with the new API instead.
@@ -11909,15 +11908,18 @@ export declare namespace CloudflareWorkersModule {
11909
11908
  timestamp: Date;
11910
11909
  type: string;
11911
11910
  };
11911
+ export type WorkflowStepContext = {
11912
+ attempt: number;
11913
+ };
11912
11914
  export abstract class WorkflowStep {
11913
11915
  do<T extends Rpc.Serializable<T>>(
11914
11916
  name: string,
11915
- callback: () => Promise<T>,
11917
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11916
11918
  ): Promise<T>;
11917
11919
  do<T extends Rpc.Serializable<T>>(
11918
11920
  name: string,
11919
11921
  config: WorkflowStepConfig,
11920
- callback: () => Promise<T>,
11922
+ callback: (ctx: WorkflowStepContext) => Promise<T>,
11921
11923
  ): Promise<T>;
11922
11924
  sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
11923
11925
  sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
@@ -12005,6 +12007,7 @@ export type ConversionOptions = {
12005
12007
  convertOGImage?: boolean;
12006
12008
  };
12007
12009
  hostname?: string;
12010
+ cssSelector?: string;
12008
12011
  };
12009
12012
  docx?: {
12010
12013
  images?: EmbeddedImageConversionOptions;