@cloudflare/workers-types 4.20260617.1 → 4.20260619.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/2022-10-31/index.d.ts
CHANGED
|
@@ -472,7 +472,8 @@ interface ExecutionContext<Props = unknown> {
|
|
|
472
472
|
passThroughOnException(): void;
|
|
473
473
|
readonly props: Props;
|
|
474
474
|
cache?: CacheContext;
|
|
475
|
-
|
|
475
|
+
readonly access?: CloudflareAccessContext;
|
|
476
|
+
tracing: Tracing;
|
|
476
477
|
}
|
|
477
478
|
type ExportedHandlerFetchHandler<
|
|
478
479
|
Env = unknown,
|
|
@@ -571,6 +572,10 @@ interface CachePurgeOptions {
|
|
|
571
572
|
interface CacheContext {
|
|
572
573
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
573
574
|
}
|
|
575
|
+
interface CloudflareAccessContext {
|
|
576
|
+
readonly aud: string;
|
|
577
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
578
|
+
}
|
|
574
579
|
declare abstract class ColoLocalActorNamespace {
|
|
575
580
|
get(actorId: string): Fetcher;
|
|
576
581
|
}
|
|
@@ -636,6 +641,8 @@ type DurableObjectLocationHint =
|
|
|
636
641
|
| "weur"
|
|
637
642
|
| "eeur"
|
|
638
643
|
| "apac"
|
|
644
|
+
| "apac-ne"
|
|
645
|
+
| "apac-se"
|
|
639
646
|
| "oc"
|
|
640
647
|
| "afr"
|
|
641
648
|
| "me";
|
|
@@ -777,6 +784,7 @@ interface DurableObjectFacets {
|
|
|
777
784
|
): Fetcher<T>;
|
|
778
785
|
abort(name: string, reason: any): void;
|
|
779
786
|
delete(name: string): void;
|
|
787
|
+
clone(src: string, dst: string): void;
|
|
780
788
|
}
|
|
781
789
|
interface FacetStartupOptions<
|
|
782
790
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3825,6 +3833,28 @@ interface EventSourceEventSourceInit {
|
|
|
3825
3833
|
withCredentials?: boolean;
|
|
3826
3834
|
fetcher?: Fetcher;
|
|
3827
3835
|
}
|
|
3836
|
+
interface ExecOutput {
|
|
3837
|
+
readonly stdout: ArrayBuffer;
|
|
3838
|
+
readonly stderr: ArrayBuffer;
|
|
3839
|
+
readonly exitCode: number;
|
|
3840
|
+
}
|
|
3841
|
+
interface ContainerExecOptions {
|
|
3842
|
+
cwd?: string;
|
|
3843
|
+
env?: Record<string, string>;
|
|
3844
|
+
user?: string;
|
|
3845
|
+
stdin?: ReadableStream | "pipe";
|
|
3846
|
+
stdout?: "pipe" | "ignore";
|
|
3847
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3848
|
+
}
|
|
3849
|
+
interface ExecProcess {
|
|
3850
|
+
readonly stdin: WritableStream | null;
|
|
3851
|
+
readonly stdout: ReadableStream | null;
|
|
3852
|
+
readonly stderr: ReadableStream | null;
|
|
3853
|
+
readonly pid: number;
|
|
3854
|
+
readonly exitCode: Promise<number>;
|
|
3855
|
+
output(): Promise<ExecOutput>;
|
|
3856
|
+
kill(signal?: number): void;
|
|
3857
|
+
}
|
|
3828
3858
|
interface Container {
|
|
3829
3859
|
get running(): boolean;
|
|
3830
3860
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3842,6 +3872,7 @@ interface Container {
|
|
|
3842
3872
|
options: ContainerSnapshotOptions,
|
|
3843
3873
|
): Promise<ContainerSnapshot>;
|
|
3844
3874
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3875
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3845
3876
|
}
|
|
3846
3877
|
interface ContainerDirectorySnapshot {
|
|
3847
3878
|
id: string;
|
|
@@ -4016,11 +4047,62 @@ interface Tracing {
|
|
|
4016
4047
|
callback: (span: Span, ...args: A) => T,
|
|
4017
4048
|
...args: A
|
|
4018
4049
|
): T;
|
|
4050
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4051
|
+
name: string,
|
|
4052
|
+
callback: (span: Span, ...args: A) => T,
|
|
4053
|
+
...args: A
|
|
4054
|
+
): T;
|
|
4019
4055
|
Span: typeof Span;
|
|
4020
4056
|
}
|
|
4021
4057
|
declare abstract class Span {
|
|
4022
4058
|
get isTraced(): boolean;
|
|
4023
4059
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4060
|
+
end(): void;
|
|
4061
|
+
}
|
|
4062
|
+
/**
|
|
4063
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4064
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4065
|
+
*
|
|
4066
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4067
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4068
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4069
|
+
*/
|
|
4070
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4071
|
+
/** The user's email address, if available from the identity provider. */
|
|
4072
|
+
email?: string;
|
|
4073
|
+
/** The user's display name. */
|
|
4074
|
+
name?: string;
|
|
4075
|
+
/** The user's unique identifier. */
|
|
4076
|
+
user_uuid?: string;
|
|
4077
|
+
/** The Cloudflare account ID. */
|
|
4078
|
+
account_id?: string;
|
|
4079
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4080
|
+
iat?: number;
|
|
4081
|
+
/** The user's IP address at authentication time. */
|
|
4082
|
+
ip?: string;
|
|
4083
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4084
|
+
amr?: string[];
|
|
4085
|
+
/** Identity provider information. */
|
|
4086
|
+
idp?: {
|
|
4087
|
+
id: string;
|
|
4088
|
+
type: string;
|
|
4089
|
+
};
|
|
4090
|
+
/** Geographic information about where the user authenticated. */
|
|
4091
|
+
geo?: {
|
|
4092
|
+
country: string;
|
|
4093
|
+
};
|
|
4094
|
+
/** Group memberships from the identity provider. */
|
|
4095
|
+
groups?: Array<{
|
|
4096
|
+
id: string;
|
|
4097
|
+
name: string;
|
|
4098
|
+
email?: string;
|
|
4099
|
+
}>;
|
|
4100
|
+
/** Device posture check results, keyed by check ID. */
|
|
4101
|
+
devicePosture?: Record<string, unknown>;
|
|
4102
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4103
|
+
is_warp?: boolean;
|
|
4104
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4105
|
+
is_gateway?: boolean;
|
|
4024
4106
|
}
|
|
4025
4107
|
// ============================================================================
|
|
4026
4108
|
// Agent Memory
|
|
@@ -12246,6 +12328,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12246
12328
|
cacheReserveMinimumFileSize?: number;
|
|
12247
12329
|
scrapeShield?: boolean;
|
|
12248
12330
|
apps?: boolean;
|
|
12331
|
+
/**
|
|
12332
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12333
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12334
|
+
*
|
|
12335
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12336
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12337
|
+
*
|
|
12338
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12339
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12340
|
+
*/
|
|
12341
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12249
12342
|
image?: RequestInitCfPropertiesImage;
|
|
12250
12343
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12251
12344
|
mirage?: boolean;
|
|
@@ -15533,7 +15626,8 @@ declare namespace TailStream {
|
|
|
15533
15626
|
| "loadShed"
|
|
15534
15627
|
| "responseStreamDisconnected"
|
|
15535
15628
|
| "scriptNotFound"
|
|
15536
|
-
| "internalError"
|
|
15629
|
+
| "internalError"
|
|
15630
|
+
| "exceededWallTime";
|
|
15537
15631
|
interface ScriptVersion {
|
|
15538
15632
|
readonly id: string;
|
|
15539
15633
|
readonly tag?: string;
|
package/2022-10-31/index.ts
CHANGED
|
@@ -474,7 +474,8 @@ export interface ExecutionContext<Props = unknown> {
|
|
|
474
474
|
passThroughOnException(): void;
|
|
475
475
|
readonly props: Props;
|
|
476
476
|
cache?: CacheContext;
|
|
477
|
-
|
|
477
|
+
readonly access?: CloudflareAccessContext;
|
|
478
|
+
tracing: Tracing;
|
|
478
479
|
}
|
|
479
480
|
export type ExportedHandlerFetchHandler<
|
|
480
481
|
Env = unknown,
|
|
@@ -573,6 +574,10 @@ export interface CachePurgeOptions {
|
|
|
573
574
|
export interface CacheContext {
|
|
574
575
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
575
576
|
}
|
|
577
|
+
export interface CloudflareAccessContext {
|
|
578
|
+
readonly aud: string;
|
|
579
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
580
|
+
}
|
|
576
581
|
export declare abstract class ColoLocalActorNamespace {
|
|
577
582
|
get(actorId: string): Fetcher;
|
|
578
583
|
}
|
|
@@ -638,6 +643,8 @@ export type DurableObjectLocationHint =
|
|
|
638
643
|
| "weur"
|
|
639
644
|
| "eeur"
|
|
640
645
|
| "apac"
|
|
646
|
+
| "apac-ne"
|
|
647
|
+
| "apac-se"
|
|
641
648
|
| "oc"
|
|
642
649
|
| "afr"
|
|
643
650
|
| "me";
|
|
@@ -779,6 +786,7 @@ export interface DurableObjectFacets {
|
|
|
779
786
|
): Fetcher<T>;
|
|
780
787
|
abort(name: string, reason: any): void;
|
|
781
788
|
delete(name: string): void;
|
|
789
|
+
clone(src: string, dst: string): void;
|
|
782
790
|
}
|
|
783
791
|
export interface FacetStartupOptions<
|
|
784
792
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3831,6 +3839,28 @@ export interface EventSourceEventSourceInit {
|
|
|
3831
3839
|
withCredentials?: boolean;
|
|
3832
3840
|
fetcher?: Fetcher;
|
|
3833
3841
|
}
|
|
3842
|
+
export interface ExecOutput {
|
|
3843
|
+
readonly stdout: ArrayBuffer;
|
|
3844
|
+
readonly stderr: ArrayBuffer;
|
|
3845
|
+
readonly exitCode: number;
|
|
3846
|
+
}
|
|
3847
|
+
export interface ContainerExecOptions {
|
|
3848
|
+
cwd?: string;
|
|
3849
|
+
env?: Record<string, string>;
|
|
3850
|
+
user?: string;
|
|
3851
|
+
stdin?: ReadableStream | "pipe";
|
|
3852
|
+
stdout?: "pipe" | "ignore";
|
|
3853
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3854
|
+
}
|
|
3855
|
+
export interface ExecProcess {
|
|
3856
|
+
readonly stdin: WritableStream | null;
|
|
3857
|
+
readonly stdout: ReadableStream | null;
|
|
3858
|
+
readonly stderr: ReadableStream | null;
|
|
3859
|
+
readonly pid: number;
|
|
3860
|
+
readonly exitCode: Promise<number>;
|
|
3861
|
+
output(): Promise<ExecOutput>;
|
|
3862
|
+
kill(signal?: number): void;
|
|
3863
|
+
}
|
|
3834
3864
|
export interface Container {
|
|
3835
3865
|
get running(): boolean;
|
|
3836
3866
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3848,6 +3878,7 @@ export interface Container {
|
|
|
3848
3878
|
options: ContainerSnapshotOptions,
|
|
3849
3879
|
): Promise<ContainerSnapshot>;
|
|
3850
3880
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3881
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3851
3882
|
}
|
|
3852
3883
|
export interface ContainerDirectorySnapshot {
|
|
3853
3884
|
id: string;
|
|
@@ -4022,11 +4053,62 @@ export interface Tracing {
|
|
|
4022
4053
|
callback: (span: Span, ...args: A) => T,
|
|
4023
4054
|
...args: A
|
|
4024
4055
|
): T;
|
|
4056
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4057
|
+
name: string,
|
|
4058
|
+
callback: (span: Span, ...args: A) => T,
|
|
4059
|
+
...args: A
|
|
4060
|
+
): T;
|
|
4025
4061
|
Span: typeof Span;
|
|
4026
4062
|
}
|
|
4027
4063
|
export declare abstract class Span {
|
|
4028
4064
|
get isTraced(): boolean;
|
|
4029
4065
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4066
|
+
end(): void;
|
|
4067
|
+
}
|
|
4068
|
+
/**
|
|
4069
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4070
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4071
|
+
*
|
|
4072
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4073
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4074
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4075
|
+
*/
|
|
4076
|
+
export interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4077
|
+
/** The user's email address, if available from the identity provider. */
|
|
4078
|
+
email?: string;
|
|
4079
|
+
/** The user's display name. */
|
|
4080
|
+
name?: string;
|
|
4081
|
+
/** The user's unique identifier. */
|
|
4082
|
+
user_uuid?: string;
|
|
4083
|
+
/** The Cloudflare account ID. */
|
|
4084
|
+
account_id?: string;
|
|
4085
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4086
|
+
iat?: number;
|
|
4087
|
+
/** The user's IP address at authentication time. */
|
|
4088
|
+
ip?: string;
|
|
4089
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4090
|
+
amr?: string[];
|
|
4091
|
+
/** Identity provider information. */
|
|
4092
|
+
idp?: {
|
|
4093
|
+
id: string;
|
|
4094
|
+
type: string;
|
|
4095
|
+
};
|
|
4096
|
+
/** Geographic information about where the user authenticated. */
|
|
4097
|
+
geo?: {
|
|
4098
|
+
country: string;
|
|
4099
|
+
};
|
|
4100
|
+
/** Group memberships from the identity provider. */
|
|
4101
|
+
groups?: Array<{
|
|
4102
|
+
id: string;
|
|
4103
|
+
name: string;
|
|
4104
|
+
email?: string;
|
|
4105
|
+
}>;
|
|
4106
|
+
/** Device posture check results, keyed by check ID. */
|
|
4107
|
+
devicePosture?: Record<string, unknown>;
|
|
4108
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4109
|
+
is_warp?: boolean;
|
|
4110
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4111
|
+
is_gateway?: boolean;
|
|
4030
4112
|
}
|
|
4031
4113
|
// ============================================================================
|
|
4032
4114
|
// Agent Memory
|
|
@@ -12258,6 +12340,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12258
12340
|
cacheReserveMinimumFileSize?: number;
|
|
12259
12341
|
scrapeShield?: boolean;
|
|
12260
12342
|
apps?: boolean;
|
|
12343
|
+
/**
|
|
12344
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12345
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12346
|
+
*
|
|
12347
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12348
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12349
|
+
*
|
|
12350
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12351
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12352
|
+
*/
|
|
12353
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12261
12354
|
image?: RequestInitCfPropertiesImage;
|
|
12262
12355
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12263
12356
|
mirage?: boolean;
|
|
@@ -15494,7 +15587,8 @@ export declare namespace TailStream {
|
|
|
15494
15587
|
| "loadShed"
|
|
15495
15588
|
| "responseStreamDisconnected"
|
|
15496
15589
|
| "scriptNotFound"
|
|
15497
|
-
| "internalError"
|
|
15590
|
+
| "internalError"
|
|
15591
|
+
| "exceededWallTime";
|
|
15498
15592
|
interface ScriptVersion {
|
|
15499
15593
|
readonly id: string;
|
|
15500
15594
|
readonly tag?: string;
|
package/2022-11-30/index.d.ts
CHANGED
|
@@ -477,7 +477,8 @@ interface ExecutionContext<Props = unknown> {
|
|
|
477
477
|
passThroughOnException(): void;
|
|
478
478
|
readonly props: Props;
|
|
479
479
|
cache?: CacheContext;
|
|
480
|
-
|
|
480
|
+
readonly access?: CloudflareAccessContext;
|
|
481
|
+
tracing: Tracing;
|
|
481
482
|
}
|
|
482
483
|
type ExportedHandlerFetchHandler<
|
|
483
484
|
Env = unknown,
|
|
@@ -576,6 +577,10 @@ interface CachePurgeOptions {
|
|
|
576
577
|
interface CacheContext {
|
|
577
578
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
578
579
|
}
|
|
580
|
+
interface CloudflareAccessContext {
|
|
581
|
+
readonly aud: string;
|
|
582
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
583
|
+
}
|
|
579
584
|
declare abstract class ColoLocalActorNamespace {
|
|
580
585
|
get(actorId: string): Fetcher;
|
|
581
586
|
}
|
|
@@ -641,6 +646,8 @@ type DurableObjectLocationHint =
|
|
|
641
646
|
| "weur"
|
|
642
647
|
| "eeur"
|
|
643
648
|
| "apac"
|
|
649
|
+
| "apac-ne"
|
|
650
|
+
| "apac-se"
|
|
644
651
|
| "oc"
|
|
645
652
|
| "afr"
|
|
646
653
|
| "me";
|
|
@@ -782,6 +789,7 @@ interface DurableObjectFacets {
|
|
|
782
789
|
): Fetcher<T>;
|
|
783
790
|
abort(name: string, reason: any): void;
|
|
784
791
|
delete(name: string): void;
|
|
792
|
+
clone(src: string, dst: string): void;
|
|
785
793
|
}
|
|
786
794
|
interface FacetStartupOptions<
|
|
787
795
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3830,6 +3838,28 @@ interface EventSourceEventSourceInit {
|
|
|
3830
3838
|
withCredentials?: boolean;
|
|
3831
3839
|
fetcher?: Fetcher;
|
|
3832
3840
|
}
|
|
3841
|
+
interface ExecOutput {
|
|
3842
|
+
readonly stdout: ArrayBuffer;
|
|
3843
|
+
readonly stderr: ArrayBuffer;
|
|
3844
|
+
readonly exitCode: number;
|
|
3845
|
+
}
|
|
3846
|
+
interface ContainerExecOptions {
|
|
3847
|
+
cwd?: string;
|
|
3848
|
+
env?: Record<string, string>;
|
|
3849
|
+
user?: string;
|
|
3850
|
+
stdin?: ReadableStream | "pipe";
|
|
3851
|
+
stdout?: "pipe" | "ignore";
|
|
3852
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3853
|
+
}
|
|
3854
|
+
interface ExecProcess {
|
|
3855
|
+
readonly stdin: WritableStream | null;
|
|
3856
|
+
readonly stdout: ReadableStream | null;
|
|
3857
|
+
readonly stderr: ReadableStream | null;
|
|
3858
|
+
readonly pid: number;
|
|
3859
|
+
readonly exitCode: Promise<number>;
|
|
3860
|
+
output(): Promise<ExecOutput>;
|
|
3861
|
+
kill(signal?: number): void;
|
|
3862
|
+
}
|
|
3833
3863
|
interface Container {
|
|
3834
3864
|
get running(): boolean;
|
|
3835
3865
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3847,6 +3877,7 @@ interface Container {
|
|
|
3847
3877
|
options: ContainerSnapshotOptions,
|
|
3848
3878
|
): Promise<ContainerSnapshot>;
|
|
3849
3879
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3880
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3850
3881
|
}
|
|
3851
3882
|
interface ContainerDirectorySnapshot {
|
|
3852
3883
|
id: string;
|
|
@@ -4021,11 +4052,62 @@ interface Tracing {
|
|
|
4021
4052
|
callback: (span: Span, ...args: A) => T,
|
|
4022
4053
|
...args: A
|
|
4023
4054
|
): T;
|
|
4055
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4056
|
+
name: string,
|
|
4057
|
+
callback: (span: Span, ...args: A) => T,
|
|
4058
|
+
...args: A
|
|
4059
|
+
): T;
|
|
4024
4060
|
Span: typeof Span;
|
|
4025
4061
|
}
|
|
4026
4062
|
declare abstract class Span {
|
|
4027
4063
|
get isTraced(): boolean;
|
|
4028
4064
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4065
|
+
end(): void;
|
|
4066
|
+
}
|
|
4067
|
+
/**
|
|
4068
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4069
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4070
|
+
*
|
|
4071
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4072
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4073
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4074
|
+
*/
|
|
4075
|
+
interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4076
|
+
/** The user's email address, if available from the identity provider. */
|
|
4077
|
+
email?: string;
|
|
4078
|
+
/** The user's display name. */
|
|
4079
|
+
name?: string;
|
|
4080
|
+
/** The user's unique identifier. */
|
|
4081
|
+
user_uuid?: string;
|
|
4082
|
+
/** The Cloudflare account ID. */
|
|
4083
|
+
account_id?: string;
|
|
4084
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4085
|
+
iat?: number;
|
|
4086
|
+
/** The user's IP address at authentication time. */
|
|
4087
|
+
ip?: string;
|
|
4088
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4089
|
+
amr?: string[];
|
|
4090
|
+
/** Identity provider information. */
|
|
4091
|
+
idp?: {
|
|
4092
|
+
id: string;
|
|
4093
|
+
type: string;
|
|
4094
|
+
};
|
|
4095
|
+
/** Geographic information about where the user authenticated. */
|
|
4096
|
+
geo?: {
|
|
4097
|
+
country: string;
|
|
4098
|
+
};
|
|
4099
|
+
/** Group memberships from the identity provider. */
|
|
4100
|
+
groups?: Array<{
|
|
4101
|
+
id: string;
|
|
4102
|
+
name: string;
|
|
4103
|
+
email?: string;
|
|
4104
|
+
}>;
|
|
4105
|
+
/** Device posture check results, keyed by check ID. */
|
|
4106
|
+
devicePosture?: Record<string, unknown>;
|
|
4107
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4108
|
+
is_warp?: boolean;
|
|
4109
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4110
|
+
is_gateway?: boolean;
|
|
4029
4111
|
}
|
|
4030
4112
|
// ============================================================================
|
|
4031
4113
|
// Agent Memory
|
|
@@ -12251,6 +12333,17 @@ interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12251
12333
|
cacheReserveMinimumFileSize?: number;
|
|
12252
12334
|
scrapeShield?: boolean;
|
|
12253
12335
|
apps?: boolean;
|
|
12336
|
+
/**
|
|
12337
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12338
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12339
|
+
*
|
|
12340
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12341
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12342
|
+
*
|
|
12343
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12344
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12345
|
+
*/
|
|
12346
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12254
12347
|
image?: RequestInitCfPropertiesImage;
|
|
12255
12348
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12256
12349
|
mirage?: boolean;
|
|
@@ -15538,7 +15631,8 @@ declare namespace TailStream {
|
|
|
15538
15631
|
| "loadShed"
|
|
15539
15632
|
| "responseStreamDisconnected"
|
|
15540
15633
|
| "scriptNotFound"
|
|
15541
|
-
| "internalError"
|
|
15634
|
+
| "internalError"
|
|
15635
|
+
| "exceededWallTime";
|
|
15542
15636
|
interface ScriptVersion {
|
|
15543
15637
|
readonly id: string;
|
|
15544
15638
|
readonly tag?: string;
|
package/2022-11-30/index.ts
CHANGED
|
@@ -479,7 +479,8 @@ export interface ExecutionContext<Props = unknown> {
|
|
|
479
479
|
passThroughOnException(): void;
|
|
480
480
|
readonly props: Props;
|
|
481
481
|
cache?: CacheContext;
|
|
482
|
-
|
|
482
|
+
readonly access?: CloudflareAccessContext;
|
|
483
|
+
tracing: Tracing;
|
|
483
484
|
}
|
|
484
485
|
export type ExportedHandlerFetchHandler<
|
|
485
486
|
Env = unknown,
|
|
@@ -578,6 +579,10 @@ export interface CachePurgeOptions {
|
|
|
578
579
|
export interface CacheContext {
|
|
579
580
|
purge(options: CachePurgeOptions): Promise<CachePurgeResult>;
|
|
580
581
|
}
|
|
582
|
+
export interface CloudflareAccessContext {
|
|
583
|
+
readonly aud: string;
|
|
584
|
+
getIdentity(): Promise<CloudflareAccessIdentity | undefined>;
|
|
585
|
+
}
|
|
581
586
|
export declare abstract class ColoLocalActorNamespace {
|
|
582
587
|
get(actorId: string): Fetcher;
|
|
583
588
|
}
|
|
@@ -643,6 +648,8 @@ export type DurableObjectLocationHint =
|
|
|
643
648
|
| "weur"
|
|
644
649
|
| "eeur"
|
|
645
650
|
| "apac"
|
|
651
|
+
| "apac-ne"
|
|
652
|
+
| "apac-se"
|
|
646
653
|
| "oc"
|
|
647
654
|
| "afr"
|
|
648
655
|
| "me";
|
|
@@ -784,6 +791,7 @@ export interface DurableObjectFacets {
|
|
|
784
791
|
): Fetcher<T>;
|
|
785
792
|
abort(name: string, reason: any): void;
|
|
786
793
|
delete(name: string): void;
|
|
794
|
+
clone(src: string, dst: string): void;
|
|
787
795
|
}
|
|
788
796
|
export interface FacetStartupOptions<
|
|
789
797
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
@@ -3836,6 +3844,28 @@ export interface EventSourceEventSourceInit {
|
|
|
3836
3844
|
withCredentials?: boolean;
|
|
3837
3845
|
fetcher?: Fetcher;
|
|
3838
3846
|
}
|
|
3847
|
+
export interface ExecOutput {
|
|
3848
|
+
readonly stdout: ArrayBuffer;
|
|
3849
|
+
readonly stderr: ArrayBuffer;
|
|
3850
|
+
readonly exitCode: number;
|
|
3851
|
+
}
|
|
3852
|
+
export interface ContainerExecOptions {
|
|
3853
|
+
cwd?: string;
|
|
3854
|
+
env?: Record<string, string>;
|
|
3855
|
+
user?: string;
|
|
3856
|
+
stdin?: ReadableStream | "pipe";
|
|
3857
|
+
stdout?: "pipe" | "ignore";
|
|
3858
|
+
stderr?: "pipe" | "ignore" | "combined";
|
|
3859
|
+
}
|
|
3860
|
+
export interface ExecProcess {
|
|
3861
|
+
readonly stdin: WritableStream | null;
|
|
3862
|
+
readonly stdout: ReadableStream | null;
|
|
3863
|
+
readonly stderr: ReadableStream | null;
|
|
3864
|
+
readonly pid: number;
|
|
3865
|
+
readonly exitCode: Promise<number>;
|
|
3866
|
+
output(): Promise<ExecOutput>;
|
|
3867
|
+
kill(signal?: number): void;
|
|
3868
|
+
}
|
|
3839
3869
|
export interface Container {
|
|
3840
3870
|
get running(): boolean;
|
|
3841
3871
|
start(options?: ContainerStartupOptions): void;
|
|
@@ -3853,6 +3883,7 @@ export interface Container {
|
|
|
3853
3883
|
options: ContainerSnapshotOptions,
|
|
3854
3884
|
): Promise<ContainerSnapshot>;
|
|
3855
3885
|
interceptOutboundHttps(addr: string, binding: Fetcher): Promise<void>;
|
|
3886
|
+
exec(cmd: string[], options?: ContainerExecOptions): Promise<ExecProcess>;
|
|
3856
3887
|
}
|
|
3857
3888
|
export interface ContainerDirectorySnapshot {
|
|
3858
3889
|
id: string;
|
|
@@ -4027,11 +4058,62 @@ export interface Tracing {
|
|
|
4027
4058
|
callback: (span: Span, ...args: A) => T,
|
|
4028
4059
|
...args: A
|
|
4029
4060
|
): T;
|
|
4061
|
+
startActiveSpan<T, A extends unknown[]>(
|
|
4062
|
+
name: string,
|
|
4063
|
+
callback: (span: Span, ...args: A) => T,
|
|
4064
|
+
...args: A
|
|
4065
|
+
): T;
|
|
4030
4066
|
Span: typeof Span;
|
|
4031
4067
|
}
|
|
4032
4068
|
export declare abstract class Span {
|
|
4033
4069
|
get isTraced(): boolean;
|
|
4034
4070
|
setAttribute(key: string, value?: boolean | number | string): void;
|
|
4071
|
+
end(): void;
|
|
4072
|
+
}
|
|
4073
|
+
/**
|
|
4074
|
+
* Represents the identity of a user authenticated via Cloudflare Access.
|
|
4075
|
+
* This matches the result of calling /cdn-cgi/access/get-identity.
|
|
4076
|
+
*
|
|
4077
|
+
* The exact structure of the returned object depends on the identity provider
|
|
4078
|
+
* configuration for the Access application. The fields below represent commonly
|
|
4079
|
+
* available properties, but additional provider-specific fields may be present.
|
|
4080
|
+
*/
|
|
4081
|
+
export interface CloudflareAccessIdentity extends Record<string, unknown> {
|
|
4082
|
+
/** The user's email address, if available from the identity provider. */
|
|
4083
|
+
email?: string;
|
|
4084
|
+
/** The user's display name. */
|
|
4085
|
+
name?: string;
|
|
4086
|
+
/** The user's unique identifier. */
|
|
4087
|
+
user_uuid?: string;
|
|
4088
|
+
/** The Cloudflare account ID. */
|
|
4089
|
+
account_id?: string;
|
|
4090
|
+
/** Login timestamp (Unix epoch seconds). */
|
|
4091
|
+
iat?: number;
|
|
4092
|
+
/** The user's IP address at authentication time. */
|
|
4093
|
+
ip?: string;
|
|
4094
|
+
/** Authentication methods used (e.g., "pwd"). */
|
|
4095
|
+
amr?: string[];
|
|
4096
|
+
/** Identity provider information. */
|
|
4097
|
+
idp?: {
|
|
4098
|
+
id: string;
|
|
4099
|
+
type: string;
|
|
4100
|
+
};
|
|
4101
|
+
/** Geographic information about where the user authenticated. */
|
|
4102
|
+
geo?: {
|
|
4103
|
+
country: string;
|
|
4104
|
+
};
|
|
4105
|
+
/** Group memberships from the identity provider. */
|
|
4106
|
+
groups?: Array<{
|
|
4107
|
+
id: string;
|
|
4108
|
+
name: string;
|
|
4109
|
+
email?: string;
|
|
4110
|
+
}>;
|
|
4111
|
+
/** Device posture check results, keyed by check ID. */
|
|
4112
|
+
devicePosture?: Record<string, unknown>;
|
|
4113
|
+
/** True if the user connected via Cloudflare WARP. */
|
|
4114
|
+
is_warp?: boolean;
|
|
4115
|
+
/** True if the user is authenticated via Cloudflare Gateway. */
|
|
4116
|
+
is_gateway?: boolean;
|
|
4035
4117
|
}
|
|
4036
4118
|
// ============================================================================
|
|
4037
4119
|
// Agent Memory
|
|
@@ -12263,6 +12345,17 @@ export interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
12263
12345
|
cacheReserveMinimumFileSize?: number;
|
|
12264
12346
|
scrapeShield?: boolean;
|
|
12265
12347
|
apps?: boolean;
|
|
12348
|
+
/**
|
|
12349
|
+
* Controls whether an outbound gRPC-web subrequest from this Worker is
|
|
12350
|
+
* converted to gRPC at the Cloudflare edge.
|
|
12351
|
+
*
|
|
12352
|
+
* - `"passthrough"`: forward the subrequest unchanged as gRPC-web (default).
|
|
12353
|
+
* - `"convert"`: convert the gRPC-web subrequest to gRPC at the edge.
|
|
12354
|
+
*
|
|
12355
|
+
* Provides per-request control over the same edge conversion behavior
|
|
12356
|
+
* gated by the `auto_grpc_convert` compatibility flag.
|
|
12357
|
+
*/
|
|
12358
|
+
grpcWeb?: "passthrough" | "convert";
|
|
12266
12359
|
image?: RequestInitCfPropertiesImage;
|
|
12267
12360
|
minify?: RequestInitCfPropertiesImageMinify;
|
|
12268
12361
|
mirage?: boolean;
|
|
@@ -15499,7 +15592,8 @@ export declare namespace TailStream {
|
|
|
15499
15592
|
| "loadShed"
|
|
15500
15593
|
| "responseStreamDisconnected"
|
|
15501
15594
|
| "scriptNotFound"
|
|
15502
|
-
| "internalError"
|
|
15595
|
+
| "internalError"
|
|
15596
|
+
| "exceededWallTime";
|
|
15503
15597
|
interface ScriptVersion {
|
|
15504
15598
|
readonly id: string;
|
|
15505
15599
|
readonly tag?: string;
|