@cloudflare/workers-types 5.20260918.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.
@@ -12336,6 +12336,35 @@ declare abstract class AiGateway {
12336
12336
  ): Promise<Response>;
12337
12337
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12338
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
+ }
12339
12368
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12340
12369
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12341
12370
  // https://opensource.org/licenses/Apache-2.0
@@ -12350,6 +12350,35 @@ export declare abstract class AiGateway {
12350
12350
  ): Promise<Response>;
12351
12351
  getUrl(provider?: AIGatewayProviders | string): Promise<string>; // eslint-disable-line
12352
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
+ }
12353
12382
  // Copyright (c) 2022-2025 Cloudflare, Inc.
12354
12383
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
12355
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.20260918.1"
10
+ "version": "5.20260919.1"
11
11
  }