@cloudflare/workers-types 4.20230807.0 → 4.20230814.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.
@@ -1279,8 +1279,10 @@ declare abstract class R2Bucket {
1279
1279
  | string
1280
1280
  | null
1281
1281
  | Blob,
1282
- options?: R2PutOptions
1283
- ): Promise<R2Object>;
1282
+ options?: R2PutOptions & {
1283
+ onlyIf: R2Conditional | Headers;
1284
+ }
1285
+ ): Promise<R2Object | null>;
1284
1286
  put(
1285
1287
  key: string,
1286
1288
  value:
@@ -1290,10 +1292,8 @@ declare abstract class R2Bucket {
1290
1292
  | string
1291
1293
  | null
1292
1294
  | Blob,
1293
- options?: R2PutOptions & {
1294
- onlyIf: R2Conditional | Headers;
1295
- }
1296
- ): Promise<R2Object | null>;
1295
+ options?: R2PutOptions
1296
+ ): Promise<R2Object>;
1297
1297
  createMultipartUpload(
1298
1298
  key: string,
1299
1299
  options?: R2MultipartOptions
@@ -1281,8 +1281,10 @@ export declare abstract class R2Bucket {
1281
1281
  | string
1282
1282
  | null
1283
1283
  | Blob,
1284
- options?: R2PutOptions
1285
- ): Promise<R2Object>;
1284
+ options?: R2PutOptions & {
1285
+ onlyIf: R2Conditional | Headers;
1286
+ }
1287
+ ): Promise<R2Object | null>;
1286
1288
  put(
1287
1289
  key: string,
1288
1290
  value:
@@ -1292,10 +1294,8 @@ export declare abstract class R2Bucket {
1292
1294
  | string
1293
1295
  | null
1294
1296
  | Blob,
1295
- options?: R2PutOptions & {
1296
- onlyIf: R2Conditional | Headers;
1297
- }
1298
- ): Promise<R2Object | null>;
1297
+ options?: R2PutOptions
1298
+ ): Promise<R2Object>;
1299
1299
  createMultipartUpload(
1300
1300
  key: string,
1301
1301
  options?: R2MultipartOptions
@@ -1259,8 +1259,10 @@ declare abstract class R2Bucket {
1259
1259
  | string
1260
1260
  | null
1261
1261
  | Blob,
1262
- options?: R2PutOptions
1263
- ): Promise<R2Object>;
1262
+ options?: R2PutOptions & {
1263
+ onlyIf: R2Conditional | Headers;
1264
+ }
1265
+ ): Promise<R2Object | null>;
1264
1266
  put(
1265
1267
  key: string,
1266
1268
  value:
@@ -1270,10 +1272,8 @@ declare abstract class R2Bucket {
1270
1272
  | string
1271
1273
  | null
1272
1274
  | Blob,
1273
- options?: R2PutOptions & {
1274
- onlyIf: R2Conditional | Headers;
1275
- }
1276
- ): Promise<R2Object | null>;
1275
+ options?: R2PutOptions
1276
+ ): Promise<R2Object>;
1277
1277
  createMultipartUpload(
1278
1278
  key: string,
1279
1279
  options?: R2MultipartOptions
@@ -1261,8 +1261,10 @@ export declare abstract class R2Bucket {
1261
1261
  | string
1262
1262
  | null
1263
1263
  | Blob,
1264
- options?: R2PutOptions
1265
- ): Promise<R2Object>;
1264
+ options?: R2PutOptions & {
1265
+ onlyIf: R2Conditional | Headers;
1266
+ }
1267
+ ): Promise<R2Object | null>;
1266
1268
  put(
1267
1269
  key: string,
1268
1270
  value:
@@ -1272,10 +1274,8 @@ export declare abstract class R2Bucket {
1272
1274
  | string
1273
1275
  | null
1274
1276
  | Blob,
1275
- options?: R2PutOptions & {
1276
- onlyIf: R2Conditional | Headers;
1277
- }
1278
- ): Promise<R2Object | null>;
1277
+ options?: R2PutOptions
1278
+ ): Promise<R2Object>;
1279
1279
  createMultipartUpload(
1280
1280
  key: string,
1281
1281
  options?: R2MultipartOptions
@@ -1265,8 +1265,10 @@ declare abstract class R2Bucket {
1265
1265
  | string
1266
1266
  | null
1267
1267
  | Blob,
1268
- options?: R2PutOptions
1269
- ): Promise<R2Object>;
1268
+ options?: R2PutOptions & {
1269
+ onlyIf: R2Conditional | Headers;
1270
+ }
1271
+ ): Promise<R2Object | null>;
1270
1272
  put(
1271
1273
  key: string,
1272
1274
  value:
@@ -1276,10 +1278,8 @@ declare abstract class R2Bucket {
1276
1278
  | string
1277
1279
  | null
1278
1280
  | Blob,
1279
- options?: R2PutOptions & {
1280
- onlyIf: R2Conditional | Headers;
1281
- }
1282
- ): Promise<R2Object | null>;
1281
+ options?: R2PutOptions
1282
+ ): Promise<R2Object>;
1283
1283
  createMultipartUpload(
1284
1284
  key: string,
1285
1285
  options?: R2MultipartOptions
@@ -1267,8 +1267,10 @@ export declare abstract class R2Bucket {
1267
1267
  | string
1268
1268
  | null
1269
1269
  | Blob,
1270
- options?: R2PutOptions
1271
- ): Promise<R2Object>;
1270
+ options?: R2PutOptions & {
1271
+ onlyIf: R2Conditional | Headers;
1272
+ }
1273
+ ): Promise<R2Object | null>;
1272
1274
  put(
1273
1275
  key: string,
1274
1276
  value:
@@ -1278,10 +1280,8 @@ export declare abstract class R2Bucket {
1278
1280
  | string
1279
1281
  | null
1280
1282
  | Blob,
1281
- options?: R2PutOptions & {
1282
- onlyIf: R2Conditional | Headers;
1283
- }
1284
- ): Promise<R2Object | null>;
1283
+ options?: R2PutOptions
1284
+ ): Promise<R2Object>;
1285
1285
  createMultipartUpload(
1286
1286
  key: string,
1287
1287
  options?: R2MultipartOptions
@@ -1266,8 +1266,10 @@ declare abstract class R2Bucket {
1266
1266
  | string
1267
1267
  | null
1268
1268
  | Blob,
1269
- options?: R2PutOptions
1270
- ): Promise<R2Object>;
1269
+ options?: R2PutOptions & {
1270
+ onlyIf: R2Conditional | Headers;
1271
+ }
1272
+ ): Promise<R2Object | null>;
1271
1273
  put(
1272
1274
  key: string,
1273
1275
  value:
@@ -1277,10 +1279,8 @@ declare abstract class R2Bucket {
1277
1279
  | string
1278
1280
  | null
1279
1281
  | Blob,
1280
- options?: R2PutOptions & {
1281
- onlyIf: R2Conditional | Headers;
1282
- }
1283
- ): Promise<R2Object | null>;
1282
+ options?: R2PutOptions
1283
+ ): Promise<R2Object>;
1284
1284
  createMultipartUpload(
1285
1285
  key: string,
1286
1286
  options?: R2MultipartOptions
@@ -1268,8 +1268,10 @@ export declare abstract class R2Bucket {
1268
1268
  | string
1269
1269
  | null
1270
1270
  | Blob,
1271
- options?: R2PutOptions
1272
- ): Promise<R2Object>;
1271
+ options?: R2PutOptions & {
1272
+ onlyIf: R2Conditional | Headers;
1273
+ }
1274
+ ): Promise<R2Object | null>;
1273
1275
  put(
1274
1276
  key: string,
1275
1277
  value:
@@ -1279,10 +1281,8 @@ export declare abstract class R2Bucket {
1279
1281
  | string
1280
1282
  | null
1281
1283
  | Blob,
1282
- options?: R2PutOptions & {
1283
- onlyIf: R2Conditional | Headers;
1284
- }
1285
- ): Promise<R2Object | null>;
1284
+ options?: R2PutOptions
1285
+ ): Promise<R2Object>;
1286
1286
  createMultipartUpload(
1287
1287
  key: string,
1288
1288
  options?: R2MultipartOptions
@@ -1266,8 +1266,10 @@ declare abstract class R2Bucket {
1266
1266
  | string
1267
1267
  | null
1268
1268
  | Blob,
1269
- options?: R2PutOptions
1270
- ): Promise<R2Object>;
1269
+ options?: R2PutOptions & {
1270
+ onlyIf: R2Conditional | Headers;
1271
+ }
1272
+ ): Promise<R2Object | null>;
1271
1273
  put(
1272
1274
  key: string,
1273
1275
  value:
@@ -1277,10 +1279,8 @@ declare abstract class R2Bucket {
1277
1279
  | string
1278
1280
  | null
1279
1281
  | Blob,
1280
- options?: R2PutOptions & {
1281
- onlyIf: R2Conditional | Headers;
1282
- }
1283
- ): Promise<R2Object | null>;
1282
+ options?: R2PutOptions
1283
+ ): Promise<R2Object>;
1284
1284
  createMultipartUpload(
1285
1285
  key: string,
1286
1286
  options?: R2MultipartOptions
@@ -1268,8 +1268,10 @@ export declare abstract class R2Bucket {
1268
1268
  | string
1269
1269
  | null
1270
1270
  | Blob,
1271
- options?: R2PutOptions
1272
- ): Promise<R2Object>;
1271
+ options?: R2PutOptions & {
1272
+ onlyIf: R2Conditional | Headers;
1273
+ }
1274
+ ): Promise<R2Object | null>;
1273
1275
  put(
1274
1276
  key: string,
1275
1277
  value:
@@ -1279,10 +1281,8 @@ export declare abstract class R2Bucket {
1279
1281
  | string
1280
1282
  | null
1281
1283
  | Blob,
1282
- options?: R2PutOptions & {
1283
- onlyIf: R2Conditional | Headers;
1284
- }
1285
- ): Promise<R2Object | null>;
1284
+ options?: R2PutOptions
1285
+ ): Promise<R2Object>;
1286
1286
  createMultipartUpload(
1287
1287
  key: string,
1288
1288
  options?: R2MultipartOptions
@@ -1270,8 +1270,10 @@ declare abstract class R2Bucket {
1270
1270
  | string
1271
1271
  | null
1272
1272
  | Blob,
1273
- options?: R2PutOptions
1274
- ): Promise<R2Object>;
1273
+ options?: R2PutOptions & {
1274
+ onlyIf: R2Conditional | Headers;
1275
+ }
1276
+ ): Promise<R2Object | null>;
1275
1277
  put(
1276
1278
  key: string,
1277
1279
  value:
@@ -1281,10 +1283,8 @@ declare abstract class R2Bucket {
1281
1283
  | string
1282
1284
  | null
1283
1285
  | Blob,
1284
- options?: R2PutOptions & {
1285
- onlyIf: R2Conditional | Headers;
1286
- }
1287
- ): Promise<R2Object | null>;
1286
+ options?: R2PutOptions
1287
+ ): Promise<R2Object>;
1288
1288
  createMultipartUpload(
1289
1289
  key: string,
1290
1290
  options?: R2MultipartOptions
@@ -1272,8 +1272,10 @@ export declare abstract class R2Bucket {
1272
1272
  | string
1273
1273
  | null
1274
1274
  | Blob,
1275
- options?: R2PutOptions
1276
- ): Promise<R2Object>;
1275
+ options?: R2PutOptions & {
1276
+ onlyIf: R2Conditional | Headers;
1277
+ }
1278
+ ): Promise<R2Object | null>;
1277
1279
  put(
1278
1280
  key: string,
1279
1281
  value:
@@ -1283,10 +1285,8 @@ export declare abstract class R2Bucket {
1283
1285
  | string
1284
1286
  | null
1285
1287
  | Blob,
1286
- options?: R2PutOptions & {
1287
- onlyIf: R2Conditional | Headers;
1288
- }
1289
- ): Promise<R2Object | null>;
1288
+ options?: R2PutOptions
1289
+ ): Promise<R2Object>;
1290
1290
  createMultipartUpload(
1291
1291
  key: string,
1292
1292
  options?: R2MultipartOptions
@@ -1126,11 +1126,17 @@ declare interface FetcherQueueResult {
1126
1126
  explicitRetries: string[];
1127
1127
  explicitAcks: string[];
1128
1128
  }
1129
- declare interface ServiceBindingQueueMessage<Body = unknown> {
1129
+ declare type ServiceBindingQueueMessage<Body = unknown> = {
1130
1130
  id: string;
1131
1131
  timestamp: Date;
1132
- body: Body;
1133
- }
1132
+ } & (
1133
+ | {
1134
+ body: Body;
1135
+ }
1136
+ | {
1137
+ serializedBody: ArrayBuffer | ArrayBufferView;
1138
+ }
1139
+ );
1134
1140
  declare interface KVNamespaceListKey<Metadata, Key extends string = string> {
1135
1141
  name: Key;
1136
1142
  expiration?: number;
@@ -1305,8 +1311,10 @@ declare abstract class R2Bucket {
1305
1311
  | string
1306
1312
  | null
1307
1313
  | Blob,
1308
- options?: R2PutOptions
1309
- ): Promise<R2Object>;
1314
+ options?: R2PutOptions & {
1315
+ onlyIf: R2Conditional | Headers;
1316
+ }
1317
+ ): Promise<R2Object | null>;
1310
1318
  put(
1311
1319
  key: string,
1312
1320
  value:
@@ -1316,10 +1324,8 @@ declare abstract class R2Bucket {
1316
1324
  | string
1317
1325
  | null
1318
1326
  | Blob,
1319
- options?: R2PutOptions & {
1320
- onlyIf: R2Conditional | Headers;
1321
- }
1322
- ): Promise<R2Object | null>;
1327
+ options?: R2PutOptions
1328
+ ): Promise<R2Object>;
1323
1329
  createMultipartUpload(
1324
1330
  key: string,
1325
1331
  options?: R2MultipartOptions
@@ -1947,6 +1953,8 @@ declare abstract class SqlStorageStatement {}
1947
1953
  declare abstract class SqlStorageCursor {
1948
1954
  raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
1949
1955
  get columnNames(): string[];
1956
+ get rowsRead(): number;
1957
+ get rowsWritten(): number;
1950
1958
  [Symbol.iterator](): IterableIterator<
1951
1959
  Record<string, (ArrayBuffer | string | number) | null>
1952
1960
  >;
@@ -1128,11 +1128,17 @@ export interface FetcherQueueResult {
1128
1128
  explicitRetries: string[];
1129
1129
  explicitAcks: string[];
1130
1130
  }
1131
- export interface ServiceBindingQueueMessage<Body = unknown> {
1131
+ export type ServiceBindingQueueMessage<Body = unknown> = {
1132
1132
  id: string;
1133
1133
  timestamp: Date;
1134
- body: Body;
1135
- }
1134
+ } & (
1135
+ | {
1136
+ body: Body;
1137
+ }
1138
+ | {
1139
+ serializedBody: ArrayBuffer | ArrayBufferView;
1140
+ }
1141
+ );
1136
1142
  export interface KVNamespaceListKey<Metadata, Key extends string = string> {
1137
1143
  name: Key;
1138
1144
  expiration?: number;
@@ -1307,8 +1313,10 @@ export declare abstract class R2Bucket {
1307
1313
  | string
1308
1314
  | null
1309
1315
  | Blob,
1310
- options?: R2PutOptions
1311
- ): Promise<R2Object>;
1316
+ options?: R2PutOptions & {
1317
+ onlyIf: R2Conditional | Headers;
1318
+ }
1319
+ ): Promise<R2Object | null>;
1312
1320
  put(
1313
1321
  key: string,
1314
1322
  value:
@@ -1318,10 +1326,8 @@ export declare abstract class R2Bucket {
1318
1326
  | string
1319
1327
  | null
1320
1328
  | Blob,
1321
- options?: R2PutOptions & {
1322
- onlyIf: R2Conditional | Headers;
1323
- }
1324
- ): Promise<R2Object | null>;
1329
+ options?: R2PutOptions
1330
+ ): Promise<R2Object>;
1325
1331
  createMultipartUpload(
1326
1332
  key: string,
1327
1333
  options?: R2MultipartOptions
@@ -1952,6 +1958,8 @@ export declare abstract class SqlStorageStatement {}
1952
1958
  export declare abstract class SqlStorageCursor {
1953
1959
  raw(): IterableIterator<((ArrayBuffer | string | number) | null)[]>;
1954
1960
  get columnNames(): string[];
1961
+ get rowsRead(): number;
1962
+ get rowsWritten(): number;
1955
1963
  [Symbol.iterator](): IterableIterator<
1956
1964
  Record<string, (ArrayBuffer | string | number) | null>
1957
1965
  >;
package/index.d.ts CHANGED
@@ -1279,8 +1279,10 @@ declare abstract class R2Bucket {
1279
1279
  | string
1280
1280
  | null
1281
1281
  | Blob,
1282
- options?: R2PutOptions
1283
- ): Promise<R2Object>;
1282
+ options?: R2PutOptions & {
1283
+ onlyIf: R2Conditional | Headers;
1284
+ }
1285
+ ): Promise<R2Object | null>;
1284
1286
  put(
1285
1287
  key: string,
1286
1288
  value:
@@ -1290,10 +1292,8 @@ declare abstract class R2Bucket {
1290
1292
  | string
1291
1293
  | null
1292
1294
  | Blob,
1293
- options?: R2PutOptions & {
1294
- onlyIf: R2Conditional | Headers;
1295
- }
1296
- ): Promise<R2Object | null>;
1295
+ options?: R2PutOptions
1296
+ ): Promise<R2Object>;
1297
1297
  createMultipartUpload(
1298
1298
  key: string,
1299
1299
  options?: R2MultipartOptions
package/index.ts CHANGED
@@ -1281,8 +1281,10 @@ export declare abstract class R2Bucket {
1281
1281
  | string
1282
1282
  | null
1283
1283
  | Blob,
1284
- options?: R2PutOptions
1285
- ): Promise<R2Object>;
1284
+ options?: R2PutOptions & {
1285
+ onlyIf: R2Conditional | Headers;
1286
+ }
1287
+ ): Promise<R2Object | null>;
1286
1288
  put(
1287
1289
  key: string,
1288
1290
  value:
@@ -1292,10 +1294,8 @@ export declare abstract class R2Bucket {
1292
1294
  | string
1293
1295
  | null
1294
1296
  | Blob,
1295
- options?: R2PutOptions & {
1296
- onlyIf: R2Conditional | Headers;
1297
- }
1298
- ): Promise<R2Object | null>;
1297
+ options?: R2PutOptions
1298
+ ): Promise<R2Object>;
1299
1299
  createMultipartUpload(
1300
1300
  key: string,
1301
1301
  options?: R2MultipartOptions
package/oldest/index.d.ts CHANGED
@@ -1279,8 +1279,10 @@ declare abstract class R2Bucket {
1279
1279
  | string
1280
1280
  | null
1281
1281
  | Blob,
1282
- options?: R2PutOptions
1283
- ): Promise<R2Object>;
1282
+ options?: R2PutOptions & {
1283
+ onlyIf: R2Conditional | Headers;
1284
+ }
1285
+ ): Promise<R2Object | null>;
1284
1286
  put(
1285
1287
  key: string,
1286
1288
  value:
@@ -1290,10 +1292,8 @@ declare abstract class R2Bucket {
1290
1292
  | string
1291
1293
  | null
1292
1294
  | Blob,
1293
- options?: R2PutOptions & {
1294
- onlyIf: R2Conditional | Headers;
1295
- }
1296
- ): Promise<R2Object | null>;
1295
+ options?: R2PutOptions
1296
+ ): Promise<R2Object>;
1297
1297
  createMultipartUpload(
1298
1298
  key: string,
1299
1299
  options?: R2MultipartOptions
package/oldest/index.ts CHANGED
@@ -1281,8 +1281,10 @@ export declare abstract class R2Bucket {
1281
1281
  | string
1282
1282
  | null
1283
1283
  | Blob,
1284
- options?: R2PutOptions
1285
- ): Promise<R2Object>;
1284
+ options?: R2PutOptions & {
1285
+ onlyIf: R2Conditional | Headers;
1286
+ }
1287
+ ): Promise<R2Object | null>;
1286
1288
  put(
1287
1289
  key: string,
1288
1290
  value:
@@ -1292,10 +1294,8 @@ export declare abstract class R2Bucket {
1292
1294
  | string
1293
1295
  | null
1294
1296
  | Blob,
1295
- options?: R2PutOptions & {
1296
- onlyIf: R2Conditional | Headers;
1297
- }
1298
- ): Promise<R2Object | null>;
1297
+ options?: R2PutOptions
1298
+ ): Promise<R2Object>;
1299
1299
  createMultipartUpload(
1300
1300
  key: string,
1301
1301
  options?: R2MultipartOptions
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.20230807.0"
10
+ "version": "4.20230814.0"
11
11
  }