From 40315fb0b2565884c4de054c715ac576242f1208 Mon Sep 17 00:00:00 2001 From: Kirill Timofeev Date: Fri, 19 Jun 2026 15:06:50 +0000 Subject: [PATCH] Add us to DurableObjectJurisdiction type --- src/workerd/api/actor.h | 4 ++-- types/generated-snapshot/experimental/index.d.ts | 6 +++++- types/generated-snapshot/experimental/index.ts | 10 +++++++++- types/generated-snapshot/latest/index.d.ts | 4 +++- types/generated-snapshot/latest/index.ts | 8 +++++++- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/workerd/api/actor.h b/src/workerd/api/actor.h index 87161bc7504..d2a22fdf002 100644 --- a/src/workerd/api/actor.h +++ b/src/workerd/api/actor.h @@ -192,8 +192,8 @@ class DurableObjectNamespace: public jsg::Object { JSG_STRUCT(jurisdiction); - JSG_STRUCT_TS_DEFINE(type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"); - // Possible values from https://developers.cloudflare.com/workers/runtime-apis/durable-objects/#restricting-objects-to-a-jurisdiction + JSG_STRUCT_TS_DEFINE(type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high" | "us"); + // Possible values from https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction JSG_STRUCT_TS_OVERRIDE({ jurisdiction?: DurableObjectJurisdiction; }); diff --git a/types/generated-snapshot/experimental/index.d.ts b/types/generated-snapshot/experimental/index.d.ts index 19fdbc03bb5..73f16f4d893 100755 --- a/types/generated-snapshot/experimental/index.d.ts +++ b/types/generated-snapshot/experimental/index.d.ts @@ -492,6 +492,7 @@ interface ExecutionContext { passThroughOnException(): void; readonly exports: Cloudflare.Exports; readonly props: Props; + restore(params: any): Promise; cache?: CacheContext; readonly version?: { readonly metadata?: { @@ -667,7 +668,7 @@ declare abstract class DurableObjectNamespace< jurisdiction: DurableObjectJurisdiction, ): DurableObjectNamespace; } -type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; +type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high" | "us"; interface DurableObjectNamespaceNewUniqueIdOptions { jurisdiction?: DurableObjectJurisdiction; } @@ -678,6 +679,8 @@ type DurableObjectLocationHint = | "weur" | "eeur" | "apac" + | "apac-ne" + | "apac-se" | "oc" | "afr" | "me"; @@ -699,6 +702,7 @@ interface DurableObjectState { waitUntil(promise: Promise): void; readonly exports: Cloudflare.Exports; readonly props: Props; + restore(params: any): Promise; readonly id: DurableObjectId; readonly storage: DurableObjectStorage; container?: Container; diff --git a/types/generated-snapshot/experimental/index.ts b/types/generated-snapshot/experimental/index.ts index 3b99f046bf2..c4ff4d2599e 100755 --- a/types/generated-snapshot/experimental/index.ts +++ b/types/generated-snapshot/experimental/index.ts @@ -494,6 +494,7 @@ export interface ExecutionContext { passThroughOnException(): void; readonly exports: Cloudflare.Exports; readonly props: Props; + restore(params: any): Promise; cache?: CacheContext; readonly version?: { readonly metadata?: { @@ -669,7 +670,11 @@ export declare abstract class DurableObjectNamespace< jurisdiction: DurableObjectJurisdiction, ): DurableObjectNamespace; } -export type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; +export type DurableObjectJurisdiction = + | "eu" + | "fedramp" + | "fedramp-high" + | "us"; export interface DurableObjectNamespaceNewUniqueIdOptions { jurisdiction?: DurableObjectJurisdiction; } @@ -680,6 +685,8 @@ export type DurableObjectLocationHint = | "weur" | "eeur" | "apac" + | "apac-ne" + | "apac-se" | "oc" | "afr" | "me"; @@ -701,6 +708,7 @@ export interface DurableObjectState { waitUntil(promise: Promise): void; readonly exports: Cloudflare.Exports; readonly props: Props; + restore(params: any): Promise; readonly id: DurableObjectId; readonly storage: DurableObjectStorage; container?: Container; diff --git a/types/generated-snapshot/latest/index.d.ts b/types/generated-snapshot/latest/index.d.ts index 9450123248b..7cb85ac92e4 100755 --- a/types/generated-snapshot/latest/index.d.ts +++ b/types/generated-snapshot/latest/index.d.ts @@ -640,7 +640,7 @@ declare abstract class DurableObjectNamespace< jurisdiction: DurableObjectJurisdiction, ): DurableObjectNamespace; } -type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; +type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high" | "us"; interface DurableObjectNamespaceNewUniqueIdOptions { jurisdiction?: DurableObjectJurisdiction; } @@ -651,6 +651,8 @@ type DurableObjectLocationHint = | "weur" | "eeur" | "apac" + | "apac-ne" + | "apac-se" | "oc" | "afr" | "me"; diff --git a/types/generated-snapshot/latest/index.ts b/types/generated-snapshot/latest/index.ts index 8495f88fddd..27d068cbfff 100755 --- a/types/generated-snapshot/latest/index.ts +++ b/types/generated-snapshot/latest/index.ts @@ -642,7 +642,11 @@ export declare abstract class DurableObjectNamespace< jurisdiction: DurableObjectJurisdiction, ): DurableObjectNamespace; } -export type DurableObjectJurisdiction = "eu" | "fedramp" | "fedramp-high"; +export type DurableObjectJurisdiction = + | "eu" + | "fedramp" + | "fedramp-high" + | "us"; export interface DurableObjectNamespaceNewUniqueIdOptions { jurisdiction?: DurableObjectJurisdiction; } @@ -653,6 +657,8 @@ export type DurableObjectLocationHint = | "weur" | "eeur" | "apac" + | "apac-ne" + | "apac-se" | "oc" | "afr" | "me";