@cloudflare/workers-types 4.20260617.1 → 4.20260620.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.
- package/2021-11-03/index.d.ts +96 -2
- package/2021-11-03/index.ts +96 -2
- package/2022-01-31/index.d.ts +96 -2
- package/2022-01-31/index.ts +96 -2
- package/2022-03-21/index.d.ts +96 -2
- package/2022-03-21/index.ts +96 -2
- package/2022-08-04/index.d.ts +96 -2
- package/2022-08-04/index.ts +96 -2
- package/2022-10-31/index.d.ts +96 -2
- package/2022-10-31/index.ts +96 -2
- package/2022-11-30/index.d.ts +96 -2
- package/2022-11-30/index.ts +96 -2
- package/2023-03-01/index.d.ts +96 -2
- package/2023-03-01/index.ts +96 -2
- package/2023-07-01/index.d.ts +96 -2
- package/2023-07-01/index.ts +96 -2
- package/experimental/index.d.ts +75 -2
- package/experimental/index.ts +75 -2
- package/index.d.ts +96 -2
- package/index.ts +96 -2
- package/latest/index.d.ts +96 -2
- package/latest/index.ts +96 -2
- package/oldest/index.d.ts +96 -2
- package/oldest/index.ts +96 -2
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -492,6 +492,7 @@ interface ExecutionContext<Props = unknown> {
|
|
|
492
492
|
passThroughOnException(): void;
|
|
493
493
|
readonly exports: Cloudflare.Exports;
|
|
494
494
|
readonly props: Props;
|
|
495
|
+
restore(params: any): Promise<any>;
|
|
495
496
|
cache?: CacheContext;
|
|
496
497
|
readonly version?: {
|
|
497
498
|
readonly metadata?: {
|
|
@@ -501,7 +502,8 @@ interface ExecutionContext<Props = unknown> {
|
|
|
501
502
|
readonly key?: string;
|
|
502
503
|
readonly override?: string;
|
|
503
504
|
};
|
|
504
|
-
|
|
505
|
+
readonly access?: CloudflareAccessContext;
|
|
506
|
+
tracing: Tracing;
|
|
505
507
|
abort(reason?: any): void;
|
|
506
508
|
}
|
|
507
509
|
type ExportedHandlerFetchHandler<
|
|
@@ -604,6 +606,10 @@ interface CachePurgeOptions {
|
|
|
604
606
|
interface CacheContext {
|
|
605
607
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
606
608
|
}
|
|
609
|
+
interface CloudflareAccessContext {
|
|
610
|
+
readonly aud: string;
|
|
611
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
612
|
+
}
|
|
607
613
|
declare abstract class ColoLocalActorNamespace {
|
|
608
614
|
get(actorId: string): Fetcher;
|
|
609
615
|
}
|
|
@@ -673,6 +679,8 @@ type DurableObjectLocationHint =
|
|
|
673
679
|
| "weur"
|
|
674
680
|
| "eeur"
|
|
675
681
|
| "apac"
|
|
682
|
+
| "apac-ne"
|
|
683
|
+
| "apac-se"
|
|
676
684
|
| "oc"
|
|
677
685
|
| "afr"
|
|
678
686
|
| "me";
|
|
@@ -694,6 +702,7 @@ interface DurableObjectState<Props = unknown> {
|
|
|
694
702
|
waitUntil(promise: Promise<any>): void;
|
|
695
703
|
readonly exports: Cloudflare.Exports;
|
|
696
704
|
readonly props: Props;
|
|
705
|
+
restore(params: any): Promise<any>;
|
|
697
706
|
readonly id: DurableObjectId;
|
|
698
707
|
readonly storage: DurableObjectStorage;
|
|
699
708
|
container?: Container;
|
|
@@ -836,6 +845,7 @@ interface DurableObjectFacets {
|
|
|
836
845
|
): Fetcher<T>;
|
|
837
846
|
abort(name: string, reason: any): void;
|
|
838
847
|
delete(name: string): void;
|
|
848
|
+
clone(src: string, dst: string): void;
|
|
839
849
|
}
|
|
840
850
|
interface FacetStartupOptions<
|
|
841
851
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -4728,11 +4738,62 @@ interface Tracing {
|
|
|
4728
4738
|
callback: (span: Span, ...args: A) => T,
|
|
4729
4739
|
...args: A
|
|
4730
4740
|
): T;
|
|
4741
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4742
|
+
name: string,
|
|
4743
|
+
callback: (span: Span, ...args: A) => T,
|
|
4744
|
+
...args: A
|
|
4745
|
+
): T;
|
|
4731
4746
|
Span: typeof Span;
|
|
4732
4747
|
}
|
|
4733
4748
|
declare abstract class Span {
|
|
4734
4749
|
get isTraced(): boolean;
|
|
4735
4750
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4751
|
+
end(): void;
|
|
4752
|
+
}
|
|
4753
|
+
/**
|
|
4754
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4755
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4756
|
+
*
|
|
4757
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4758
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4759
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4760
|
+
*/
|
|
4761
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4762
|
+
/** The user's email address, if available from the identity provider. */
|
|
4763
|
+
email?: string;
|
|
4764
|
+
/** The user's display name. */
|
|
4765
|
+
name?: string;
|
|
4766
|
+
/** The user's unique identifier. */
|
|
4767
|
+
user_uuid?: string;
|
|
4768
|
+
/** The Cloudflare account ID. */
|
|
4769
|
+
account_id?: string;
|
|
4770
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4771
|
+
iat?: number;
|
|
4772
|
+
/** The user's IP address at authentication time. */
|
|
4773
|
+
ip?: string;
|
|
4774
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4775
|
+
amr?: string[];
|
|
4776
|
+
/** Identity provider information. */
|
|
4777
|
+
idp?: {
|
|
4778
|
+
id: string;
|
|
4779
|
+
type: string;
|
|
4780
|
+
};
|
|
4781
|
+
/** Geographic information about where the user authenticated. */
|
|
4782
|
+
geo?: {
|
|
4783
|
+
country: string;
|
|
4784
|
+
};
|
|
4785
|
+
/** Group memberships from the identity provider. */
|
|
4786
|
+
groups?: Array<{
|
|
4787
|
+
id: string;
|
|
4788
|
+
name: string;
|
|
4789
|
+
email?: string;
|
|
4790
|
+
}>;
|
|
4791
|
+
/** Device posture check results, keyed by check ID. */
|
|
4792
|
+
devicePosture?: Record<string, unknown>;
|
|
4793
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4794
|
+
is_warp?: boolean;
|
|
4795
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4796
|
+
is_gateway?: boolean;
|
|
4736
4797
|
}
|
|
4737
4798
|
// ============================================================================
|
|
4738
4799
|
// Agent Memory
|
|
@@ -12958,6 +13019,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12958
13019
|
cacheReserveMinimumFileSize?: number;
|
|
12959
13020
|
scrapeShield?: boolean;
|
|
12960
13021
|
apps?: boolean;
|
|
13022
|
+
/**
|
|
13023
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
13024
|
+
* converted to gRPC at the Cloudflare edge.
|
|
13025
|
+
*
|
|
13026
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
13027
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
13028
|
+
*
|
|
13029
|
+
* Provides per-request control over the same edge conversion behavior
|
|
13030
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
13031
|
+
*/
|
|
13032
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12961
13033
|
image?: RequestInitCfPropertiesImage;
|
|
12962
13034
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12963
13035
|
mirage?: boolean;
|
|
@@ -16245,7 +16317,8 @@ declare namespace TailStream {
|
|
|
16245
16317
|
| "loadShed"
|
|
16246
16318
|
| "responseStreamDisconnected"
|
|
16247
16319
|
| "scriptNotFound"
|
|
16248
|
-
| "internalError"
|
|
16320
|
+
| "internalError"
|
|
16321
|
+
| "exceededWallTime";
|
|
16249
16322
|
interface ScriptVersion {
|
|
16250
16323
|
readonly id: string;
|
|
16251
16324
|
readonly tag?: string;
|
package/experimental/index.ts
CHANGED
|
@@ -494,6 +494,7 @@ export interface ExecutionContext<Props = unknown> {
|
|
|
494
494
|
passThroughOnException(): void;
|
|
495
495
|
readonly exports: Cloudflare.Exports;
|
|
496
496
|
readonly props: Props;
|
|
497
|
+
restore(params: any): Promise<any>;
|
|
497
498
|
cache?: CacheContext;
|
|
498
499
|
readonly version?: {
|
|
499
500
|
readonly metadata?: {
|
|
@@ -503,7 +504,8 @@ export interface ExecutionContext<Props = unknown> {
|
|
|
503
504
|
readonly key?: string;
|
|
504
505
|
readonly override?: string;
|
|
505
506
|
};
|
|
506
|
-
|
|
507
|
+
readonly access?: CloudflareAccessContext;
|
|
508
|
+
tracing: Tracing;
|
|
507
509
|
abort(reason?: any): void;
|
|
508
510
|
}
|
|
509
511
|
export type ExportedHandlerFetchHandler<
|
|
@@ -606,6 +608,10 @@ export interface CachePurgeOptions {
|
|
|
606
608
|
export interface CacheContext {
|
|
607
609
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
608
610
|
}
|
|
611
|
+
export interface CloudflareAccessContext {
|
|
612
|
+
readonly aud: string;
|
|
613
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
614
|
+
}
|
|
609
615
|
export declare abstract class ColoLocalActorNamespace {
|
|
610
616
|
get(actorId: string): Fetcher;
|
|
611
617
|
}
|
|
@@ -675,6 +681,8 @@ export type DurableObjectLocationHint =
|
|
|
675
681
|
| "weur"
|
|
676
682
|
| "eeur"
|
|
677
683
|
| "apac"
|
|
684
|
+
| "apac-ne"
|
|
685
|
+
| "apac-se"
|
|
678
686
|
| "oc"
|
|
679
687
|
| "afr"
|
|
680
688
|
| "me";
|
|
@@ -696,6 +704,7 @@ export interface DurableObjectState<Props = unknown> {
|
|
|
696
704
|
waitUntil(promise: Promise<any>): void;
|
|
697
705
|
readonly exports: Cloudflare.Exports;
|
|
698
706
|
readonly props: Props;
|
|
707
|
+
restore(params: any): Promise<any>;
|
|
699
708
|
readonly id: DurableObjectId;
|
|
700
709
|
readonly storage: DurableObjectStorage;
|
|
701
710
|
container?: Container;
|
|
@@ -838,6 +847,7 @@ export interface DurableObjectFacets {
|
|
|
838
847
|
): Fetcher<T>;
|
|
839
848
|
abort(name: string, reason: any): void;
|
|
840
849
|
delete(name: string): void;
|
|
850
|
+
clone(src: string, dst: string): void;
|
|
841
851
|
}
|
|
842
852
|
export interface FacetStartupOptions<
|
|
843
853
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -4734,11 +4744,62 @@ export interface Tracing {
|
|
|
4734
4744
|
callback: (span: Span, ...args: A) => T,
|
|
4735
4745
|
...args: A
|
|
4736
4746
|
): T;
|
|
4747
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4748
|
+
name: string,
|
|
4749
|
+
callback: (span: Span, ...args: A) => T,
|
|
4750
|
+
...args: A
|
|
4751
|
+
): T;
|
|
4737
4752
|
Span: typeof Span;
|
|
4738
4753
|
}
|
|
4739
4754
|
export declare abstract class Span {
|
|
4740
4755
|
get isTraced(): boolean;
|
|
4741
4756
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4757
|
+
end(): void;
|
|
4758
|
+
}
|
|
4759
|
+
/**
|
|
4760
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4761
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4762
|
+
*
|
|
4763
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4764
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4765
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4766
|
+
*/
|
|
4767
|
+
export interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4768
|
+
/** The user's email address, if available from the identity provider. */
|
|
4769
|
+
email?: string;
|
|
4770
|
+
/** The user's display name. */
|
|
4771
|
+
name?: string;
|
|
4772
|
+
/** The user's unique identifier. */
|
|
4773
|
+
user_uuid?: string;
|
|
4774
|
+
/** The Cloudflare account ID. */
|
|
4775
|
+
account_id?: string;
|
|
4776
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4777
|
+
iat?: number;
|
|
4778
|
+
/** The user's IP address at authentication time. */
|
|
4779
|
+
ip?: string;
|
|
4780
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4781
|
+
amr?: string[];
|
|
4782
|
+
/** Identity provider information. */
|
|
4783
|
+
idp?: {
|
|
4784
|
+
id: string;
|
|
4785
|
+
type: string;
|
|
4786
|
+
};
|
|
4787
|
+
/** Geographic information about where the user authenticated. */
|
|
4788
|
+
geo?: {
|
|
4789
|
+
country: string;
|
|
4790
|
+
};
|
|
4791
|
+
/** Group memberships from the identity provider. */
|
|
4792
|
+
groups?: Array<{
|
|
4793
|
+
id: string;
|
|
4794
|
+
name: string;
|
|
4795
|
+
email?: string;
|
|
4796
|
+
}>;
|
|
4797
|
+
/** Device posture check results, keyed by check ID. */
|
|
4798
|
+
devicePosture?: Record<string, unknown>;
|
|
4799
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4800
|
+
is_warp?: boolean;
|
|
4801
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4802
|
+
is_gateway?: boolean;
|
|
4742
4803
|
}
|
|
4743
4804
|
// ============================================================================
|
|
4744
4805
|
// Agent Memory
|
|
@@ -12970,6 +13031,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12970
13031
|
cacheReserveMinimumFileSize?: number;
|
|
12971
13032
|
scrapeShield?: boolean;
|
|
12972
13033
|
apps?: boolean;
|
|
13034
|
+
/**
|
|
13035
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
13036
|
+
* converted to gRPC at the Cloudflare edge.
|
|
13037
|
+
*
|
|
13038
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
13039
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
13040
|
+
*
|
|
13041
|
+
* Provides per-request control over the same edge conversion behavior
|
|
13042
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
13043
|
+
*/
|
|
13044
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12973
13045
|
image?: RequestInitCfPropertiesImage;
|
|
12974
13046
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12975
13047
|
mirage?: boolean;
|
|
@@ -16206,7 +16278,8 @@ export declare namespace TailStream {
|
|
|
16206
16278
|
| "loadShed"
|
|
16207
16279
|
| "responseStreamDisconnected"
|
|
16208
16280
|
| "scriptNotFound"
|
|
16209
|
-
| "internalError"
|
|
16281
|
+
| "internalError"
|
|
16282
|
+
| "exceededWallTime";
|
|
16210
16283
|
interface ScriptVersion {
|
|
16211
16284
|
readonly id: string;
|
|
16212
16285
|
readonly tag?: string;
|
package/index.d.ts
CHANGED
|
@@ -469,7 +469,8 @@ interface ExecutionContext<Props = unknown> {
|
|
|
469
469
|
passThroughOnException(): void;
|
|
470
470
|
readonly props: Props;
|
|
471
471
|
cache?: CacheContext;
|
|
472
|
-
|
|
472
|
+
readonly access?: CloudflareAccessContext;
|
|
473
|
+
tracing: Tracing;
|
|
473
474
|
}
|
|
474
475
|
type ExportedHandlerFetchHandler<
|
|
475
476
|
Env = unknown,
|
|
@@ -562,6 +563,10 @@ interface CachePurgeOptions {
|
|
|
562
563
|
interface CacheContext {
|
|
563
564
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
564
565
|
}
|
|
566
|
+
interface CloudflareAccessContext {
|
|
567
|
+
readonly aud: string;
|
|
568
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
569
|
+
}
|
|
565
570
|
declare abstract class ColoLocalActorNamespace {
|
|
566
571
|
get(actorId: string): Fetcher;
|
|
567
572
|
}
|
|
@@ -627,6 +632,8 @@ type DurableObjectLocationHint =
|
|
|
627
632
|
| "weur"
|
|
628
633
|
| "eeur"
|
|
629
634
|
| "apac"
|
|
635
|
+
| "apac-ne"
|
|
636
|
+
| "apac-se"
|
|
630
637
|
| "oc"
|
|
631
638
|
| "afr"
|
|
632
639
|
| "me";
|
|
@@ -768,6 +775,7 @@ interface DurableObjectFacets {
|
|
|
768
775
|
): Fetcher<T>;
|
|
769
776
|
abort(name: string, reason: any): void;
|
|
770
777
|
delete(name: string): void;
|
|
778
|
+
clone(src: string, dst: string): void;
|
|
771
779
|
}
|
|
772
780
|
interface FacetStartupOptions<
|
|
773
781
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3728,6 +3736,28 @@ interface EventSourceEventSourceInit {
|
|
|
3728
3736
|
withCredentials?: boolean;
|
|
3729
3737
|
fetcher?: Fetcher;
|
|
3730
3738
|
}
|
|
3739
|
+
interface ExecOutput {
|
|
3740
|
+
readonly stdout: ArrayBuffer;
|
|
3741
|
+
readonly stderr: ArrayBuffer;
|
|
3742
|
+
readonly exitCode: number;
|
|
3743
|
+
}
|
|
3744
|
+
interface ContainerExecOptions {
|
|
3745
|
+
cwd?: string;
|
|
3746
|
+
env?: Record<string, string>;
|
|
3747
|
+
user?: string;
|
|
3748
|
+
stdin?: ReadableStream | "pipe";
|
|
3749
|
+
stdout?: "pipe" | "ignore";
|
|
3750
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3751
|
+
}
|
|
3752
|
+
interface ExecProcess {
|
|
3753
|
+
readonly stdin: WritableStream | null;
|
|
3754
|
+
readonly stdout: ReadableStream | null;
|
|
3755
|
+
readonly stderr: ReadableStream | null;
|
|
3756
|
+
readonly pid: number;
|
|
3757
|
+
readonly exitCode: Promise<number>;
|
|
3758
|
+
output(): Promise<ExecOutput>;
|
|
3759
|
+
kill(signal?: number): void;
|
|
3760
|
+
}
|
|
3731
3761
|
interface Container {
|
|
3732
3762
|
get running(): boolean;
|
|
3733
3763
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3745,6 +3775,7 @@ interface Container {
|
|
|
3745
3775
|
options: ContainerSnapshotOptions,
|
|
3746
3776
|
): Promise<ContainerSnapshot>;
|
|
3747
3777
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3778
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3748
3779
|
}
|
|
3749
3780
|
interface ContainerDirectorySnapshot {
|
|
3750
3781
|
id: string;
|
|
@@ -3919,11 +3950,62 @@ interface Tracing {
|
|
|
3919
3950
|
callback: (span: Span, ...args: A) => T,
|
|
3920
3951
|
...args: A
|
|
3921
3952
|
): T;
|
|
3953
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
3954
|
+
name: string,
|
|
3955
|
+
callback: (span: Span, ...args: A) => T,
|
|
3956
|
+
...args: A
|
|
3957
|
+
): T;
|
|
3922
3958
|
Span: typeof Span;
|
|
3923
3959
|
}
|
|
3924
3960
|
declare abstract class Span {
|
|
3925
3961
|
get isTraced(): boolean;
|
|
3926
3962
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
3963
|
+
end(): void;
|
|
3964
|
+
}
|
|
3965
|
+
/**
|
|
3966
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
3967
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
3968
|
+
*
|
|
3969
|
+
* The exact structure of the returned object depends on the identity provider
|
|
3970
|
+
* configuration for the Access application. The fields below represent commonly
|
|
3971
|
+
* available properties, but additional provider-specific fields may be present.
|
|
3972
|
+
*/
|
|
3973
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
3974
|
+
/** The user's email address, if available from the identity provider. */
|
|
3975
|
+
email?: string;
|
|
3976
|
+
/** The user's display name. */
|
|
3977
|
+
name?: string;
|
|
3978
|
+
/** The user's unique identifier. */
|
|
3979
|
+
user_uuid?: string;
|
|
3980
|
+
/** The Cloudflare account ID. */
|
|
3981
|
+
account_id?: string;
|
|
3982
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
3983
|
+
iat?: number;
|
|
3984
|
+
/** The user's IP address at authentication time. */
|
|
3985
|
+
ip?: string;
|
|
3986
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
3987
|
+
amr?: string[];
|
|
3988
|
+
/** Identity provider information. */
|
|
3989
|
+
idp?: {
|
|
3990
|
+
id: string;
|
|
3991
|
+
type: string;
|
|
3992
|
+
};
|
|
3993
|
+
/** Geographic information about where the user authenticated. */
|
|
3994
|
+
geo?: {
|
|
3995
|
+
country: string;
|
|
3996
|
+
};
|
|
3997
|
+
/** Group memberships from the identity provider. */
|
|
3998
|
+
groups?: Array<{
|
|
3999
|
+
id: string;
|
|
4000
|
+
name: string;
|
|
4001
|
+
email?: string;
|
|
4002
|
+
}>;
|
|
4003
|
+
/** Device posture check results, keyed by check ID. */
|
|
4004
|
+
devicePosture?: Record<string, unknown>;
|
|
4005
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4006
|
+
is_warp?: boolean;
|
|
4007
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4008
|
+
is_gateway?: boolean;
|
|
3927
4009
|
}
|
|
3928
4010
|
// ============================================================================
|
|
3929
4011
|
// Agent Memory
|
|
@@ -12149,6 +12231,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12149
12231
|
cacheReserveMinimumFileSize?: number;
|
|
12150
12232
|
scrapeShield?: boolean;
|
|
12151
12233
|
apps?: boolean;
|
|
12234
|
+
/**
|
|
12235
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12236
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12237
|
+
*
|
|
12238
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12239
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12240
|
+
*
|
|
12241
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12242
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12243
|
+
*/
|
|
12244
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12152
12245
|
image?: RequestInitCfPropertiesImage;
|
|
12153
12246
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12154
12247
|
mirage?: boolean;
|
|
@@ -15436,7 +15529,8 @@ declare namespace TailStream {
|
|
|
15436
15529
|
| "loadShed"
|
|
15437
15530
|
| "responseStreamDisconnected"
|
|
15438
15531
|
| "scriptNotFound"
|
|
15439
|
-
| "internalError"
|
|
15532
|
+
| "internalError"
|
|
15533
|
+
| "exceededWallTime";
|
|
15440
15534
|
interface ScriptVersion {
|
|
15441
15535
|
readonly id: string;
|
|
15442
15536
|
readonly tag?: string;
|
package/index.ts
CHANGED
|
@@ -471,7 +471,8 @@ export interface ExecutionContext<Props = unknown> {
|
|
|
471
471
|
passThroughOnException(): void;
|
|
472
472
|
readonly props: Props;
|
|
473
473
|
cache?: CacheContext;
|
|
474
|
-
|
|
474
|
+
readonly access?: CloudflareAccessContext;
|
|
475
|
+
tracing: Tracing;
|
|
475
476
|
}
|
|
476
477
|
export type ExportedHandlerFetchHandler<
|
|
477
478
|
Env = unknown,
|
|
@@ -564,6 +565,10 @@ export interface CachePurgeOptions {
|
|
|
564
565
|
export interface CacheContext {
|
|
565
566
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
566
567
|
}
|
|
568
|
+
export interface CloudflareAccessContext {
|
|
569
|
+
readonly aud: string;
|
|
570
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
571
|
+
}
|
|
567
572
|
export declare abstract class ColoLocalActorNamespace {
|
|
568
573
|
get(actorId: string): Fetcher;
|
|
569
574
|
}
|
|
@@ -629,6 +634,8 @@ export type DurableObjectLocationHint =
|
|
|
629
634
|
| "weur"
|
|
630
635
|
| "eeur"
|
|
631
636
|
| "apac"
|
|
637
|
+
| "apac-ne"
|
|
638
|
+
| "apac-se"
|
|
632
639
|
| "oc"
|
|
633
640
|
| "afr"
|
|
634
641
|
| "me";
|
|
@@ -770,6 +777,7 @@ export interface DurableObjectFacets {
|
|
|
770
777
|
): Fetcher<T>;
|
|
771
778
|
abort(name: string, reason: any): void;
|
|
772
779
|
delete(name: string): void;
|
|
780
|
+
clone(src: string, dst: string): void;
|
|
773
781
|
}
|
|
774
782
|
export interface FacetStartupOptions<
|
|
775
783
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3734,6 +3742,28 @@ export interface EventSourceEventSourceInit {
|
|
|
3734
3742
|
withCredentials?: boolean;
|
|
3735
3743
|
fetcher?: Fetcher;
|
|
3736
3744
|
}
|
|
3745
|
+
export interface ExecOutput {
|
|
3746
|
+
readonly stdout: ArrayBuffer;
|
|
3747
|
+
readonly stderr: ArrayBuffer;
|
|
3748
|
+
readonly exitCode: number;
|
|
3749
|
+
}
|
|
3750
|
+
export interface ContainerExecOptions {
|
|
3751
|
+
cwd?: string;
|
|
3752
|
+
env?: Record<string, string>;
|
|
3753
|
+
user?: string;
|
|
3754
|
+
stdin?: ReadableStream | "pipe";
|
|
3755
|
+
stdout?: "pipe" | "ignore";
|
|
3756
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3757
|
+
}
|
|
3758
|
+
export interface ExecProcess {
|
|
3759
|
+
readonly stdin: WritableStream | null;
|
|
3760
|
+
readonly stdout: ReadableStream | null;
|
|
3761
|
+
readonly stderr: ReadableStream | null;
|
|
3762
|
+
readonly pid: number;
|
|
3763
|
+
readonly exitCode: Promise<number>;
|
|
3764
|
+
output(): Promise<ExecOutput>;
|
|
3765
|
+
kill(signal?: number): void;
|
|
3766
|
+
}
|
|
3737
3767
|
export interface Container {
|
|
3738
3768
|
get running(): boolean;
|
|
3739
3769
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3751,6 +3781,7 @@ export interface Container {
|
|
|
3751
3781
|
options: ContainerSnapshotOptions,
|
|
3752
3782
|
): Promise<ContainerSnapshot>;
|
|
3753
3783
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3784
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3754
3785
|
}
|
|
3755
3786
|
export interface ContainerDirectorySnapshot {
|
|
3756
3787
|
id: string;
|
|
@@ -3925,11 +3956,62 @@ export interface Tracing {
|
|
|
3925
3956
|
callback: (span: Span, ...args: A) => T,
|
|
3926
3957
|
...args: A
|
|
3927
3958
|
): T;
|
|
3959
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
3960
|
+
name: string,
|
|
3961
|
+
callback: (span: Span, ...args: A) => T,
|
|
3962
|
+
...args: A
|
|
3963
|
+
): T;
|
|
3928
3964
|
Span: typeof Span;
|
|
3929
3965
|
}
|
|
3930
3966
|
export declare abstract class Span {
|
|
3931
3967
|
get isTraced(): boolean;
|
|
3932
3968
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
3969
|
+
end(): void;
|
|
3970
|
+
}
|
|
3971
|
+
/**
|
|
3972
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
3973
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
3974
|
+
*
|
|
3975
|
+
* The exact structure of the returned object depends on the identity provider
|
|
3976
|
+
* configuration for the Access application. The fields below represent commonly
|
|
3977
|
+
* available properties, but additional provider-specific fields may be present.
|
|
3978
|
+
*/
|
|
3979
|
+
export interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
3980
|
+
/** The user's email address, if available from the identity provider. */
|
|
3981
|
+
email?: string;
|
|
3982
|
+
/** The user's display name. */
|
|
3983
|
+
name?: string;
|
|
3984
|
+
/** The user's unique identifier. */
|
|
3985
|
+
user_uuid?: string;
|
|
3986
|
+
/** The Cloudflare account ID. */
|
|
3987
|
+
account_id?: string;
|
|
3988
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
3989
|
+
iat?: number;
|
|
3990
|
+
/** The user's IP address at authentication time. */
|
|
3991
|
+
ip?: string;
|
|
3992
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
3993
|
+
amr?: string[];
|
|
3994
|
+
/** Identity provider information. */
|
|
3995
|
+
idp?: {
|
|
3996
|
+
id: string;
|
|
3997
|
+
type: string;
|
|
3998
|
+
};
|
|
3999
|
+
/** Geographic information about where the user authenticated. */
|
|
4000
|
+
geo?: {
|
|
4001
|
+
country: string;
|
|
4002
|
+
};
|
|
4003
|
+
/** Group memberships from the identity provider. */
|
|
4004
|
+
groups?: Array<{
|
|
4005
|
+
id: string;
|
|
4006
|
+
name: string;
|
|
4007
|
+
email?: string;
|
|
4008
|
+
}>;
|
|
4009
|
+
/** Device posture check results, keyed by check ID. */
|
|
4010
|
+
devicePosture?: Record<string, unknown>;
|
|
4011
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4012
|
+
is_warp?: boolean;
|
|
4013
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4014
|
+
is_gateway?: boolean;
|
|
3933
4015
|
}
|
|
3934
4016
|
// ============================================================================
|
|
3935
4017
|
// Agent Memory
|
|
@@ -12161,6 +12243,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12161
12243
|
cacheReserveMinimumFileSize?: number;
|
|
12162
12244
|
scrapeShield?: boolean;
|
|
12163
12245
|
apps?: boolean;
|
|
12246
|
+
/**
|
|
12247
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12248
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12249
|
+
*
|
|
12250
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12251
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12252
|
+
*
|
|
12253
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12254
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12255
|
+
*/
|
|
12256
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12164
12257
|
image?: RequestInitCfPropertiesImage;
|
|
12165
12258
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12166
12259
|
mirage?: boolean;
|
|
@@ -15397,7 +15490,8 @@ export declare namespace TailStream {
|
|
|
15397
15490
|
| "loadShed"
|
|
15398
15491
|
| "responseStreamDisconnected"
|
|
15399
15492
|
| "scriptNotFound"
|
|
15400
|
-
| "internalError"
|
|
15493
|
+
| "internalError"
|
|
15494
|
+
| "exceededWallTime";
|
|
15401
15495
|
interface ScriptVersion {
|
|
15402
15496
|
readonly id: string;
|
|
15403
15497
|
readonly tag?: string;
|