@cloudflare/workers-types 4.20230710.1 → 4.20230717.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.
@@ -1116,10 +1116,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1116
1116
  list_complete: false;
1117
1117
  keys: KVNamespaceListKey<Metadata, Key>[];
1118
1118
  cursor: string;
1119
+ cacheStatus: string | null;
1119
1120
  }
1120
1121
  | {
1121
1122
  list_complete: true;
1122
1123
  keys: KVNamespaceListKey<Metadata, Key>[];
1124
+ cacheStatus: string | null;
1123
1125
  };
1124
1126
  declare interface KVNamespace<Key extends string = string> {
1125
1127
  get(
@@ -1212,14 +1214,19 @@ declare interface KVNamespacePutOptions {
1212
1214
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1213
1215
  value: Value | null;
1214
1216
  metadata: Metadata | null;
1217
+ cacheStatus: string | null;
1215
1218
  }
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1216
1220
  declare interface Queue<Body> {
1217
- send(message: Body): Promise<void>;
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1218
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1219
1223
  }
1220
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1221
1227
  declare interface MessageSendRequest<Body = unknown> {
1222
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1223
1230
  }
1224
1231
  declare interface Message<Body = unknown> {
1225
1232
  readonly id: string;
@@ -2907,15 +2914,15 @@ declare abstract class D1Database {
2907
2914
  prepare(query: string): D1PreparedStatement;
2908
2915
  dump(): Promise<ArrayBuffer>;
2909
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2910
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2911
2918
  }
2912
2919
  declare abstract class D1PreparedStatement {
2913
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2914
2921
  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[]>;
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[]>;
2919
2926
  }
2920
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2921
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1118,10 +1118,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1118
1118
  list_complete: false;
1119
1119
  keys: KVNamespaceListKey<Metadata, Key>[];
1120
1120
  cursor: string;
1121
+ cacheStatus: string | null;
1121
1122
  }
1122
1123
  | {
1123
1124
  list_complete: true;
1124
1125
  keys: KVNamespaceListKey<Metadata, Key>[];
1126
+ cacheStatus: string | null;
1125
1127
  };
1126
1128
  export interface KVNamespace<Key extends string = string> {
1127
1129
  get(
@@ -1214,14 +1216,19 @@ export interface KVNamespacePutOptions {
1214
1216
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1215
1217
  value: Value | null;
1216
1218
  metadata: Metadata | null;
1219
+ cacheStatus: string | null;
1217
1220
  }
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1218
1222
  export interface Queue<Body> {
1219
- send(message: Body): Promise<void>;
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1220
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1221
1225
  }
1222
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1223
1229
  export interface MessageSendRequest<Body = unknown> {
1224
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1225
1232
  }
1226
1233
  export interface Message<Body = unknown> {
1227
1234
  readonly id: string;
@@ -2912,15 +2919,15 @@ export declare abstract class D1Database {
2912
2919
  prepare(query: string): D1PreparedStatement;
2913
2920
  dump(): Promise<ArrayBuffer>;
2914
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2915
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2916
2923
  }
2917
2924
  export declare abstract class D1PreparedStatement {
2918
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2919
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2920
- first<T = unknown>(): Promise<Record<string, T> | null>;
2921
- run<T = unknown>(): Promise<D1Result<T>>;
2922
- all<T = unknown>(): Promise<D1Result<T[]>>;
2923
- 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[]>;
2924
2931
  }
2925
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2926
2933
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1096,10 +1096,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1096
1096
  list_complete: false;
1097
1097
  keys: KVNamespaceListKey<Metadata, Key>[];
1098
1098
  cursor: string;
1099
+ cacheStatus: string | null;
1099
1100
  }
1100
1101
  | {
1101
1102
  list_complete: true;
1102
1103
  keys: KVNamespaceListKey<Metadata, Key>[];
1104
+ cacheStatus: string | null;
1103
1105
  };
1104
1106
  declare interface KVNamespace<Key extends string = string> {
1105
1107
  get(
@@ -1192,14 +1194,19 @@ declare interface KVNamespacePutOptions {
1192
1194
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1193
1195
  value: Value | null;
1194
1196
  metadata: Metadata | null;
1197
+ cacheStatus: string | null;
1195
1198
  }
1199
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1196
1200
  declare interface Queue<Body> {
1197
- send(message: Body): Promise<void>;
1201
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1198
1202
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1199
1203
  }
1200
- declare interface QueueSendOptions {}
1204
+ declare interface QueueSendOptions {
1205
+ contentType?: QueueContentType;
1206
+ }
1201
1207
  declare interface MessageSendRequest<Body = unknown> {
1202
1208
  body: Body;
1209
+ contentType?: QueueContentType;
1203
1210
  }
1204
1211
  declare interface Message<Body = unknown> {
1205
1212
  readonly id: string;
@@ -2893,15 +2900,15 @@ declare abstract class D1Database {
2893
2900
  prepare(query: string): D1PreparedStatement;
2894
2901
  dump(): Promise<ArrayBuffer>;
2895
2902
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2896
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2903
+ exec(query: string): Promise<D1ExecResult>;
2897
2904
  }
2898
2905
  declare abstract class D1PreparedStatement {
2899
- bind(...values: any[]): D1PreparedStatement;
2906
+ bind(...values: unknown[]): D1PreparedStatement;
2900
2907
  first<T = unknown>(colName: string): Promise<T | null>;
2901
- first<T = unknown>(): Promise<Record<string, T> | null>;
2902
- run<T = unknown>(): Promise<D1Result<T>>;
2903
- all<T = unknown>(): Promise<D1Result<T[]>>;
2904
- 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[]>;
2905
2912
  }
2906
2913
  // Copyright (c) 2023 Cloudflare, Inc.
2907
2914
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1098,10 +1098,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1098
1098
  list_complete: false;
1099
1099
  keys: KVNamespaceListKey<Metadata, Key>[];
1100
1100
  cursor: string;
1101
+ cacheStatus: string | null;
1101
1102
  }
1102
1103
  | {
1103
1104
  list_complete: true;
1104
1105
  keys: KVNamespaceListKey<Metadata, Key>[];
1106
+ cacheStatus: string | null;
1105
1107
  };
1106
1108
  export interface KVNamespace<Key extends string = string> {
1107
1109
  get(
@@ -1194,14 +1196,19 @@ export interface KVNamespacePutOptions {
1194
1196
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1195
1197
  value: Value | null;
1196
1198
  metadata: Metadata | null;
1199
+ cacheStatus: string | null;
1197
1200
  }
1201
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1198
1202
  export interface Queue<Body> {
1199
- send(message: Body): Promise<void>;
1203
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1200
1204
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1201
1205
  }
1202
- export interface QueueSendOptions {}
1206
+ export interface QueueSendOptions {
1207
+ contentType?: QueueContentType;
1208
+ }
1203
1209
  export interface MessageSendRequest<Body = unknown> {
1204
1210
  body: Body;
1211
+ contentType?: QueueContentType;
1205
1212
  }
1206
1213
  export interface Message<Body = unknown> {
1207
1214
  readonly id: string;
@@ -2898,15 +2905,15 @@ export declare abstract class D1Database {
2898
2905
  prepare(query: string): D1PreparedStatement;
2899
2906
  dump(): Promise<ArrayBuffer>;
2900
2907
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2901
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2908
+ exec(query: string): Promise<D1ExecResult>;
2902
2909
  }
2903
2910
  export declare abstract class D1PreparedStatement {
2904
- bind(...values: any[]): D1PreparedStatement;
2911
+ bind(...values: unknown[]): D1PreparedStatement;
2905
2912
  first<T = unknown>(colName: string): Promise<T | null>;
2906
- first<T = unknown>(): Promise<Record<string, T> | null>;
2907
- run<T = unknown>(): Promise<D1Result<T>>;
2908
- all<T = unknown>(): Promise<D1Result<T[]>>;
2909
- 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[]>;
2910
2917
  }
2911
2918
  // Copyright (c) 2023 Cloudflare, Inc.
2912
2919
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1102,10 +1102,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1102
1102
  list_complete: false;
1103
1103
  keys: KVNamespaceListKey<Metadata, Key>[];
1104
1104
  cursor: string;
1105
+ cacheStatus: string | null;
1105
1106
  }
1106
1107
  | {
1107
1108
  list_complete: true;
1108
1109
  keys: KVNamespaceListKey<Metadata, Key>[];
1110
+ cacheStatus: string | null;
1109
1111
  };
1110
1112
  declare interface KVNamespace<Key extends string = string> {
1111
1113
  get(
@@ -1198,14 +1200,19 @@ declare interface KVNamespacePutOptions {
1198
1200
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1199
1201
  value: Value | null;
1200
1202
  metadata: Metadata | null;
1203
+ cacheStatus: string | null;
1201
1204
  }
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1202
1206
  declare interface Queue<Body> {
1203
- send(message: Body): Promise<void>;
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1204
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1205
1209
  }
1206
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1207
1213
  declare interface MessageSendRequest<Body = unknown> {
1208
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1209
1216
  }
1210
1217
  declare interface Message<Body = unknown> {
1211
1218
  readonly id: string;
@@ -2899,15 +2906,15 @@ declare abstract class D1Database {
2899
2906
  prepare(query: string): D1PreparedStatement;
2900
2907
  dump(): Promise<ArrayBuffer>;
2901
2908
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2902
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2909
+ exec(query: string): Promise<D1ExecResult>;
2903
2910
  }
2904
2911
  declare abstract class D1PreparedStatement {
2905
- bind(...values: any[]): D1PreparedStatement;
2912
+ bind(...values: unknown[]): D1PreparedStatement;
2906
2913
  first<T = unknown>(colName: string): Promise<T | null>;
2907
- first<T = unknown>(): Promise<Record<string, T> | null>;
2908
- run<T = unknown>(): Promise<D1Result<T>>;
2909
- all<T = unknown>(): Promise<D1Result<T[]>>;
2910
- 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[]>;
2911
2918
  }
2912
2919
  // Copyright (c) 2023 Cloudflare, Inc.
2913
2920
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1104,10 +1104,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1104
1104
  list_complete: false;
1105
1105
  keys: KVNamespaceListKey<Metadata, Key>[];
1106
1106
  cursor: string;
1107
+ cacheStatus: string | null;
1107
1108
  }
1108
1109
  | {
1109
1110
  list_complete: true;
1110
1111
  keys: KVNamespaceListKey<Metadata, Key>[];
1112
+ cacheStatus: string | null;
1111
1113
  };
1112
1114
  export interface KVNamespace<Key extends string = string> {
1113
1115
  get(
@@ -1200,14 +1202,19 @@ export interface KVNamespacePutOptions {
1200
1202
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1201
1203
  value: Value | null;
1202
1204
  metadata: Metadata | null;
1205
+ cacheStatus: string | null;
1203
1206
  }
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1204
1208
  export interface Queue<Body> {
1205
- send(message: Body): Promise<void>;
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1206
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1207
1211
  }
1208
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1209
1215
  export interface MessageSendRequest<Body = unknown> {
1210
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1211
1218
  }
1212
1219
  export interface Message<Body = unknown> {
1213
1220
  readonly id: string;
@@ -2904,15 +2911,15 @@ export declare abstract class D1Database {
2904
2911
  prepare(query: string): D1PreparedStatement;
2905
2912
  dump(): Promise<ArrayBuffer>;
2906
2913
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2907
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2914
+ exec(query: string): Promise<D1ExecResult>;
2908
2915
  }
2909
2916
  export declare abstract class D1PreparedStatement {
2910
- bind(...values: any[]): D1PreparedStatement;
2917
+ bind(...values: unknown[]): D1PreparedStatement;
2911
2918
  first<T = unknown>(colName: string): Promise<T | null>;
2912
- first<T = unknown>(): Promise<Record<string, T> | null>;
2913
- run<T = unknown>(): Promise<D1Result<T>>;
2914
- all<T = unknown>(): Promise<D1Result<T[]>>;
2915
- 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[]>;
2916
2923
  }
2917
2924
  // Copyright (c) 2023 Cloudflare, Inc.
2918
2925
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1102,10 +1102,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1102
1102
  list_complete: false;
1103
1103
  keys: KVNamespaceListKey<Metadata, Key>[];
1104
1104
  cursor: string;
1105
+ cacheStatus: string | null;
1105
1106
  }
1106
1107
  | {
1107
1108
  list_complete: true;
1108
1109
  keys: KVNamespaceListKey<Metadata, Key>[];
1110
+ cacheStatus: string | null;
1109
1111
  };
1110
1112
  declare interface KVNamespace<Key extends string = string> {
1111
1113
  get(
@@ -1198,14 +1200,19 @@ declare interface KVNamespacePutOptions {
1198
1200
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1199
1201
  value: Value | null;
1200
1202
  metadata: Metadata | null;
1203
+ cacheStatus: string | null;
1201
1204
  }
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1202
1206
  declare interface Queue<Body> {
1203
- send(message: Body): Promise<void>;
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1204
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1205
1209
  }
1206
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1207
1213
  declare interface MessageSendRequest<Body = unknown> {
1208
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1209
1216
  }
1210
1217
  declare interface Message<Body = unknown> {
1211
1218
  readonly id: string;
@@ -2900,15 +2907,15 @@ declare abstract class D1Database {
2900
2907
  prepare(query: string): D1PreparedStatement;
2901
2908
  dump(): Promise<ArrayBuffer>;
2902
2909
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2903
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2910
+ exec(query: string): Promise<D1ExecResult>;
2904
2911
  }
2905
2912
  declare abstract class D1PreparedStatement {
2906
- bind(...values: any[]): D1PreparedStatement;
2913
+ bind(...values: unknown[]): D1PreparedStatement;
2907
2914
  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[]>;
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[]>;
2912
2919
  }
2913
2920
  // Copyright (c) 2023 Cloudflare, Inc.
2914
2921
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1104,10 +1104,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1104
1104
  list_complete: false;
1105
1105
  keys: KVNamespaceListKey<Metadata, Key>[];
1106
1106
  cursor: string;
1107
+ cacheStatus: string | null;
1107
1108
  }
1108
1109
  | {
1109
1110
  list_complete: true;
1110
1111
  keys: KVNamespaceListKey<Metadata, Key>[];
1112
+ cacheStatus: string | null;
1111
1113
  };
1112
1114
  export interface KVNamespace<Key extends string = string> {
1113
1115
  get(
@@ -1200,14 +1202,19 @@ export interface KVNamespacePutOptions {
1200
1202
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1201
1203
  value: Value | null;
1202
1204
  metadata: Metadata | null;
1205
+ cacheStatus: string | null;
1203
1206
  }
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1204
1208
  export interface Queue<Body> {
1205
- send(message: Body): Promise<void>;
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1206
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1207
1211
  }
1208
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1209
1215
  export interface MessageSendRequest<Body = unknown> {
1210
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1211
1218
  }
1212
1219
  export interface Message<Body = unknown> {
1213
1220
  readonly id: string;
@@ -2905,15 +2912,15 @@ export declare abstract class D1Database {
2905
2912
  prepare(query: string): D1PreparedStatement;
2906
2913
  dump(): Promise<ArrayBuffer>;
2907
2914
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2908
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2915
+ exec(query: string): Promise<D1ExecResult>;
2909
2916
  }
2910
2917
  export declare abstract class D1PreparedStatement {
2911
- bind(...values: any[]): D1PreparedStatement;
2918
+ bind(...values: unknown[]): D1PreparedStatement;
2912
2919
  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[]>;
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[]>;
2917
2924
  }
2918
2925
  // Copyright (c) 2023 Cloudflare, Inc.
2919
2926
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1102,10 +1102,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1102
1102
  list_complete: false;
1103
1103
  keys: KVNamespaceListKey<Metadata, Key>[];
1104
1104
  cursor: string;
1105
+ cacheStatus: string | null;
1105
1106
  }
1106
1107
  | {
1107
1108
  list_complete: true;
1108
1109
  keys: KVNamespaceListKey<Metadata, Key>[];
1110
+ cacheStatus: string | null;
1109
1111
  };
1110
1112
  declare interface KVNamespace<Key extends string = string> {
1111
1113
  get(
@@ -1198,14 +1200,19 @@ declare interface KVNamespacePutOptions {
1198
1200
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1199
1201
  value: Value | null;
1200
1202
  metadata: Metadata | null;
1203
+ cacheStatus: string | null;
1201
1204
  }
1205
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1202
1206
  declare interface Queue<Body> {
1203
- send(message: Body): Promise<void>;
1207
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1204
1208
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1205
1209
  }
1206
- declare interface QueueSendOptions {}
1210
+ declare interface QueueSendOptions {
1211
+ contentType?: QueueContentType;
1212
+ }
1207
1213
  declare interface MessageSendRequest<Body = unknown> {
1208
1214
  body: Body;
1215
+ contentType?: QueueContentType;
1209
1216
  }
1210
1217
  declare interface Message<Body = unknown> {
1211
1218
  readonly id: string;
@@ -2897,15 +2904,15 @@ declare abstract class D1Database {
2897
2904
  prepare(query: string): D1PreparedStatement;
2898
2905
  dump(): Promise<ArrayBuffer>;
2899
2906
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2900
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2907
+ exec(query: string): Promise<D1ExecResult>;
2901
2908
  }
2902
2909
  declare abstract class D1PreparedStatement {
2903
- bind(...values: any[]): D1PreparedStatement;
2910
+ bind(...values: unknown[]): D1PreparedStatement;
2904
2911
  first<T = unknown>(colName: string): Promise<T | null>;
2905
- first<T = unknown>(): Promise<Record<string, T> | null>;
2906
- run<T = unknown>(): Promise<D1Result<T>>;
2907
- all<T = unknown>(): Promise<D1Result<T[]>>;
2908
- 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[]>;
2909
2916
  }
2910
2917
  // Copyright (c) 2023 Cloudflare, Inc.
2911
2918
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1104,10 +1104,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1104
1104
  list_complete: false;
1105
1105
  keys: KVNamespaceListKey<Metadata, Key>[];
1106
1106
  cursor: string;
1107
+ cacheStatus: string | null;
1107
1108
  }
1108
1109
  | {
1109
1110
  list_complete: true;
1110
1111
  keys: KVNamespaceListKey<Metadata, Key>[];
1112
+ cacheStatus: string | null;
1111
1113
  };
1112
1114
  export interface KVNamespace<Key extends string = string> {
1113
1115
  get(
@@ -1200,14 +1202,19 @@ export interface KVNamespacePutOptions {
1200
1202
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1201
1203
  value: Value | null;
1202
1204
  metadata: Metadata | null;
1205
+ cacheStatus: string | null;
1203
1206
  }
1207
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1204
1208
  export interface Queue<Body> {
1205
- send(message: Body): Promise<void>;
1209
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1206
1210
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1207
1211
  }
1208
- export interface QueueSendOptions {}
1212
+ export interface QueueSendOptions {
1213
+ contentType?: QueueContentType;
1214
+ }
1209
1215
  export interface MessageSendRequest<Body = unknown> {
1210
1216
  body: Body;
1217
+ contentType?: QueueContentType;
1211
1218
  }
1212
1219
  export interface Message<Body = unknown> {
1213
1220
  readonly id: string;
@@ -2902,15 +2909,15 @@ export declare abstract class D1Database {
2902
2909
  prepare(query: string): D1PreparedStatement;
2903
2910
  dump(): Promise<ArrayBuffer>;
2904
2911
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2905
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2912
+ exec(query: string): Promise<D1ExecResult>;
2906
2913
  }
2907
2914
  export declare abstract class D1PreparedStatement {
2908
- bind(...values: any[]): D1PreparedStatement;
2915
+ bind(...values: unknown[]): D1PreparedStatement;
2909
2916
  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[]>;
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[]>;
2914
2921
  }
2915
2922
  // Copyright (c) 2023 Cloudflare, Inc.
2916
2923
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1106,10 +1106,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1106
1106
  list_complete: false;
1107
1107
  keys: KVNamespaceListKey<Metadata, Key>[];
1108
1108
  cursor: string;
1109
+ cacheStatus: string | null;
1109
1110
  }
1110
1111
  | {
1111
1112
  list_complete: true;
1112
1113
  keys: KVNamespaceListKey<Metadata, Key>[];
1114
+ cacheStatus: string | null;
1113
1115
  };
1114
1116
  declare interface KVNamespace<Key extends string = string> {
1115
1117
  get(
@@ -1202,14 +1204,19 @@ declare interface KVNamespacePutOptions {
1202
1204
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1203
1205
  value: Value | null;
1204
1206
  metadata: Metadata | null;
1207
+ cacheStatus: string | null;
1205
1208
  }
1209
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1206
1210
  declare interface Queue<Body> {
1207
- send(message: Body): Promise<void>;
1211
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1208
1212
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1209
1213
  }
1210
- declare interface QueueSendOptions {}
1214
+ declare interface QueueSendOptions {
1215
+ contentType?: QueueContentType;
1216
+ }
1211
1217
  declare interface MessageSendRequest<Body = unknown> {
1212
1218
  body: Body;
1219
+ contentType?: QueueContentType;
1213
1220
  }
1214
1221
  declare interface Message<Body = unknown> {
1215
1222
  readonly id: string;
@@ -2900,15 +2907,15 @@ declare abstract class D1Database {
2900
2907
  prepare(query: string): D1PreparedStatement;
2901
2908
  dump(): Promise<ArrayBuffer>;
2902
2909
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2903
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2910
+ exec(query: string): Promise<D1ExecResult>;
2904
2911
  }
2905
2912
  declare abstract class D1PreparedStatement {
2906
- bind(...values: any[]): D1PreparedStatement;
2913
+ bind(...values: unknown[]): D1PreparedStatement;
2907
2914
  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[]>;
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[]>;
2912
2919
  }
2913
2920
  // Copyright (c) 2023 Cloudflare, Inc.
2914
2921
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1108,10 +1108,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1108
1108
  list_complete: false;
1109
1109
  keys: KVNamespaceListKey<Metadata, Key>[];
1110
1110
  cursor: string;
1111
+ cacheStatus: string | null;
1111
1112
  }
1112
1113
  | {
1113
1114
  list_complete: true;
1114
1115
  keys: KVNamespaceListKey<Metadata, Key>[];
1116
+ cacheStatus: string | null;
1115
1117
  };
1116
1118
  export interface KVNamespace<Key extends string = string> {
1117
1119
  get(
@@ -1204,14 +1206,19 @@ export interface KVNamespacePutOptions {
1204
1206
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1205
1207
  value: Value | null;
1206
1208
  metadata: Metadata | null;
1209
+ cacheStatus: string | null;
1207
1210
  }
1211
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1208
1212
  export interface Queue<Body> {
1209
- send(message: Body): Promise<void>;
1213
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1210
1214
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1211
1215
  }
1212
- export interface QueueSendOptions {}
1216
+ export interface QueueSendOptions {
1217
+ contentType?: QueueContentType;
1218
+ }
1213
1219
  export interface MessageSendRequest<Body = unknown> {
1214
1220
  body: Body;
1221
+ contentType?: QueueContentType;
1215
1222
  }
1216
1223
  export interface Message<Body = unknown> {
1217
1224
  readonly id: string;
@@ -2905,15 +2912,15 @@ export declare abstract class D1Database {
2905
2912
  prepare(query: string): D1PreparedStatement;
2906
2913
  dump(): Promise<ArrayBuffer>;
2907
2914
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2908
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2915
+ exec(query: string): Promise<D1ExecResult>;
2909
2916
  }
2910
2917
  export declare abstract class D1PreparedStatement {
2911
- bind(...values: any[]): D1PreparedStatement;
2918
+ bind(...values: unknown[]): D1PreparedStatement;
2912
2919
  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[]>;
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[]>;
2917
2924
  }
2918
2925
  // Copyright (c) 2023 Cloudflare, Inc.
2919
2926
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1125,10 +1125,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1125
1125
  list_complete: false;
1126
1126
  keys: KVNamespaceListKey<Metadata, Key>[];
1127
1127
  cursor: string;
1128
+ cacheStatus: string | null;
1128
1129
  }
1129
1130
  | {
1130
1131
  list_complete: true;
1131
1132
  keys: KVNamespaceListKey<Metadata, Key>[];
1133
+ cacheStatus: string | null;
1132
1134
  };
1133
1135
  declare interface KVNamespace<Key extends string = string> {
1134
1136
  get(
@@ -1221,14 +1223,19 @@ declare interface KVNamespacePutOptions {
1221
1223
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1222
1224
  value: Value | null;
1223
1225
  metadata: Metadata | null;
1226
+ cacheStatus: string | null;
1224
1227
  }
1228
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1225
1229
  declare interface Queue<Body> {
1226
- send(message: Body): Promise<void>;
1230
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1227
1231
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1228
1232
  }
1229
- declare interface QueueSendOptions {}
1233
+ declare interface QueueSendOptions {
1234
+ contentType?: QueueContentType;
1235
+ }
1230
1236
  declare interface MessageSendRequest<Body = unknown> {
1231
1237
  body: Body;
1238
+ contentType?: QueueContentType;
1232
1239
  }
1233
1240
  declare interface QueueResponse {
1234
1241
  outcome: number;
@@ -2940,15 +2947,15 @@ declare abstract class D1Database {
2940
2947
  prepare(query: string): D1PreparedStatement;
2941
2948
  dump(): Promise<ArrayBuffer>;
2942
2949
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2943
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2950
+ exec(query: string): Promise<D1ExecResult>;
2944
2951
  }
2945
2952
  declare abstract class D1PreparedStatement {
2946
- bind(...values: any[]): D1PreparedStatement;
2953
+ bind(...values: unknown[]): D1PreparedStatement;
2947
2954
  first<T = unknown>(colName: string): Promise<T | null>;
2948
- first<T = unknown>(): Promise<Record<string, T> | null>;
2949
- run<T = unknown>(): Promise<D1Result<T>>;
2950
- all<T = unknown>(): Promise<D1Result<T[]>>;
2951
- 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[]>;
2952
2959
  }
2953
2960
  // Copyright (c) 2023 Cloudflare, Inc.
2954
2961
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
@@ -1127,10 +1127,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1127
1127
  list_complete: false;
1128
1128
  keys: KVNamespaceListKey<Metadata, Key>[];
1129
1129
  cursor: string;
1130
+ cacheStatus: string | null;
1130
1131
  }
1131
1132
  | {
1132
1133
  list_complete: true;
1133
1134
  keys: KVNamespaceListKey<Metadata, Key>[];
1135
+ cacheStatus: string | null;
1134
1136
  };
1135
1137
  export interface KVNamespace<Key extends string = string> {
1136
1138
  get(
@@ -1223,14 +1225,19 @@ export interface KVNamespacePutOptions {
1223
1225
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1224
1226
  value: Value | null;
1225
1227
  metadata: Metadata | null;
1228
+ cacheStatus: string | null;
1226
1229
  }
1230
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1227
1231
  export interface Queue<Body> {
1228
- send(message: Body): Promise<void>;
1232
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1229
1233
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1230
1234
  }
1231
- export interface QueueSendOptions {}
1235
+ export interface QueueSendOptions {
1236
+ contentType?: QueueContentType;
1237
+ }
1232
1238
  export interface MessageSendRequest<Body = unknown> {
1233
1239
  body: Body;
1240
+ contentType?: QueueContentType;
1234
1241
  }
1235
1242
  export interface QueueResponse {
1236
1243
  outcome: number;
@@ -2945,15 +2952,15 @@ export declare abstract class D1Database {
2945
2952
  prepare(query: string): D1PreparedStatement;
2946
2953
  dump(): Promise<ArrayBuffer>;
2947
2954
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2948
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2955
+ exec(query: string): Promise<D1ExecResult>;
2949
2956
  }
2950
2957
  export declare abstract class D1PreparedStatement {
2951
- bind(...values: any[]): D1PreparedStatement;
2958
+ bind(...values: unknown[]): D1PreparedStatement;
2952
2959
  first<T = unknown>(colName: string): Promise<T | null>;
2953
- first<T = unknown>(): Promise<Record<string, T> | null>;
2954
- run<T = unknown>(): Promise<D1Result<T>>;
2955
- all<T = unknown>(): Promise<D1Result<T[]>>;
2956
- 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[]>;
2957
2964
  }
2958
2965
  // Copyright (c) 2023 Cloudflare, Inc.
2959
2966
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/index.d.ts CHANGED
@@ -1116,10 +1116,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1116
1116
  list_complete: false;
1117
1117
  keys: KVNamespaceListKey<Metadata, Key>[];
1118
1118
  cursor: string;
1119
+ cacheStatus: string | null;
1119
1120
  }
1120
1121
  | {
1121
1122
  list_complete: true;
1122
1123
  keys: KVNamespaceListKey<Metadata, Key>[];
1124
+ cacheStatus: string | null;
1123
1125
  };
1124
1126
  declare interface KVNamespace<Key extends string = string> {
1125
1127
  get(
@@ -1212,14 +1214,19 @@ declare interface KVNamespacePutOptions {
1212
1214
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1213
1215
  value: Value | null;
1214
1216
  metadata: Metadata | null;
1217
+ cacheStatus: string | null;
1215
1218
  }
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1216
1220
  declare interface Queue<Body> {
1217
- send(message: Body): Promise<void>;
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1218
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1219
1223
  }
1220
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1221
1227
  declare interface MessageSendRequest<Body = unknown> {
1222
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1223
1230
  }
1224
1231
  declare interface Message<Body = unknown> {
1225
1232
  readonly id: string;
@@ -2907,15 +2914,15 @@ declare abstract class D1Database {
2907
2914
  prepare(query: string): D1PreparedStatement;
2908
2915
  dump(): Promise<ArrayBuffer>;
2909
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2910
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2911
2918
  }
2912
2919
  declare abstract class D1PreparedStatement {
2913
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2914
2921
  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[]>;
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[]>;
2919
2926
  }
2920
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2921
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/index.ts CHANGED
@@ -1118,10 +1118,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1118
1118
  list_complete: false;
1119
1119
  keys: KVNamespaceListKey<Metadata, Key>[];
1120
1120
  cursor: string;
1121
+ cacheStatus: string | null;
1121
1122
  }
1122
1123
  | {
1123
1124
  list_complete: true;
1124
1125
  keys: KVNamespaceListKey<Metadata, Key>[];
1126
+ cacheStatus: string | null;
1125
1127
  };
1126
1128
  export interface KVNamespace<Key extends string = string> {
1127
1129
  get(
@@ -1214,14 +1216,19 @@ export interface KVNamespacePutOptions {
1214
1216
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1215
1217
  value: Value | null;
1216
1218
  metadata: Metadata | null;
1219
+ cacheStatus: string | null;
1217
1220
  }
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1218
1222
  export interface Queue<Body> {
1219
- send(message: Body): Promise<void>;
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1220
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1221
1225
  }
1222
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1223
1229
  export interface MessageSendRequest<Body = unknown> {
1224
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1225
1232
  }
1226
1233
  export interface Message<Body = unknown> {
1227
1234
  readonly id: string;
@@ -2912,15 +2919,15 @@ export declare abstract class D1Database {
2912
2919
  prepare(query: string): D1PreparedStatement;
2913
2920
  dump(): Promise<ArrayBuffer>;
2914
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2915
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2916
2923
  }
2917
2924
  export declare abstract class D1PreparedStatement {
2918
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2919
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2920
- first<T = unknown>(): Promise<Record<string, T> | null>;
2921
- run<T = unknown>(): Promise<D1Result<T>>;
2922
- all<T = unknown>(): Promise<D1Result<T[]>>;
2923
- 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[]>;
2924
2931
  }
2925
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2926
2933
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/oldest/index.d.ts CHANGED
@@ -1116,10 +1116,12 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
1116
1116
  list_complete: false;
1117
1117
  keys: KVNamespaceListKey<Metadata, Key>[];
1118
1118
  cursor: string;
1119
+ cacheStatus: string | null;
1119
1120
  }
1120
1121
  | {
1121
1122
  list_complete: true;
1122
1123
  keys: KVNamespaceListKey<Metadata, Key>[];
1124
+ cacheStatus: string | null;
1123
1125
  };
1124
1126
  declare interface KVNamespace<Key extends string = string> {
1125
1127
  get(
@@ -1212,14 +1214,19 @@ declare interface KVNamespacePutOptions {
1212
1214
  declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1213
1215
  value: Value | null;
1214
1216
  metadata: Metadata | null;
1217
+ cacheStatus: string | null;
1215
1218
  }
1219
+ declare type QueueContentType = "text" | "bytes" | "json" | "v8";
1216
1220
  declare interface Queue<Body> {
1217
- send(message: Body): Promise<void>;
1221
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1218
1222
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1219
1223
  }
1220
- declare interface QueueSendOptions {}
1224
+ declare interface QueueSendOptions {
1225
+ contentType?: QueueContentType;
1226
+ }
1221
1227
  declare interface MessageSendRequest<Body = unknown> {
1222
1228
  body: Body;
1229
+ contentType?: QueueContentType;
1223
1230
  }
1224
1231
  declare interface Message<Body = unknown> {
1225
1232
  readonly id: string;
@@ -2907,15 +2914,15 @@ declare abstract class D1Database {
2907
2914
  prepare(query: string): D1PreparedStatement;
2908
2915
  dump(): Promise<ArrayBuffer>;
2909
2916
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2910
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2917
+ exec(query: string): Promise<D1ExecResult>;
2911
2918
  }
2912
2919
  declare abstract class D1PreparedStatement {
2913
- bind(...values: any[]): D1PreparedStatement;
2920
+ bind(...values: unknown[]): D1PreparedStatement;
2914
2921
  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[]>;
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[]>;
2919
2926
  }
2920
2927
  // Copyright (c) 2023 Cloudflare, Inc.
2921
2928
  // Licensed under the Apache 2.0 license found in the LICENSE file or at:
package/oldest/index.ts CHANGED
@@ -1118,10 +1118,12 @@ export type KVNamespaceListResult<Metadata, Key extends string = string> =
1118
1118
  list_complete: false;
1119
1119
  keys: KVNamespaceListKey<Metadata, Key>[];
1120
1120
  cursor: string;
1121
+ cacheStatus: string | null;
1121
1122
  }
1122
1123
  | {
1123
1124
  list_complete: true;
1124
1125
  keys: KVNamespaceListKey<Metadata, Key>[];
1126
+ cacheStatus: string | null;
1125
1127
  };
1126
1128
  export interface KVNamespace<Key extends string = string> {
1127
1129
  get(
@@ -1214,14 +1216,19 @@ export interface KVNamespacePutOptions {
1214
1216
  export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
1215
1217
  value: Value | null;
1216
1218
  metadata: Metadata | null;
1219
+ cacheStatus: string | null;
1217
1220
  }
1221
+ export type QueueContentType = "text" | "bytes" | "json" | "v8";
1218
1222
  export interface Queue<Body> {
1219
- send(message: Body): Promise<void>;
1223
+ send(message: Body, options?: QueueSendOptions): Promise<void>;
1220
1224
  sendBatch(messages: Iterable<MessageSendRequest<Body>>): Promise<void>;
1221
1225
  }
1222
- export interface QueueSendOptions {}
1226
+ export interface QueueSendOptions {
1227
+ contentType?: QueueContentType;
1228
+ }
1223
1229
  export interface MessageSendRequest<Body = unknown> {
1224
1230
  body: Body;
1231
+ contentType?: QueueContentType;
1225
1232
  }
1226
1233
  export interface Message<Body = unknown> {
1227
1234
  readonly id: string;
@@ -2912,15 +2919,15 @@ export declare abstract class D1Database {
2912
2919
  prepare(query: string): D1PreparedStatement;
2913
2920
  dump(): Promise<ArrayBuffer>;
2914
2921
  batch<T = unknown>(statements: D1PreparedStatement[]): Promise<D1Result<T>[]>;
2915
- exec<T = unknown>(query: string): Promise<D1ExecResult>;
2922
+ exec(query: string): Promise<D1ExecResult>;
2916
2923
  }
2917
2924
  export declare abstract class D1PreparedStatement {
2918
- bind(...values: any[]): D1PreparedStatement;
2925
+ bind(...values: unknown[]): D1PreparedStatement;
2919
2926
  first<T = unknown>(colName: string): Promise<T | null>;
2920
- first<T = unknown>(): Promise<Record<string, T> | null>;
2921
- run<T = unknown>(): Promise<D1Result<T>>;
2922
- all<T = unknown>(): Promise<D1Result<T[]>>;
2923
- 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[]>;
2924
2931
  }
2925
2932
  // Copyright (c) 2023 Cloudflare, Inc.
2926
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.20230710.1"
10
+ "version": "4.20230717.1"
11
11
  }