@cloudflare/workers-types 4.20230717.0 → 4.20230724.0

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.
@@ -1216,13 +1216,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1216
1216
  metadata: Metadata | null;
1217
1217
  cacheStatus: string | null;
1218
1218
  }
1219
- declare interface Queue<Body> {
1220
- send(message: Body): Promise<void>;
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1220
+ declare interface Queue<Body = unknown> {
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1221
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1222
1223
  }
1223
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1224
1227
  declare interface MessageSendRequest<Body = unknown> {
1225
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1226
1230
  }
1227
1231
  declare interface Message<Body = unknown> {
1228
1232
  readonly id: string;
@@ -2910,15 +2914,15 @@ declare abstract class D1Database {
2910
2914
  prepare(query: string): D1PreparedStatement;
2911
2915
  dump(): Promise<ArrayBuffer>;
2912
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2913
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2914
2918
  }
2915
2919
  declare abstract class D1PreparedStatement {
2916
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2917
2921
  first<T = unknown>(colName: string): Promise<T | null>;
2918
- first<T = unknown>(): Promise<Record<string, T> | null>;
2919
- run<T = unknown>(): Promise<D1Result<T>>;
2920
- all<T = unknown>(): Promise<D1Result<T[]>>;
2921
- raw<T = unknown>(): Promise<T[]>;
2922
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2923
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2924
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2925
+ raw<T = unknown[]>(): Promise<T[]>;
2922
2926
  }
2923
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2924
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1218,13 +1218,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1218
1218
  metadata: Metadata | null;
1219
1219
  cacheStatus: string | null;
1220
1220
  }
1221
- export interface Queue<Body> {
1222
- send(message: Body): Promise<void>;
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1222
+ export interface Queue<Body = unknown> {
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1223
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1224
1225
  }
1225
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1226
1229
  export interface MessageSendRequest<Body = unknown> {
1227
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1228
1232
  }
1229
1233
  export interface Message<Body = unknown> {
1230
1234
  readonly id: string;
@@ -2915,15 +2919,15 @@ export declare abstract class D1Database {
2915
2919
  prepare(query: string): D1PreparedStatement;
2916
2920
  dump(): Promise<ArrayBuffer>;
2917
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2918
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2919
2923
  }
2920
2924
  export declare abstract class D1PreparedStatement {
2921
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2922
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2923
- first<T = unknown>(): Promise<Record<string, T> | null>;
2924
- run<T = unknown>(): Promise<D1Result<T>>;
2925
- all<T = unknown>(): Promise<D1Result<T[]>>;
2926
- raw<T = unknown>(): Promise<T[]>;
2927
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2928
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2929
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2930
+ raw<T = unknown[]>(): Promise<T[]>;
2927
2931
  }
2928
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2929
2933
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1196,13 +1196,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1196
1196
  metadata: Metadata | null;
1197
1197
  cacheStatus: string | null;
1198
1198
  }
1199
- declare interface Queue<Body> {
1200
- send(message: Body): Promise<void>;
1199
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1200
+ declare interface Queue<Body = unknown> {
1201
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1201
1202
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1202
1203
  }
1203
- declare interface QueueSendOptions {}
1204
+ declare interface QueueSendOptions {
1205
+ contentType?: QueueContentType;
1206
+ }
1204
1207
  declare interface MessageSendRequest<Body = unknown> {
1205
1208
  body: Body;
1209
+ contentType?: QueueContentType;
1206
1210
  }
1207
1211
  declare interface Message<Body = unknown> {
1208
1212
  readonly id: string;
@@ -2896,15 +2900,15 @@ declare abstract class D1Database {
2896
2900
  prepare(query: string): D1PreparedStatement;
2897
2901
  dump(): Promise<ArrayBuffer>;
2898
2902
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2899
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2903
+ exec(query: string): Promise<D1ExecResult>;
2900
2904
  }
2901
2905
  declare abstract class D1PreparedStatement {
2902
- bind(...values: any[]): D1PreparedStatement;
2906
+ bind(...values: unknown[]): D1PreparedStatement;
2903
2907
  first<T = unknown>(colName: string): Promise<T | null>;
2904
- first<T = unknown>(): Promise<Record<string, T> | null>;
2905
- run<T = unknown>(): Promise<D1Result<T>>;
2906
- all<T = unknown>(): Promise<D1Result<T[]>>;
2907
- raw<T = unknown>(): Promise<T[]>;
2908
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2909
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2910
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2911
+ raw<T = unknown[]>(): Promise<T[]>;
2908
2912
  }
2909
2913
  // Copyright (c) 2023 Cloudflare, Inc.
2910
2914
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1198,13 +1198,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1198
1198
  metadata: Metadata | null;
1199
1199
  cacheStatus: string | null;
1200
1200
  }
1201
- export interface Queue<Body> {
1202
- send(message: Body): Promise<void>;
1201
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1202
+ export interface Queue<Body = unknown> {
1203
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1203
1204
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1204
1205
  }
1205
- export interface QueueSendOptions {}
1206
+ export interface QueueSendOptions {
1207
+ contentType?: QueueContentType;
1208
+ }
1206
1209
  export interface MessageSendRequest<Body = unknown> {
1207
1210
  body: Body;
1211
+ contentType?: QueueContentType;
1208
1212
  }
1209
1213
  export interface Message<Body = unknown> {
1210
1214
  readonly id: string;
@@ -2901,15 +2905,15 @@ export declare abstract class D1Database {
2901
2905
  prepare(query: string): D1PreparedStatement;
2902
2906
  dump(): Promise<ArrayBuffer>;
2903
2907
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2904
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2908
+ exec(query: string): Promise<D1ExecResult>;
2905
2909
  }
2906
2910
  export declare abstract class D1PreparedStatement {
2907
- bind(...values: any[]): D1PreparedStatement;
2911
+ bind(...values: unknown[]): D1PreparedStatement;
2908
2912
  first<T = unknown>(colName: string): Promise<T | null>;
2909
- first<T = unknown>(): Promise<Record<string, T> | null>;
2910
- run<T = unknown>(): Promise<D1Result<T>>;
2911
- all<T = unknown>(): Promise<D1Result<T[]>>;
2912
- raw<T = unknown>(): Promise<T[]>;
2913
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2914
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2915
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2916
+ raw<T = unknown[]>(): Promise<T[]>;
2913
2917
  }
2914
2918
  // Copyright (c) 2023 Cloudflare, Inc.
2915
2919
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1202,13 +1202,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1202
1202
  metadata: Metadata | null;
1203
1203
  cacheStatus: string | null;
1204
1204
  }
1205
- declare interface Queue<Body> {
1206
- send(message: Body): Promise<void>;
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1206
+ declare interface Queue<Body = unknown> {
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1207
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1208
1209
  }
1209
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1210
1213
  declare interface MessageSendRequest<Body = unknown> {
1211
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1212
1216
  }
1213
1217
  declare interface Message<Body = unknown> {
1214
1218
  readonly id: string;
@@ -2902,15 +2906,15 @@ declare abstract class D1Database {
2902
2906
  prepare(query: string): D1PreparedStatement;
2903
2907
  dump(): Promise<ArrayBuffer>;
2904
2908
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2905
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2909
+ exec(query: string): Promise<D1ExecResult>;
2906
2910
  }
2907
2911
  declare abstract class D1PreparedStatement {
2908
- bind(...values: any[]): D1PreparedStatement;
2912
+ bind(...values: unknown[]): D1PreparedStatement;
2909
2913
  first<T = unknown>(colName: string): Promise<T | null>;
2910
- first<T = unknown>(): Promise<Record<string, T> | null>;
2911
- run<T = unknown>(): Promise<D1Result<T>>;
2912
- all<T = unknown>(): Promise<D1Result<T[]>>;
2913
- raw<T = unknown>(): Promise<T[]>;
2914
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2915
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2916
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2917
+ raw<T = unknown[]>(): Promise<T[]>;
2914
2918
  }
2915
2919
  // Copyright (c) 2023 Cloudflare, Inc.
2916
2920
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1204,13 +1204,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1204
1204
  metadata: Metadata | null;
1205
1205
  cacheStatus: string | null;
1206
1206
  }
1207
- export interface Queue<Body> {
1208
- send(message: Body): Promise<void>;
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1208
+ export interface Queue<Body = unknown> {
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1209
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1210
1211
  }
1211
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1212
1215
  export interface MessageSendRequest<Body = unknown> {
1213
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1214
1218
  }
1215
1219
  export interface Message<Body = unknown> {
1216
1220
  readonly id: string;
@@ -2907,15 +2911,15 @@ export declare abstract class D1Database {
2907
2911
  prepare(query: string): D1PreparedStatement;
2908
2912
  dump(): Promise<ArrayBuffer>;
2909
2913
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2910
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2914
+ exec(query: string): Promise<D1ExecResult>;
2911
2915
  }
2912
2916
  export declare abstract class D1PreparedStatement {
2913
- bind(...values: any[]): D1PreparedStatement;
2917
+ bind(...values: unknown[]): D1PreparedStatement;
2914
2918
  first<T = unknown>(colName: string): Promise<T | null>;
2915
- first<T = unknown>(): Promise<Record<string, T> | null>;
2916
- run<T = unknown>(): Promise<D1Result<T>>;
2917
- all<T = unknown>(): Promise<D1Result<T[]>>;
2918
- raw<T = unknown>(): Promise<T[]>;
2919
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2920
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2921
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2922
+ raw<T = unknown[]>(): Promise<T[]>;
2919
2923
  }
2920
2924
  // Copyright (c) 2023 Cloudflare, Inc.
2921
2925
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1202,13 +1202,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1202
1202
  metadata: Metadata | null;
1203
1203
  cacheStatus: string | null;
1204
1204
  }
1205
- declare interface Queue<Body> {
1206
- send(message: Body): Promise<void>;
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1206
+ declare interface Queue<Body = unknown> {
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1207
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1208
1209
  }
1209
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1210
1213
  declare interface MessageSendRequest<Body = unknown> {
1211
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1212
1216
  }
1213
1217
  declare interface Message<Body = unknown> {
1214
1218
  readonly id: string;
@@ -2903,15 +2907,15 @@ declare abstract class D1Database {
2903
2907
  prepare(query: string): D1PreparedStatement;
2904
2908
  dump(): Promise<ArrayBuffer>;
2905
2909
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2906
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2910
+ exec(query: string): Promise<D1ExecResult>;
2907
2911
  }
2908
2912
  declare abstract class D1PreparedStatement {
2909
- bind(...values: any[]): D1PreparedStatement;
2913
+ bind(...values: unknown[]): D1PreparedStatement;
2910
2914
  first<T = unknown>(colName: string): Promise<T | null>;
2911
- first<T = unknown>(): Promise<Record<string, T> | null>;
2912
- run<T = unknown>(): Promise<D1Result<T>>;
2913
- all<T = unknown>(): Promise<D1Result<T[]>>;
2914
- raw<T = unknown>(): Promise<T[]>;
2915
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2916
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2917
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2918
+ raw<T = unknown[]>(): Promise<T[]>;
2915
2919
  }
2916
2920
  // Copyright (c) 2023 Cloudflare, Inc.
2917
2921
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1204,13 +1204,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1204
1204
  metadata: Metadata | null;
1205
1205
  cacheStatus: string | null;
1206
1206
  }
1207
- export interface Queue<Body> {
1208
- send(message: Body): Promise<void>;
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1208
+ export interface Queue<Body = unknown> {
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1209
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1210
1211
  }
1211
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1212
1215
  export interface MessageSendRequest<Body = unknown> {
1213
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1214
1218
  }
1215
1219
  export interface Message<Body = unknown> {
1216
1220
  readonly id: string;
@@ -2908,15 +2912,15 @@ export declare abstract class D1Database {
2908
2912
  prepare(query: string): D1PreparedStatement;
2909
2913
  dump(): Promise<ArrayBuffer>;
2910
2914
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2911
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2915
+ exec(query: string): Promise<D1ExecResult>;
2912
2916
  }
2913
2917
  export declare abstract class D1PreparedStatement {
2914
- bind(...values: any[]): D1PreparedStatement;
2918
+ bind(...values: unknown[]): D1PreparedStatement;
2915
2919
  first<T = unknown>(colName: string): Promise<T | null>;
2916
- first<T = unknown>(): Promise<Record<string, T> | null>;
2917
- run<T = unknown>(): Promise<D1Result<T>>;
2918
- all<T = unknown>(): Promise<D1Result<T[]>>;
2919
- raw<T = unknown>(): Promise<T[]>;
2920
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2921
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2922
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2923
+ raw<T = unknown[]>(): Promise<T[]>;
2920
2924
  }
2921
2925
  // Copyright (c) 2023 Cloudflare, Inc.
2922
2926
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1202,13 +1202,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1202
1202
  metadata: Metadata | null;
1203
1203
  cacheStatus: string | null;
1204
1204
  }
1205
- declare interface Queue<Body> {
1206
- send(message: Body): Promise<void>;
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1206
+ declare interface Queue<Body = unknown> {
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1207
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1208
1209
  }
1209
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1210
1213
  declare interface MessageSendRequest<Body = unknown> {
1211
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1212
1216
  }
1213
1217
  declare interface Message<Body = unknown> {
1214
1218
  readonly id: string;
@@ -2900,15 +2904,15 @@ declare abstract class D1Database {
2900
2904
  prepare(query: string): D1PreparedStatement;
2901
2905
  dump(): Promise<ArrayBuffer>;
2902
2906
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2903
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2907
+ exec(query: string): Promise<D1ExecResult>;
2904
2908
  }
2905
2909
  declare abstract class D1PreparedStatement {
2906
- bind(...values: any[]): D1PreparedStatement;
2910
+ bind(...values: unknown[]): D1PreparedStatement;
2907
2911
  first<T = unknown>(colName: string): Promise<T | null>;
2908
- first<T = unknown>(): Promise<Record<string, T> | null>;
2909
- run<T = unknown>(): Promise<D1Result<T>>;
2910
- all<T = unknown>(): Promise<D1Result<T[]>>;
2911
- raw<T = unknown>(): Promise<T[]>;
2912
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2913
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2914
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2915
+ raw<T = unknown[]>(): Promise<T[]>;
2912
2916
  }
2913
2917
  // Copyright (c) 2023 Cloudflare, Inc.
2914
2918
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1204,13 +1204,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1204
1204
  metadata: Metadata | null;
1205
1205
  cacheStatus: string | null;
1206
1206
  }
1207
- export interface Queue<Body> {
1208
- send(message: Body): Promise<void>;
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1208
+ export interface Queue<Body = unknown> {
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1209
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1210
1211
  }
1211
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1212
1215
  export interface MessageSendRequest<Body = unknown> {
1213
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1214
1218
  }
1215
1219
  export interface Message<Body = unknown> {
1216
1220
  readonly id: string;
@@ -2905,15 +2909,15 @@ export declare abstract class D1Database {
2905
2909
  prepare(query: string): D1PreparedStatement;
2906
2910
  dump(): Promise<ArrayBuffer>;
2907
2911
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2908
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2912
+ exec(query: string): Promise<D1ExecResult>;
2909
2913
  }
2910
2914
  export declare abstract class D1PreparedStatement {
2911
- bind(...values: any[]): D1PreparedStatement;
2915
+ bind(...values: unknown[]): D1PreparedStatement;
2912
2916
  first<T = unknown>(colName: string): Promise<T | null>;
2913
- first<T = unknown>(): Promise<Record<string, T> | null>;
2914
- run<T = unknown>(): Promise<D1Result<T>>;
2915
- all<T = unknown>(): Promise<D1Result<T[]>>;
2916
- raw<T = unknown>(): Promise<T[]>;
2917
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2918
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2919
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2920
+ raw<T = unknown[]>(): Promise<T[]>;
2917
2921
  }
2918
2922
  // Copyright (c) 2023 Cloudflare, Inc.
2919
2923
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1206,13 +1206,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1206
1206
  metadata: Metadata | null;
1207
1207
  cacheStatus: string | null;
1208
1208
  }
1209
- declare interface Queue<Body> {
1210
- send(message: Body): Promise<void>;
1209
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1210
+ declare interface Queue<Body = unknown> {
1211
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1211
1212
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1212
1213
  }
1213
- declare interface QueueSendOptions {}
1214
+ declare interface QueueSendOptions {
1215
+ contentType?: QueueContentType;
1216
+ }
1214
1217
  declare interface MessageSendRequest<Body = unknown> {
1215
1218
  body: Body;
1219
+ contentType?: QueueContentType;
1216
1220
  }
1217
1221
  declare interface Message<Body = unknown> {
1218
1222
  readonly id: string;
@@ -2903,15 +2907,15 @@ declare abstract class D1Database {
2903
2907
  prepare(query: string): D1PreparedStatement;
2904
2908
  dump(): Promise<ArrayBuffer>;
2905
2909
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2906
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2910
+ exec(query: string): Promise<D1ExecResult>;
2907
2911
  }
2908
2912
  declare abstract class D1PreparedStatement {
2909
- bind(...values: any[]): D1PreparedStatement;
2913
+ bind(...values: unknown[]): D1PreparedStatement;
2910
2914
  first<T = unknown>(colName: string): Promise<T | null>;
2911
- first<T = unknown>(): Promise<Record<string, T> | null>;
2912
- run<T = unknown>(): Promise<D1Result<T>>;
2913
- all<T = unknown>(): Promise<D1Result<T[]>>;
2914
- raw<T = unknown>(): Promise<T[]>;
2915
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2916
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2917
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2918
+ raw<T = unknown[]>(): Promise<T[]>;
2915
2919
  }
2916
2920
  // Copyright (c) 2023 Cloudflare, Inc.
2917
2921
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1208,13 +1208,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1208
1208
  metadata: Metadata | null;
1209
1209
  cacheStatus: string | null;
1210
1210
  }
1211
- export interface Queue<Body> {
1212
- send(message: Body): Promise<void>;
1211
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1212
+ export interface Queue<Body = unknown> {
1213
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1213
1214
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1214
1215
  }
1215
- export interface QueueSendOptions {}
1216
+ export interface QueueSendOptions {
1217
+ contentType?: QueueContentType;
1218
+ }
1216
1219
  export interface MessageSendRequest<Body = unknown> {
1217
1220
  body: Body;
1221
+ contentType?: QueueContentType;
1218
1222
  }
1219
1223
  export interface Message<Body = unknown> {
1220
1224
  readonly id: string;
@@ -2908,15 +2912,15 @@ export declare abstract class D1Database {
2908
2912
  prepare(query: string): D1PreparedStatement;
2909
2913
  dump(): Promise<ArrayBuffer>;
2910
2914
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2911
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2915
+ exec(query: string): Promise<D1ExecResult>;
2912
2916
  }
2913
2917
  export declare abstract class D1PreparedStatement {
2914
- bind(...values: any[]): D1PreparedStatement;
2918
+ bind(...values: unknown[]): D1PreparedStatement;
2915
2919
  first<T = unknown>(colName: string): Promise<T | null>;
2916
- first<T = unknown>(): Promise<Record<string, T> | null>;
2917
- run<T = unknown>(): Promise<D1Result<T>>;
2918
- all<T = unknown>(): Promise<D1Result<T[]>>;
2919
- raw<T = unknown>(): Promise<T[]>;
2920
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2921
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2922
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2923
+ raw<T = unknown[]>(): Promise<T[]>;
2920
2924
  }
2921
2925
  // Copyright (c) 2023 Cloudflare, Inc.
2922
2926
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1225,13 +1225,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1225
1225
  metadata: Metadata | null;
1226
1226
  cacheStatus: string | null;
1227
1227
  }
1228
- declare interface Queue<Body> {
1229
- send(message: Body): Promise<void>;
1228
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1229
+ declare interface Queue<Body = unknown> {
1230
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1230
1231
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1231
1232
  }
1232
- declare interface QueueSendOptions {}
1233
+ declare interface QueueSendOptions {
1234
+ contentType?: QueueContentType;
1235
+ }
1233
1236
  declare interface MessageSendRequest<Body = unknown> {
1234
1237
  body: Body;
1238
+ contentType?: QueueContentType;
1235
1239
  }
1236
1240
  declare interface QueueResponse {
1237
1241
  outcome: number;
@@ -2943,15 +2947,15 @@ declare abstract class D1Database {
2943
2947
  prepare(query: string): D1PreparedStatement;
2944
2948
  dump(): Promise<ArrayBuffer>;
2945
2949
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2946
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2950
+ exec(query: string): Promise<D1ExecResult>;
2947
2951
  }
2948
2952
  declare abstract class D1PreparedStatement {
2949
- bind(...values: any[]): D1PreparedStatement;
2953
+ bind(...values: unknown[]): D1PreparedStatement;
2950
2954
  first<T = unknown>(colName: string): Promise<T | null>;
2951
- first<T = unknown>(): Promise<Record<string, T> | null>;
2952
- run<T = unknown>(): Promise<D1Result<T>>;
2953
- all<T = unknown>(): Promise<D1Result<T[]>>;
2954
- raw<T = unknown>(): Promise<T[]>;
2955
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2956
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2957
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2958
+ raw<T = unknown[]>(): Promise<T[]>;
2955
2959
  }
2956
2960
  // Copyright (c) 2023 Cloudflare, Inc.
2957
2961
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1227,13 +1227,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1227
1227
  metadata: Metadata | null;
1228
1228
  cacheStatus: string | null;
1229
1229
  }
1230
- export interface Queue<Body> {
1231
- send(message: Body): Promise<void>;
1230
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1231
+ export interface Queue<Body = unknown> {
1232
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1232
1233
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1233
1234
  }
1234
- export interface QueueSendOptions {}
1235
+ export interface QueueSendOptions {
1236
+ contentType?: QueueContentType;
1237
+ }
1235
1238
  export interface MessageSendRequest<Body = unknown> {
1236
1239
  body: Body;
1240
+ contentType?: QueueContentType;
1237
1241
  }
1238
1242
  export interface QueueResponse {
1239
1243
  outcome: number;
@@ -2948,15 +2952,15 @@ export declare abstract class D1Database {
2948
2952
  prepare(query: string): D1PreparedStatement;
2949
2953
  dump(): Promise<ArrayBuffer>;
2950
2954
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2951
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2955
+ exec(query: string): Promise<D1ExecResult>;
2952
2956
  }
2953
2957
  export declare abstract class D1PreparedStatement {
2954
- bind(...values: any[]): D1PreparedStatement;
2958
+ bind(...values: unknown[]): D1PreparedStatement;
2955
2959
  first<T = unknown>(colName: string): Promise<T | null>;
2956
- first<T = unknown>(): Promise<Record<string, T> | null>;
2957
- run<T = unknown>(): Promise<D1Result<T>>;
2958
- all<T = unknown>(): Promise<D1Result<T[]>>;
2959
- raw<T = unknown>(): Promise<T[]>;
2960
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2961
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2962
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2963
+ raw<T = unknown[]>(): Promise<T[]>;
2960
2964
  }
2961
2965
  // Copyright (c) 2023 Cloudflare, Inc.
2962
2966
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/index.d.ts CHANGED
@@ -1216,13 +1216,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1216
1216
  metadata: Metadata | null;
1217
1217
  cacheStatus: string | null;
1218
1218
  }
1219
- declare interface Queue<Body> {
1220
- send(message: Body): Promise<void>;
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1220
+ declare interface Queue<Body = unknown> {
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1221
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1222
1223
  }
1223
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1224
1227
  declare interface MessageSendRequest<Body = unknown> {
1225
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1226
1230
  }
1227
1231
  declare interface Message<Body = unknown> {
1228
1232
  readonly id: string;
@@ -2910,15 +2914,15 @@ declare abstract class D1Database {
2910
2914
  prepare(query: string): D1PreparedStatement;
2911
2915
  dump(): Promise<ArrayBuffer>;
2912
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2913
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2914
2918
  }
2915
2919
  declare abstract class D1PreparedStatement {
2916
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2917
2921
  first<T = unknown>(colName: string): Promise<T | null>;
2918
- first<T = unknown>(): Promise<Record<string, T> | null>;
2919
- run<T = unknown>(): Promise<D1Result<T>>;
2920
- all<T = unknown>(): Promise<D1Result<T[]>>;
2921
- raw<T = unknown>(): Promise<T[]>;
2922
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2923
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2924
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2925
+ raw<T = unknown[]>(): Promise<T[]>;
2922
2926
  }
2923
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2924
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/index.ts CHANGED
@@ -1218,13 +1218,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1218
1218
  metadata: Metadata | null;
1219
1219
  cacheStatus: string | null;
1220
1220
  }
1221
- export interface Queue<Body> {
1222
- send(message: Body): Promise<void>;
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1222
+ export interface Queue<Body = unknown> {
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1223
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1224
1225
  }
1225
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1226
1229
  export interface MessageSendRequest<Body = unknown> {
1227
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1228
1232
  }
1229
1233
  export interface Message<Body = unknown> {
1230
1234
  readonly id: string;
@@ -2915,15 +2919,15 @@ export declare abstract class D1Database {
2915
2919
  prepare(query: string): D1PreparedStatement;
2916
2920
  dump(): Promise<ArrayBuffer>;
2917
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2918
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2919
2923
  }
2920
2924
  export declare abstract class D1PreparedStatement {
2921
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2922
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2923
- first<T = unknown>(): Promise<Record<string, T> | null>;
2924
- run<T = unknown>(): Promise<D1Result<T>>;
2925
- all<T = unknown>(): Promise<D1Result<T[]>>;
2926
- raw<T = unknown>(): Promise<T[]>;
2927
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2928
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2929
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2930
+ raw<T = unknown[]>(): Promise<T[]>;
2927
2931
  }
2928
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2929
2933
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/oldest/index.d.ts CHANGED
@@ -1216,13 +1216,17 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1216
1216
  metadata: Metadata | null;
1217
1217
  cacheStatus: string | null;
1218
1218
  }
1219
- declare interface Queue<Body> {
1220
- send(message: Body): Promise<void>;
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1220
+ declare interface Queue<Body = unknown> {
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1221
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1222
1223
  }
1223
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1224
1227
  declare interface MessageSendRequest<Body = unknown> {
1225
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1226
1230
  }
1227
1231
  declare interface Message<Body = unknown> {
1228
1232
  readonly id: string;
@@ -2910,15 +2914,15 @@ declare abstract class D1Database {
2910
2914
  prepare(query: string): D1PreparedStatement;
2911
2915
  dump(): Promise<ArrayBuffer>;
2912
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2913
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2914
2918
  }
2915
2919
  declare abstract class D1PreparedStatement {
2916
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2917
2921
  first<T = unknown>(colName: string): Promise<T | null>;
2918
- first<T = unknown>(): Promise<Record<string, T> | null>;
2919
- run<T = unknown>(): Promise<D1Result<T>>;
2920
- all<T = unknown>(): Promise<D1Result<T[]>>;
2921
- raw<T = unknown>(): Promise<T[]>;
2922
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2923
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2924
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2925
+ raw<T = unknown[]>(): Promise<T[]>;
2922
2926
  }
2923
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2924
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/oldest/index.ts CHANGED
@@ -1218,13 +1218,17 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1218
1218
  metadata: Metadata | null;
1219
1219
  cacheStatus: string | null;
1220
1220
  }
1221
- export interface Queue<Body> {
1222
- send(message: Body): Promise<void>;
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1222
+ export interface Queue<Body = unknown> {
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1223
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1224
1225
  }
1225
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1226
1229
  export interface MessageSendRequest<Body = unknown> {
1227
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1228
1232
  }
1229
1233
  export interface Message<Body = unknown> {
1230
1234
  readonly id: string;
@@ -2915,15 +2919,15 @@ export declare abstract class D1Database {
2915
2919
  prepare(query: string): D1PreparedStatement;
2916
2920
  dump(): Promise<ArrayBuffer>;
2917
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2918
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2919
2923
  }
2920
2924
  export declare abstract class D1PreparedStatement {
2921
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2922
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2923
- first<T = unknown>(): Promise<Record<string, T> | null>;
2924
- run<T = unknown>(): Promise<D1Result<T>>;
2925
- all<T = unknown>(): Promise<D1Result<T[]>>;
2926
- raw<T = unknown>(): Promise<T[]>;
2927
+ first<T = Record<string, unknown>>(): Promise<T | null>;
2928
+ run<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2929
+ all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
2930
+ raw<T = unknown[]>(): Promise<T[]>;
2927
2931
  }
2928
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2929
2933
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
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": "4.20230717.0"
10
+ "version": "4.20230724.0"
11
11
  }