@cloudflare/workers-types 4.20240222.0 → 4.20240314.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.
- package/2021-11-03/index.d.ts +32 -10
- package/2021-11-03/index.ts +32 -10
- package/2022-01-31/index.d.ts +32 -10
- package/2022-01-31/index.ts +32 -10
- package/2022-03-21/index.d.ts +32 -10
- package/2022-03-21/index.ts +32 -10
- package/2022-08-04/index.d.ts +32 -10
- package/2022-08-04/index.ts +32 -10
- package/2022-10-31/index.d.ts +32 -10
- package/2022-10-31/index.ts +32 -10
- package/2022-11-30/index.d.ts +32 -10
- package/2022-11-30/index.ts +32 -10
- package/2023-03-01/index.d.ts +32 -10
- package/2023-03-01/index.ts +32 -10
- package/2023-07-01/index.d.ts +32 -10
- package/2023-07-01/index.ts +32 -10
- package/experimental/index.d.ts +49 -17
- package/experimental/index.ts +49 -17
- package/index.d.ts +32 -10
- package/index.ts +32 -10
- package/oldest/index.d.ts +32 -10
- package/oldest/index.ts +32 -10
- package/package.json +1 -1
package/experimental/index.ts
CHANGED
|
@@ -310,6 +310,7 @@ export interface TestController {}
|
|
|
310
310
|
export interface ExecutionContext {
|
|
311
311
|
waitUntil(promise: Promise<any>): void;
|
|
312
312
|
passThroughOnException(): void;
|
|
313
|
+
abort(reason?: any): void;
|
|
313
314
|
}
|
|
314
315
|
export type ExportedHandlerFetchHandler<
|
|
315
316
|
Env = unknown,
|
|
@@ -383,6 +384,10 @@ export interface Performance {
|
|
|
383
384
|
readonly timeOrigin: number;
|
|
384
385
|
now(): number;
|
|
385
386
|
}
|
|
387
|
+
export interface AlarmInvocationInfo {
|
|
388
|
+
readonly isRetry: boolean;
|
|
389
|
+
readonly retryCount: number;
|
|
390
|
+
}
|
|
386
391
|
export interface DurableObject {
|
|
387
392
|
fetch(request: Request): Response | Promise<Response>;
|
|
388
393
|
alarm?(): void | Promise<void>;
|
|
@@ -653,9 +658,9 @@ export interface SchedulerWaitOptions {
|
|
|
653
658
|
export declare abstract class ExtendableEvent extends Event {
|
|
654
659
|
waitUntil(promise: Promise<any>): void;
|
|
655
660
|
}
|
|
656
|
-
export declare class CustomEvent extends Event {
|
|
661
|
+
export declare class CustomEvent<T = any> extends Event {
|
|
657
662
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
658
|
-
get detail():
|
|
663
|
+
get detail(): T;
|
|
659
664
|
}
|
|
660
665
|
export interface CustomEventCustomEventInit {
|
|
661
666
|
bubbles?: boolean;
|
|
@@ -1146,11 +1151,7 @@ export declare abstract class Fetcher {
|
|
|
1146
1151
|
messages: ServiceBindingQueueMessage[]
|
|
1147
1152
|
): Promise<FetcherQueueResult>;
|
|
1148
1153
|
scheduled(options?: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
|
|
1149
|
-
getRpcMethodForTestOnly(name: string):
|
|
1150
|
-
}
|
|
1151
|
-
export interface FetcherPutOptions {
|
|
1152
|
-
expiration?: number;
|
|
1153
|
-
expirationTtl?: number;
|
|
1154
|
+
getRpcMethodForTestOnly(name: string): JsRpcProperty | null;
|
|
1154
1155
|
}
|
|
1155
1156
|
export interface FetcherScheduledOptions {
|
|
1156
1157
|
scheduledTime?: Date;
|
|
@@ -1162,10 +1163,10 @@ export interface FetcherScheduledResult {
|
|
|
1162
1163
|
}
|
|
1163
1164
|
export interface FetcherQueueResult {
|
|
1164
1165
|
outcome: string;
|
|
1165
|
-
retryAll: boolean;
|
|
1166
1166
|
ackAll: boolean;
|
|
1167
|
-
|
|
1167
|
+
retryBatch: QueueRetryBatch;
|
|
1168
1168
|
explicitAcks: string[];
|
|
1169
|
+
retryMessages: QueueRetryMessage[];
|
|
1169
1170
|
}
|
|
1170
1171
|
export type ServiceBindingQueueMessage<Body = unknown> = {
|
|
1171
1172
|
id: string;
|
|
@@ -1291,32 +1292,51 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1291
1292
|
export type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1292
1293
|
export interface Queue<Body = unknown> {
|
|
1293
1294
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1294
|
-
sendBatch(
|
|
1295
|
+
sendBatch(
|
|
1296
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1297
|
+
options?: QueueSendBatchOptions
|
|
1298
|
+
): Promise<void>;
|
|
1295
1299
|
}
|
|
1296
1300
|
export interface QueueSendOptions {
|
|
1297
1301
|
contentType?: QueueContentType;
|
|
1302
|
+
delaySeconds?: number;
|
|
1303
|
+
}
|
|
1304
|
+
export interface QueueSendBatchOptions {
|
|
1305
|
+
delaySeconds?: number;
|
|
1298
1306
|
}
|
|
1299
1307
|
export interface MessageSendRequest<Body = unknown> {
|
|
1300
1308
|
body: Body;
|
|
1301
1309
|
contentType?: QueueContentType;
|
|
1310
|
+
delaySeconds?: number;
|
|
1311
|
+
}
|
|
1312
|
+
export interface QueueRetryBatch {
|
|
1313
|
+
retry: boolean;
|
|
1314
|
+
delaySeconds?: number;
|
|
1315
|
+
}
|
|
1316
|
+
export interface QueueRetryMessage {
|
|
1317
|
+
msgId: string;
|
|
1318
|
+
delaySeconds?: number;
|
|
1319
|
+
}
|
|
1320
|
+
export interface QueueRetryOptions {
|
|
1321
|
+
delaySeconds?: number;
|
|
1302
1322
|
}
|
|
1303
1323
|
export interface Message<Body = unknown> {
|
|
1304
1324
|
readonly id: string;
|
|
1305
1325
|
readonly timestamp: Date;
|
|
1306
1326
|
readonly body: Body;
|
|
1307
|
-
retry(): void;
|
|
1327
|
+
retry(options?: QueueRetryOptions): void;
|
|
1308
1328
|
ack(): void;
|
|
1309
1329
|
}
|
|
1310
1330
|
export interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1311
1331
|
readonly messages: readonly Message<Body>[];
|
|
1312
1332
|
readonly queue: string;
|
|
1313
|
-
retryAll(): void;
|
|
1333
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1314
1334
|
ackAll(): void;
|
|
1315
1335
|
}
|
|
1316
1336
|
export interface MessageBatch<Body = unknown> {
|
|
1317
1337
|
readonly messages: readonly Message<Body>[];
|
|
1318
1338
|
readonly queue: string;
|
|
1319
|
-
retryAll(): void;
|
|
1339
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1320
1340
|
ackAll(): void;
|
|
1321
1341
|
}
|
|
1322
1342
|
export interface R2Error extends Error {
|
|
@@ -1482,6 +1502,11 @@ export type R2Objects = {
|
|
|
1482
1502
|
truncated: false;
|
|
1483
1503
|
}
|
|
1484
1504
|
);
|
|
1505
|
+
export interface JsRpcProperty {
|
|
1506
|
+
then(handler: Function, errorHandler?: Function): any;
|
|
1507
|
+
catch(errorHandler: Function): any;
|
|
1508
|
+
finally(onFinally: Function): any;
|
|
1509
|
+
}
|
|
1485
1510
|
export declare abstract class ScheduledEvent extends ExtendableEvent {
|
|
1486
1511
|
readonly scheduledTime: number;
|
|
1487
1512
|
readonly cron: string;
|
|
@@ -1924,7 +1949,11 @@ export declare class URLSearchParams {
|
|
|
1924
1949
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1925
1950
|
}
|
|
1926
1951
|
export declare class URLPattern {
|
|
1927
|
-
constructor(
|
|
1952
|
+
constructor(
|
|
1953
|
+
input?: string | URLPatternURLPatternInit,
|
|
1954
|
+
baseURL?: string,
|
|
1955
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1956
|
+
);
|
|
1928
1957
|
get protocol(): string;
|
|
1929
1958
|
get username(): string;
|
|
1930
1959
|
get password(): string;
|
|
@@ -1965,6 +1994,9 @@ export interface URLPatternURLPatternResult {
|
|
|
1965
1994
|
search: URLPatternURLPatternComponentResult;
|
|
1966
1995
|
hash: URLPatternURLPatternComponentResult;
|
|
1967
1996
|
}
|
|
1997
|
+
export interface URLPatternURLPatternOptions {
|
|
1998
|
+
ignoreCase?: boolean;
|
|
1999
|
+
}
|
|
1968
2000
|
export declare class CloseEvent extends Event {
|
|
1969
2001
|
constructor(type: string, initializer: CloseEventInit);
|
|
1970
2002
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2141,9 +2173,9 @@ export interface gpuGPUBuffer {
|
|
|
2141
2173
|
unmap(): void;
|
|
2142
2174
|
destroy(): void;
|
|
2143
2175
|
mapAsync(
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2176
|
+
offset: number,
|
|
2177
|
+
size?: number | bigint,
|
|
2178
|
+
param3?: number | bigint
|
|
2147
2179
|
): Promise<void>;
|
|
2148
2180
|
get size(): number | bigint;
|
|
2149
2181
|
get usage(): number;
|
package/index.d.ts
CHANGED
|
@@ -360,6 +360,10 @@ declare interface Performance {
|
|
|
360
360
|
readonly timeOrigin: number;
|
|
361
361
|
now(): number;
|
|
362
362
|
}
|
|
363
|
+
declare interface AlarmInvocationInfo {
|
|
364
|
+
readonly isRetry: boolean;
|
|
365
|
+
readonly retryCount: number;
|
|
366
|
+
}
|
|
363
367
|
declare interface DurableObject {
|
|
364
368
|
fetch(request: Request): Response | Promise<Response>;
|
|
365
369
|
alarm?(): void | Promise<void>;
|
|
@@ -633,9 +637,9 @@ declare interface SchedulerWaitOptions {
|
|
|
633
637
|
declare abstract class ExtendableEvent extends Event {
|
|
634
638
|
waitUntil(promise: Promise<any>): void;
|
|
635
639
|
}
|
|
636
|
-
declare class CustomEvent extends Event {
|
|
640
|
+
declare class CustomEvent<T = any> extends Event {
|
|
637
641
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
638
|
-
get detail():
|
|
642
|
+
get detail(): T;
|
|
639
643
|
}
|
|
640
644
|
declare interface CustomEventCustomEventInit {
|
|
641
645
|
bubbles?: boolean;
|
|
@@ -1246,32 +1250,43 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1246
1250
|
declare type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1247
1251
|
declare interface Queue<Body = unknown> {
|
|
1248
1252
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1249
|
-
sendBatch(
|
|
1253
|
+
sendBatch(
|
|
1254
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1255
|
+
options?: QueueSendBatchOptions
|
|
1256
|
+
): Promise<void>;
|
|
1250
1257
|
}
|
|
1251
1258
|
declare interface QueueSendOptions {
|
|
1252
1259
|
contentType?: QueueContentType;
|
|
1260
|
+
delaySeconds?: number;
|
|
1261
|
+
}
|
|
1262
|
+
declare interface QueueSendBatchOptions {
|
|
1263
|
+
delaySeconds?: number;
|
|
1253
1264
|
}
|
|
1254
1265
|
declare interface MessageSendRequest<Body = unknown> {
|
|
1255
1266
|
body: Body;
|
|
1256
1267
|
contentType?: QueueContentType;
|
|
1268
|
+
delaySeconds?: number;
|
|
1269
|
+
}
|
|
1270
|
+
declare interface QueueRetryOptions {
|
|
1271
|
+
delaySeconds?: number;
|
|
1257
1272
|
}
|
|
1258
1273
|
declare interface Message<Body = unknown> {
|
|
1259
1274
|
readonly id: string;
|
|
1260
1275
|
readonly timestamp: Date;
|
|
1261
1276
|
readonly body: Body;
|
|
1262
|
-
retry(): void;
|
|
1277
|
+
retry(options?: QueueRetryOptions): void;
|
|
1263
1278
|
ack(): void;
|
|
1264
1279
|
}
|
|
1265
1280
|
declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1266
1281
|
readonly messages: readonly Message<Body>[];
|
|
1267
1282
|
readonly queue: string;
|
|
1268
|
-
retryAll(): void;
|
|
1283
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1269
1284
|
ackAll(): void;
|
|
1270
1285
|
}
|
|
1271
1286
|
declare interface MessageBatch<Body = unknown> {
|
|
1272
1287
|
readonly messages: readonly Message<Body>[];
|
|
1273
1288
|
readonly queue: string;
|
|
1274
|
-
retryAll(): void;
|
|
1289
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1275
1290
|
ackAll(): void;
|
|
1276
1291
|
}
|
|
1277
1292
|
declare interface R2Error extends Error {
|
|
@@ -1869,7 +1884,11 @@ declare class URLSearchParams {
|
|
|
1869
1884
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1870
1885
|
}
|
|
1871
1886
|
declare class URLPattern {
|
|
1872
|
-
constructor(
|
|
1887
|
+
constructor(
|
|
1888
|
+
input?: string | URLPatternURLPatternInit,
|
|
1889
|
+
baseURL?: string,
|
|
1890
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1891
|
+
);
|
|
1873
1892
|
get protocol(): string;
|
|
1874
1893
|
get username(): string;
|
|
1875
1894
|
get password(): string;
|
|
@@ -1910,6 +1929,9 @@ declare interface URLPatternURLPatternResult {
|
|
|
1910
1929
|
search: URLPatternURLPatternComponentResult;
|
|
1911
1930
|
hash: URLPatternURLPatternComponentResult;
|
|
1912
1931
|
}
|
|
1932
|
+
declare interface URLPatternURLPatternOptions {
|
|
1933
|
+
ignoreCase?: boolean;
|
|
1934
|
+
}
|
|
1913
1935
|
declare class CloseEvent extends Event {
|
|
1914
1936
|
constructor(type: string, initializer: CloseEventInit);
|
|
1915
1937
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2068,9 +2090,9 @@ declare interface gpuGPUBuffer {
|
|
|
2068
2090
|
unmap(): void;
|
|
2069
2091
|
destroy(): void;
|
|
2070
2092
|
mapAsync(
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2093
|
+
offset: number,
|
|
2094
|
+
size?: number | bigint,
|
|
2095
|
+
param3?: number | bigint
|
|
2074
2096
|
): Promise<void>;
|
|
2075
2097
|
get size(): number | bigint;
|
|
2076
2098
|
get usage(): number;
|
package/index.ts
CHANGED
|
@@ -362,6 +362,10 @@ export interface Performance {
|
|
|
362
362
|
readonly timeOrigin: number;
|
|
363
363
|
now(): number;
|
|
364
364
|
}
|
|
365
|
+
export interface AlarmInvocationInfo {
|
|
366
|
+
readonly isRetry: boolean;
|
|
367
|
+
readonly retryCount: number;
|
|
368
|
+
}
|
|
365
369
|
export interface DurableObject {
|
|
366
370
|
fetch(request: Request): Response | Promise<Response>;
|
|
367
371
|
alarm?(): void | Promise<void>;
|
|
@@ -635,9 +639,9 @@ export interface SchedulerWaitOptions {
|
|
|
635
639
|
export declare abstract class ExtendableEvent extends Event {
|
|
636
640
|
waitUntil(promise: Promise<any>): void;
|
|
637
641
|
}
|
|
638
|
-
export declare class CustomEvent extends Event {
|
|
642
|
+
export declare class CustomEvent<T = any> extends Event {
|
|
639
643
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
640
|
-
get detail():
|
|
644
|
+
get detail(): T;
|
|
641
645
|
}
|
|
642
646
|
export interface CustomEventCustomEventInit {
|
|
643
647
|
bubbles?: boolean;
|
|
@@ -1248,32 +1252,43 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1248
1252
|
export type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1249
1253
|
export interface Queue<Body = unknown> {
|
|
1250
1254
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1251
|
-
sendBatch(
|
|
1255
|
+
sendBatch(
|
|
1256
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1257
|
+
options?: QueueSendBatchOptions
|
|
1258
|
+
): Promise<void>;
|
|
1252
1259
|
}
|
|
1253
1260
|
export interface QueueSendOptions {
|
|
1254
1261
|
contentType?: QueueContentType;
|
|
1262
|
+
delaySeconds?: number;
|
|
1263
|
+
}
|
|
1264
|
+
export interface QueueSendBatchOptions {
|
|
1265
|
+
delaySeconds?: number;
|
|
1255
1266
|
}
|
|
1256
1267
|
export interface MessageSendRequest<Body = unknown> {
|
|
1257
1268
|
body: Body;
|
|
1258
1269
|
contentType?: QueueContentType;
|
|
1270
|
+
delaySeconds?: number;
|
|
1271
|
+
}
|
|
1272
|
+
export interface QueueRetryOptions {
|
|
1273
|
+
delaySeconds?: number;
|
|
1259
1274
|
}
|
|
1260
1275
|
export interface Message<Body = unknown> {
|
|
1261
1276
|
readonly id: string;
|
|
1262
1277
|
readonly timestamp: Date;
|
|
1263
1278
|
readonly body: Body;
|
|
1264
|
-
retry(): void;
|
|
1279
|
+
retry(options?: QueueRetryOptions): void;
|
|
1265
1280
|
ack(): void;
|
|
1266
1281
|
}
|
|
1267
1282
|
export interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1268
1283
|
readonly messages: readonly Message<Body>[];
|
|
1269
1284
|
readonly queue: string;
|
|
1270
|
-
retryAll(): void;
|
|
1285
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1271
1286
|
ackAll(): void;
|
|
1272
1287
|
}
|
|
1273
1288
|
export interface MessageBatch<Body = unknown> {
|
|
1274
1289
|
readonly messages: readonly Message<Body>[];
|
|
1275
1290
|
readonly queue: string;
|
|
1276
|
-
retryAll(): void;
|
|
1291
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1277
1292
|
ackAll(): void;
|
|
1278
1293
|
}
|
|
1279
1294
|
export interface R2Error extends Error {
|
|
@@ -1874,7 +1889,11 @@ export declare class URLSearchParams {
|
|
|
1874
1889
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1875
1890
|
}
|
|
1876
1891
|
export declare class URLPattern {
|
|
1877
|
-
constructor(
|
|
1892
|
+
constructor(
|
|
1893
|
+
input?: string | URLPatternURLPatternInit,
|
|
1894
|
+
baseURL?: string,
|
|
1895
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1896
|
+
);
|
|
1878
1897
|
get protocol(): string;
|
|
1879
1898
|
get username(): string;
|
|
1880
1899
|
get password(): string;
|
|
@@ -1915,6 +1934,9 @@ export interface URLPatternURLPatternResult {
|
|
|
1915
1934
|
search: URLPatternURLPatternComponentResult;
|
|
1916
1935
|
hash: URLPatternURLPatternComponentResult;
|
|
1917
1936
|
}
|
|
1937
|
+
export interface URLPatternURLPatternOptions {
|
|
1938
|
+
ignoreCase?: boolean;
|
|
1939
|
+
}
|
|
1918
1940
|
export declare class CloseEvent extends Event {
|
|
1919
1941
|
constructor(type: string, initializer: CloseEventInit);
|
|
1920
1942
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2073,9 +2095,9 @@ export interface gpuGPUBuffer {
|
|
|
2073
2095
|
unmap(): void;
|
|
2074
2096
|
destroy(): void;
|
|
2075
2097
|
mapAsync(
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2098
|
+
offset: number,
|
|
2099
|
+
size?: number | bigint,
|
|
2100
|
+
param3?: number | bigint
|
|
2079
2101
|
): Promise<void>;
|
|
2080
2102
|
get size(): number | bigint;
|
|
2081
2103
|
get usage(): number;
|
package/oldest/index.d.ts
CHANGED
|
@@ -360,6 +360,10 @@ declare interface Performance {
|
|
|
360
360
|
readonly timeOrigin: number;
|
|
361
361
|
now(): number;
|
|
362
362
|
}
|
|
363
|
+
declare interface AlarmInvocationInfo {
|
|
364
|
+
readonly isRetry: boolean;
|
|
365
|
+
readonly retryCount: number;
|
|
366
|
+
}
|
|
363
367
|
declare interface DurableObject {
|
|
364
368
|
fetch(request: Request): Response | Promise<Response>;
|
|
365
369
|
alarm?(): void | Promise<void>;
|
|
@@ -633,9 +637,9 @@ declare interface SchedulerWaitOptions {
|
|
|
633
637
|
declare abstract class ExtendableEvent extends Event {
|
|
634
638
|
waitUntil(promise: Promise<any>): void;
|
|
635
639
|
}
|
|
636
|
-
declare class CustomEvent extends Event {
|
|
640
|
+
declare class CustomEvent<T = any> extends Event {
|
|
637
641
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
638
|
-
get detail():
|
|
642
|
+
get detail(): T;
|
|
639
643
|
}
|
|
640
644
|
declare interface CustomEventCustomEventInit {
|
|
641
645
|
bubbles?: boolean;
|
|
@@ -1246,32 +1250,43 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1246
1250
|
declare type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1247
1251
|
declare interface Queue<Body = unknown> {
|
|
1248
1252
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1249
|
-
sendBatch(
|
|
1253
|
+
sendBatch(
|
|
1254
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1255
|
+
options?: QueueSendBatchOptions
|
|
1256
|
+
): Promise<void>;
|
|
1250
1257
|
}
|
|
1251
1258
|
declare interface QueueSendOptions {
|
|
1252
1259
|
contentType?: QueueContentType;
|
|
1260
|
+
delaySeconds?: number;
|
|
1261
|
+
}
|
|
1262
|
+
declare interface QueueSendBatchOptions {
|
|
1263
|
+
delaySeconds?: number;
|
|
1253
1264
|
}
|
|
1254
1265
|
declare interface MessageSendRequest<Body = unknown> {
|
|
1255
1266
|
body: Body;
|
|
1256
1267
|
contentType?: QueueContentType;
|
|
1268
|
+
delaySeconds?: number;
|
|
1269
|
+
}
|
|
1270
|
+
declare interface QueueRetryOptions {
|
|
1271
|
+
delaySeconds?: number;
|
|
1257
1272
|
}
|
|
1258
1273
|
declare interface Message<Body = unknown> {
|
|
1259
1274
|
readonly id: string;
|
|
1260
1275
|
readonly timestamp: Date;
|
|
1261
1276
|
readonly body: Body;
|
|
1262
|
-
retry(): void;
|
|
1277
|
+
retry(options?: QueueRetryOptions): void;
|
|
1263
1278
|
ack(): void;
|
|
1264
1279
|
}
|
|
1265
1280
|
declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1266
1281
|
readonly messages: readonly Message<Body>[];
|
|
1267
1282
|
readonly queue: string;
|
|
1268
|
-
retryAll(): void;
|
|
1283
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1269
1284
|
ackAll(): void;
|
|
1270
1285
|
}
|
|
1271
1286
|
declare interface MessageBatch<Body = unknown> {
|
|
1272
1287
|
readonly messages: readonly Message<Body>[];
|
|
1273
1288
|
readonly queue: string;
|
|
1274
|
-
retryAll(): void;
|
|
1289
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1275
1290
|
ackAll(): void;
|
|
1276
1291
|
}
|
|
1277
1292
|
declare interface R2Error extends Error {
|
|
@@ -1869,7 +1884,11 @@ declare class URLSearchParams {
|
|
|
1869
1884
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1870
1885
|
}
|
|
1871
1886
|
declare class URLPattern {
|
|
1872
|
-
constructor(
|
|
1887
|
+
constructor(
|
|
1888
|
+
input?: string | URLPatternURLPatternInit,
|
|
1889
|
+
baseURL?: string,
|
|
1890
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1891
|
+
);
|
|
1873
1892
|
get protocol(): string;
|
|
1874
1893
|
get username(): string;
|
|
1875
1894
|
get password(): string;
|
|
@@ -1910,6 +1929,9 @@ declare interface URLPatternURLPatternResult {
|
|
|
1910
1929
|
search: URLPatternURLPatternComponentResult;
|
|
1911
1930
|
hash: URLPatternURLPatternComponentResult;
|
|
1912
1931
|
}
|
|
1932
|
+
declare interface URLPatternURLPatternOptions {
|
|
1933
|
+
ignoreCase?: boolean;
|
|
1934
|
+
}
|
|
1913
1935
|
declare class CloseEvent extends Event {
|
|
1914
1936
|
constructor(type: string, initializer: CloseEventInit);
|
|
1915
1937
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2068,9 +2090,9 @@ declare interface gpuGPUBuffer {
|
|
|
2068
2090
|
unmap(): void;
|
|
2069
2091
|
destroy(): void;
|
|
2070
2092
|
mapAsync(
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2093
|
+
offset: number,
|
|
2094
|
+
size?: number | bigint,
|
|
2095
|
+
param3?: number | bigint
|
|
2074
2096
|
): Promise<void>;
|
|
2075
2097
|
get size(): number | bigint;
|
|
2076
2098
|
get usage(): number;
|
package/oldest/index.ts
CHANGED
|
@@ -362,6 +362,10 @@ export interface Performance {
|
|
|
362
362
|
readonly timeOrigin: number;
|
|
363
363
|
now(): number;
|
|
364
364
|
}
|
|
365
|
+
export interface AlarmInvocationInfo {
|
|
366
|
+
readonly isRetry: boolean;
|
|
367
|
+
readonly retryCount: number;
|
|
368
|
+
}
|
|
365
369
|
export interface DurableObject {
|
|
366
370
|
fetch(request: Request): Response | Promise<Response>;
|
|
367
371
|
alarm?(): void | Promise<void>;
|
|
@@ -635,9 +639,9 @@ export interface SchedulerWaitOptions {
|
|
|
635
639
|
export declare abstract class ExtendableEvent extends Event {
|
|
636
640
|
waitUntil(promise: Promise<any>): void;
|
|
637
641
|
}
|
|
638
|
-
export declare class CustomEvent extends Event {
|
|
642
|
+
export declare class CustomEvent<T = any> extends Event {
|
|
639
643
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
640
|
-
get detail():
|
|
644
|
+
get detail(): T;
|
|
641
645
|
}
|
|
642
646
|
export interface CustomEventCustomEventInit {
|
|
643
647
|
bubbles?: boolean;
|
|
@@ -1248,32 +1252,43 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1248
1252
|
export type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1249
1253
|
export interface Queue<Body = unknown> {
|
|
1250
1254
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1251
|
-
sendBatch(
|
|
1255
|
+
sendBatch(
|
|
1256
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1257
|
+
options?: QueueSendBatchOptions
|
|
1258
|
+
): Promise<void>;
|
|
1252
1259
|
}
|
|
1253
1260
|
export interface QueueSendOptions {
|
|
1254
1261
|
contentType?: QueueContentType;
|
|
1262
|
+
delaySeconds?: number;
|
|
1263
|
+
}
|
|
1264
|
+
export interface QueueSendBatchOptions {
|
|
1265
|
+
delaySeconds?: number;
|
|
1255
1266
|
}
|
|
1256
1267
|
export interface MessageSendRequest<Body = unknown> {
|
|
1257
1268
|
body: Body;
|
|
1258
1269
|
contentType?: QueueContentType;
|
|
1270
|
+
delaySeconds?: number;
|
|
1271
|
+
}
|
|
1272
|
+
export interface QueueRetryOptions {
|
|
1273
|
+
delaySeconds?: number;
|
|
1259
1274
|
}
|
|
1260
1275
|
export interface Message<Body = unknown> {
|
|
1261
1276
|
readonly id: string;
|
|
1262
1277
|
readonly timestamp: Date;
|
|
1263
1278
|
readonly body: Body;
|
|
1264
|
-
retry(): void;
|
|
1279
|
+
retry(options?: QueueRetryOptions): void;
|
|
1265
1280
|
ack(): void;
|
|
1266
1281
|
}
|
|
1267
1282
|
export interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1268
1283
|
readonly messages: readonly Message<Body>[];
|
|
1269
1284
|
readonly queue: string;
|
|
1270
|
-
retryAll(): void;
|
|
1285
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1271
1286
|
ackAll(): void;
|
|
1272
1287
|
}
|
|
1273
1288
|
export interface MessageBatch<Body = unknown> {
|
|
1274
1289
|
readonly messages: readonly Message<Body>[];
|
|
1275
1290
|
readonly queue: string;
|
|
1276
|
-
retryAll(): void;
|
|
1291
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1277
1292
|
ackAll(): void;
|
|
1278
1293
|
}
|
|
1279
1294
|
export interface R2Error extends Error {
|
|
@@ -1874,7 +1889,11 @@ export declare class URLSearchParams {
|
|
|
1874
1889
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1875
1890
|
}
|
|
1876
1891
|
export declare class URLPattern {
|
|
1877
|
-
constructor(
|
|
1892
|
+
constructor(
|
|
1893
|
+
input?: string | URLPatternURLPatternInit,
|
|
1894
|
+
baseURL?: string,
|
|
1895
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1896
|
+
);
|
|
1878
1897
|
get protocol(): string;
|
|
1879
1898
|
get username(): string;
|
|
1880
1899
|
get password(): string;
|
|
@@ -1915,6 +1934,9 @@ export interface URLPatternURLPatternResult {
|
|
|
1915
1934
|
search: URLPatternURLPatternComponentResult;
|
|
1916
1935
|
hash: URLPatternURLPatternComponentResult;
|
|
1917
1936
|
}
|
|
1937
|
+
export interface URLPatternURLPatternOptions {
|
|
1938
|
+
ignoreCase?: boolean;
|
|
1939
|
+
}
|
|
1918
1940
|
export declare class CloseEvent extends Event {
|
|
1919
1941
|
constructor(type: string, initializer: CloseEventInit);
|
|
1920
1942
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2073,9 +2095,9 @@ export interface gpuGPUBuffer {
|
|
|
2073
2095
|
unmap(): void;
|
|
2074
2096
|
destroy(): void;
|
|
2075
2097
|
mapAsync(
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2098
|
+
offset: number,
|
|
2099
|
+
size?: number | bigint,
|
|
2100
|
+
param3?: number | bigint
|
|
2079
2101
|
): Promise<void>;
|
|
2080
2102
|
get size(): number | bigint;
|
|
2081
2103
|
get usage(): number;
|
package/package.json
CHANGED