@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/oldest/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/package.json
CHANGED