@cloudflare/workers-types 4.20250903.0 → 4.20250904.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.
@@ -491,7 +491,7 @@ interface DurableObjectId {
491
491
  equals(other: DurableObjectId): boolean;
492
492
  readonly name?: string;
493
493
  }
494
- interface DurableObjectNamespace<
494
+ declare abstract class DurableObjectNamespace<
495
495
  T extends Rpc.DurableObjectBranded | undefined = undefined,
496
496
  > {
497
497
  newUniqueId(
@@ -530,6 +530,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
530
530
  }
531
531
  interface DurableObjectState {
532
532
  waitUntil(promise: Promise<any>): void;
533
+ props: any;
533
534
  readonly id: DurableObjectId;
534
535
  readonly storage: DurableObjectStorage;
535
536
  container?: Container;
@@ -610,6 +611,7 @@ interface DurableObjectStorage {
610
611
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
611
612
  sync(): Promise<void>;
612
613
  sql: SqlStorage;
614
+ kv: SyncKvStorage;
613
615
  transactionSync<T>(closure: () => T): T;
614
616
  getCurrentBookmark(): Promise<string>;
615
617
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3033,6 +3035,20 @@ interface MessagePort extends EventTarget {
3033
3035
  interface MessagePortPostMessageOptions {
3034
3036
  transfer?: any[];
3035
3037
  }
3038
+ interface SyncKvStorage {
3039
+ get<T = unknown>(key: string): T | undefined;
3040
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3041
+ put<T>(key: string, value: T): void;
3042
+ delete(key: string): boolean;
3043
+ }
3044
+ interface SyncKvListOptions {
3045
+ start?: string;
3046
+ startAfter?: string;
3047
+ end?: string;
3048
+ prefix?: string;
3049
+ reverse?: boolean;
3050
+ limit?: number;
3051
+ }
3036
3052
  type AiImageClassificationInput = {
3037
3053
  image: number[];
3038
3054
  };
@@ -496,7 +496,7 @@ export interface DurableObjectId {
496
496
  equals(other: DurableObjectId): boolean;
497
497
  readonly name?: string;
498
498
  }
499
- export interface DurableObjectNamespace<
499
+ export declare abstract class DurableObjectNamespace<
500
500
  T extends Rpc.DurableObjectBranded | undefined = undefined,
501
501
  > {
502
502
  newUniqueId(
@@ -535,6 +535,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
535
535
  }
536
536
  export interface DurableObjectState {
537
537
  waitUntil(promise: Promise<any>): void;
538
+ props: any;
538
539
  readonly id: DurableObjectId;
539
540
  readonly storage: DurableObjectStorage;
540
541
  container?: Container;
@@ -615,6 +616,7 @@ export interface DurableObjectStorage {
615
616
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
616
617
  sync(): Promise<void>;
617
618
  sql: SqlStorage;
619
+ kv: SyncKvStorage;
618
620
  transactionSync<T>(closure: () => T): T;
619
621
  getCurrentBookmark(): Promise<string>;
620
622
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3044,6 +3046,20 @@ export interface MessagePort extends EventTarget {
3044
3046
  export interface MessagePortPostMessageOptions {
3045
3047
  transfer?: any[];
3046
3048
  }
3049
+ export interface SyncKvStorage {
3050
+ get<T = unknown>(key: string): T | undefined;
3051
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3052
+ put<T>(key: string, value: T): void;
3053
+ delete(key: string): boolean;
3054
+ }
3055
+ export interface SyncKvListOptions {
3056
+ start?: string;
3057
+ startAfter?: string;
3058
+ end?: string;
3059
+ prefix?: string;
3060
+ reverse?: boolean;
3061
+ limit?: number;
3062
+ }
3047
3063
  export type AiImageClassificationInput = {
3048
3064
  image: number[];
3049
3065
  };
@@ -491,7 +491,7 @@ interface DurableObjectId {
491
491
  equals(other: DurableObjectId): boolean;
492
492
  readonly name?: string;
493
493
  }
494
- interface DurableObjectNamespace<
494
+ declare abstract class DurableObjectNamespace<
495
495
  T extends Rpc.DurableObjectBranded | undefined = undefined,
496
496
  > {
497
497
  newUniqueId(
@@ -530,6 +530,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
530
530
  }
531
531
  interface DurableObjectState {
532
532
  waitUntil(promise: Promise<any>): void;
533
+ props: any;
533
534
  readonly id: DurableObjectId;
534
535
  readonly storage: DurableObjectStorage;
535
536
  container?: Container;
@@ -610,6 +611,7 @@ interface DurableObjectStorage {
610
611
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
611
612
  sync(): Promise<void>;
612
613
  sql: SqlStorage;
614
+ kv: SyncKvStorage;
613
615
  transactionSync<T>(closure: () => T): T;
614
616
  getCurrentBookmark(): Promise<string>;
615
617
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3059,6 +3061,20 @@ interface MessagePort extends EventTarget {
3059
3061
  interface MessagePortPostMessageOptions {
3060
3062
  transfer?: any[];
3061
3063
  }
3064
+ interface SyncKvStorage {
3065
+ get<T = unknown>(key: string): T | undefined;
3066
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3067
+ put<T>(key: string, value: T): void;
3068
+ delete(key: string): boolean;
3069
+ }
3070
+ interface SyncKvListOptions {
3071
+ start?: string;
3072
+ startAfter?: string;
3073
+ end?: string;
3074
+ prefix?: string;
3075
+ reverse?: boolean;
3076
+ limit?: number;
3077
+ }
3062
3078
  type AiImageClassificationInput = {
3063
3079
  image: number[];
3064
3080
  };
@@ -496,7 +496,7 @@ export interface DurableObjectId {
496
496
  equals(other: DurableObjectId): boolean;
497
497
  readonly name?: string;
498
498
  }
499
- export interface DurableObjectNamespace<
499
+ export declare abstract class DurableObjectNamespace<
500
500
  T extends Rpc.DurableObjectBranded | undefined = undefined,
501
501
  > {
502
502
  newUniqueId(
@@ -535,6 +535,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
535
535
  }
536
536
  export interface DurableObjectState {
537
537
  waitUntil(promise: Promise<any>): void;
538
+ props: any;
538
539
  readonly id: DurableObjectId;
539
540
  readonly storage: DurableObjectStorage;
540
541
  container?: Container;
@@ -615,6 +616,7 @@ export interface DurableObjectStorage {
615
616
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
616
617
  sync(): Promise<void>;
617
618
  sql: SqlStorage;
619
+ kv: SyncKvStorage;
618
620
  transactionSync<T>(closure: () => T): T;
619
621
  getCurrentBookmark(): Promise<string>;
620
622
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3070,6 +3072,20 @@ export interface MessagePort extends EventTarget {
3070
3072
  export interface MessagePortPostMessageOptions {
3071
3073
  transfer?: any[];
3072
3074
  }
3075
+ export interface SyncKvStorage {
3076
+ get<T = unknown>(key: string): T | undefined;
3077
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3078
+ put<T>(key: string, value: T): void;
3079
+ delete(key: string): boolean;
3080
+ }
3081
+ export interface SyncKvListOptions {
3082
+ start?: string;
3083
+ startAfter?: string;
3084
+ end?: string;
3085
+ prefix?: string;
3086
+ reverse?: boolean;
3087
+ limit?: number;
3088
+ }
3073
3089
  export type AiImageClassificationInput = {
3074
3090
  image: number[];
3075
3091
  };
@@ -509,7 +509,7 @@ interface DurableObjectId {
509
509
  equals(other: DurableObjectId): boolean;
510
510
  readonly name?: string;
511
511
  }
512
- interface DurableObjectNamespace<
512
+ declare abstract class DurableObjectNamespace<
513
513
  T extends Rpc.DurableObjectBranded | undefined = undefined,
514
514
  > {
515
515
  newUniqueId(
@@ -548,6 +548,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
548
548
  }
549
549
  interface DurableObjectState {
550
550
  waitUntil(promise: Promise<any>): void;
551
+ props: any;
551
552
  readonly id: DurableObjectId;
552
553
  readonly storage: DurableObjectStorage;
553
554
  container?: Container;
@@ -628,6 +629,7 @@ interface DurableObjectStorage {
628
629
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
629
630
  sync(): Promise<void>;
630
631
  sql: SqlStorage;
632
+ kv: SyncKvStorage;
631
633
  transactionSync<T>(closure: () => T): T;
632
634
  getCurrentBookmark(): Promise<string>;
633
635
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3077,6 +3079,20 @@ interface MessagePort extends EventTarget {
3077
3079
  interface MessagePortPostMessageOptions {
3078
3080
  transfer?: any[];
3079
3081
  }
3082
+ interface SyncKvStorage {
3083
+ get<T = unknown>(key: string): T | undefined;
3084
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3085
+ put<T>(key: string, value: T): void;
3086
+ delete(key: string): boolean;
3087
+ }
3088
+ interface SyncKvListOptions {
3089
+ start?: string;
3090
+ startAfter?: string;
3091
+ end?: string;
3092
+ prefix?: string;
3093
+ reverse?: boolean;
3094
+ limit?: number;
3095
+ }
3080
3096
  type AiImageClassificationInput = {
3081
3097
  image: number[];
3082
3098
  };
@@ -514,7 +514,7 @@ export interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- export interface DurableObjectNamespace<
517
+ export declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  export interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ export interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3088,6 +3090,20 @@ export interface MessagePort extends EventTarget {
3088
3090
  export interface MessagePortPostMessageOptions {
3089
3091
  transfer?: any[];
3090
3092
  }
3093
+ export interface SyncKvStorage {
3094
+ get<T = unknown>(key: string): T | undefined;
3095
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3096
+ put<T>(key: string, value: T): void;
3097
+ delete(key: string): boolean;
3098
+ }
3099
+ export interface SyncKvListOptions {
3100
+ start?: string;
3101
+ startAfter?: string;
3102
+ end?: string;
3103
+ prefix?: string;
3104
+ reverse?: boolean;
3105
+ limit?: number;
3106
+ }
3091
3107
  export type AiImageClassificationInput = {
3092
3108
  image: number[];
3093
3109
  };
@@ -509,7 +509,7 @@ interface DurableObjectId {
509
509
  equals(other: DurableObjectId): boolean;
510
510
  readonly name?: string;
511
511
  }
512
- interface DurableObjectNamespace<
512
+ declare abstract class DurableObjectNamespace<
513
513
  T extends Rpc.DurableObjectBranded | undefined = undefined,
514
514
  > {
515
515
  newUniqueId(
@@ -548,6 +548,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
548
548
  }
549
549
  interface DurableObjectState {
550
550
  waitUntil(promise: Promise<any>): void;
551
+ props: any;
551
552
  readonly id: DurableObjectId;
552
553
  readonly storage: DurableObjectStorage;
553
554
  container?: Container;
@@ -628,6 +629,7 @@ interface DurableObjectStorage {
628
629
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
629
630
  sync(): Promise<void>;
630
631
  sql: SqlStorage;
632
+ kv: SyncKvStorage;
631
633
  transactionSync<T>(closure: () => T): T;
632
634
  getCurrentBookmark(): Promise<string>;
633
635
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3078,6 +3080,20 @@ interface MessagePort extends EventTarget {
3078
3080
  interface MessagePortPostMessageOptions {
3079
3081
  transfer?: any[];
3080
3082
  }
3083
+ interface SyncKvStorage {
3084
+ get<T = unknown>(key: string): T | undefined;
3085
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3086
+ put<T>(key: string, value: T): void;
3087
+ delete(key: string): boolean;
3088
+ }
3089
+ interface SyncKvListOptions {
3090
+ start?: string;
3091
+ startAfter?: string;
3092
+ end?: string;
3093
+ prefix?: string;
3094
+ reverse?: boolean;
3095
+ limit?: number;
3096
+ }
3081
3097
  type AiImageClassificationInput = {
3082
3098
  image: number[];
3083
3099
  };
@@ -514,7 +514,7 @@ export interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- export interface DurableObjectNamespace<
517
+ export declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  export interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ export interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3089,6 +3091,20 @@ export interface MessagePort extends EventTarget {
3089
3091
  export interface MessagePortPostMessageOptions {
3090
3092
  transfer?: any[];
3091
3093
  }
3094
+ export interface SyncKvStorage {
3095
+ get<T = unknown>(key: string): T | undefined;
3096
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3097
+ put<T>(key: string, value: T): void;
3098
+ delete(key: string): boolean;
3099
+ }
3100
+ export interface SyncKvListOptions {
3101
+ start?: string;
3102
+ startAfter?: string;
3103
+ end?: string;
3104
+ prefix?: string;
3105
+ reverse?: boolean;
3106
+ limit?: number;
3107
+ }
3092
3108
  export type AiImageClassificationInput = {
3093
3109
  image: number[];
3094
3110
  };
@@ -509,7 +509,7 @@ interface DurableObjectId {
509
509
  equals(other: DurableObjectId): boolean;
510
510
  readonly name?: string;
511
511
  }
512
- interface DurableObjectNamespace<
512
+ declare abstract class DurableObjectNamespace<
513
513
  T extends Rpc.DurableObjectBranded | undefined = undefined,
514
514
  > {
515
515
  newUniqueId(
@@ -548,6 +548,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
548
548
  }
549
549
  interface DurableObjectState {
550
550
  waitUntil(promise: Promise<any>): void;
551
+ props: any;
551
552
  readonly id: DurableObjectId;
552
553
  readonly storage: DurableObjectStorage;
553
554
  container?: Container;
@@ -628,6 +629,7 @@ interface DurableObjectStorage {
628
629
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
629
630
  sync(): Promise<void>;
630
631
  sql: SqlStorage;
632
+ kv: SyncKvStorage;
631
633
  transactionSync<T>(closure: () => T): T;
632
634
  getCurrentBookmark(): Promise<string>;
633
635
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3082,6 +3084,20 @@ interface MessagePort extends EventTarget {
3082
3084
  interface MessagePortPostMessageOptions {
3083
3085
  transfer?: any[];
3084
3086
  }
3087
+ interface SyncKvStorage {
3088
+ get<T = unknown>(key: string): T | undefined;
3089
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3090
+ put<T>(key: string, value: T): void;
3091
+ delete(key: string): boolean;
3092
+ }
3093
+ interface SyncKvListOptions {
3094
+ start?: string;
3095
+ startAfter?: string;
3096
+ end?: string;
3097
+ prefix?: string;
3098
+ reverse?: boolean;
3099
+ limit?: number;
3100
+ }
3085
3101
  type AiImageClassificationInput = {
3086
3102
  image: number[];
3087
3103
  };
@@ -514,7 +514,7 @@ export interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- export interface DurableObjectNamespace<
517
+ export declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  export interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ export interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3093,6 +3095,20 @@ export interface MessagePort extends EventTarget {
3093
3095
  export interface MessagePortPostMessageOptions {
3094
3096
  transfer?: any[];
3095
3097
  }
3098
+ export interface SyncKvStorage {
3099
+ get<T = unknown>(key: string): T | undefined;
3100
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3101
+ put<T>(key: string, value: T): void;
3102
+ delete(key: string): boolean;
3103
+ }
3104
+ export interface SyncKvListOptions {
3105
+ start?: string;
3106
+ startAfter?: string;
3107
+ end?: string;
3108
+ prefix?: string;
3109
+ reverse?: boolean;
3110
+ limit?: number;
3111
+ }
3096
3112
  export type AiImageClassificationInput = {
3097
3113
  image: number[];
3098
3114
  };
@@ -514,7 +514,7 @@ interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- interface DurableObjectNamespace<
517
+ declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3087,6 +3089,20 @@ interface MessagePort extends EventTarget {
3087
3089
  interface MessagePortPostMessageOptions {
3088
3090
  transfer?: any[];
3089
3091
  }
3092
+ interface SyncKvStorage {
3093
+ get<T = unknown>(key: string): T | undefined;
3094
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3095
+ put<T>(key: string, value: T): void;
3096
+ delete(key: string): boolean;
3097
+ }
3098
+ interface SyncKvListOptions {
3099
+ start?: string;
3100
+ startAfter?: string;
3101
+ end?: string;
3102
+ prefix?: string;
3103
+ reverse?: boolean;
3104
+ limit?: number;
3105
+ }
3090
3106
  type AiImageClassificationInput = {
3091
3107
  image: number[];
3092
3108
  };
@@ -519,7 +519,7 @@ export interface DurableObjectId {
519
519
  equals(other: DurableObjectId): boolean;
520
520
  readonly name?: string;
521
521
  }
522
- export interface DurableObjectNamespace<
522
+ export declare abstract class DurableObjectNamespace<
523
523
  T extends Rpc.DurableObjectBranded | undefined = undefined,
524
524
  > {
525
525
  newUniqueId(
@@ -558,6 +558,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
558
558
  }
559
559
  export interface DurableObjectState {
560
560
  waitUntil(promise: Promise<any>): void;
561
+ props: any;
561
562
  readonly id: DurableObjectId;
562
563
  readonly storage: DurableObjectStorage;
563
564
  container?: Container;
@@ -638,6 +639,7 @@ export interface DurableObjectStorage {
638
639
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
639
640
  sync(): Promise<void>;
640
641
  sql: SqlStorage;
642
+ kv: SyncKvStorage;
641
643
  transactionSync<T>(closure: () => T): T;
642
644
  getCurrentBookmark(): Promise<string>;
643
645
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3098,6 +3100,20 @@ export interface MessagePort extends EventTarget {
3098
3100
  export interface MessagePortPostMessageOptions {
3099
3101
  transfer?: any[];
3100
3102
  }
3103
+ export interface SyncKvStorage {
3104
+ get<T = unknown>(key: string): T | undefined;
3105
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3106
+ put<T>(key: string, value: T): void;
3107
+ delete(key: string): boolean;
3108
+ }
3109
+ export interface SyncKvListOptions {
3110
+ start?: string;
3111
+ startAfter?: string;
3112
+ end?: string;
3113
+ prefix?: string;
3114
+ reverse?: boolean;
3115
+ limit?: number;
3116
+ }
3101
3117
  export type AiImageClassificationInput = {
3102
3118
  image: number[];
3103
3119
  };
@@ -514,7 +514,7 @@ interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- interface DurableObjectNamespace<
517
+ declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3089,6 +3091,20 @@ interface MessagePort extends EventTarget {
3089
3091
  interface MessagePortPostMessageOptions {
3090
3092
  transfer?: any[];
3091
3093
  }
3094
+ interface SyncKvStorage {
3095
+ get<T = unknown>(key: string): T | undefined;
3096
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3097
+ put<T>(key: string, value: T): void;
3098
+ delete(key: string): boolean;
3099
+ }
3100
+ interface SyncKvListOptions {
3101
+ start?: string;
3102
+ startAfter?: string;
3103
+ end?: string;
3104
+ prefix?: string;
3105
+ reverse?: boolean;
3106
+ limit?: number;
3107
+ }
3092
3108
  type AiImageClassificationInput = {
3093
3109
  image: number[];
3094
3110
  };
@@ -519,7 +519,7 @@ export interface DurableObjectId {
519
519
  equals(other: DurableObjectId): boolean;
520
520
  readonly name?: string;
521
521
  }
522
- export interface DurableObjectNamespace<
522
+ export declare abstract class DurableObjectNamespace<
523
523
  T extends Rpc.DurableObjectBranded | undefined = undefined,
524
524
  > {
525
525
  newUniqueId(
@@ -558,6 +558,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
558
558
  }
559
559
  export interface DurableObjectState {
560
560
  waitUntil(promise: Promise<any>): void;
561
+ props: any;
561
562
  readonly id: DurableObjectId;
562
563
  readonly storage: DurableObjectStorage;
563
564
  container?: Container;
@@ -638,6 +639,7 @@ export interface DurableObjectStorage {
638
639
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
639
640
  sync(): Promise<void>;
640
641
  sql: SqlStorage;
642
+ kv: SyncKvStorage;
641
643
  transactionSync<T>(closure: () => T): T;
642
644
  getCurrentBookmark(): Promise<string>;
643
645
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3100,6 +3102,20 @@ export interface MessagePort extends EventTarget {
3100
3102
  export interface MessagePortPostMessageOptions {
3101
3103
  transfer?: any[];
3102
3104
  }
3105
+ export interface SyncKvStorage {
3106
+ get<T = unknown>(key: string): T | undefined;
3107
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3108
+ put<T>(key: string, value: T): void;
3109
+ delete(key: string): boolean;
3110
+ }
3111
+ export interface SyncKvListOptions {
3112
+ start?: string;
3113
+ startAfter?: string;
3114
+ end?: string;
3115
+ prefix?: string;
3116
+ reverse?: boolean;
3117
+ limit?: number;
3118
+ }
3103
3119
  export type AiImageClassificationInput = {
3104
3120
  image: number[];
3105
3121
  };
@@ -514,7 +514,7 @@ interface DurableObjectId {
514
514
  equals(other: DurableObjectId): boolean;
515
515
  readonly name?: string;
516
516
  }
517
- interface DurableObjectNamespace<
517
+ declare abstract class DurableObjectNamespace<
518
518
  T extends Rpc.DurableObjectBranded | undefined = undefined,
519
519
  > {
520
520
  newUniqueId(
@@ -553,6 +553,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
553
553
  }
554
554
  interface DurableObjectState {
555
555
  waitUntil(promise: Promise<any>): void;
556
+ props: any;
556
557
  readonly id: DurableObjectId;
557
558
  readonly storage: DurableObjectStorage;
558
559
  container?: Container;
@@ -633,6 +634,7 @@ interface DurableObjectStorage {
633
634
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
634
635
  sync(): Promise<void>;
635
636
  sql: SqlStorage;
637
+ kv: SyncKvStorage;
636
638
  transactionSync<T>(closure: () => T): T;
637
639
  getCurrentBookmark(): Promise<string>;
638
640
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3089,6 +3091,20 @@ interface MessagePort extends EventTarget {
3089
3091
  interface MessagePortPostMessageOptions {
3090
3092
  transfer?: any[];
3091
3093
  }
3094
+ interface SyncKvStorage {
3095
+ get<T = unknown>(key: string): T | undefined;
3096
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3097
+ put<T>(key: string, value: T): void;
3098
+ delete(key: string): boolean;
3099
+ }
3100
+ interface SyncKvListOptions {
3101
+ start?: string;
3102
+ startAfter?: string;
3103
+ end?: string;
3104
+ prefix?: string;
3105
+ reverse?: boolean;
3106
+ limit?: number;
3107
+ }
3092
3108
  type AiImageClassificationInput = {
3093
3109
  image: number[];
3094
3110
  };
@@ -519,7 +519,7 @@ export interface DurableObjectId {
519
519
  equals(other: DurableObjectId): boolean;
520
520
  readonly name?: string;
521
521
  }
522
- export interface DurableObjectNamespace<
522
+ export declare abstract class DurableObjectNamespace<
523
523
  T extends Rpc.DurableObjectBranded | undefined = undefined,
524
524
  > {
525
525
  newUniqueId(
@@ -558,6 +558,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
558
558
  }
559
559
  export interface DurableObjectState {
560
560
  waitUntil(promise: Promise<any>): void;
561
+ props: any;
561
562
  readonly id: DurableObjectId;
562
563
  readonly storage: DurableObjectStorage;
563
564
  container?: Container;
@@ -638,6 +639,7 @@ export interface DurableObjectStorage {
638
639
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
639
640
  sync(): Promise<void>;
640
641
  sql: SqlStorage;
642
+ kv: SyncKvStorage;
641
643
  transactionSync<T>(closure: () => T): T;
642
644
  getCurrentBookmark(): Promise<string>;
643
645
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3100,6 +3102,20 @@ export interface MessagePort extends EventTarget {
3100
3102
  export interface MessagePortPostMessageOptions {
3101
3103
  transfer?: any[];
3102
3104
  }
3105
+ export interface SyncKvStorage {
3106
+ get<T = unknown>(key: string): T | undefined;
3107
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3108
+ put<T>(key: string, value: T): void;
3109
+ delete(key: string): boolean;
3110
+ }
3111
+ export interface SyncKvListOptions {
3112
+ start?: string;
3113
+ startAfter?: string;
3114
+ end?: string;
3115
+ prefix?: string;
3116
+ reverse?: boolean;
3117
+ limit?: number;
3118
+ }
3103
3119
  export type AiImageClassificationInput = {
3104
3120
  image: number[];
3105
3121
  };
@@ -497,6 +497,9 @@ interface AlarmInvocationInfo {
497
497
  interface Cloudflare {
498
498
  readonly compatibilityFlags: Record<string, boolean>;
499
499
  }
500
+ declare abstract class ColoLocalActorNamespace {
501
+ get(actorId: string): Fetcher;
502
+ }
500
503
  interface DurableObject {
501
504
  fetch(request: Request): Response | Promise<Response>;
502
505
  alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise<void>;
@@ -527,7 +530,7 @@ interface DurableObjectId {
527
530
  readonly name?: string;
528
531
  readonly jurisdiction?: string;
529
532
  }
530
- interface DurableObjectNamespace<
533
+ declare abstract class DurableObjectNamespace<
531
534
  T extends Rpc.DurableObjectBranded | undefined = undefined,
532
535
  > {
533
536
  newUniqueId(
@@ -568,10 +571,11 @@ type DurableObjectLocationHint =
568
571
  interface DurableObjectNamespaceGetDurableObjectOptions {
569
572
  locationHint?: DurableObjectLocationHint;
570
573
  }
571
- interface DurableObjectClass {}
574
+ declare abstract class DurableObjectClass {}
572
575
  interface DurableObjectState {
573
576
  waitUntil(promise: Promise<any>): void;
574
577
  exports: any;
578
+ props: any;
575
579
  readonly id: DurableObjectId;
576
580
  readonly storage: DurableObjectStorage;
577
581
  container?: Container;
@@ -653,6 +657,7 @@ interface DurableObjectStorage {
653
657
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
654
658
  sync(): Promise<void>;
655
659
  sql: SqlStorage;
660
+ kv: SyncKvStorage;
656
661
  transactionSync<T>(closure: () => T): T;
657
662
  getCurrentBookmark(): Promise<string>;
658
663
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -704,7 +709,10 @@ interface DurableObjectFacets {
704
709
  delete(name: string): void;
705
710
  }
706
711
  interface DurableObjectFacetsStartupOptions {
707
- $class: DurableObjectClass;
712
+ $class:
713
+ | DurableObjectClass
714
+ | LoopbackDurableObjectNamespace
715
+ | LoopbackColoLocalActorNamespace;
708
716
  id?: DurableObjectId | string;
709
717
  }
710
718
  interface AnalyticsEngineDataset {
@@ -3339,6 +3347,22 @@ declare class MessageChannel {
3339
3347
  interface MessagePortPostMessageOptions {
3340
3348
  transfer?: any[];
3341
3349
  }
3350
+ interface LoopbackDurableObjectNamespace extends DurableObjectNamespace {}
3351
+ interface LoopbackColoLocalActorNamespace extends ColoLocalActorNamespace {}
3352
+ interface SyncKvStorage {
3353
+ get<T = unknown>(key: string): T | undefined;
3354
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3355
+ put<T>(key: string, value: T): void;
3356
+ delete(key: string): boolean;
3357
+ }
3358
+ interface SyncKvListOptions {
3359
+ start?: string;
3360
+ startAfter?: string;
3361
+ end?: string;
3362
+ prefix?: string;
3363
+ reverse?: boolean;
3364
+ limit?: number;
3365
+ }
3342
3366
  type AiImageClassificationInput = {
3343
3367
  image: number[];
3344
3368
  };
@@ -502,6 +502,9 @@ export interface AlarmInvocationInfo {
502
502
  export interface Cloudflare {
503
503
  readonly compatibilityFlags: Record<string, boolean>;
504
504
  }
505
+ export declare abstract class ColoLocalActorNamespace {
506
+ get(actorId: string): Fetcher;
507
+ }
505
508
  export interface DurableObject {
506
509
  fetch(request: Request): Response | Promise<Response>;
507
510
  alarm?(alarmInfo?: AlarmInvocationInfo): void | Promise<void>;
@@ -532,7 +535,7 @@ export interface DurableObjectId {
532
535
  readonly name?: string;
533
536
  readonly jurisdiction?: string;
534
537
  }
535
- export interface DurableObjectNamespace<
538
+ export declare abstract class DurableObjectNamespace<
536
539
  T extends Rpc.DurableObjectBranded | undefined = undefined,
537
540
  > {
538
541
  newUniqueId(
@@ -573,10 +576,11 @@ export type DurableObjectLocationHint =
573
576
  export interface DurableObjectNamespaceGetDurableObjectOptions {
574
577
  locationHint?: DurableObjectLocationHint;
575
578
  }
576
- export interface DurableObjectClass {}
579
+ export declare abstract class DurableObjectClass {}
577
580
  export interface DurableObjectState {
578
581
  waitUntil(promise: Promise<any>): void;
579
582
  exports: any;
583
+ props: any;
580
584
  readonly id: DurableObjectId;
581
585
  readonly storage: DurableObjectStorage;
582
586
  container?: Container;
@@ -658,6 +662,7 @@ export interface DurableObjectStorage {
658
662
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
659
663
  sync(): Promise<void>;
660
664
  sql: SqlStorage;
665
+ kv: SyncKvStorage;
661
666
  transactionSync<T>(closure: () => T): T;
662
667
  getCurrentBookmark(): Promise<string>;
663
668
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -709,7 +714,10 @@ export interface DurableObjectFacets {
709
714
  delete(name: string): void;
710
715
  }
711
716
  export interface DurableObjectFacetsStartupOptions {
712
- $class: DurableObjectClass;
717
+ $class:
718
+ | DurableObjectClass
719
+ | LoopbackDurableObjectNamespace
720
+ | LoopbackColoLocalActorNamespace;
713
721
  id?: DurableObjectId | string;
714
722
  }
715
723
  export interface AnalyticsEngineDataset {
@@ -3350,6 +3358,24 @@ export declare class MessageChannel {
3350
3358
  export interface MessagePortPostMessageOptions {
3351
3359
  transfer?: any[];
3352
3360
  }
3361
+ export interface LoopbackDurableObjectNamespace
3362
+ extends DurableObjectNamespace {}
3363
+ export interface LoopbackColoLocalActorNamespace
3364
+ extends ColoLocalActorNamespace {}
3365
+ export interface SyncKvStorage {
3366
+ get<T = unknown>(key: string): T | undefined;
3367
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3368
+ put<T>(key: string, value: T): void;
3369
+ delete(key: string): boolean;
3370
+ }
3371
+ export interface SyncKvListOptions {
3372
+ start?: string;
3373
+ startAfter?: string;
3374
+ end?: string;
3375
+ prefix?: string;
3376
+ reverse?: boolean;
3377
+ limit?: number;
3378
+ }
3353
3379
  export type AiImageClassificationInput = {
3354
3380
  image: number[];
3355
3381
  };
package/index.d.ts CHANGED
@@ -491,7 +491,7 @@ interface DurableObjectId {
491
491
  equals(other: DurableObjectId): boolean;
492
492
  readonly name?: string;
493
493
  }
494
- interface DurableObjectNamespace<
494
+ declare abstract class DurableObjectNamespace<
495
495
  T extends Rpc.DurableObjectBranded | undefined = undefined,
496
496
  > {
497
497
  newUniqueId(
@@ -530,6 +530,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
530
530
  }
531
531
  interface DurableObjectState {
532
532
  waitUntil(promise: Promise<any>): void;
533
+ props: any;
533
534
  readonly id: DurableObjectId;
534
535
  readonly storage: DurableObjectStorage;
535
536
  container?: Container;
@@ -610,6 +611,7 @@ interface DurableObjectStorage {
610
611
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
611
612
  sync(): Promise<void>;
612
613
  sql: SqlStorage;
614
+ kv: SyncKvStorage;
613
615
  transactionSync<T>(closure: () => T): T;
614
616
  getCurrentBookmark(): Promise<string>;
615
617
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3033,6 +3035,20 @@ interface MessagePort extends EventTarget {
3033
3035
  interface MessagePortPostMessageOptions {
3034
3036
  transfer?: any[];
3035
3037
  }
3038
+ interface SyncKvStorage {
3039
+ get<T = unknown>(key: string): T | undefined;
3040
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3041
+ put<T>(key: string, value: T): void;
3042
+ delete(key: string): boolean;
3043
+ }
3044
+ interface SyncKvListOptions {
3045
+ start?: string;
3046
+ startAfter?: string;
3047
+ end?: string;
3048
+ prefix?: string;
3049
+ reverse?: boolean;
3050
+ limit?: number;
3051
+ }
3036
3052
  type AiImageClassificationInput = {
3037
3053
  image: number[];
3038
3054
  };
package/index.ts CHANGED
@@ -496,7 +496,7 @@ export interface DurableObjectId {
496
496
  equals(other: DurableObjectId): boolean;
497
497
  readonly name?: string;
498
498
  }
499
- export interface DurableObjectNamespace<
499
+ export declare abstract class DurableObjectNamespace<
500
500
  T extends Rpc.DurableObjectBranded | undefined = undefined,
501
501
  > {
502
502
  newUniqueId(
@@ -535,6 +535,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
535
535
  }
536
536
  export interface DurableObjectState {
537
537
  waitUntil(promise: Promise<any>): void;
538
+ props: any;
538
539
  readonly id: DurableObjectId;
539
540
  readonly storage: DurableObjectStorage;
540
541
  container?: Container;
@@ -615,6 +616,7 @@ export interface DurableObjectStorage {
615
616
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
616
617
  sync(): Promise<void>;
617
618
  sql: SqlStorage;
619
+ kv: SyncKvStorage;
618
620
  transactionSync<T>(closure: () => T): T;
619
621
  getCurrentBookmark(): Promise<string>;
620
622
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3044,6 +3046,20 @@ export interface MessagePort extends EventTarget {
3044
3046
  export interface MessagePortPostMessageOptions {
3045
3047
  transfer?: any[];
3046
3048
  }
3049
+ export interface SyncKvStorage {
3050
+ get<T = unknown>(key: string): T | undefined;
3051
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3052
+ put<T>(key: string, value: T): void;
3053
+ delete(key: string): boolean;
3054
+ }
3055
+ export interface SyncKvListOptions {
3056
+ start?: string;
3057
+ startAfter?: string;
3058
+ end?: string;
3059
+ prefix?: string;
3060
+ reverse?: boolean;
3061
+ limit?: number;
3062
+ }
3047
3063
  export type AiImageClassificationInput = {
3048
3064
  image: number[];
3049
3065
  };
package/latest/index.d.ts CHANGED
@@ -518,7 +518,7 @@ interface DurableObjectId {
518
518
  equals(other: DurableObjectId): boolean;
519
519
  readonly name?: string;
520
520
  }
521
- interface DurableObjectNamespace<
521
+ declare abstract class DurableObjectNamespace<
522
522
  T extends Rpc.DurableObjectBranded | undefined = undefined,
523
523
  > {
524
524
  newUniqueId(
@@ -557,6 +557,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
557
557
  }
558
558
  interface DurableObjectState {
559
559
  waitUntil(promise: Promise<any>): void;
560
+ props: any;
560
561
  readonly id: DurableObjectId;
561
562
  readonly storage: DurableObjectStorage;
562
563
  container?: Container;
@@ -637,6 +638,7 @@ interface DurableObjectStorage {
637
638
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
638
639
  sync(): Promise<void>;
639
640
  sql: SqlStorage;
641
+ kv: SyncKvStorage;
640
642
  transactionSync<T>(closure: () => T): T;
641
643
  getCurrentBookmark(): Promise<string>;
642
644
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3118,6 +3120,20 @@ declare class MessageChannel {
3118
3120
  interface MessagePortPostMessageOptions {
3119
3121
  transfer?: any[];
3120
3122
  }
3123
+ interface SyncKvStorage {
3124
+ get<T = unknown>(key: string): T | undefined;
3125
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3126
+ put<T>(key: string, value: T): void;
3127
+ delete(key: string): boolean;
3128
+ }
3129
+ interface SyncKvListOptions {
3130
+ start?: string;
3131
+ startAfter?: string;
3132
+ end?: string;
3133
+ prefix?: string;
3134
+ reverse?: boolean;
3135
+ limit?: number;
3136
+ }
3121
3137
  type AiImageClassificationInput = {
3122
3138
  image: number[];
3123
3139
  };
package/latest/index.ts CHANGED
@@ -523,7 +523,7 @@ export interface DurableObjectId {
523
523
  equals(other: DurableObjectId): boolean;
524
524
  readonly name?: string;
525
525
  }
526
- export interface DurableObjectNamespace<
526
+ export declare abstract class DurableObjectNamespace<
527
527
  T extends Rpc.DurableObjectBranded | undefined = undefined,
528
528
  > {
529
529
  newUniqueId(
@@ -562,6 +562,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
562
562
  }
563
563
  export interface DurableObjectState {
564
564
  waitUntil(promise: Promise<any>): void;
565
+ props: any;
565
566
  readonly id: DurableObjectId;
566
567
  readonly storage: DurableObjectStorage;
567
568
  container?: Container;
@@ -642,6 +643,7 @@ export interface DurableObjectStorage {
642
643
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
643
644
  sync(): Promise<void>;
644
645
  sql: SqlStorage;
646
+ kv: SyncKvStorage;
645
647
  transactionSync<T>(closure: () => T): T;
646
648
  getCurrentBookmark(): Promise<string>;
647
649
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3129,6 +3131,20 @@ export declare class MessageChannel {
3129
3131
  export interface MessagePortPostMessageOptions {
3130
3132
  transfer?: any[];
3131
3133
  }
3134
+ export interface SyncKvStorage {
3135
+ get<T = unknown>(key: string): T | undefined;
3136
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3137
+ put<T>(key: string, value: T): void;
3138
+ delete(key: string): boolean;
3139
+ }
3140
+ export interface SyncKvListOptions {
3141
+ start?: string;
3142
+ startAfter?: string;
3143
+ end?: string;
3144
+ prefix?: string;
3145
+ reverse?: boolean;
3146
+ limit?: number;
3147
+ }
3132
3148
  export type AiImageClassificationInput = {
3133
3149
  image: number[];
3134
3150
  };
package/oldest/index.d.ts CHANGED
@@ -491,7 +491,7 @@ interface DurableObjectId {
491
491
  equals(other: DurableObjectId): boolean;
492
492
  readonly name?: string;
493
493
  }
494
- interface DurableObjectNamespace<
494
+ declare abstract class DurableObjectNamespace<
495
495
  T extends Rpc.DurableObjectBranded | undefined = undefined,
496
496
  > {
497
497
  newUniqueId(
@@ -530,6 +530,7 @@ interface DurableObjectNamespaceGetDurableObjectOptions {
530
530
  }
531
531
  interface DurableObjectState {
532
532
  waitUntil(promise: Promise<any>): void;
533
+ props: any;
533
534
  readonly id: DurableObjectId;
534
535
  readonly storage: DurableObjectStorage;
535
536
  container?: Container;
@@ -610,6 +611,7 @@ interface DurableObjectStorage {
610
611
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
611
612
  sync(): Promise<void>;
612
613
  sql: SqlStorage;
614
+ kv: SyncKvStorage;
613
615
  transactionSync<T>(closure: () => T): T;
614
616
  getCurrentBookmark(): Promise<string>;
615
617
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3033,6 +3035,20 @@ interface MessagePort extends EventTarget {
3033
3035
  interface MessagePortPostMessageOptions {
3034
3036
  transfer?: any[];
3035
3037
  }
3038
+ interface SyncKvStorage {
3039
+ get<T = unknown>(key: string): T | undefined;
3040
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3041
+ put<T>(key: string, value: T): void;
3042
+ delete(key: string): boolean;
3043
+ }
3044
+ interface SyncKvListOptions {
3045
+ start?: string;
3046
+ startAfter?: string;
3047
+ end?: string;
3048
+ prefix?: string;
3049
+ reverse?: boolean;
3050
+ limit?: number;
3051
+ }
3036
3052
  type AiImageClassificationInput = {
3037
3053
  image: number[];
3038
3054
  };
package/oldest/index.ts CHANGED
@@ -496,7 +496,7 @@ export interface DurableObjectId {
496
496
  equals(other: DurableObjectId): boolean;
497
497
  readonly name?: string;
498
498
  }
499
- export interface DurableObjectNamespace<
499
+ export declare abstract class DurableObjectNamespace<
500
500
  T extends Rpc.DurableObjectBranded | undefined = undefined,
501
501
  > {
502
502
  newUniqueId(
@@ -535,6 +535,7 @@ export interface DurableObjectNamespaceGetDurableObjectOptions {
535
535
  }
536
536
  export interface DurableObjectState {
537
537
  waitUntil(promise: Promise<any>): void;
538
+ props: any;
538
539
  readonly id: DurableObjectId;
539
540
  readonly storage: DurableObjectStorage;
540
541
  container?: Container;
@@ -615,6 +616,7 @@ export interface DurableObjectStorage {
615
616
  deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
616
617
  sync(): Promise<void>;
617
618
  sql: SqlStorage;
619
+ kv: SyncKvStorage;
618
620
  transactionSync<T>(closure: () => T): T;
619
621
  getCurrentBookmark(): Promise<string>;
620
622
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
@@ -3044,6 +3046,20 @@ export interface MessagePort extends EventTarget {
3044
3046
  export interface MessagePortPostMessageOptions {
3045
3047
  transfer?: any[];
3046
3048
  }
3049
+ export interface SyncKvStorage {
3050
+ get<T = unknown>(key: string): T | undefined;
3051
+ list<T = unknown>(options?: SyncKvListOptions): Iterable<[string, T]>;
3052
+ put<T>(key: string, value: T): void;
3053
+ delete(key: string): boolean;
3054
+ }
3055
+ export interface SyncKvListOptions {
3056
+ start?: string;
3057
+ startAfter?: string;
3058
+ end?: string;
3059
+ prefix?: string;
3060
+ reverse?: boolean;
3061
+ limit?: number;
3062
+ }
3047
3063
  export type AiImageClassificationInput = {
3048
3064
  image: number[];
3049
3065
  };
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "4.20250903.0"
10
+ "version": "4.20250904.0"
11
11
  }