@cloudflare/workers-types 4.20240222.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 +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 +59 -37
- package/2022-10-31/index.ts +59 -37
- package/2022-11-30/index.d.ts +59 -37
- package/2022-11-30/index.ts +59 -37
- package/2023-03-01/index.d.ts +59 -37
- package/2023-03-01/index.ts +59 -37
- package/2023-07-01/index.d.ts +59 -37
- package/2023-07-01/index.ts +59 -37
- package/experimental/index.d.ts +76 -44
- package/experimental/index.ts +76 -44
- 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/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