@cloudflare/workers-types 4.20240208.0 → 4.20240312.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 +42 -15
- package/2021-11-03/index.ts +42 -15
- package/2022-01-31/index.d.ts +42 -15
- package/2022-01-31/index.ts +42 -15
- package/2022-03-21/index.d.ts +42 -15
- package/2022-03-21/index.ts +42 -15
- package/2022-08-04/index.d.ts +42 -15
- package/2022-08-04/index.ts +42 -15
- package/2022-10-31/index.d.ts +69 -42
- package/2022-10-31/index.ts +69 -42
- package/2022-11-30/index.d.ts +69 -42
- package/2022-11-30/index.ts +69 -42
- package/2023-03-01/index.d.ts +69 -42
- package/2023-03-01/index.ts +69 -42
- package/2023-07-01/index.d.ts +69 -42
- package/2023-07-01/index.ts +69 -42
- package/experimental/index.d.ts +86 -48
- package/experimental/index.ts +86 -48
- package/index.d.ts +42 -15
- package/index.ts +42 -15
- package/oldest/index.d.ts +42 -15
- package/oldest/index.ts +42 -15
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -308,6 +308,7 @@ declare interface TestController {}
|
|
|
308
308
|
declare interface ExecutionContext {
|
|
309
309
|
waitUntil(promise: Promise<any>): void;
|
|
310
310
|
passThroughOnException(): void;
|
|
311
|
+
abort(reason?: any): void;
|
|
311
312
|
}
|
|
312
313
|
declare type ExportedHandlerFetchHandler<
|
|
313
314
|
Env = unknown,
|
|
@@ -381,6 +382,10 @@ declare interface Performance {
|
|
|
381
382
|
readonly timeOrigin: number;
|
|
382
383
|
now(): number;
|
|
383
384
|
}
|
|
385
|
+
declare interface AlarmInvocationInfo {
|
|
386
|
+
readonly isRetry: boolean;
|
|
387
|
+
readonly retryCount: number;
|
|
388
|
+
}
|
|
384
389
|
declare interface DurableObject {
|
|
385
390
|
fetch(request: Request): Response | Promise<Response>;
|
|
386
391
|
alarm?(): void | Promise<void>;
|
|
@@ -396,7 +401,7 @@ declare interface DurableObject {
|
|
|
396
401
|
): void | Promise<void>;
|
|
397
402
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
398
403
|
}
|
|
399
|
-
declare interface DurableObjectStub extends
|
|
404
|
+
declare interface DurableObjectStub extends Fetcher {
|
|
400
405
|
readonly id: DurableObjectId;
|
|
401
406
|
readonly name?: string;
|
|
402
407
|
}
|
|
@@ -651,9 +656,9 @@ declare interface SchedulerWaitOptions {
|
|
|
651
656
|
declare abstract class ExtendableEvent extends Event {
|
|
652
657
|
waitUntil(promise: Promise<any>): void;
|
|
653
658
|
}
|
|
654
|
-
declare class CustomEvent extends Event {
|
|
659
|
+
declare class CustomEvent<T = any> extends Event {
|
|
655
660
|
constructor(type: string, init?: CustomEventCustomEventInit);
|
|
656
|
-
get detail():
|
|
661
|
+
get detail(): T;
|
|
657
662
|
}
|
|
658
663
|
declare interface CustomEventCustomEventInit {
|
|
659
664
|
bubbles?: boolean;
|
|
@@ -1144,10 +1149,7 @@ declare abstract class Fetcher {
|
|
|
1144
1149
|
messages: ServiceBindingQueueMessage[]
|
|
1145
1150
|
): Promise<FetcherQueueResult>;
|
|
1146
1151
|
scheduled(options?: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
|
|
1147
|
-
|
|
1148
|
-
declare interface FetcherPutOptions {
|
|
1149
|
-
expiration?: number;
|
|
1150
|
-
expirationTtl?: number;
|
|
1152
|
+
getRpcMethodForTestOnly(name: string): JsRpcProperty | null;
|
|
1151
1153
|
}
|
|
1152
1154
|
declare interface FetcherScheduledOptions {
|
|
1153
1155
|
scheduledTime?: Date;
|
|
@@ -1159,10 +1161,10 @@ declare interface FetcherScheduledResult {
|
|
|
1159
1161
|
}
|
|
1160
1162
|
declare interface FetcherQueueResult {
|
|
1161
1163
|
outcome: string;
|
|
1162
|
-
retryAll: boolean;
|
|
1163
1164
|
ackAll: boolean;
|
|
1164
|
-
|
|
1165
|
+
retryBatch: QueueRetryBatch;
|
|
1165
1166
|
explicitAcks: string[];
|
|
1167
|
+
retryMessages: QueueRetryMessage[];
|
|
1166
1168
|
}
|
|
1167
1169
|
declare type ServiceBindingQueueMessage<Body = unknown> = {
|
|
1168
1170
|
id: string;
|
|
@@ -1288,32 +1290,51 @@ declare interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1288
1290
|
declare type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1289
1291
|
declare interface Queue<Body = unknown> {
|
|
1290
1292
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1291
|
-
sendBatch(
|
|
1293
|
+
sendBatch(
|
|
1294
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1295
|
+
options?: QueueSendBatchOptions
|
|
1296
|
+
): Promise<void>;
|
|
1292
1297
|
}
|
|
1293
1298
|
declare interface QueueSendOptions {
|
|
1294
1299
|
contentType?: QueueContentType;
|
|
1300
|
+
delaySeconds?: number;
|
|
1301
|
+
}
|
|
1302
|
+
declare interface QueueSendBatchOptions {
|
|
1303
|
+
delaySeconds?: number;
|
|
1295
1304
|
}
|
|
1296
1305
|
declare interface MessageSendRequest<Body = unknown> {
|
|
1297
1306
|
body: Body;
|
|
1298
1307
|
contentType?: QueueContentType;
|
|
1308
|
+
delaySeconds?: number;
|
|
1309
|
+
}
|
|
1310
|
+
declare interface QueueRetryBatch {
|
|
1311
|
+
retry: boolean;
|
|
1312
|
+
delaySeconds?: number;
|
|
1313
|
+
}
|
|
1314
|
+
declare interface QueueRetryMessage {
|
|
1315
|
+
msgId: string;
|
|
1316
|
+
delaySeconds?: number;
|
|
1317
|
+
}
|
|
1318
|
+
declare interface QueueRetryOptions {
|
|
1319
|
+
delaySeconds?: number;
|
|
1299
1320
|
}
|
|
1300
1321
|
declare interface Message<Body = unknown> {
|
|
1301
1322
|
readonly id: string;
|
|
1302
1323
|
readonly timestamp: Date;
|
|
1303
1324
|
readonly body: Body;
|
|
1304
|
-
retry(): void;
|
|
1325
|
+
retry(options?: QueueRetryOptions): void;
|
|
1305
1326
|
ack(): void;
|
|
1306
1327
|
}
|
|
1307
1328
|
declare interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1308
1329
|
readonly messages: readonly Message<Body>[];
|
|
1309
1330
|
readonly queue: string;
|
|
1310
|
-
retryAll(): void;
|
|
1331
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1311
1332
|
ackAll(): void;
|
|
1312
1333
|
}
|
|
1313
1334
|
declare interface MessageBatch<Body = unknown> {
|
|
1314
1335
|
readonly messages: readonly Message<Body>[];
|
|
1315
1336
|
readonly queue: string;
|
|
1316
|
-
retryAll(): void;
|
|
1337
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1317
1338
|
ackAll(): void;
|
|
1318
1339
|
}
|
|
1319
1340
|
declare interface R2Error extends Error {
|
|
@@ -1479,7 +1500,11 @@ declare type R2Objects = {
|
|
|
1479
1500
|
truncated: false;
|
|
1480
1501
|
}
|
|
1481
1502
|
);
|
|
1482
|
-
declare
|
|
1503
|
+
declare interface JsRpcProperty {
|
|
1504
|
+
then(handler: Function, errorHandler?: Function): any;
|
|
1505
|
+
catch(errorHandler: Function): any;
|
|
1506
|
+
finally(onFinally: Function): any;
|
|
1507
|
+
}
|
|
1483
1508
|
declare abstract class ScheduledEvent extends ExtendableEvent {
|
|
1484
1509
|
readonly scheduledTime: number;
|
|
1485
1510
|
readonly cron: string;
|
|
@@ -1620,6 +1645,9 @@ declare class ReadableStreamBYOBReader {
|
|
|
1620
1645
|
view: T
|
|
1621
1646
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1622
1647
|
}
|
|
1648
|
+
declare interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
|
|
1649
|
+
min?: number;
|
|
1650
|
+
}
|
|
1623
1651
|
declare interface ReadableStreamGetReaderOptions {
|
|
1624
1652
|
mode: "byob";
|
|
1625
1653
|
}
|
|
@@ -1862,30 +1890,30 @@ declare interface UnsafeTraceMetrics {
|
|
|
1862
1890
|
}
|
|
1863
1891
|
declare class URL {
|
|
1864
1892
|
constructor(url: string | URL, base?: string | URL);
|
|
1865
|
-
get origin():
|
|
1866
|
-
get href():
|
|
1867
|
-
set href(value:
|
|
1868
|
-
get protocol():
|
|
1869
|
-
set protocol(value:
|
|
1870
|
-
get username():
|
|
1871
|
-
set username(value:
|
|
1872
|
-
get password():
|
|
1873
|
-
set password(value:
|
|
1874
|
-
get host():
|
|
1875
|
-
set host(value:
|
|
1876
|
-
get hostname():
|
|
1877
|
-
set hostname(value:
|
|
1878
|
-
get port():
|
|
1879
|
-
set port(value:
|
|
1880
|
-
get pathname():
|
|
1881
|
-
set pathname(value:
|
|
1882
|
-
get search():
|
|
1883
|
-
set search(value:
|
|
1884
|
-
get hash():
|
|
1885
|
-
set hash(value:
|
|
1893
|
+
get origin(): ArrayBuffer;
|
|
1894
|
+
get href(): ArrayBufferView;
|
|
1895
|
+
set href(value: ArrayBufferView);
|
|
1896
|
+
get protocol(): ArrayBufferView;
|
|
1897
|
+
set protocol(value: ArrayBufferView);
|
|
1898
|
+
get username(): ArrayBufferView;
|
|
1899
|
+
set username(value: ArrayBufferView);
|
|
1900
|
+
get password(): ArrayBufferView;
|
|
1901
|
+
set password(value: ArrayBufferView);
|
|
1902
|
+
get host(): ArrayBufferView;
|
|
1903
|
+
set host(value: ArrayBufferView);
|
|
1904
|
+
get hostname(): ArrayBufferView;
|
|
1905
|
+
set hostname(value: ArrayBufferView);
|
|
1906
|
+
get port(): ArrayBufferView;
|
|
1907
|
+
set port(value: ArrayBufferView);
|
|
1908
|
+
get pathname(): ArrayBufferView;
|
|
1909
|
+
set pathname(value: ArrayBufferView);
|
|
1910
|
+
get search(): ArrayBufferView;
|
|
1911
|
+
set search(value: ArrayBufferView);
|
|
1912
|
+
get hash(): ArrayBufferView;
|
|
1913
|
+
set hash(value: ArrayBufferView);
|
|
1886
1914
|
get searchParams(): URLSearchParams;
|
|
1887
|
-
toJSON():
|
|
1888
|
-
toString():
|
|
1915
|
+
toJSON(): ArrayBufferView;
|
|
1916
|
+
toString(): ArrayBufferView;
|
|
1889
1917
|
static canParse(url: string, base?: string): boolean;
|
|
1890
1918
|
}
|
|
1891
1919
|
declare class URLSearchParams {
|
|
@@ -1895,14 +1923,14 @@ declare class URLSearchParams {
|
|
|
1895
1923
|
get size(): number;
|
|
1896
1924
|
append(name: string, value: string): void;
|
|
1897
1925
|
delete(name: string, value?: string): void;
|
|
1898
|
-
get(name: string):
|
|
1899
|
-
getAll(name: string):
|
|
1926
|
+
get(name: string): ArrayBufferView | null;
|
|
1927
|
+
getAll(name: string): ArrayBufferView[];
|
|
1900
1928
|
has(name: string, value?: string): boolean;
|
|
1901
1929
|
set(name: string, value: string): void;
|
|
1902
1930
|
sort(): void;
|
|
1903
1931
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1904
|
-
keys(): IterableIterator<
|
|
1905
|
-
values(): IterableIterator<
|
|
1932
|
+
keys(): IterableIterator<ArrayBufferView>;
|
|
1933
|
+
values(): IterableIterator<ArrayBufferView>;
|
|
1906
1934
|
forEach<This = unknown>(
|
|
1907
1935
|
callback: (
|
|
1908
1936
|
this: This,
|
|
@@ -1916,7 +1944,11 @@ declare class URLSearchParams {
|
|
|
1916
1944
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1917
1945
|
}
|
|
1918
1946
|
declare class URLPattern {
|
|
1919
|
-
constructor(
|
|
1947
|
+
constructor(
|
|
1948
|
+
input?: string | URLPatternURLPatternInit,
|
|
1949
|
+
baseURL?: string,
|
|
1950
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1951
|
+
);
|
|
1920
1952
|
get protocol(): string;
|
|
1921
1953
|
get username(): string;
|
|
1922
1954
|
get password(): string;
|
|
@@ -1957,6 +1989,9 @@ declare interface URLPatternURLPatternResult {
|
|
|
1957
1989
|
search: URLPatternURLPatternComponentResult;
|
|
1958
1990
|
hash: URLPatternURLPatternComponentResult;
|
|
1959
1991
|
}
|
|
1992
|
+
declare interface URLPatternURLPatternOptions {
|
|
1993
|
+
ignoreCase?: boolean;
|
|
1994
|
+
}
|
|
1960
1995
|
declare class CloseEvent extends Event {
|
|
1961
1996
|
constructor(type: string, initializer: CloseEventInit);
|
|
1962
1997
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2133,9 +2168,9 @@ declare interface gpuGPUBuffer {
|
|
|
2133
2168
|
unmap(): void;
|
|
2134
2169
|
destroy(): void;
|
|
2135
2170
|
mapAsync(
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2171
|
+
offset: number,
|
|
2172
|
+
size?: number | bigint,
|
|
2173
|
+
param3?: number | bigint
|
|
2139
2174
|
): Promise<void>;
|
|
2140
2175
|
get size(): number | bigint;
|
|
2141
2176
|
get usage(): number;
|
|
@@ -3580,7 +3615,10 @@ declare abstract class D1PreparedStatement {
|
|
|
3580
3615
|
first<T = Record<string, unknown>>(): Promise<T | null>;
|
|
3581
3616
|
run(): Promise<D1Response>;
|
|
3582
3617
|
all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
|
|
3583
|
-
raw<T = unknown[]>(
|
|
3618
|
+
raw<T = unknown[]>(options: {
|
|
3619
|
+
columnNames: true;
|
|
3620
|
+
}): Promise<[string[], ...T[]]>;
|
|
3621
|
+
raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
|
|
3584
3622
|
}
|
|
3585
3623
|
/**
|
|
3586
3624
|
* An email message that can be sent from a Worker.
|
|
@@ -3695,7 +3733,7 @@ declare interface Hyperdrive {
|
|
|
3695
3733
|
}
|
|
3696
3734
|
declare type Params<P extends string = any> = Record<P, string | string[]>;
|
|
3697
3735
|
declare type EventContext<Env, P extends string, Data> = {
|
|
3698
|
-
request: Request
|
|
3736
|
+
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
3699
3737
|
functionPath: string;
|
|
3700
3738
|
waitUntil: (promise: Promise<any>) => void;
|
|
3701
3739
|
passThroughOnException: () => void;
|
|
@@ -3714,7 +3752,7 @@ declare type PagesFunction<
|
|
|
3714
3752
|
Data extends Record<string, unknown> = Record<string, unknown>
|
|
3715
3753
|
> = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
|
|
3716
3754
|
declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
|
|
3717
|
-
request: Request
|
|
3755
|
+
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
3718
3756
|
functionPath: string;
|
|
3719
3757
|
waitUntil: (promise: Promise<any>) => void;
|
|
3720
3758
|
passThroughOnException: () => void;
|
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>;
|
|
@@ -398,7 +403,7 @@ export interface DurableObject {
|
|
|
398
403
|
): void | Promise<void>;
|
|
399
404
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
400
405
|
}
|
|
401
|
-
export interface DurableObjectStub extends
|
|
406
|
+
export interface DurableObjectStub extends Fetcher {
|
|
402
407
|
readonly id: DurableObjectId;
|
|
403
408
|
readonly name?: string;
|
|
404
409
|
}
|
|
@@ -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,10 +1151,7 @@ export declare abstract class Fetcher {
|
|
|
1146
1151
|
messages: ServiceBindingQueueMessage[]
|
|
1147
1152
|
): Promise<FetcherQueueResult>;
|
|
1148
1153
|
scheduled(options?: FetcherScheduledOptions): Promise<FetcherScheduledResult>;
|
|
1149
|
-
|
|
1150
|
-
export interface FetcherPutOptions {
|
|
1151
|
-
expiration?: number;
|
|
1152
|
-
expirationTtl?: number;
|
|
1154
|
+
getRpcMethodForTestOnly(name: string): JsRpcProperty | null;
|
|
1153
1155
|
}
|
|
1154
1156
|
export interface FetcherScheduledOptions {
|
|
1155
1157
|
scheduledTime?: Date;
|
|
@@ -1161,10 +1163,10 @@ export interface FetcherScheduledResult {
|
|
|
1161
1163
|
}
|
|
1162
1164
|
export interface FetcherQueueResult {
|
|
1163
1165
|
outcome: string;
|
|
1164
|
-
retryAll: boolean;
|
|
1165
1166
|
ackAll: boolean;
|
|
1166
|
-
|
|
1167
|
+
retryBatch: QueueRetryBatch;
|
|
1167
1168
|
explicitAcks: string[];
|
|
1169
|
+
retryMessages: QueueRetryMessage[];
|
|
1168
1170
|
}
|
|
1169
1171
|
export type ServiceBindingQueueMessage<Body = unknown> = {
|
|
1170
1172
|
id: string;
|
|
@@ -1290,32 +1292,51 @@ export interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
|
1290
1292
|
export type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1291
1293
|
export interface Queue<Body = unknown> {
|
|
1292
1294
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1293
|
-
sendBatch(
|
|
1295
|
+
sendBatch(
|
|
1296
|
+
messages: Iterable<MessageSendRequest<Body>>,
|
|
1297
|
+
options?: QueueSendBatchOptions
|
|
1298
|
+
): Promise<void>;
|
|
1294
1299
|
}
|
|
1295
1300
|
export interface QueueSendOptions {
|
|
1296
1301
|
contentType?: QueueContentType;
|
|
1302
|
+
delaySeconds?: number;
|
|
1303
|
+
}
|
|
1304
|
+
export interface QueueSendBatchOptions {
|
|
1305
|
+
delaySeconds?: number;
|
|
1297
1306
|
}
|
|
1298
1307
|
export interface MessageSendRequest<Body = unknown> {
|
|
1299
1308
|
body: Body;
|
|
1300
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;
|
|
1301
1322
|
}
|
|
1302
1323
|
export interface Message<Body = unknown> {
|
|
1303
1324
|
readonly id: string;
|
|
1304
1325
|
readonly timestamp: Date;
|
|
1305
1326
|
readonly body: Body;
|
|
1306
|
-
retry(): void;
|
|
1327
|
+
retry(options?: QueueRetryOptions): void;
|
|
1307
1328
|
ack(): void;
|
|
1308
1329
|
}
|
|
1309
1330
|
export interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1310
1331
|
readonly messages: readonly Message<Body>[];
|
|
1311
1332
|
readonly queue: string;
|
|
1312
|
-
retryAll(): void;
|
|
1333
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1313
1334
|
ackAll(): void;
|
|
1314
1335
|
}
|
|
1315
1336
|
export interface MessageBatch<Body = unknown> {
|
|
1316
1337
|
readonly messages: readonly Message<Body>[];
|
|
1317
1338
|
readonly queue: string;
|
|
1318
|
-
retryAll(): void;
|
|
1339
|
+
retryAll(options?: QueueRetryOptions): void;
|
|
1319
1340
|
ackAll(): void;
|
|
1320
1341
|
}
|
|
1321
1342
|
export interface R2Error extends Error {
|
|
@@ -1481,7 +1502,11 @@ export type R2Objects = {
|
|
|
1481
1502
|
truncated: false;
|
|
1482
1503
|
}
|
|
1483
1504
|
);
|
|
1484
|
-
export
|
|
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;
|
|
@@ -1622,6 +1647,9 @@ export declare class ReadableStreamBYOBReader {
|
|
|
1622
1647
|
view: T
|
|
1623
1648
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1624
1649
|
}
|
|
1650
|
+
export interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
|
|
1651
|
+
min?: number;
|
|
1652
|
+
}
|
|
1625
1653
|
export interface ReadableStreamGetReaderOptions {
|
|
1626
1654
|
mode: "byob";
|
|
1627
1655
|
}
|
|
@@ -1867,30 +1895,30 @@ export interface UnsafeTraceMetrics {
|
|
|
1867
1895
|
}
|
|
1868
1896
|
export declare class URL {
|
|
1869
1897
|
constructor(url: string | URL, base?: string | URL);
|
|
1870
|
-
get origin():
|
|
1871
|
-
get href():
|
|
1872
|
-
set href(value:
|
|
1873
|
-
get protocol():
|
|
1874
|
-
set protocol(value:
|
|
1875
|
-
get username():
|
|
1876
|
-
set username(value:
|
|
1877
|
-
get password():
|
|
1878
|
-
set password(value:
|
|
1879
|
-
get host():
|
|
1880
|
-
set host(value:
|
|
1881
|
-
get hostname():
|
|
1882
|
-
set hostname(value:
|
|
1883
|
-
get port():
|
|
1884
|
-
set port(value:
|
|
1885
|
-
get pathname():
|
|
1886
|
-
set pathname(value:
|
|
1887
|
-
get search():
|
|
1888
|
-
set search(value:
|
|
1889
|
-
get hash():
|
|
1890
|
-
set hash(value:
|
|
1898
|
+
get origin(): ArrayBuffer;
|
|
1899
|
+
get href(): ArrayBufferView;
|
|
1900
|
+
set href(value: ArrayBufferView);
|
|
1901
|
+
get protocol(): ArrayBufferView;
|
|
1902
|
+
set protocol(value: ArrayBufferView);
|
|
1903
|
+
get username(): ArrayBufferView;
|
|
1904
|
+
set username(value: ArrayBufferView);
|
|
1905
|
+
get password(): ArrayBufferView;
|
|
1906
|
+
set password(value: ArrayBufferView);
|
|
1907
|
+
get host(): ArrayBufferView;
|
|
1908
|
+
set host(value: ArrayBufferView);
|
|
1909
|
+
get hostname(): ArrayBufferView;
|
|
1910
|
+
set hostname(value: ArrayBufferView);
|
|
1911
|
+
get port(): ArrayBufferView;
|
|
1912
|
+
set port(value: ArrayBufferView);
|
|
1913
|
+
get pathname(): ArrayBufferView;
|
|
1914
|
+
set pathname(value: ArrayBufferView);
|
|
1915
|
+
get search(): ArrayBufferView;
|
|
1916
|
+
set search(value: ArrayBufferView);
|
|
1917
|
+
get hash(): ArrayBufferView;
|
|
1918
|
+
set hash(value: ArrayBufferView);
|
|
1891
1919
|
get searchParams(): URLSearchParams;
|
|
1892
|
-
toJSON():
|
|
1893
|
-
toString():
|
|
1920
|
+
toJSON(): ArrayBufferView;
|
|
1921
|
+
toString(): ArrayBufferView;
|
|
1894
1922
|
static canParse(url: string, base?: string): boolean;
|
|
1895
1923
|
}
|
|
1896
1924
|
export declare class URLSearchParams {
|
|
@@ -1900,14 +1928,14 @@ export declare class URLSearchParams {
|
|
|
1900
1928
|
get size(): number;
|
|
1901
1929
|
append(name: string, value: string): void;
|
|
1902
1930
|
delete(name: string, value?: string): void;
|
|
1903
|
-
get(name: string):
|
|
1904
|
-
getAll(name: string):
|
|
1931
|
+
get(name: string): ArrayBufferView | null;
|
|
1932
|
+
getAll(name: string): ArrayBufferView[];
|
|
1905
1933
|
has(name: string, value?: string): boolean;
|
|
1906
1934
|
set(name: string, value: string): void;
|
|
1907
1935
|
sort(): void;
|
|
1908
1936
|
entries(): IterableIterator<[key: string, value: string]>;
|
|
1909
|
-
keys(): IterableIterator<
|
|
1910
|
-
values(): IterableIterator<
|
|
1937
|
+
keys(): IterableIterator<ArrayBufferView>;
|
|
1938
|
+
values(): IterableIterator<ArrayBufferView>;
|
|
1911
1939
|
forEach<This = unknown>(
|
|
1912
1940
|
callback: (
|
|
1913
1941
|
this: This,
|
|
@@ -1921,7 +1949,11 @@ export declare class URLSearchParams {
|
|
|
1921
1949
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1922
1950
|
}
|
|
1923
1951
|
export declare class URLPattern {
|
|
1924
|
-
constructor(
|
|
1952
|
+
constructor(
|
|
1953
|
+
input?: string | URLPatternURLPatternInit,
|
|
1954
|
+
baseURL?: string,
|
|
1955
|
+
patternOptions?: URLPatternURLPatternOptions
|
|
1956
|
+
);
|
|
1925
1957
|
get protocol(): string;
|
|
1926
1958
|
get username(): string;
|
|
1927
1959
|
get password(): string;
|
|
@@ -1962,6 +1994,9 @@ export interface URLPatternURLPatternResult {
|
|
|
1962
1994
|
search: URLPatternURLPatternComponentResult;
|
|
1963
1995
|
hash: URLPatternURLPatternComponentResult;
|
|
1964
1996
|
}
|
|
1997
|
+
export interface URLPatternURLPatternOptions {
|
|
1998
|
+
ignoreCase?: boolean;
|
|
1999
|
+
}
|
|
1965
2000
|
export declare class CloseEvent extends Event {
|
|
1966
2001
|
constructor(type: string, initializer: CloseEventInit);
|
|
1967
2002
|
/** Returns the WebSocket connection close code provided by the server. */
|
|
@@ -2138,9 +2173,9 @@ export interface gpuGPUBuffer {
|
|
|
2138
2173
|
unmap(): void;
|
|
2139
2174
|
destroy(): void;
|
|
2140
2175
|
mapAsync(
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2176
|
+
offset: number,
|
|
2177
|
+
size?: number | bigint,
|
|
2178
|
+
param3?: number | bigint
|
|
2144
2179
|
): Promise<void>;
|
|
2145
2180
|
get size(): number | bigint;
|
|
2146
2181
|
get usage(): number;
|
|
@@ -3585,7 +3620,10 @@ export declare abstract class D1PreparedStatement {
|
|
|
3585
3620
|
first<T = Record<string, unknown>>(): Promise<T | null>;
|
|
3586
3621
|
run(): Promise<D1Response>;
|
|
3587
3622
|
all<T = Record<string, unknown>>(): Promise<D1Result<T>>;
|
|
3588
|
-
raw<T = unknown[]>(
|
|
3623
|
+
raw<T = unknown[]>(options: {
|
|
3624
|
+
columnNames: true;
|
|
3625
|
+
}): Promise<[string[], ...T[]]>;
|
|
3626
|
+
raw<T = unknown[]>(options?: { columnNames?: false }): Promise<T[]>;
|
|
3589
3627
|
}
|
|
3590
3628
|
/**
|
|
3591
3629
|
* An email message that can be sent from a Worker.
|
|
@@ -3693,7 +3731,7 @@ export interface Hyperdrive {
|
|
|
3693
3731
|
}
|
|
3694
3732
|
export type Params<P extends string = any> = Record<P, string | string[]>;
|
|
3695
3733
|
export type EventContext<Env, P extends string, Data> = {
|
|
3696
|
-
request: Request
|
|
3734
|
+
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
3697
3735
|
functionPath: string;
|
|
3698
3736
|
waitUntil: (promise: Promise<any>) => void;
|
|
3699
3737
|
passThroughOnException: () => void;
|
|
@@ -3712,7 +3750,7 @@ export type PagesFunction<
|
|
|
3712
3750
|
Data extends Record<string, unknown> = Record<string, unknown>
|
|
3713
3751
|
> = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
|
|
3714
3752
|
export type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
|
|
3715
|
-
request: Request
|
|
3753
|
+
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
3716
3754
|
functionPath: string;
|
|
3717
3755
|
waitUntil: (promise: Promise<any>) => void;
|
|
3718
3756
|
passThroughOnException: () => void;
|