@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.
- package/2021-11-03/index.d.ts +29 -14
- package/2021-11-03/index.ts +29 -14
- package/2022-01-31/index.d.ts +29 -14
- package/2022-01-31/index.ts +29 -14
- package/2022-03-21/index.d.ts +29 -14
- package/2022-03-21/index.ts +29 -14
- package/2022-08-04/index.d.ts +29 -14
- package/2022-08-04/index.ts +29 -14
- package/2022-10-31/index.d.ts +29 -14
- package/2022-10-31/index.ts +29 -14
- package/2022-11-30/index.d.ts +29 -14
- package/2022-11-30/index.ts +29 -14
- package/2023-03-01/index.d.ts +29 -14
- package/2023-03-01/index.ts +29 -14
- package/2023-07-01/index.d.ts +29 -14
- package/2023-07-01/index.ts +29 -14
- package/experimental/index.d.ts +34 -18
- package/experimental/index.ts +34 -18
- package/index.d.ts +29 -14
- package/index.ts +29 -14
- package/latest/index.d.ts +29 -14
- package/latest/index.ts +29 -14
- package/oldest/index.d.ts +29 -14
- package/oldest/index.ts +29 -14
- package/package.json +1 -1
package/2021-11-03/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?:
|
|
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?:
|
|
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/2021-11-03/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?:
|
|
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?:
|
|
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/2022-01-31/index.d.ts
CHANGED
|
@@ -3560,6 +3560,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3560
3560
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3561
3561
|
*/
|
|
3562
3562
|
extensions: string | null;
|
|
3563
|
+
/**
|
|
3564
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3565
|
+
*
|
|
3566
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3567
|
+
*/
|
|
3568
|
+
binaryType: "blob" | "arraybuffer";
|
|
3563
3569
|
}
|
|
3564
3570
|
declare const WebSocketPair: {
|
|
3565
3571
|
new (): {
|
|
@@ -3808,21 +3814,17 @@ declare abstract class Performance {
|
|
|
3808
3814
|
get timeOrigin(): number;
|
|
3809
3815
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3810
3816
|
now(): number;
|
|
3817
|
+
/**
|
|
3818
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3819
|
+
*
|
|
3820
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3821
|
+
*/
|
|
3822
|
+
toJSON(): object;
|
|
3811
3823
|
}
|
|
3812
3824
|
// AI Search V2 API Error Interfaces
|
|
3813
3825
|
interface AiSearchInternalError extends Error {}
|
|
3814
3826
|
interface AiSearchNotFoundError extends Error {}
|
|
3815
3827
|
interface AiSearchNameNotSetError extends Error {}
|
|
3816
|
-
// Filter types (shared with AutoRAG for compatibility)
|
|
3817
|
-
type ComparisonFilter = {
|
|
3818
|
-
key: string;
|
|
3819
|
-
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
3820
|
-
value: string | number | boolean;
|
|
3821
|
-
};
|
|
3822
|
-
type CompoundFilter = {
|
|
3823
|
-
type: "and" | "or";
|
|
3824
|
-
filters: ComparisonFilter[];
|
|
3825
|
-
};
|
|
3826
3828
|
// AI Search V2 Request Types
|
|
3827
3829
|
type AiSearchSearchRequest = {
|
|
3828
3830
|
messages: Array<{
|
|
@@ -3836,7 +3838,7 @@ type AiSearchSearchRequest = {
|
|
|
3836
3838
|
match_threshold?: number;
|
|
3837
3839
|
/** Maximum number of results (1-50, default 10) */
|
|
3838
3840
|
max_num_results?: number;
|
|
3839
|
-
filters?:
|
|
3841
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3840
3842
|
/** Context expansion (0-3, default 0) */
|
|
3841
3843
|
context_expansion?: number;
|
|
3842
3844
|
[key: string]: unknown;
|
|
@@ -3870,7 +3872,7 @@ type AiSearchChatCompletionsRequest = {
|
|
|
3870
3872
|
retrieval_type?: "vector" | "keyword" | "hybrid";
|
|
3871
3873
|
match_threshold?: number;
|
|
3872
3874
|
max_num_results?: number;
|
|
3873
|
-
filters?:
|
|
3875
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3874
3876
|
context_expansion?: number;
|
|
3875
3877
|
[key: string]: unknown;
|
|
3876
3878
|
};
|
|
@@ -9701,6 +9703,15 @@ interface AutoRAGUnauthorizedError extends Error {}
|
|
|
9701
9703
|
* @see AiSearchNameNotSetError
|
|
9702
9704
|
*/
|
|
9703
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
|
+
};
|
|
9704
9715
|
/**
|
|
9705
9716
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9706
9717
|
* Use AiSearchSearchRequest with the new API instead.
|
|
@@ -11920,15 +11931,18 @@ declare namespace CloudflareWorkersModule {
|
|
|
11920
11931
|
timestamp: Date;
|
|
11921
11932
|
type: string;
|
|
11922
11933
|
};
|
|
11934
|
+
export type WorkflowStepContext = {
|
|
11935
|
+
attempt: number;
|
|
11936
|
+
};
|
|
11923
11937
|
export abstract class WorkflowStep {
|
|
11924
11938
|
do<T extends Rpc.Serializable<T>>(
|
|
11925
11939
|
name: string,
|
|
11926
|
-
callback: () => Promise<T>,
|
|
11940
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11927
11941
|
): Promise<T>;
|
|
11928
11942
|
do<T extends Rpc.Serializable<T>>(
|
|
11929
11943
|
name: string,
|
|
11930
11944
|
config: WorkflowStepConfig,
|
|
11931
|
-
callback: () => Promise<T>,
|
|
11945
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11932
11946
|
): Promise<T>;
|
|
11933
11947
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
11934
11948
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
@@ -12026,6 +12040,7 @@ type ConversionOptions = {
|
|
|
12026
12040
|
convertOGImage?: boolean;
|
|
12027
12041
|
};
|
|
12028
12042
|
hostname?: string;
|
|
12043
|
+
cssSelector?: string;
|
|
12029
12044
|
};
|
|
12030
12045
|
docx?: {
|
|
12031
12046
|
images?: EmbeddedImageConversionOptions;
|
package/2022-01-31/index.ts
CHANGED
|
@@ -3569,6 +3569,12 @@ export 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
|
export declare const WebSocketPair: {
|
|
3574
3580
|
new (): {
|
|
@@ -3817,21 +3823,17 @@ export 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
|
export interface AiSearchInternalError extends Error {}
|
|
3823
3835
|
export interface AiSearchNotFoundError extends Error {}
|
|
3824
3836
|
export interface AiSearchNameNotSetError extends Error {}
|
|
3825
|
-
// Filter types (shared with AutoRAG for compatibility)
|
|
3826
|
-
export type ComparisonFilter = {
|
|
3827
|
-
key: string;
|
|
3828
|
-
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
3829
|
-
value: string | number | boolean;
|
|
3830
|
-
};
|
|
3831
|
-
export type CompoundFilter = {
|
|
3832
|
-
type: "and" | "or";
|
|
3833
|
-
filters: ComparisonFilter[];
|
|
3834
|
-
};
|
|
3835
3837
|
// AI Search V2 Request Types
|
|
3836
3838
|
export type AiSearchSearchRequest = {
|
|
3837
3839
|
messages: Array<{
|
|
@@ -3845,7 +3847,7 @@ export 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?:
|
|
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 @@ export type AiSearchChatCompletionsRequest = {
|
|
|
3879
3881
|
retrieval_type?: "vector" | "keyword" | "hybrid";
|
|
3880
3882
|
match_threshold?: number;
|
|
3881
3883
|
max_num_results?: number;
|
|
3882
|
-
filters?:
|
|
3884
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3883
3885
|
context_expansion?: number;
|
|
3884
3886
|
[key: string]: unknown;
|
|
3885
3887
|
};
|
|
@@ -9713,6 +9715,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
|
|
|
9713
9715
|
* @see AiSearchNameNotSetError
|
|
9714
9716
|
*/
|
|
9715
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
|
+
};
|
|
9716
9727
|
/**
|
|
9717
9728
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9718
9729
|
* Use AiSearchSearchRequest with the new API instead.
|
|
@@ -11888,15 +11899,18 @@ export declare namespace CloudflareWorkersModule {
|
|
|
11888
11899
|
timestamp: Date;
|
|
11889
11900
|
type: string;
|
|
11890
11901
|
};
|
|
11902
|
+
export type WorkflowStepContext = {
|
|
11903
|
+
attempt: number;
|
|
11904
|
+
};
|
|
11891
11905
|
export abstract class WorkflowStep {
|
|
11892
11906
|
do<T extends Rpc.Serializable<T>>(
|
|
11893
11907
|
name: string,
|
|
11894
|
-
callback: () => Promise<T>,
|
|
11908
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11895
11909
|
): Promise<T>;
|
|
11896
11910
|
do<T extends Rpc.Serializable<T>>(
|
|
11897
11911
|
name: string,
|
|
11898
11912
|
config: WorkflowStepConfig,
|
|
11899
|
-
callback: () => Promise<T>,
|
|
11913
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11900
11914
|
): Promise<T>;
|
|
11901
11915
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
11902
11916
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
@@ -11984,6 +11998,7 @@ export type ConversionOptions = {
|
|
|
11984
11998
|
convertOGImage?: boolean;
|
|
11985
11999
|
};
|
|
11986
12000
|
hostname?: string;
|
|
12001
|
+
cssSelector?: string;
|
|
11987
12002
|
};
|
|
11988
12003
|
docx?: {
|
|
11989
12004
|
images?: EmbeddedImageConversionOptions;
|
package/2022-03-21/index.d.ts
CHANGED
|
@@ -3568,6 +3568,12 @@ interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3568
3568
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3569
3569
|
*/
|
|
3570
3570
|
extensions: string | null;
|
|
3571
|
+
/**
|
|
3572
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3573
|
+
*
|
|
3574
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3575
|
+
*/
|
|
3576
|
+
binaryType: "blob" | "arraybuffer";
|
|
3571
3577
|
}
|
|
3572
3578
|
declare const WebSocketPair: {
|
|
3573
3579
|
new (): {
|
|
@@ -3816,21 +3822,17 @@ declare abstract class Performance {
|
|
|
3816
3822
|
get timeOrigin(): number;
|
|
3817
3823
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3818
3824
|
now(): number;
|
|
3825
|
+
/**
|
|
3826
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3827
|
+
*
|
|
3828
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3829
|
+
*/
|
|
3830
|
+
toJSON(): object;
|
|
3819
3831
|
}
|
|
3820
3832
|
// AI Search V2 API Error Interfaces
|
|
3821
3833
|
interface AiSearchInternalError extends Error {}
|
|
3822
3834
|
interface AiSearchNotFoundError extends Error {}
|
|
3823
3835
|
interface AiSearchNameNotSetError extends Error {}
|
|
3824
|
-
// Filter types (shared with AutoRAG for compatibility)
|
|
3825
|
-
type ComparisonFilter = {
|
|
3826
|
-
key: string;
|
|
3827
|
-
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
3828
|
-
value: string | number | boolean;
|
|
3829
|
-
};
|
|
3830
|
-
type CompoundFilter = {
|
|
3831
|
-
type: "and" | "or";
|
|
3832
|
-
filters: ComparisonFilter[];
|
|
3833
|
-
};
|
|
3834
3836
|
// AI Search V2 Request Types
|
|
3835
3837
|
type AiSearchSearchRequest = {
|
|
3836
3838
|
messages: Array<{
|
|
@@ -3844,7 +3846,7 @@ type AiSearchSearchRequest = {
|
|
|
3844
3846
|
match_threshold?: number;
|
|
3845
3847
|
/** Maximum number of results (1-50, default 10) */
|
|
3846
3848
|
max_num_results?: number;
|
|
3847
|
-
filters?:
|
|
3849
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3848
3850
|
/** Context expansion (0-3, default 0) */
|
|
3849
3851
|
context_expansion?: number;
|
|
3850
3852
|
[key: string]: unknown;
|
|
@@ -3878,7 +3880,7 @@ type AiSearchChatCompletionsRequest = {
|
|
|
3878
3880
|
retrieval_type?: "vector" | "keyword" | "hybrid";
|
|
3879
3881
|
match_threshold?: number;
|
|
3880
3882
|
max_num_results?: number;
|
|
3881
|
-
filters?:
|
|
3883
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3882
3884
|
context_expansion?: number;
|
|
3883
3885
|
[key: string]: unknown;
|
|
3884
3886
|
};
|
|
@@ -9709,6 +9711,15 @@ interface AutoRAGUnauthorizedError extends Error {}
|
|
|
9709
9711
|
* @see AiSearchNameNotSetError
|
|
9710
9712
|
*/
|
|
9711
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
|
+
};
|
|
9712
9723
|
/**
|
|
9713
9724
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9714
9725
|
* Use AiSearchSearchRequest with the new API instead.
|
|
@@ -11928,15 +11939,18 @@ declare namespace CloudflareWorkersModule {
|
|
|
11928
11939
|
timestamp: Date;
|
|
11929
11940
|
type: string;
|
|
11930
11941
|
};
|
|
11942
|
+
export type WorkflowStepContext = {
|
|
11943
|
+
attempt: number;
|
|
11944
|
+
};
|
|
11931
11945
|
export abstract class WorkflowStep {
|
|
11932
11946
|
do<T extends Rpc.Serializable<T>>(
|
|
11933
11947
|
name: string,
|
|
11934
|
-
callback: () => Promise<T>,
|
|
11948
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11935
11949
|
): Promise<T>;
|
|
11936
11950
|
do<T extends Rpc.Serializable<T>>(
|
|
11937
11951
|
name: string,
|
|
11938
11952
|
config: WorkflowStepConfig,
|
|
11939
|
-
callback: () => Promise<T>,
|
|
11953
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11940
11954
|
): Promise<T>;
|
|
11941
11955
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
11942
11956
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
@@ -12034,6 +12048,7 @@ type ConversionOptions = {
|
|
|
12034
12048
|
convertOGImage?: boolean;
|
|
12035
12049
|
};
|
|
12036
12050
|
hostname?: string;
|
|
12051
|
+
cssSelector?: string;
|
|
12037
12052
|
};
|
|
12038
12053
|
docx?: {
|
|
12039
12054
|
images?: EmbeddedImageConversionOptions;
|
package/2022-03-21/index.ts
CHANGED
|
@@ -3577,6 +3577,12 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3577
3577
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3578
3578
|
*/
|
|
3579
3579
|
extensions: string | null;
|
|
3580
|
+
/**
|
|
3581
|
+
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3582
|
+
*
|
|
3583
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/binaryType)
|
|
3584
|
+
*/
|
|
3585
|
+
binaryType: "blob" | "arraybuffer";
|
|
3580
3586
|
}
|
|
3581
3587
|
export declare const WebSocketPair: {
|
|
3582
3588
|
new (): {
|
|
@@ -3825,21 +3831,17 @@ export declare abstract class Performance {
|
|
|
3825
3831
|
get timeOrigin(): number;
|
|
3826
3832
|
/* [Cloudflare Docs Reference](https://developers.cloudflare.com/workers/runtime-apis/performance/#performancenow) */
|
|
3827
3833
|
now(): number;
|
|
3834
|
+
/**
|
|
3835
|
+
* The **`toJSON()`** method of the Performance interface is a Serialization; it returns a JSON representation of the Performance object.
|
|
3836
|
+
*
|
|
3837
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/toJSON)
|
|
3838
|
+
*/
|
|
3839
|
+
toJSON(): object;
|
|
3828
3840
|
}
|
|
3829
3841
|
// AI Search V2 API Error Interfaces
|
|
3830
3842
|
export interface AiSearchInternalError extends Error {}
|
|
3831
3843
|
export interface AiSearchNotFoundError extends Error {}
|
|
3832
3844
|
export interface AiSearchNameNotSetError extends Error {}
|
|
3833
|
-
// Filter types (shared with AutoRAG for compatibility)
|
|
3834
|
-
export type ComparisonFilter = {
|
|
3835
|
-
key: string;
|
|
3836
|
-
type: "eq" | "ne" | "gt" | "gte" | "lt" | "lte";
|
|
3837
|
-
value: string | number | boolean;
|
|
3838
|
-
};
|
|
3839
|
-
export type CompoundFilter = {
|
|
3840
|
-
type: "and" | "or";
|
|
3841
|
-
filters: ComparisonFilter[];
|
|
3842
|
-
};
|
|
3843
3845
|
// AI Search V2 Request Types
|
|
3844
3846
|
export type AiSearchSearchRequest = {
|
|
3845
3847
|
messages: Array<{
|
|
@@ -3853,7 +3855,7 @@ export type AiSearchSearchRequest = {
|
|
|
3853
3855
|
match_threshold?: number;
|
|
3854
3856
|
/** Maximum number of results (1-50, default 10) */
|
|
3855
3857
|
max_num_results?: number;
|
|
3856
|
-
filters?:
|
|
3858
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3857
3859
|
/** Context expansion (0-3, default 0) */
|
|
3858
3860
|
context_expansion?: number;
|
|
3859
3861
|
[key: string]: unknown;
|
|
@@ -3887,7 +3889,7 @@ export type AiSearchChatCompletionsRequest = {
|
|
|
3887
3889
|
retrieval_type?: "vector" | "keyword" | "hybrid";
|
|
3888
3890
|
match_threshold?: number;
|
|
3889
3891
|
max_num_results?: number;
|
|
3890
|
-
filters?:
|
|
3892
|
+
filters?: VectorizeVectorMetadataFilter;
|
|
3891
3893
|
context_expansion?: number;
|
|
3892
3894
|
[key: string]: unknown;
|
|
3893
3895
|
};
|
|
@@ -9721,6 +9723,15 @@ export interface AutoRAGUnauthorizedError extends Error {}
|
|
|
9721
9723
|
* @see AiSearchNameNotSetError
|
|
9722
9724
|
*/
|
|
9723
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
|
+
};
|
|
9724
9735
|
/**
|
|
9725
9736
|
* @deprecated AutoRAG has been replaced by AI Search.
|
|
9726
9737
|
* Use AiSearchSearchRequest with the new API instead.
|
|
@@ -11896,15 +11907,18 @@ export declare namespace CloudflareWorkersModule {
|
|
|
11896
11907
|
timestamp: Date;
|
|
11897
11908
|
type: string;
|
|
11898
11909
|
};
|
|
11910
|
+
export type WorkflowStepContext = {
|
|
11911
|
+
attempt: number;
|
|
11912
|
+
};
|
|
11899
11913
|
export abstract class WorkflowStep {
|
|
11900
11914
|
do<T extends Rpc.Serializable<T>>(
|
|
11901
11915
|
name: string,
|
|
11902
|
-
callback: () => Promise<T>,
|
|
11916
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11903
11917
|
): Promise<T>;
|
|
11904
11918
|
do<T extends Rpc.Serializable<T>>(
|
|
11905
11919
|
name: string,
|
|
11906
11920
|
config: WorkflowStepConfig,
|
|
11907
|
-
callback: () => Promise<T>,
|
|
11921
|
+
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
11908
11922
|
): Promise<T>;
|
|
11909
11923
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
11910
11924
|
sleepUntil: (name: string, timestamp: Date | number) => Promise<void>;
|
|
@@ -11992,6 +12006,7 @@ export type ConversionOptions = {
|
|
|
11992
12006
|
convertOGImage?: boolean;
|
|
11993
12007
|
};
|
|
11994
12008
|
hostname?: string;
|
|
12009
|
+
cssSelector?: string;
|
|
11995
12010
|
};
|
|
11996
12011
|
docx?: {
|
|
11997
12012
|
images?: EmbeddedImageConversionOptions;
|