@cloudflare/workers-types 3.5.1 → 3.6.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 +25 -21
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -345,10 +345,6 @@ interface DurableObject {
|
|
|
345
345
|
fetch(request: Request): Promise<Response>;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
interface DurableObjectGetAlarmOptions {
|
|
349
|
-
allowConcurrency?: boolean;
|
|
350
|
-
}
|
|
351
|
-
|
|
352
348
|
interface DurableObjectGetOptions {
|
|
353
349
|
allowConcurrency?: boolean;
|
|
354
350
|
noCache?: boolean;
|
|
@@ -389,11 +385,6 @@ interface DurableObjectPutOptions {
|
|
|
389
385
|
noCache?: boolean;
|
|
390
386
|
}
|
|
391
387
|
|
|
392
|
-
interface DurableObjectSetAlarmOptions {
|
|
393
|
-
allowConcurrency?: boolean;
|
|
394
|
-
allowUnconfirmed?: boolean;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
388
|
interface DurableObjectState {
|
|
398
389
|
waitUntil(promise: Promise<any>): void;
|
|
399
390
|
readonly id: DurableObjectId | string;
|
|
@@ -428,8 +419,17 @@ interface DurableObjectStorage {
|
|
|
428
419
|
transaction<T>(
|
|
429
420
|
closure: (txn: DurableObjectTransaction) => Promise<T>
|
|
430
421
|
): Promise<T>;
|
|
431
|
-
getAlarm(
|
|
432
|
-
|
|
422
|
+
getAlarm(
|
|
423
|
+
options?: DurableObjectStorageOperationsGetAlarmOptions
|
|
424
|
+
): Promise<Date | null>;
|
|
425
|
+
setAlarm(
|
|
426
|
+
arg2: Date,
|
|
427
|
+
options?: DurableObjectStorageOperationsSetAlarmOptions
|
|
428
|
+
): Promise<void>;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
interface DurableObjectStorageOperationsGetAlarmOptions {
|
|
432
|
+
allowConcurrency?: boolean;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
/**
|
|
@@ -451,6 +451,11 @@ declare type DurableObjectStorageOperationsListOptions =
|
|
|
451
451
|
*/
|
|
452
452
|
declare type DurableObjectStorageOperationsPutOptions = DurableObjectPutOptions;
|
|
453
453
|
|
|
454
|
+
interface DurableObjectStorageOperationsSetAlarmOptions {
|
|
455
|
+
allowConcurrency?: boolean;
|
|
456
|
+
allowUnconfirmed?: boolean;
|
|
457
|
+
}
|
|
458
|
+
|
|
454
459
|
interface DurableObjectStub extends Fetcher {
|
|
455
460
|
readonly id: DurableObjectId;
|
|
456
461
|
readonly name?: string;
|
|
@@ -477,8 +482,13 @@ interface DurableObjectTransaction {
|
|
|
477
482
|
delete(key: string, options?: DurableObjectPutOptions): Promise<boolean>;
|
|
478
483
|
delete(keys: string[], options?: DurableObjectPutOptions): Promise<number>;
|
|
479
484
|
rollback(): void;
|
|
480
|
-
getAlarm(
|
|
481
|
-
|
|
485
|
+
getAlarm(
|
|
486
|
+
options?: DurableObjectStorageOperationsGetAlarmOptions
|
|
487
|
+
): Promise<Date | null>;
|
|
488
|
+
setAlarm(
|
|
489
|
+
arg2: Date,
|
|
490
|
+
options?: DurableObjectStorageOperationsSetAlarmOptions
|
|
491
|
+
): Promise<void>;
|
|
482
492
|
}
|
|
483
493
|
|
|
484
494
|
interface Element {
|
|
@@ -993,13 +1003,7 @@ interface R2Bucket {
|
|
|
993
1003
|
get(key: string, options?: R2GetOptions): Promise<R2ObjectBody | null>;
|
|
994
1004
|
put(
|
|
995
1005
|
key: string,
|
|
996
|
-
value:
|
|
997
|
-
| ReadableStream
|
|
998
|
-
| ArrayBuffer
|
|
999
|
-
| ArrayBufferView
|
|
1000
|
-
| string
|
|
1001
|
-
| null
|
|
1002
|
-
| Blob,
|
|
1006
|
+
value: ReadableStream | ArrayBuffer | ArrayBufferView | string | null,
|
|
1003
1007
|
options?: R2PutOptions
|
|
1004
1008
|
): Promise<R2Object>;
|
|
1005
1009
|
delete(key: string): Promise<void>;
|
|
@@ -1073,7 +1077,7 @@ interface R2ListOptions {
|
|
|
1073
1077
|
* }
|
|
1074
1078
|
* ```
|
|
1075
1079
|
*/
|
|
1076
|
-
include
|
|
1080
|
+
include: ("httpMetadata" | "customMetadata")[];
|
|
1077
1081
|
}
|
|
1078
1082
|
|
|
1079
1083
|
/**
|