@cloudflare/workers-types 3.5.0 → 3.7.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.
Files changed (2) hide show
  1. package/index.d.ts +23 -13
  2. 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(options?: DurableObjectGetAlarmOptions): Promise<Date | null>;
432
- setAlarm(arg2: Date, options?: DurableObjectSetAlarmOptions): Promise<void>;
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(options?: DurableObjectGetAlarmOptions): Promise<Date | null>;
481
- setAlarm(arg2: Date, options?: DurableObjectSetAlarmOptions): Promise<void>;
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudflare/workers-types",
3
- "version": "3.5.0",
3
+ "version": "3.7.0",
4
4
  "description": "TypeScript typings for Cloudflare Workers",
5
5
  "repository": {
6
6
  "type": "git",