@cloudflare/workers-types 5.20260917.1 → 5.20260919.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.
@@ -382,6 +382,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
382
382
  FixedLengthStream: typeof FixedLengthStream;
383
383
  IdentityTransformStream: typeof IdentityTransformStream;
384
384
  HTMLRewriter: typeof HTMLRewriter;
385
+ Datagram: typeof Datagram;
385
386
  Performance: typeof Performance;
386
387
  PerformanceEntry: typeof PerformanceEntry;
387
388
  PerformanceMark: typeof PerformanceMark;
@@ -3967,6 +3968,7 @@ interface Socket {
3967
3968
  get opened(): Promise<SocketInfo>;
3968
3969
  get upgraded(): boolean;
3969
3970
  get secureTransport(): "on" | "off" | "starttls";
3971
+ get protocol(): "tcp" | "udp";
3970
3972
  close(): Promise<void>;
3971
3973
  startTls(options?: TlsOptions): Socket;
3972
3974
  }
@@ -3986,6 +3988,10 @@ interface SocketInfo {
3986
3988
  remoteAddress?: string;
3987
3989
  localAddress?: string;
3988
3990
  }
3991
+ declare class Datagram {
3992
+ constructor(data: Uint8Array);
3993
+ get data(): Uint8Array;
3994
+ }
3989
3995
  /**
3990
3996
  * The **`EventSource`** interface is web content's interface to server-sent events.
3991
3997
  *
@@ -12330,6 +12336,35 @@ declare abstract class AiGateway {
12330
12336
  ): Promise<Response>;
12331
12337
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12332
12338
  }
12339
+ /** A parameter accepted by an Analytics SQL query. */
12340
+ type AnalyticsSQLParameter = string | number | boolean | null;
12341
+ /** An Analytics SQL query and its optional positional or named parameters. */
12342
+ interface AnalyticsSQLQuery {
12343
+ query: string;
12344
+ params?:
12345
+ | readonly AnalyticsSQLParameter[]
12346
+ | Readonly<Record<string, AnalyticsSQLParameter>>;
12347
+ }
12348
+ /** Execution statistics returned by Analytics SQL. */
12349
+ interface AnalyticsSQLStatistics {
12350
+ elapsed_ms: number;
12351
+ rows_read: number;
12352
+ bytes_read: number;
12353
+ }
12354
+ /** The rows and execution statistics returned by an Analytics SQL query. */
12355
+ interface AnalyticsSQLResult<
12356
+ T extends Record<string, unknown> = Record<string, unknown>,
12357
+ > {
12358
+ data: T[];
12359
+ rows: number;
12360
+ statistics: AnalyticsSQLStatistics;
12361
+ }
12362
+ /** An Analytics SQL binding. */
12363
+ interface AnalyticsSQLBinding {
12364
+ query<T extends Record<string, unknown> = Record<string, unknown>>(
12365
+ request: AnalyticsSQLQuery,
12366
+ ): Promise<AnalyticsSQLResult<T>>;
12367
+ }
12333
12368
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12334
12369
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12335
12370
  // https://opensource.org/licenses/Apache-2.0
@@ -382,6 +382,7 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
382
382
  FixedLengthStream: typeof FixedLengthStream;
383
383
  IdentityTransformStream: typeof IdentityTransformStream;
384
384
  HTMLRewriter: typeof HTMLRewriter;
385
+ Datagram: typeof Datagram;
385
386
  Performance: typeof Performance;
386
387
  PerformanceEntry: typeof PerformanceEntry;
387
388
  PerformanceMark: typeof PerformanceMark;
@@ -3976,6 +3977,7 @@ export interface Socket {
3976
3977
  get opened(): Promise<SocketInfo>;
3977
3978
  get upgraded(): boolean;
3978
3979
  get secureTransport(): "on" | "off" | "starttls";
3980
+ get protocol(): "tcp" | "udp";
3979
3981
  close(): Promise<void>;
3980
3982
  startTls(options?: TlsOptions): Socket;
3981
3983
  }
@@ -3995,6 +3997,10 @@ export interface SocketInfo {
3995
3997
  remoteAddress?: string;
3996
3998
  localAddress?: string;
3997
3999
  }
4000
+ export declare class Datagram {
4001
+ constructor(data: Uint8Array);
4002
+ get data(): Uint8Array;
4003
+ }
3998
4004
  /**
3999
4005
  * The **`EventSource`** interface is web content's interface to server-sent events.
4000
4006
  *
@@ -12344,6 +12350,35 @@ export declare abstract class AiGateway {
12344
12350
  ): Promise<Response>;
12345
12351
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12346
12352
  }
12353
+ /** A parameter accepted by an Analytics SQL query. */
12354
+ export type AnalyticsSQLParameter = string | number | boolean | null;
12355
+ /** An Analytics SQL query and its optional positional or named parameters. */
12356
+ export interface AnalyticsSQLQuery {
12357
+ query: string;
12358
+ params?:
12359
+ | readonly AnalyticsSQLParameter[]
12360
+ | Readonly<Record<string, AnalyticsSQLParameter>>;
12361
+ }
12362
+ /** Execution statistics returned by Analytics SQL. */
12363
+ export interface AnalyticsSQLStatistics {
12364
+ elapsed_ms: number;
12365
+ rows_read: number;
12366
+ bytes_read: number;
12367
+ }
12368
+ /** The rows and execution statistics returned by an Analytics SQL query. */
12369
+ export interface AnalyticsSQLResult<
12370
+ T extends Record<string, unknown> = Record<string, unknown>,
12371
+ > {
12372
+ data: T[];
12373
+ rows: number;
12374
+ statistics: AnalyticsSQLStatistics;
12375
+ }
12376
+ /** An Analytics SQL binding. */
12377
+ export interface AnalyticsSQLBinding {
12378
+ query<T extends Record<string, unknown> = Record<string, unknown>>(
12379
+ request: AnalyticsSQLQuery,
12380
+ ): Promise<AnalyticsSQLResult<T>>;
12381
+ }
12347
12382
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12348
12383
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12349
12384
  // https://opensource.org/licenses/Apache-2.0
package/index.d.ts CHANGED
@@ -12053,6 +12053,35 @@ declare abstract class AiGateway {
12053
12053
  ): Promise<Response>;
12054
12054
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12055
12055
  }
12056
+ /** A parameter accepted by an Analytics SQL query. */
12057
+ type AnalyticsSQLParameter = string | number | boolean | null;
12058
+ /** An Analytics SQL query and its optional positional or named parameters. */
12059
+ interface AnalyticsSQLQuery {
12060
+ query: string;
12061
+ params?:
12062
+ | readonly AnalyticsSQLParameter[]
12063
+ | Readonly<Record<string, AnalyticsSQLParameter>>;
12064
+ }
12065
+ /** Execution statistics returned by Analytics SQL. */
12066
+ interface AnalyticsSQLStatistics {
12067
+ elapsed_ms: number;
12068
+ rows_read: number;
12069
+ bytes_read: number;
12070
+ }
12071
+ /** The rows and execution statistics returned by an Analytics SQL query. */
12072
+ interface AnalyticsSQLResult<
12073
+ T extends Record<string, unknown> = Record<string, unknown>,
12074
+ > {
12075
+ data: T[];
12076
+ rows: number;
12077
+ statistics: AnalyticsSQLStatistics;
12078
+ }
12079
+ /** An Analytics SQL binding. */
12080
+ interface AnalyticsSQLBinding {
12081
+ query<T extends Record<string, unknown> = Record<string, unknown>>(
12082
+ request: AnalyticsSQLQuery,
12083
+ ): Promise<AnalyticsSQLResult<T>>;
12084
+ }
12056
12085
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12057
12086
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12058
12087
  // https://opensource.org/licenses/Apache-2.0
package/index.ts CHANGED
@@ -12067,6 +12067,35 @@ export declare abstract class AiGateway {
12067
12067
  ): Promise<Response>;
12068
12068
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12069
12069
  }
12070
+ /** A parameter accepted by an Analytics SQL query. */
12071
+ export type AnalyticsSQLParameter = string | number | boolean | null;
12072
+ /** An Analytics SQL query and its optional positional or named parameters. */
12073
+ export interface AnalyticsSQLQuery {
12074
+ query: string;
12075
+ params?:
12076
+ | readonly AnalyticsSQLParameter[]
12077
+ | Readonly<Record<string, AnalyticsSQLParameter>>;
12078
+ }
12079
+ /** Execution statistics returned by Analytics SQL. */
12080
+ export interface AnalyticsSQLStatistics {
12081
+ elapsed_ms: number;
12082
+ rows_read: number;
12083
+ bytes_read: number;
12084
+ }
12085
+ /** The rows and execution statistics returned by an Analytics SQL query. */
12086
+ export interface AnalyticsSQLResult<
12087
+ T extends Record<string, unknown> = Record<string, unknown>,
12088
+ > {
12089
+ data: T[];
12090
+ rows: number;
12091
+ statistics: AnalyticsSQLStatistics;
12092
+ }
12093
+ /** An Analytics SQL binding. */
12094
+ export interface AnalyticsSQLBinding {
12095
+ query<T extends Record<string, unknown> = Record<string, unknown>>(
12096
+ request: AnalyticsSQLQuery,
12097
+ ): Promise<AnalyticsSQLResult<T>>;
12098
+ }
12070
12099
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12071
12100
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12072
12101
  // https://opensource.org/licenses/Apache-2.0
package/package.json CHANGED
@@ -7,5 +7,5 @@
7
7
  },
8
8
  "author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
9
9
  "license": "MIT OR Apache-2.0",
10
- "version": "5.20260917.1"
10
+ "version": "5.20260919.1"
11
11
  }