@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/2021-11-03/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/2021-11-03/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;
|
package/2022-01-31/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,
|
|
@@ -3795,6 +3803,28 @@ interface EventSourceEventSourceInit {
|
|
|
3795
3803
|
withCredentials?: boolean;
|
|
3796
3804
|
fetcher?: Fetcher;
|
|
3797
3805
|
}
|
|
3806
|
+
interface ExecOutput {
|
|
3807
|
+
readonly stdout: ArrayBuffer;
|
|
3808
|
+
readonly stderr: ArrayBuffer;
|
|
3809
|
+
readonly exitCode: number;
|
|
3810
|
+
}
|
|
3811
|
+
interface ContainerExecOptions {
|
|
3812
|
+
cwd?: string;
|
|
3813
|
+
env?: Record<string, string>;
|
|
3814
|
+
user?: string;
|
|
3815
|
+
stdin?: ReadableStream | "pipe";
|
|
3816
|
+
stdout?: "pipe" | "ignore";
|
|
3817
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3818
|
+
}
|
|
3819
|
+
interface ExecProcess {
|
|
3820
|
+
readonly stdin: WritableStream | null;
|
|
3821
|
+
readonly stdout: ReadableStream | null;
|
|
3822
|
+
readonly stderr: ReadableStream | null;
|
|
3823
|
+
readonly pid: number;
|
|
3824
|
+
readonly exitCode: Promise<number>;
|
|
3825
|
+
output(): Promise<ExecOutput>;
|
|
3826
|
+
kill(signal?: number): void;
|
|
3827
|
+
}
|
|
3798
3828
|
interface Container {
|
|
3799
3829
|
get running(): boolean;
|
|
3800
3830
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3812,6 +3842,7 @@ interface Container {
|
|
|
3812
3842
|
options: ContainerSnapshotOptions,
|
|
3813
3843
|
): Promise<ContainerSnapshot>;
|
|
3814
3844
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3845
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3815
3846
|
}
|
|
3816
3847
|
interface ContainerDirectorySnapshot {
|
|
3817
3848
|
id: string;
|
|
@@ -3986,11 +4017,62 @@ interface Tracing {
|
|
|
3986
4017
|
callback: (span: Span, ...args: A) => T,
|
|
3987
4018
|
...args: A
|
|
3988
4019
|
): T;
|
|
4020
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4021
|
+
name: string,
|
|
4022
|
+
callback: (span: Span, ...args: A) => T,
|
|
4023
|
+
...args: A
|
|
4024
|
+
): T;
|
|
3989
4025
|
Span: typeof Span;
|
|
3990
4026
|
}
|
|
3991
4027
|
declare abstract class Span {
|
|
3992
4028
|
get isTraced(): boolean;
|
|
3993
4029
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4030
|
+
end(): void;
|
|
4031
|
+
}
|
|
4032
|
+
/**
|
|
4033
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4034
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4035
|
+
*
|
|
4036
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4037
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4038
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4039
|
+
*/
|
|
4040
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4041
|
+
/** The user's email address, if available from the identity provider. */
|
|
4042
|
+
email?: string;
|
|
4043
|
+
/** The user's display name. */
|
|
4044
|
+
name?: string;
|
|
4045
|
+
/** The user's unique identifier. */
|
|
4046
|
+
user_uuid?: string;
|
|
4047
|
+
/** The Cloudflare account ID. */
|
|
4048
|
+
account_id?: string;
|
|
4049
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4050
|
+
iat?: number;
|
|
4051
|
+
/** The user's IP address at authentication time. */
|
|
4052
|
+
ip?: string;
|
|
4053
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4054
|
+
amr?: string[];
|
|
4055
|
+
/** Identity provider information. */
|
|
4056
|
+
idp?: {
|
|
4057
|
+
id: string;
|
|
4058
|
+
type: string;
|
|
4059
|
+
};
|
|
4060
|
+
/** Geographic information about where the user authenticated. */
|
|
4061
|
+
geo?: {
|
|
4062
|
+
country: string;
|
|
4063
|
+
};
|
|
4064
|
+
/** Group memberships from the identity provider. */
|
|
4065
|
+
groups?: Array<{
|
|
4066
|
+
id: string;
|
|
4067
|
+
name: string;
|
|
4068
|
+
email?: string;
|
|
4069
|
+
}>;
|
|
4070
|
+
/** Device posture check results, keyed by check ID. */
|
|
4071
|
+
devicePosture?: Record<string, unknown>;
|
|
4072
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4073
|
+
is_warp?: boolean;
|
|
4074
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4075
|
+
is_gateway?: boolean;
|
|
3994
4076
|
}
|
|
3995
4077
|
// ============================================================================
|
|
3996
4078
|
// Agent Memory
|
|
@@ -12216,6 +12298,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12216
12298
|
cacheReserveMinimumFileSize?: number;
|
|
12217
12299
|
scrapeShield?: boolean;
|
|
12218
12300
|
apps?: boolean;
|
|
12301
|
+
/**
|
|
12302
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12303
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12304
|
+
*
|
|
12305
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12306
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12307
|
+
*
|
|
12308
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12309
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12310
|
+
*/
|
|
12311
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12219
12312
|
image?: RequestInitCfPropertiesImage;
|
|
12220
12313
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12221
12314
|
mirage?: boolean;
|
|
@@ -15503,7 +15596,8 @@ declare namespace TailStream {
|
|
|
15503
15596
|
| "loadShed"
|
|
15504
15597
|
| "responseStreamDisconnected"
|
|
15505
15598
|
| "scriptNotFound"
|
|
15506
|
-
| "internalError"
|
|
15599
|
+
| "internalError"
|
|
15600
|
+
| "exceededWallTime";
|
|
15507
15601
|
interface ScriptVersion {
|
|
15508
15602
|
readonly id: string;
|
|
15509
15603
|
readonly tag?: string;
|
package/2022-01-31/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,
|
|
@@ -3801,6 +3809,28 @@ export interface EventSourceEventSourceInit {
|
|
|
3801
3809
|
withCredentials?: boolean;
|
|
3802
3810
|
fetcher?: Fetcher;
|
|
3803
3811
|
}
|
|
3812
|
+
export interface ExecOutput {
|
|
3813
|
+
readonly stdout: ArrayBuffer;
|
|
3814
|
+
readonly stderr: ArrayBuffer;
|
|
3815
|
+
readonly exitCode: number;
|
|
3816
|
+
}
|
|
3817
|
+
export interface ContainerExecOptions {
|
|
3818
|
+
cwd?: string;
|
|
3819
|
+
env?: Record<string, string>;
|
|
3820
|
+
user?: string;
|
|
3821
|
+
stdin?: ReadableStream | "pipe";
|
|
3822
|
+
stdout?: "pipe" | "ignore";
|
|
3823
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3824
|
+
}
|
|
3825
|
+
export interface ExecProcess {
|
|
3826
|
+
readonly stdin: WritableStream | null;
|
|
3827
|
+
readonly stdout: ReadableStream | null;
|
|
3828
|
+
readonly stderr: ReadableStream | null;
|
|
3829
|
+
readonly pid: number;
|
|
3830
|
+
readonly exitCode: Promise<number>;
|
|
3831
|
+
output(): Promise<ExecOutput>;
|
|
3832
|
+
kill(signal?: number): void;
|
|
3833
|
+
}
|
|
3804
3834
|
export interface Container {
|
|
3805
3835
|
get running(): boolean;
|
|
3806
3836
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3818,6 +3848,7 @@ export interface Container {
|
|
|
3818
3848
|
options: ContainerSnapshotOptions,
|
|
3819
3849
|
): Promise<ContainerSnapshot>;
|
|
3820
3850
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3851
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3821
3852
|
}
|
|
3822
3853
|
export interface ContainerDirectorySnapshot {
|
|
3823
3854
|
id: string;
|
|
@@ -3992,11 +4023,62 @@ export interface Tracing {
|
|
|
3992
4023
|
callback: (span: Span, ...args: A) => T,
|
|
3993
4024
|
...args: A
|
|
3994
4025
|
): T;
|
|
4026
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4027
|
+
name: string,
|
|
4028
|
+
callback: (span: Span, ...args: A) => T,
|
|
4029
|
+
...args: A
|
|
4030
|
+
): T;
|
|
3995
4031
|
Span: typeof Span;
|
|
3996
4032
|
}
|
|
3997
4033
|
export declare abstract class Span {
|
|
3998
4034
|
get isTraced(): boolean;
|
|
3999
4035
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4036
|
+
end(): void;
|
|
4037
|
+
}
|
|
4038
|
+
/**
|
|
4039
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4040
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4041
|
+
*
|
|
4042
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4043
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4044
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4045
|
+
*/
|
|
4046
|
+
export interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4047
|
+
/** The user's email address, if available from the identity provider. */
|
|
4048
|
+
email?: string;
|
|
4049
|
+
/** The user's display name. */
|
|
4050
|
+
name?: string;
|
|
4051
|
+
/** The user's unique identifier. */
|
|
4052
|
+
user_uuid?: string;
|
|
4053
|
+
/** The Cloudflare account ID. */
|
|
4054
|
+
account_id?: string;
|
|
4055
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4056
|
+
iat?: number;
|
|
4057
|
+
/** The user's IP address at authentication time. */
|
|
4058
|
+
ip?: string;
|
|
4059
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4060
|
+
amr?: string[];
|
|
4061
|
+
/** Identity provider information. */
|
|
4062
|
+
idp?: {
|
|
4063
|
+
id: string;
|
|
4064
|
+
type: string;
|
|
4065
|
+
};
|
|
4066
|
+
/** Geographic information about where the user authenticated. */
|
|
4067
|
+
geo?: {
|
|
4068
|
+
country: string;
|
|
4069
|
+
};
|
|
4070
|
+
/** Group memberships from the identity provider. */
|
|
4071
|
+
groups?: Array<{
|
|
4072
|
+
id: string;
|
|
4073
|
+
name: string;
|
|
4074
|
+
email?: string;
|
|
4075
|
+
}>;
|
|
4076
|
+
/** Device posture check results, keyed by check ID. */
|
|
4077
|
+
devicePosture?: Record<string, unknown>;
|
|
4078
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4079
|
+
is_warp?: boolean;
|
|
4080
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4081
|
+
is_gateway?: boolean;
|
|
4000
4082
|
}
|
|
4001
4083
|
// ============================================================================
|
|
4002
4084
|
// Agent Memory
|
|
@@ -12228,6 +12310,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12228
12310
|
cacheReserveMinimumFileSize?: number;
|
|
12229
12311
|
scrapeShield?: boolean;
|
|
12230
12312
|
apps?: boolean;
|
|
12313
|
+
/**
|
|
12314
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12315
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12316
|
+
*
|
|
12317
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12318
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12319
|
+
*
|
|
12320
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12321
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12322
|
+
*/
|
|
12323
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12231
12324
|
image?: RequestInitCfPropertiesImage;
|
|
12232
12325
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12233
12326
|
mirage?: boolean;
|
|
@@ -15464,7 +15557,8 @@ export declare namespace TailStream {
|
|
|
15464
15557
|
| "loadShed"
|
|
15465
15558
|
| "responseStreamDisconnected"
|
|
15466
15559
|
| "scriptNotFound"
|
|
15467
|
-
| "internalError"
|
|
15560
|
+
| "internalError"
|
|
15561
|
+
| "exceededWallTime";
|
|
15468
15562
|
interface ScriptVersion {
|
|
15469
15563
|
readonly id: string;
|
|
15470
15564
|
readonly tag?: string;
|