@cloudflare/workers-types 3.10.0 → 3.11.0
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/index.d.ts +20 -15
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -363,6 +363,7 @@ interface DurableObjectId {
|
|
|
363
363
|
|
|
364
364
|
interface DurableObjectListOptions {
|
|
365
365
|
start?: string;
|
|
366
|
+
startAfter?: string;
|
|
366
367
|
end?: string;
|
|
367
368
|
prefix?: string;
|
|
368
369
|
reverse?: boolean;
|
|
@@ -987,6 +988,7 @@ interface PipeToOptions {
|
|
|
987
988
|
preventClose?: boolean;
|
|
988
989
|
preventAbort?: boolean;
|
|
989
990
|
preventCancel?: boolean;
|
|
991
|
+
signal?: AbortSignal;
|
|
990
992
|
}
|
|
991
993
|
|
|
992
994
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
@@ -1002,8 +1004,19 @@ interface QueuingStrategyInit {
|
|
|
1002
1004
|
* An instance of the R2 bucket binding.
|
|
1003
1005
|
*/
|
|
1004
1006
|
interface R2Bucket {
|
|
1005
|
-
head(key: string
|
|
1006
|
-
get(key: string
|
|
1007
|
+
head(key: string): Promise<R2Object | null>;
|
|
1008
|
+
get(key: string): Promise<R2ObjectBody | null>;
|
|
1009
|
+
/**
|
|
1010
|
+
* Returns R2Object on a failure of the conditional specified in onlyIf.
|
|
1011
|
+
*/
|
|
1012
|
+
get(
|
|
1013
|
+
key: string,
|
|
1014
|
+
options: R2GetOptions
|
|
1015
|
+
): Promise<R2ObjectBody | R2Object | null>;
|
|
1016
|
+
get(
|
|
1017
|
+
key: string,
|
|
1018
|
+
options?: R2GetOptions
|
|
1019
|
+
): Promise<R2ObjectBody | R2Object | null>;
|
|
1007
1020
|
put(
|
|
1008
1021
|
key: string,
|
|
1009
1022
|
value:
|
|
@@ -1057,13 +1070,6 @@ interface R2HTTPMetadata {
|
|
|
1057
1070
|
cacheExpiry?: Date;
|
|
1058
1071
|
}
|
|
1059
1072
|
|
|
1060
|
-
/**
|
|
1061
|
-
* Options for retrieving the object metadata.
|
|
1062
|
-
*/
|
|
1063
|
-
interface R2HeadOptions {
|
|
1064
|
-
onlyIf?: R2Conditional | Headers;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
1073
|
interface R2ListOptions {
|
|
1068
1074
|
limit?: number;
|
|
1069
1075
|
prefix?: string;
|
|
@@ -1123,13 +1129,12 @@ interface R2PutOptions {
|
|
|
1123
1129
|
httpMetadata?: R2HTTPMetadata | Headers;
|
|
1124
1130
|
customMetadata?: Record<string, string>;
|
|
1125
1131
|
md5?: ArrayBuffer | string;
|
|
1126
|
-
sha1?: ArrayBuffer | string;
|
|
1127
1132
|
}
|
|
1128
1133
|
|
|
1129
|
-
|
|
1130
|
-
offset: number;
|
|
1131
|
-
length: number
|
|
1132
|
-
}
|
|
1134
|
+
declare type R2Range =
|
|
1135
|
+
| { offset: number; length?: number }
|
|
1136
|
+
| { offset?: number; length: number }
|
|
1137
|
+
| { suffix: number };
|
|
1133
1138
|
|
|
1134
1139
|
interface ReadResult {
|
|
1135
1140
|
value?: any;
|
|
@@ -1537,7 +1542,7 @@ declare type StreamPipeOptions = PipeToOptions;
|
|
|
1537
1542
|
|
|
1538
1543
|
interface StreamQueuingStrategy {
|
|
1539
1544
|
highWaterMark?: number;
|
|
1540
|
-
size(chunk:
|
|
1545
|
+
size(chunk: any): number;
|
|
1541
1546
|
}
|
|
1542
1547
|
|
|
1543
1548
|
declare abstract class SubtleCrypto {
|