@cloudflare/workers-types 4.20260423.1 → 4.20260425.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.
@@ -699,6 +699,7 @@ interface DurableObjectState<Props = unknown> {
699
699
  container?: Container;
700
700
  facets: DurableObjectFacets;
701
701
  version?: DurableObjectStateVersion;
702
+ readonly primaryStub?: DurableObjectStub;
702
703
  blockConcurrencyWhile<T>(callback: () => Promise<T>): Promise<T>;
703
704
  acceptWebSocket(ws: WebSocket, tags?: string[]): void;
704
705
  getWebSockets(tag?: string): WebSocket[];
@@ -709,6 +710,9 @@ interface DurableObjectState<Props = unknown> {
709
710
  getHibernatableWebSocketEventTimeout(): number | null;
710
711
  getTags(ws: WebSocket): string[];
711
712
  abort(reason?: string): void;
713
+ configureReadReplication(
714
+ options: DurableObjectReadReplicationOptions,
715
+ ): Promise<void>;
712
716
  }
713
717
  interface DurableObjectTransaction {
714
718
  get<T = unknown>(
@@ -782,12 +786,12 @@ interface DurableObjectStorage {
782
786
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
783
787
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
784
788
  waitForBookmark(bookmark: string): Promise<void>;
789
+ /** @deprecated Use `ctx.primaryStub` instead. */
785
790
  readonly primary?: DurableObjectStub;
791
+ /** @deprecated Use `ctx.configureReadReplication()` instead. */
786
792
  ensureReplicas(): void;
793
+ /** @deprecated Use `ctx.configureReadReplication()` instead. */
787
794
  disableReplicas(): void;
788
- configureReadReplication(
789
- options: DurableObjectReadReplicationOptions,
790
- ): Promise<void>;
791
795
  }
792
796
  interface DurableObjectReadReplicationOptions {
793
797
  mode: "auto" | "disabled";
@@ -701,6 +701,7 @@ export interface DurableObjectState<Props = unknown> {
701
701
  container?: Container;
702
702
  facets: DurableObjectFacets;
703
703
  version?: DurableObjectStateVersion;
704
+ readonly primaryStub?: DurableObjectStub;
704
705
  blockConcurrencyWhile<T>(callback: () => Promise<T>): Promise<T>;
705
706
  acceptWebSocket(ws: WebSocket, tags?: string[]): void;
706
707
  getWebSockets(tag?: string): WebSocket[];
@@ -711,6 +712,9 @@ export interface DurableObjectState<Props = unknown> {
711
712
  getHibernatableWebSocketEventTimeout(): number | null;
712
713
  getTags(ws: WebSocket): string[];
713
714
  abort(reason?: string): void;
715
+ configureReadReplication(
716
+ options: DurableObjectReadReplicationOptions,
717
+ ): Promise<void>;
714
718
  }
715
719
  export interface DurableObjectTransaction {
716
720
  get<T = unknown>(
@@ -784,12 +788,12 @@ export interface DurableObjectStorage {
784
788
  getBookmarkForTime(timestamp: number | Date): Promise<string>;
785
789
  onNextSessionRestoreBookmark(bookmark: string): Promise<string>;
786
790
  waitForBookmark(bookmark: string): Promise<void>;
791
+ /** @deprecated Use `ctx.primaryStub` instead. */
787
792
  readonly primary?: DurableObjectStub;
793
+ /** @deprecated Use `ctx.configureReadReplication()` instead. */
788
794
  ensureReplicas(): void;
795
+ /** @deprecated Use `ctx.configureReadReplication()` instead. */
789
796
  disableReplicas(): void;
790
- configureReadReplication(
791
- options: DurableObjectReadReplicationOptions,
792
- ): Promise<void>;
793
797
  }
794
798
  export interface DurableObjectReadReplicationOptions {
795
799
  mode: "auto" | "disabled";
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.20260423.1"
10
+ "version": "4.20260425.1"
11
11
  }