@cloudflare/workers-types 4.20240701.0 → 4.20240712.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 +464 -468
- package/2021-11-03/index.ts +210 -193
- package/2022-01-31/index.d.ts +464 -468
- package/2022-01-31/index.ts +210 -193
- package/2022-03-21/index.d.ts +468 -474
- package/2022-03-21/index.ts +214 -199
- package/2022-08-04/index.d.ts +468 -474
- package/2022-08-04/index.ts +214 -199
- package/2022-10-31/index.d.ts +468 -474
- package/2022-10-31/index.ts +214 -199
- package/2022-11-30/index.d.ts +463 -469
- package/2022-11-30/index.ts +214 -199
- package/2023-03-01/index.d.ts +463 -469
- package/2023-03-01/index.ts +214 -199
- package/2023-07-01/index.d.ts +463 -469
- package/2023-07-01/index.ts +214 -199
- package/experimental/index.d.ts +470 -476
- package/experimental/index.ts +214 -199
- package/index.d.ts +464 -468
- package/index.ts +210 -193
- package/oldest/index.d.ts +464 -468
- package/oldest/index.ts +210 -193
- package/package.json +1 -1
package/2021-11-03/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ declare class DOMException extends Error {
|
|
|
54
54
|
get stack(): any;
|
|
55
55
|
set stack(value: any);
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
type WorkerGlobalScopeEventMap = {
|
|
58
58
|
fetch: FetchEvent;
|
|
59
59
|
scheduled: ScheduledEvent;
|
|
60
60
|
queue: QueueEvent;
|
|
@@ -65,7 +65,7 @@ declare abstract class WorkerGlobalScope extends EventTarget<WorkerGlobalScopeEv
|
|
|
65
65
|
EventTarget: typeof EventTarget;
|
|
66
66
|
}
|
|
67
67
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console) */
|
|
68
|
-
|
|
68
|
+
interface Console {
|
|
69
69
|
"assert"(condition?: boolean, ...data: any[]): void;
|
|
70
70
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/console/clear_static) */
|
|
71
71
|
clear(): void;
|
|
@@ -106,8 +106,8 @@ declare interface Console {
|
|
|
106
106
|
warn(...data: any[]): void;
|
|
107
107
|
}
|
|
108
108
|
declare const console: Console;
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
type BufferSource = ArrayBufferView | ArrayBuffer;
|
|
110
|
+
type TypedArray =
|
|
111
111
|
| Int8Array
|
|
112
112
|
| Uint8Array
|
|
113
113
|
| Uint8ClampedArray
|
|
@@ -198,7 +198,7 @@ declare namespace WebAssembly {
|
|
|
198
198
|
*
|
|
199
199
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ServiceWorkerGlobalScope)
|
|
200
200
|
*/
|
|
201
|
-
|
|
201
|
+
interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
202
202
|
DOMException: typeof DOMException;
|
|
203
203
|
WorkerGlobalScope: typeof WorkerGlobalScope;
|
|
204
204
|
btoa(data: string): string;
|
|
@@ -279,16 +279,16 @@ declare interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
279
279
|
FixedLengthStream: typeof FixedLengthStream;
|
|
280
280
|
IdentityTransformStream: typeof IdentityTransformStream;
|
|
281
281
|
HTMLRewriter: typeof HTMLRewriter;
|
|
282
|
-
GPUAdapter: typeof
|
|
283
|
-
GPUOutOfMemoryError: typeof
|
|
284
|
-
GPUValidationError: typeof
|
|
285
|
-
GPUInternalError: typeof
|
|
286
|
-
GPUDeviceLostInfo: typeof
|
|
287
|
-
GPUBufferUsage: typeof
|
|
288
|
-
GPUShaderStage: typeof
|
|
289
|
-
GPUMapMode: typeof
|
|
290
|
-
GPUTextureUsage: typeof
|
|
291
|
-
GPUColorWrite: typeof
|
|
282
|
+
GPUAdapter: typeof GPUAdapter;
|
|
283
|
+
GPUOutOfMemoryError: typeof GPUOutOfMemoryError;
|
|
284
|
+
GPUValidationError: typeof GPUValidationError;
|
|
285
|
+
GPUInternalError: typeof GPUInternalError;
|
|
286
|
+
GPUDeviceLostInfo: typeof GPUDeviceLostInfo;
|
|
287
|
+
GPUBufferUsage: typeof GPUBufferUsage;
|
|
288
|
+
GPUShaderStage: typeof GPUShaderStage;
|
|
289
|
+
GPUMapMode: typeof GPUMapMode;
|
|
290
|
+
GPUTextureUsage: typeof GPUTextureUsage;
|
|
291
|
+
GPUColorWrite: typeof GPUColorWrite;
|
|
292
292
|
}
|
|
293
293
|
declare function addEventListener<Type extends keyof WorkerGlobalScopeEventMap>(
|
|
294
294
|
type: Type,
|
|
@@ -360,45 +360,42 @@ declare const caches: CacheStorage;
|
|
|
360
360
|
declare const scheduler: Scheduler;
|
|
361
361
|
declare const performance: Performance;
|
|
362
362
|
declare const origin: string;
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
interface TestController {}
|
|
364
|
+
interface ExecutionContext {
|
|
365
365
|
waitUntil(promise: Promise<any>): void;
|
|
366
366
|
passThroughOnException(): void;
|
|
367
367
|
}
|
|
368
|
-
|
|
369
|
-
Env = unknown,
|
|
370
|
-
CfHostMetadata = unknown,
|
|
371
|
-
> = (
|
|
368
|
+
type ExportedHandlerFetchHandler<Env = unknown, CfHostMetadata = unknown> = (
|
|
372
369
|
request: Request<CfHostMetadata, IncomingRequestCfProperties<CfHostMetadata>>,
|
|
373
370
|
env: Env,
|
|
374
371
|
ctx: ExecutionContext,
|
|
375
372
|
) => Response | Promise<Response>;
|
|
376
|
-
|
|
373
|
+
type ExportedHandlerTailHandler<Env = unknown> = (
|
|
377
374
|
events: TraceItem[],
|
|
378
375
|
env: Env,
|
|
379
376
|
ctx: ExecutionContext,
|
|
380
377
|
) => void | Promise<void>;
|
|
381
|
-
|
|
378
|
+
type ExportedHandlerTraceHandler<Env = unknown> = (
|
|
382
379
|
traces: TraceItem[],
|
|
383
380
|
env: Env,
|
|
384
381
|
ctx: ExecutionContext,
|
|
385
382
|
) => void | Promise<void>;
|
|
386
|
-
|
|
383
|
+
type ExportedHandlerScheduledHandler<Env = unknown> = (
|
|
387
384
|
controller: ScheduledController,
|
|
388
385
|
env: Env,
|
|
389
386
|
ctx: ExecutionContext,
|
|
390
387
|
) => void | Promise<void>;
|
|
391
|
-
|
|
388
|
+
type ExportedHandlerQueueHandler<Env = unknown, Message = unknown> = (
|
|
392
389
|
batch: MessageBatch<Message>,
|
|
393
390
|
env: Env,
|
|
394
391
|
ctx: ExecutionContext,
|
|
395
392
|
) => void | Promise<void>;
|
|
396
|
-
|
|
393
|
+
type ExportedHandlerTestHandler<Env = unknown> = (
|
|
397
394
|
controller: TestController,
|
|
398
395
|
env: Env,
|
|
399
396
|
ctx: ExecutionContext,
|
|
400
397
|
) => void | Promise<void>;
|
|
401
|
-
|
|
398
|
+
interface ExportedHandler<
|
|
402
399
|
Env = unknown,
|
|
403
400
|
QueueHandlerMessage = unknown,
|
|
404
401
|
CfHostMetadata = unknown,
|
|
@@ -411,7 +408,7 @@ declare interface ExportedHandler<
|
|
|
411
408
|
email?: EmailExportedHandler<Env>;
|
|
412
409
|
queue?: ExportedHandlerQueueHandler<Env, QueueHandlerMessage>;
|
|
413
410
|
}
|
|
414
|
-
|
|
411
|
+
interface StructuredSerializeOptions {
|
|
415
412
|
transfer?: any[];
|
|
416
413
|
}
|
|
417
414
|
declare abstract class PromiseRejectionEvent extends Event {
|
|
@@ -425,17 +422,17 @@ declare abstract class PromiseRejectionEvent extends Event {
|
|
|
425
422
|
*
|
|
426
423
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance)
|
|
427
424
|
*/
|
|
428
|
-
|
|
425
|
+
interface Performance {
|
|
429
426
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/timeOrigin) */
|
|
430
427
|
readonly timeOrigin: number;
|
|
431
428
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Performance/now) */
|
|
432
429
|
now(): number;
|
|
433
430
|
}
|
|
434
|
-
|
|
431
|
+
interface AlarmInvocationInfo {
|
|
435
432
|
readonly isRetry: boolean;
|
|
436
433
|
readonly retryCount: number;
|
|
437
434
|
}
|
|
438
|
-
|
|
435
|
+
interface DurableObject {
|
|
439
436
|
fetch(request: Request): Response | Promise<Response>;
|
|
440
437
|
alarm?(): void | Promise<void>;
|
|
441
438
|
webSocketMessage?(
|
|
@@ -450,7 +447,7 @@ declare interface DurableObject {
|
|
|
450
447
|
): void | Promise<void>;
|
|
451
448
|
webSocketError?(ws: WebSocket, error: unknown): void | Promise<void>;
|
|
452
449
|
}
|
|
453
|
-
|
|
450
|
+
type DurableObjectStub<
|
|
454
451
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
455
452
|
> = Fetcher<
|
|
456
453
|
T,
|
|
@@ -459,12 +456,12 @@ declare type DurableObjectStub<
|
|
|
459
456
|
readonly id: DurableObjectId;
|
|
460
457
|
readonly name?: string;
|
|
461
458
|
};
|
|
462
|
-
|
|
459
|
+
interface DurableObjectId {
|
|
463
460
|
toString(): string;
|
|
464
461
|
equals(other: DurableObjectId): boolean;
|
|
465
462
|
readonly name?: string;
|
|
466
463
|
}
|
|
467
|
-
|
|
464
|
+
interface DurableObjectNamespace<
|
|
468
465
|
T extends Rpc.DurableObjectBranded | undefined = undefined,
|
|
469
466
|
> {
|
|
470
467
|
newUniqueId(
|
|
@@ -480,11 +477,11 @@ declare interface DurableObjectNamespace<
|
|
|
480
477
|
jurisdiction: DurableObjectJurisdiction,
|
|
481
478
|
): DurableObjectNamespace<T>;
|
|
482
479
|
}
|
|
483
|
-
|
|
484
|
-
|
|
480
|
+
type DurableObjectJurisdiction = "eu" | "fedramp";
|
|
481
|
+
interface DurableObjectNamespaceNewUniqueIdOptions {
|
|
485
482
|
jurisdiction?: DurableObjectJurisdiction;
|
|
486
483
|
}
|
|
487
|
-
|
|
484
|
+
type DurableObjectLocationHint =
|
|
488
485
|
| "wnam"
|
|
489
486
|
| "enam"
|
|
490
487
|
| "sam"
|
|
@@ -494,10 +491,10 @@ declare type DurableObjectLocationHint =
|
|
|
494
491
|
| "oc"
|
|
495
492
|
| "afr"
|
|
496
493
|
| "me";
|
|
497
|
-
|
|
494
|
+
interface DurableObjectNamespaceGetDurableObjectOptions {
|
|
498
495
|
locationHint?: DurableObjectLocationHint;
|
|
499
496
|
}
|
|
500
|
-
|
|
497
|
+
interface DurableObjectState {
|
|
501
498
|
waitUntil(promise: Promise<any>): void;
|
|
502
499
|
readonly id: DurableObjectId;
|
|
503
500
|
readonly storage: DurableObjectStorage;
|
|
@@ -511,7 +508,7 @@ declare interface DurableObjectState {
|
|
|
511
508
|
getHibernatableWebSocketEventTimeout(): number | null;
|
|
512
509
|
getTags(ws: WebSocket): string[];
|
|
513
510
|
}
|
|
514
|
-
|
|
511
|
+
interface DurableObjectTransaction {
|
|
515
512
|
get<T = unknown>(
|
|
516
513
|
key: string,
|
|
517
514
|
options?: DurableObjectGetOptions,
|
|
@@ -542,7 +539,7 @@ declare interface DurableObjectTransaction {
|
|
|
542
539
|
): Promise<void>;
|
|
543
540
|
deleteAlarm(options?: DurableObjectSetAlarmOptions): Promise<void>;
|
|
544
541
|
}
|
|
545
|
-
|
|
542
|
+
interface DurableObjectStorage {
|
|
546
543
|
get<T = unknown>(
|
|
547
544
|
key: string,
|
|
548
545
|
options?: DurableObjectGetOptions,
|
|
@@ -578,7 +575,7 @@ declare interface DurableObjectStorage {
|
|
|
578
575
|
sync(): Promise<void>;
|
|
579
576
|
transactionSync<T>(closure: () => T): T;
|
|
580
577
|
}
|
|
581
|
-
|
|
578
|
+
interface DurableObjectListOptions {
|
|
582
579
|
start?: string;
|
|
583
580
|
startAfter?: string;
|
|
584
581
|
end?: string;
|
|
@@ -588,19 +585,19 @@ declare interface DurableObjectListOptions {
|
|
|
588
585
|
allowConcurrency?: boolean;
|
|
589
586
|
noCache?: boolean;
|
|
590
587
|
}
|
|
591
|
-
|
|
588
|
+
interface DurableObjectGetOptions {
|
|
592
589
|
allowConcurrency?: boolean;
|
|
593
590
|
noCache?: boolean;
|
|
594
591
|
}
|
|
595
|
-
|
|
592
|
+
interface DurableObjectGetAlarmOptions {
|
|
596
593
|
allowConcurrency?: boolean;
|
|
597
594
|
}
|
|
598
|
-
|
|
595
|
+
interface DurableObjectPutOptions {
|
|
599
596
|
allowConcurrency?: boolean;
|
|
600
597
|
allowUnconfirmed?: boolean;
|
|
601
598
|
noCache?: boolean;
|
|
602
599
|
}
|
|
603
|
-
|
|
600
|
+
interface DurableObjectSetAlarmOptions {
|
|
604
601
|
allowConcurrency?: boolean;
|
|
605
602
|
allowUnconfirmed?: boolean;
|
|
606
603
|
}
|
|
@@ -609,10 +606,10 @@ declare class WebSocketRequestResponsePair {
|
|
|
609
606
|
get request(): string;
|
|
610
607
|
get response(): string;
|
|
611
608
|
}
|
|
612
|
-
|
|
609
|
+
interface AnalyticsEngineDataset {
|
|
613
610
|
writeDataPoint(event?: AnalyticsEngineDataPoint): void;
|
|
614
611
|
}
|
|
615
|
-
|
|
612
|
+
interface AnalyticsEngineDataPoint {
|
|
616
613
|
indexes?: ((ArrayBuffer | string) | null)[];
|
|
617
614
|
doubles?: number[];
|
|
618
615
|
blobs?: ((ArrayBuffer | string) | null)[];
|
|
@@ -720,20 +717,20 @@ declare class Event {
|
|
|
720
717
|
static readonly AT_TARGET: number;
|
|
721
718
|
static readonly BUBBLING_PHASE: number;
|
|
722
719
|
}
|
|
723
|
-
|
|
720
|
+
interface EventInit {
|
|
724
721
|
bubbles?: boolean;
|
|
725
722
|
cancelable?: boolean;
|
|
726
723
|
composed?: boolean;
|
|
727
724
|
}
|
|
728
|
-
|
|
725
|
+
type EventListener<EventType extends Event = Event> = (
|
|
729
726
|
event: EventType,
|
|
730
727
|
) => void;
|
|
731
|
-
|
|
728
|
+
interface EventListenerObject<EventType extends Event = Event> {
|
|
732
729
|
handleEvent(event: EventType): void;
|
|
733
730
|
}
|
|
734
|
-
|
|
735
|
-
EventType
|
|
736
|
-
|
|
731
|
+
type EventListenerOrEventListenerObject<EventType extends Event = Event> =
|
|
732
|
+
| EventListener<EventType>
|
|
733
|
+
| EventListenerObject<EventType>;
|
|
737
734
|
declare class EventTarget<
|
|
738
735
|
EventMap extends Record<string, Event> = Record<string, Event>,
|
|
739
736
|
> {
|
|
@@ -777,16 +774,16 @@ declare class EventTarget<
|
|
|
777
774
|
*/
|
|
778
775
|
dispatchEvent(event: EventMap[keyof EventMap]): boolean;
|
|
779
776
|
}
|
|
780
|
-
|
|
777
|
+
interface EventTargetEventListenerOptions {
|
|
781
778
|
capture?: boolean;
|
|
782
779
|
}
|
|
783
|
-
|
|
780
|
+
interface EventTargetAddEventListenerOptions {
|
|
784
781
|
capture?: boolean;
|
|
785
782
|
passive?: boolean;
|
|
786
783
|
once?: boolean;
|
|
787
784
|
signal?: AbortSignal;
|
|
788
785
|
}
|
|
789
|
-
|
|
786
|
+
interface EventTargetHandlerObject {
|
|
790
787
|
handleEvent: (event: Event) => any | undefined;
|
|
791
788
|
}
|
|
792
789
|
declare class AbortController {
|
|
@@ -825,10 +822,10 @@ declare abstract class AbortSignal extends EventTarget {
|
|
|
825
822
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/throwIfAborted) */
|
|
826
823
|
throwIfAborted(): void;
|
|
827
824
|
}
|
|
828
|
-
|
|
825
|
+
interface Scheduler {
|
|
829
826
|
wait(delay: number, maybeOptions?: SchedulerWaitOptions): Promise<void>;
|
|
830
827
|
}
|
|
831
|
-
|
|
828
|
+
interface SchedulerWaitOptions {
|
|
832
829
|
signal?: AbortSignal;
|
|
833
830
|
}
|
|
834
831
|
declare abstract class ExtendableEvent extends Event {
|
|
@@ -844,7 +841,7 @@ declare class CustomEvent<T = any> extends Event {
|
|
|
844
841
|
*/
|
|
845
842
|
get detail(): T;
|
|
846
843
|
}
|
|
847
|
-
|
|
844
|
+
interface CustomEventCustomEventInit {
|
|
848
845
|
bubbles?: boolean;
|
|
849
846
|
cancelable?: boolean;
|
|
850
847
|
composed?: boolean;
|
|
@@ -869,7 +866,7 @@ declare class Blob {
|
|
|
869
866
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/stream) */
|
|
870
867
|
stream(): ReadableStream;
|
|
871
868
|
}
|
|
872
|
-
|
|
869
|
+
interface BlobOptions {
|
|
873
870
|
type?: string;
|
|
874
871
|
}
|
|
875
872
|
declare class File extends Blob {
|
|
@@ -883,7 +880,7 @@ declare class File extends Blob {
|
|
|
883
880
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified) */
|
|
884
881
|
readonly lastModified: number;
|
|
885
882
|
}
|
|
886
|
-
|
|
883
|
+
interface FileOptions {
|
|
887
884
|
type?: string;
|
|
888
885
|
lastModified?: number;
|
|
889
886
|
}
|
|
@@ -900,7 +897,7 @@ declare abstract class Cache {
|
|
|
900
897
|
): Promise<Response | undefined>;
|
|
901
898
|
put(request: RequestInfo, response: Response): Promise<void>;
|
|
902
899
|
}
|
|
903
|
-
|
|
900
|
+
interface CacheQueryOptions {
|
|
904
901
|
ignoreMethod?: boolean;
|
|
905
902
|
}
|
|
906
903
|
declare abstract class Crypto {
|
|
@@ -1021,11 +1018,11 @@ declare abstract class CryptoKey {
|
|
|
1021
1018
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CryptoKey/usages) */
|
|
1022
1019
|
readonly usages: string[];
|
|
1023
1020
|
}
|
|
1024
|
-
|
|
1021
|
+
interface CryptoKeyPair {
|
|
1025
1022
|
publicKey: CryptoKey;
|
|
1026
1023
|
privateKey: CryptoKey;
|
|
1027
1024
|
}
|
|
1028
|
-
|
|
1025
|
+
interface JsonWebKey {
|
|
1029
1026
|
kty: string;
|
|
1030
1027
|
use?: string;
|
|
1031
1028
|
key_ops?: string[];
|
|
@@ -1045,12 +1042,12 @@ declare interface JsonWebKey {
|
|
|
1045
1042
|
oth?: RsaOtherPrimesInfo[];
|
|
1046
1043
|
k?: string;
|
|
1047
1044
|
}
|
|
1048
|
-
|
|
1045
|
+
interface RsaOtherPrimesInfo {
|
|
1049
1046
|
r?: string;
|
|
1050
1047
|
d?: string;
|
|
1051
1048
|
t?: string;
|
|
1052
1049
|
}
|
|
1053
|
-
|
|
1050
|
+
interface SubtleCryptoDeriveKeyAlgorithm {
|
|
1054
1051
|
name: string;
|
|
1055
1052
|
salt?: ArrayBuffer;
|
|
1056
1053
|
iterations?: number;
|
|
@@ -1058,7 +1055,7 @@ declare interface SubtleCryptoDeriveKeyAlgorithm {
|
|
|
1058
1055
|
$public?: CryptoKey;
|
|
1059
1056
|
info?: ArrayBuffer;
|
|
1060
1057
|
}
|
|
1061
|
-
|
|
1058
|
+
interface SubtleCryptoEncryptAlgorithm {
|
|
1062
1059
|
name: string;
|
|
1063
1060
|
iv?: ArrayBuffer;
|
|
1064
1061
|
additionalData?: ArrayBuffer;
|
|
@@ -1067,7 +1064,7 @@ declare interface SubtleCryptoEncryptAlgorithm {
|
|
|
1067
1064
|
length?: number;
|
|
1068
1065
|
label?: ArrayBuffer;
|
|
1069
1066
|
}
|
|
1070
|
-
|
|
1067
|
+
interface SubtleCryptoGenerateKeyAlgorithm {
|
|
1071
1068
|
name: string;
|
|
1072
1069
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1073
1070
|
modulusLength?: number;
|
|
@@ -1075,45 +1072,45 @@ declare interface SubtleCryptoGenerateKeyAlgorithm {
|
|
|
1075
1072
|
length?: number;
|
|
1076
1073
|
namedCurve?: string;
|
|
1077
1074
|
}
|
|
1078
|
-
|
|
1075
|
+
interface SubtleCryptoHashAlgorithm {
|
|
1079
1076
|
name: string;
|
|
1080
1077
|
}
|
|
1081
|
-
|
|
1078
|
+
interface SubtleCryptoImportKeyAlgorithm {
|
|
1082
1079
|
name: string;
|
|
1083
1080
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1084
1081
|
length?: number;
|
|
1085
1082
|
namedCurve?: string;
|
|
1086
1083
|
compressed?: boolean;
|
|
1087
1084
|
}
|
|
1088
|
-
|
|
1085
|
+
interface SubtleCryptoSignAlgorithm {
|
|
1089
1086
|
name: string;
|
|
1090
1087
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1091
1088
|
dataLength?: number;
|
|
1092
1089
|
saltLength?: number;
|
|
1093
1090
|
}
|
|
1094
|
-
|
|
1091
|
+
interface CryptoKeyKeyAlgorithm {
|
|
1095
1092
|
name: string;
|
|
1096
1093
|
}
|
|
1097
|
-
|
|
1094
|
+
interface CryptoKeyAesKeyAlgorithm {
|
|
1098
1095
|
name: string;
|
|
1099
1096
|
length: number;
|
|
1100
1097
|
}
|
|
1101
|
-
|
|
1098
|
+
interface CryptoKeyHmacKeyAlgorithm {
|
|
1102
1099
|
name: string;
|
|
1103
1100
|
hash: CryptoKeyKeyAlgorithm;
|
|
1104
1101
|
length: number;
|
|
1105
1102
|
}
|
|
1106
|
-
|
|
1103
|
+
interface CryptoKeyRsaKeyAlgorithm {
|
|
1107
1104
|
name: string;
|
|
1108
1105
|
modulusLength: number;
|
|
1109
1106
|
publicExponent: ArrayBuffer | (ArrayBuffer | ArrayBufferView);
|
|
1110
1107
|
hash?: CryptoKeyKeyAlgorithm;
|
|
1111
1108
|
}
|
|
1112
|
-
|
|
1109
|
+
interface CryptoKeyEllipticKeyAlgorithm {
|
|
1113
1110
|
name: string;
|
|
1114
1111
|
namedCurve: string;
|
|
1115
1112
|
}
|
|
1116
|
-
|
|
1113
|
+
interface CryptoKeyArbitraryKeyAlgorithm {
|
|
1117
1114
|
name: string;
|
|
1118
1115
|
hash?: CryptoKeyKeyAlgorithm;
|
|
1119
1116
|
namedCurve?: string;
|
|
@@ -1170,14 +1167,14 @@ declare class TextEncoder {
|
|
|
1170
1167
|
): TextEncoderEncodeIntoResult;
|
|
1171
1168
|
readonly encoding: string;
|
|
1172
1169
|
}
|
|
1173
|
-
|
|
1170
|
+
interface TextDecoderConstructorOptions {
|
|
1174
1171
|
fatal: boolean;
|
|
1175
1172
|
ignoreBOM: boolean;
|
|
1176
1173
|
}
|
|
1177
|
-
|
|
1174
|
+
interface TextDecoderDecodeOptions {
|
|
1178
1175
|
stream: boolean;
|
|
1179
1176
|
}
|
|
1180
|
-
|
|
1177
|
+
interface TextEncoderEncodeIntoResult {
|
|
1181
1178
|
read: number;
|
|
1182
1179
|
written: number;
|
|
1183
1180
|
}
|
|
@@ -1194,7 +1191,7 @@ declare class ErrorEvent extends Event {
|
|
|
1194
1191
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ErrorEvent/error) */
|
|
1195
1192
|
get error(): any;
|
|
1196
1193
|
}
|
|
1197
|
-
|
|
1194
|
+
interface ErrorEventErrorEventInit {
|
|
1198
1195
|
message?: string;
|
|
1199
1196
|
filename?: string;
|
|
1200
1197
|
lineno?: number;
|
|
@@ -1228,7 +1225,7 @@ declare class FormData {
|
|
|
1228
1225
|
): void;
|
|
1229
1226
|
[Symbol.iterator](): IterableIterator<[key: string, value: File | string]>;
|
|
1230
1227
|
}
|
|
1231
|
-
|
|
1228
|
+
interface ContentOptions {
|
|
1232
1229
|
html?: boolean;
|
|
1233
1230
|
}
|
|
1234
1231
|
declare class HTMLRewriter {
|
|
@@ -1240,23 +1237,23 @@ declare class HTMLRewriter {
|
|
|
1240
1237
|
onDocument(handlers: HTMLRewriterDocumentContentHandlers): HTMLRewriter;
|
|
1241
1238
|
transform(response: Response): Response;
|
|
1242
1239
|
}
|
|
1243
|
-
|
|
1240
|
+
interface HTMLRewriterElementContentHandlers {
|
|
1244
1241
|
element?(element: Element): void | Promise<void>;
|
|
1245
1242
|
comments?(comment: Comment): void | Promise<void>;
|
|
1246
1243
|
text?(element: Text): void | Promise<void>;
|
|
1247
1244
|
}
|
|
1248
|
-
|
|
1245
|
+
interface HTMLRewriterDocumentContentHandlers {
|
|
1249
1246
|
doctype?(doctype: Doctype): void | Promise<void>;
|
|
1250
1247
|
comments?(comment: Comment): void | Promise<void>;
|
|
1251
1248
|
text?(text: Text): void | Promise<void>;
|
|
1252
1249
|
end?(end: DocumentEnd): void | Promise<void>;
|
|
1253
1250
|
}
|
|
1254
|
-
|
|
1251
|
+
interface Doctype {
|
|
1255
1252
|
readonly name: string | null;
|
|
1256
1253
|
readonly publicId: string | null;
|
|
1257
1254
|
readonly systemId: string | null;
|
|
1258
1255
|
}
|
|
1259
|
-
|
|
1256
|
+
interface Element {
|
|
1260
1257
|
tagName: string;
|
|
1261
1258
|
readonly attributes: IterableIterator<string[]>;
|
|
1262
1259
|
readonly removed: boolean;
|
|
@@ -1275,13 +1272,13 @@ declare interface Element {
|
|
|
1275
1272
|
setInnerContent(content: string, options?: ContentOptions): Element;
|
|
1276
1273
|
onEndTag(handler: (tag: EndTag) => void | Promise<void>): void;
|
|
1277
1274
|
}
|
|
1278
|
-
|
|
1275
|
+
interface EndTag {
|
|
1279
1276
|
name: string;
|
|
1280
1277
|
before(content: string, options?: ContentOptions): EndTag;
|
|
1281
1278
|
after(content: string, options?: ContentOptions): EndTag;
|
|
1282
1279
|
remove(): EndTag;
|
|
1283
1280
|
}
|
|
1284
|
-
|
|
1281
|
+
interface Comment {
|
|
1285
1282
|
text: string;
|
|
1286
1283
|
readonly removed: boolean;
|
|
1287
1284
|
before(content: string, options?: ContentOptions): Comment;
|
|
@@ -1289,7 +1286,7 @@ declare interface Comment {
|
|
|
1289
1286
|
replace(content: string, options?: ContentOptions): Comment;
|
|
1290
1287
|
remove(): Comment;
|
|
1291
1288
|
}
|
|
1292
|
-
|
|
1289
|
+
interface Text {
|
|
1293
1290
|
readonly text: string;
|
|
1294
1291
|
readonly lastInTextNode: boolean;
|
|
1295
1292
|
readonly removed: boolean;
|
|
@@ -1298,7 +1295,7 @@ declare interface Text {
|
|
|
1298
1295
|
replace(content: string, options?: ContentOptions): Text;
|
|
1299
1296
|
remove(): Text;
|
|
1300
1297
|
}
|
|
1301
|
-
|
|
1298
|
+
interface DocumentEnd {
|
|
1302
1299
|
append(content: string, options?: ContentOptions): DocumentEnd;
|
|
1303
1300
|
}
|
|
1304
1301
|
declare abstract class FetchEvent extends ExtendableEvent {
|
|
@@ -1308,7 +1305,7 @@ declare abstract class FetchEvent extends ExtendableEvent {
|
|
|
1308
1305
|
respondWith(promise: Response | Promise<Response>): void;
|
|
1309
1306
|
passThroughOnException(): void;
|
|
1310
1307
|
}
|
|
1311
|
-
|
|
1308
|
+
type HeadersInit =
|
|
1312
1309
|
| Headers
|
|
1313
1310
|
| Iterable<Iterable<string>>
|
|
1314
1311
|
| Record<string, string>;
|
|
@@ -1332,7 +1329,7 @@ declare class Headers {
|
|
|
1332
1329
|
values(): IterableIterator<string>;
|
|
1333
1330
|
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1334
1331
|
}
|
|
1335
|
-
|
|
1332
|
+
type BodyInit =
|
|
1336
1333
|
| ReadableStream<Uint8Array>
|
|
1337
1334
|
| string
|
|
1338
1335
|
| ArrayBuffer
|
|
@@ -1373,7 +1370,7 @@ declare class Response extends Body {
|
|
|
1373
1370
|
readonly webSocket: WebSocket | null;
|
|
1374
1371
|
readonly cf?: any;
|
|
1375
1372
|
}
|
|
1376
|
-
|
|
1373
|
+
interface ResponseInit {
|
|
1377
1374
|
status?: number;
|
|
1378
1375
|
statusText?: string;
|
|
1379
1376
|
headers?: HeadersInit;
|
|
@@ -1381,10 +1378,10 @@ declare interface ResponseInit {
|
|
|
1381
1378
|
webSocket?: WebSocket | null;
|
|
1382
1379
|
encodeBody?: "automatic" | "manual";
|
|
1383
1380
|
}
|
|
1384
|
-
|
|
1385
|
-
CfHostMetadata
|
|
1386
|
-
|
|
1387
|
-
|
|
1381
|
+
type RequestInfo<CfHostMetadata = unknown, Cf = CfProperties<CfHostMetadata>> =
|
|
1382
|
+
| Request<CfHostMetadata, Cf>
|
|
1383
|
+
| string
|
|
1384
|
+
| URL;
|
|
1388
1385
|
declare class Request<
|
|
1389
1386
|
CfHostMetadata = unknown,
|
|
1390
1387
|
Cf = CfProperties<CfHostMetadata>,
|
|
@@ -1437,7 +1434,7 @@ declare class Request<
|
|
|
1437
1434
|
*/
|
|
1438
1435
|
readonly keepalive: boolean;
|
|
1439
1436
|
}
|
|
1440
|
-
|
|
1437
|
+
interface RequestInit<Cf = CfProperties> {
|
|
1441
1438
|
/** A string to set request's method. */
|
|
1442
1439
|
method?: string;
|
|
1443
1440
|
/** A Headers object, an object literal, or an array of two-item arrays to set request's headers. */
|
|
@@ -1453,10 +1450,9 @@ declare interface RequestInit<Cf = CfProperties> {
|
|
|
1453
1450
|
/** An AbortSignal to set request's signal. */
|
|
1454
1451
|
signal?: AbortSignal | null;
|
|
1455
1452
|
}
|
|
1456
|
-
|
|
1457
|
-
T
|
|
1458
|
-
|
|
1459
|
-
declare type Fetcher<
|
|
1453
|
+
type Service<T extends Rpc.WorkerEntrypointBranded | undefined = undefined> =
|
|
1454
|
+
Fetcher<T>;
|
|
1455
|
+
type Fetcher<
|
|
1460
1456
|
T extends Rpc.EntrypointBranded | undefined = undefined,
|
|
1461
1457
|
Reserved extends string = never,
|
|
1462
1458
|
> = (T extends Rpc.EntrypointBranded
|
|
@@ -1465,16 +1461,16 @@ declare type Fetcher<
|
|
|
1465
1461
|
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
1466
1462
|
connect(address: SocketAddress | string, options?: SocketOptions): Socket;
|
|
1467
1463
|
};
|
|
1468
|
-
|
|
1464
|
+
interface FetcherPutOptions {
|
|
1469
1465
|
expiration?: number;
|
|
1470
1466
|
expirationTtl?: number;
|
|
1471
1467
|
}
|
|
1472
|
-
|
|
1468
|
+
interface KVNamespaceListKey<Metadata, Key extends string = string> {
|
|
1473
1469
|
name: Key;
|
|
1474
1470
|
expiration?: number;
|
|
1475
1471
|
metadata?: Metadata;
|
|
1476
1472
|
}
|
|
1477
|
-
|
|
1473
|
+
type KVNamespaceListResult<Metadata, Key extends string = string> =
|
|
1478
1474
|
| {
|
|
1479
1475
|
list_complete: false;
|
|
1480
1476
|
keys: KVNamespaceListKey<Metadata, Key>[];
|
|
@@ -1486,7 +1482,7 @@ declare type KVNamespaceListResult<Metadata, Key extends string = string> =
|
|
|
1486
1482
|
keys: KVNamespaceListKey<Metadata, Key>[];
|
|
1487
1483
|
cacheStatus: string | null;
|
|
1488
1484
|
};
|
|
1489
|
-
|
|
1485
|
+
interface KVNamespace<Key extends string = string> {
|
|
1490
1486
|
get(
|
|
1491
1487
|
key: Key,
|
|
1492
1488
|
options?: Partial<KVNamespaceGetOptions<undefined>>,
|
|
@@ -1560,49 +1556,49 @@ declare interface KVNamespace<Key extends string = string> {
|
|
|
1560
1556
|
): Promise<KVNamespaceGetWithMetadataResult<ReadableStream, Metadata>>;
|
|
1561
1557
|
delete(key: Key): Promise<void>;
|
|
1562
1558
|
}
|
|
1563
|
-
|
|
1559
|
+
interface KVNamespaceListOptions {
|
|
1564
1560
|
limit?: number;
|
|
1565
1561
|
prefix?: string | null;
|
|
1566
1562
|
cursor?: string | null;
|
|
1567
1563
|
}
|
|
1568
|
-
|
|
1564
|
+
interface KVNamespaceGetOptions<Type> {
|
|
1569
1565
|
type: Type;
|
|
1570
1566
|
cacheTtl?: number;
|
|
1571
1567
|
}
|
|
1572
|
-
|
|
1568
|
+
interface KVNamespacePutOptions {
|
|
1573
1569
|
expiration?: number;
|
|
1574
1570
|
expirationTtl?: number;
|
|
1575
1571
|
metadata?: any | null;
|
|
1576
1572
|
}
|
|
1577
|
-
|
|
1573
|
+
interface KVNamespaceGetWithMetadataResult<Value, Metadata> {
|
|
1578
1574
|
value: Value | null;
|
|
1579
1575
|
metadata: Metadata | null;
|
|
1580
1576
|
cacheStatus: string | null;
|
|
1581
1577
|
}
|
|
1582
|
-
|
|
1583
|
-
|
|
1578
|
+
type QueueContentType = "text" | "bytes" | "json" | "v8";
|
|
1579
|
+
interface Queue<Body = unknown> {
|
|
1584
1580
|
send(message: Body, options?: QueueSendOptions): Promise<void>;
|
|
1585
1581
|
sendBatch(
|
|
1586
1582
|
messages: Iterable<MessageSendRequest<Body>>,
|
|
1587
1583
|
options?: QueueSendBatchOptions,
|
|
1588
1584
|
): Promise<void>;
|
|
1589
1585
|
}
|
|
1590
|
-
|
|
1586
|
+
interface QueueSendOptions {
|
|
1591
1587
|
contentType?: QueueContentType;
|
|
1592
1588
|
delaySeconds?: number;
|
|
1593
1589
|
}
|
|
1594
|
-
|
|
1590
|
+
interface QueueSendBatchOptions {
|
|
1595
1591
|
delaySeconds?: number;
|
|
1596
1592
|
}
|
|
1597
|
-
|
|
1593
|
+
interface MessageSendRequest<Body = unknown> {
|
|
1598
1594
|
body: Body;
|
|
1599
1595
|
contentType?: QueueContentType;
|
|
1600
1596
|
delaySeconds?: number;
|
|
1601
1597
|
}
|
|
1602
|
-
|
|
1598
|
+
interface QueueRetryOptions {
|
|
1603
1599
|
delaySeconds?: number;
|
|
1604
1600
|
}
|
|
1605
|
-
|
|
1601
|
+
interface Message<Body = unknown> {
|
|
1606
1602
|
readonly id: string;
|
|
1607
1603
|
readonly timestamp: Date;
|
|
1608
1604
|
readonly body: Body;
|
|
@@ -1610,26 +1606,26 @@ declare interface Message<Body = unknown> {
|
|
|
1610
1606
|
retry(options?: QueueRetryOptions): void;
|
|
1611
1607
|
ack(): void;
|
|
1612
1608
|
}
|
|
1613
|
-
|
|
1609
|
+
interface QueueEvent<Body = unknown> extends ExtendableEvent {
|
|
1614
1610
|
readonly messages: readonly Message<Body>[];
|
|
1615
1611
|
readonly queue: string;
|
|
1616
1612
|
retryAll(options?: QueueRetryOptions): void;
|
|
1617
1613
|
ackAll(): void;
|
|
1618
1614
|
}
|
|
1619
|
-
|
|
1615
|
+
interface MessageBatch<Body = unknown> {
|
|
1620
1616
|
readonly messages: readonly Message<Body>[];
|
|
1621
1617
|
readonly queue: string;
|
|
1622
1618
|
retryAll(options?: QueueRetryOptions): void;
|
|
1623
1619
|
ackAll(): void;
|
|
1624
1620
|
}
|
|
1625
|
-
|
|
1621
|
+
interface R2Error extends Error {
|
|
1626
1622
|
readonly name: string;
|
|
1627
1623
|
readonly code: number;
|
|
1628
1624
|
readonly message: string;
|
|
1629
1625
|
readonly action: string;
|
|
1630
1626
|
readonly stack: any;
|
|
1631
1627
|
}
|
|
1632
|
-
|
|
1628
|
+
interface R2ListOptions {
|
|
1633
1629
|
limit?: number;
|
|
1634
1630
|
prefix?: string;
|
|
1635
1631
|
cursor?: string;
|
|
@@ -1677,7 +1673,7 @@ declare abstract class R2Bucket {
|
|
|
1677
1673
|
delete(keys: string | string[]): Promise<void>;
|
|
1678
1674
|
list(options?: R2ListOptions): Promise<R2Objects>;
|
|
1679
1675
|
}
|
|
1680
|
-
|
|
1676
|
+
interface R2MultipartUpload {
|
|
1681
1677
|
readonly key: string;
|
|
1682
1678
|
readonly uploadId: string;
|
|
1683
1679
|
uploadPart(
|
|
@@ -1687,7 +1683,7 @@ declare interface R2MultipartUpload {
|
|
|
1687
1683
|
abort(): Promise<void>;
|
|
1688
1684
|
complete(uploadedParts: R2UploadedPart[]): Promise<R2Object>;
|
|
1689
1685
|
}
|
|
1690
|
-
|
|
1686
|
+
interface R2UploadedPart {
|
|
1691
1687
|
partNumber: number;
|
|
1692
1688
|
etag: string;
|
|
1693
1689
|
}
|
|
@@ -1705,7 +1701,7 @@ declare abstract class R2Object {
|
|
|
1705
1701
|
readonly storageClass: string;
|
|
1706
1702
|
writeHttpMetadata(headers: Headers): void;
|
|
1707
1703
|
}
|
|
1708
|
-
|
|
1704
|
+
interface R2ObjectBody extends R2Object {
|
|
1709
1705
|
get body(): ReadableStream;
|
|
1710
1706
|
get bodyUsed(): boolean;
|
|
1711
1707
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
@@ -1713,7 +1709,7 @@ declare interface R2ObjectBody extends R2Object {
|
|
|
1713
1709
|
json<T>(): Promise<T>;
|
|
1714
1710
|
blob(): Promise<Blob>;
|
|
1715
1711
|
}
|
|
1716
|
-
|
|
1712
|
+
type R2Range =
|
|
1717
1713
|
| {
|
|
1718
1714
|
offset: number;
|
|
1719
1715
|
length?: number;
|
|
@@ -1725,18 +1721,18 @@ declare type R2Range =
|
|
|
1725
1721
|
| {
|
|
1726
1722
|
suffix: number;
|
|
1727
1723
|
};
|
|
1728
|
-
|
|
1724
|
+
interface R2Conditional {
|
|
1729
1725
|
etagMatches?: string;
|
|
1730
1726
|
etagDoesNotMatch?: string;
|
|
1731
1727
|
uploadedBefore?: Date;
|
|
1732
1728
|
uploadedAfter?: Date;
|
|
1733
1729
|
secondsGranularity?: boolean;
|
|
1734
1730
|
}
|
|
1735
|
-
|
|
1731
|
+
interface R2GetOptions {
|
|
1736
1732
|
onlyIf?: R2Conditional | Headers;
|
|
1737
1733
|
range?: R2Range | Headers;
|
|
1738
1734
|
}
|
|
1739
|
-
|
|
1735
|
+
interface R2PutOptions {
|
|
1740
1736
|
onlyIf?: R2Conditional | Headers;
|
|
1741
1737
|
httpMetadata?: R2HTTPMetadata | Headers;
|
|
1742
1738
|
customMetadata?: Record<string, string>;
|
|
@@ -1747,12 +1743,12 @@ declare interface R2PutOptions {
|
|
|
1747
1743
|
sha512?: ArrayBuffer | string;
|
|
1748
1744
|
storageClass?: string;
|
|
1749
1745
|
}
|
|
1750
|
-
|
|
1746
|
+
interface R2MultipartOptions {
|
|
1751
1747
|
httpMetadata?: R2HTTPMetadata | Headers;
|
|
1752
1748
|
customMetadata?: Record<string, string>;
|
|
1753
1749
|
storageClass?: string;
|
|
1754
1750
|
}
|
|
1755
|
-
|
|
1751
|
+
interface R2Checksums {
|
|
1756
1752
|
readonly md5?: ArrayBuffer;
|
|
1757
1753
|
readonly sha1?: ArrayBuffer;
|
|
1758
1754
|
readonly sha256?: ArrayBuffer;
|
|
@@ -1760,14 +1756,14 @@ declare interface R2Checksums {
|
|
|
1760
1756
|
readonly sha512?: ArrayBuffer;
|
|
1761
1757
|
toJSON(): R2StringChecksums;
|
|
1762
1758
|
}
|
|
1763
|
-
|
|
1759
|
+
interface R2StringChecksums {
|
|
1764
1760
|
md5?: string;
|
|
1765
1761
|
sha1?: string;
|
|
1766
1762
|
sha256?: string;
|
|
1767
1763
|
sha384?: string;
|
|
1768
1764
|
sha512?: string;
|
|
1769
1765
|
}
|
|
1770
|
-
|
|
1766
|
+
interface R2HTTPMetadata {
|
|
1771
1767
|
contentType?: string;
|
|
1772
1768
|
contentLanguage?: string;
|
|
1773
1769
|
contentDisposition?: string;
|
|
@@ -1775,7 +1771,7 @@ declare interface R2HTTPMetadata {
|
|
|
1775
1771
|
cacheControl?: string;
|
|
1776
1772
|
cacheExpiry?: Date;
|
|
1777
1773
|
}
|
|
1778
|
-
|
|
1774
|
+
type R2Objects = {
|
|
1779
1775
|
objects: R2Object[];
|
|
1780
1776
|
delimitedPrefixes: string[];
|
|
1781
1777
|
} & (
|
|
@@ -1792,16 +1788,16 @@ declare abstract class ScheduledEvent extends ExtendableEvent {
|
|
|
1792
1788
|
readonly cron: string;
|
|
1793
1789
|
noRetry(): void;
|
|
1794
1790
|
}
|
|
1795
|
-
|
|
1791
|
+
interface ScheduledController {
|
|
1796
1792
|
readonly scheduledTime: number;
|
|
1797
1793
|
readonly cron: string;
|
|
1798
1794
|
noRetry(): void;
|
|
1799
1795
|
}
|
|
1800
|
-
|
|
1796
|
+
interface QueuingStrategy<T = any> {
|
|
1801
1797
|
highWaterMark?: number | bigint;
|
|
1802
1798
|
size?: (chunk: T) => number | bigint;
|
|
1803
1799
|
}
|
|
1804
|
-
|
|
1800
|
+
interface UnderlyingSink<W = any> {
|
|
1805
1801
|
type?: string;
|
|
1806
1802
|
start?: (controller: WritableStreamDefaultController) => void | Promise<void>;
|
|
1807
1803
|
write?: (
|
|
@@ -1811,14 +1807,14 @@ declare interface UnderlyingSink<W = any> {
|
|
|
1811
1807
|
abort?: (reason: any) => void | Promise<void>;
|
|
1812
1808
|
close?: () => void | Promise<void>;
|
|
1813
1809
|
}
|
|
1814
|
-
|
|
1810
|
+
interface UnderlyingByteSource {
|
|
1815
1811
|
type: "bytes";
|
|
1816
1812
|
autoAllocateChunkSize?: number;
|
|
1817
1813
|
start?: (controller: ReadableByteStreamController) => void | Promise<void>;
|
|
1818
1814
|
pull?: (controller: ReadableByteStreamController) => void | Promise<void>;
|
|
1819
1815
|
cancel?: (reason: any) => void | Promise<void>;
|
|
1820
1816
|
}
|
|
1821
|
-
|
|
1817
|
+
interface UnderlyingSource<R = any> {
|
|
1822
1818
|
type?: "" | undefined;
|
|
1823
1819
|
start?: (
|
|
1824
1820
|
controller: ReadableStreamDefaultController<R>,
|
|
@@ -1829,7 +1825,7 @@ declare interface UnderlyingSource<R = any> {
|
|
|
1829
1825
|
cancel?: (reason: any) => void | Promise<void>;
|
|
1830
1826
|
expectedLength?: number | bigint;
|
|
1831
1827
|
}
|
|
1832
|
-
|
|
1828
|
+
interface Transformer<I = any, O = any> {
|
|
1833
1829
|
readableType?: string;
|
|
1834
1830
|
writableType?: string;
|
|
1835
1831
|
start?: (
|
|
@@ -1845,7 +1841,7 @@ declare interface Transformer<I = any, O = any> {
|
|
|
1845
1841
|
cancel?: (reason: any) => void | Promise<void>;
|
|
1846
1842
|
expectedLength?: number;
|
|
1847
1843
|
}
|
|
1848
|
-
|
|
1844
|
+
interface StreamPipeOptions {
|
|
1849
1845
|
/**
|
|
1850
1846
|
* Pipes this readable stream to a given writable stream destination. The way in which the piping process behaves under various error conditions can be customized with a number of passed options. It returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
|
|
1851
1847
|
*
|
|
@@ -1868,7 +1864,7 @@ declare interface StreamPipeOptions {
|
|
|
1868
1864
|
preventCancel?: boolean;
|
|
1869
1865
|
signal?: AbortSignal;
|
|
1870
1866
|
}
|
|
1871
|
-
|
|
1867
|
+
type ReadableStreamReadResult<R = any> =
|
|
1872
1868
|
| {
|
|
1873
1869
|
done: false;
|
|
1874
1870
|
value: R;
|
|
@@ -1882,7 +1878,7 @@ declare type ReadableStreamReadResult<R = any> =
|
|
|
1882
1878
|
*
|
|
1883
1879
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream)
|
|
1884
1880
|
*/
|
|
1885
|
-
|
|
1881
|
+
interface ReadableStream<R = any> {
|
|
1886
1882
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked) */
|
|
1887
1883
|
readonly locked: boolean;
|
|
1888
1884
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/cancel) */
|
|
@@ -1943,10 +1939,10 @@ declare class ReadableStreamBYOBReader {
|
|
|
1943
1939
|
view: T,
|
|
1944
1940
|
): Promise<ReadableStreamReadResult<T>>;
|
|
1945
1941
|
}
|
|
1946
|
-
|
|
1942
|
+
interface ReadableStreamBYOBReaderReadableStreamBYOBReaderReadOptions {
|
|
1947
1943
|
min?: number;
|
|
1948
1944
|
}
|
|
1949
|
-
|
|
1945
|
+
interface ReadableStreamGetReaderOptions {
|
|
1950
1946
|
/**
|
|
1951
1947
|
* Creates a ReadableStreamBYOBReader and locks the stream to the new reader.
|
|
1952
1948
|
*
|
|
@@ -1955,7 +1951,7 @@ declare interface ReadableStreamGetReaderOptions {
|
|
|
1955
1951
|
mode: "byob";
|
|
1956
1952
|
}
|
|
1957
1953
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest) */
|
|
1958
|
-
|
|
1954
|
+
interface ReadableStreamBYOBRequest {
|
|
1959
1955
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/view) */
|
|
1960
1956
|
get view(): Uint8Array | null;
|
|
1961
1957
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest/respond) */
|
|
@@ -1965,7 +1961,7 @@ declare interface ReadableStreamBYOBRequest {
|
|
|
1965
1961
|
get atLeast(): number | null;
|
|
1966
1962
|
}
|
|
1967
1963
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController) */
|
|
1968
|
-
|
|
1964
|
+
interface ReadableStreamDefaultController<R = any> {
|
|
1969
1965
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/desiredSize) */
|
|
1970
1966
|
get desiredSize(): number | null;
|
|
1971
1967
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController/close) */
|
|
@@ -1976,7 +1972,7 @@ declare interface ReadableStreamDefaultController<R = any> {
|
|
|
1976
1972
|
error(reason: any): void;
|
|
1977
1973
|
}
|
|
1978
1974
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController) */
|
|
1979
|
-
|
|
1975
|
+
interface ReadableByteStreamController {
|
|
1980
1976
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/byobRequest) */
|
|
1981
1977
|
get byobRequest(): ReadableStreamBYOBRequest | null;
|
|
1982
1978
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController/desiredSize) */
|
|
@@ -1993,14 +1989,14 @@ declare interface ReadableByteStreamController {
|
|
|
1993
1989
|
*
|
|
1994
1990
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
1995
1991
|
*/
|
|
1996
|
-
|
|
1992
|
+
interface WritableStreamDefaultController {
|
|
1997
1993
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/signal) */
|
|
1998
1994
|
get signal(): AbortSignal;
|
|
1999
1995
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController/error) */
|
|
2000
1996
|
error(reason?: any): void;
|
|
2001
1997
|
}
|
|
2002
1998
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController) */
|
|
2003
|
-
|
|
1999
|
+
interface TransformStreamDefaultController<O = any> {
|
|
2004
2000
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/desiredSize) */
|
|
2005
2001
|
get desiredSize(): number | null;
|
|
2006
2002
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/enqueue) */
|
|
@@ -2010,7 +2006,7 @@ declare interface TransformStreamDefaultController<O = any> {
|
|
|
2010
2006
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController/terminate) */
|
|
2011
2007
|
terminate(): void;
|
|
2012
2008
|
}
|
|
2013
|
-
|
|
2009
|
+
interface ReadableWritablePair<R = any, W = any> {
|
|
2014
2010
|
/**
|
|
2015
2011
|
* Provides a convenient, chainable way of piping this readable stream through a transform stream (or any other { writable, readable } pair). It simply pipes the stream into the writable side of the supplied pair, and returns the readable side for further use.
|
|
2016
2012
|
*
|
|
@@ -2073,10 +2069,10 @@ declare class IdentityTransformStream extends TransformStream<
|
|
|
2073
2069
|
> {
|
|
2074
2070
|
constructor(queuingStrategy?: IdentityTransformStreamQueuingStrategy);
|
|
2075
2071
|
}
|
|
2076
|
-
|
|
2072
|
+
interface IdentityTransformStreamQueuingStrategy {
|
|
2077
2073
|
highWaterMark?: number | bigint;
|
|
2078
2074
|
}
|
|
2079
|
-
|
|
2075
|
+
interface ReadableStreamValuesOptions {
|
|
2080
2076
|
preventCancel?: boolean;
|
|
2081
2077
|
}
|
|
2082
2078
|
declare class CompressionStream extends TransformStream<
|
|
@@ -2104,7 +2100,7 @@ declare class TextDecoderStream extends TransformStream<
|
|
|
2104
2100
|
get fatal(): boolean;
|
|
2105
2101
|
get ignoreBOM(): boolean;
|
|
2106
2102
|
}
|
|
2107
|
-
|
|
2103
|
+
interface TextDecoderStreamTextDecoderStreamInit {
|
|
2108
2104
|
fatal?: boolean;
|
|
2109
2105
|
ignoreBOM?: boolean;
|
|
2110
2106
|
}
|
|
@@ -2124,7 +2120,7 @@ declare class CountQueuingStrategy implements QueuingStrategy {
|
|
|
2124
2120
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CountQueuingStrategy/size) */
|
|
2125
2121
|
get size(): (chunk?: any) => number;
|
|
2126
2122
|
}
|
|
2127
|
-
|
|
2123
|
+
interface QueuingStrategyInit {
|
|
2128
2124
|
/**
|
|
2129
2125
|
* Creates a new ByteLengthQueuingStrategy with the provided high water mark.
|
|
2130
2126
|
*
|
|
@@ -2132,7 +2128,7 @@ declare interface QueuingStrategyInit {
|
|
|
2132
2128
|
*/
|
|
2133
2129
|
highWaterMark: number;
|
|
2134
2130
|
}
|
|
2135
|
-
|
|
2131
|
+
interface ScriptVersion {
|
|
2136
2132
|
id?: string;
|
|
2137
2133
|
tag?: string;
|
|
2138
2134
|
message?: string;
|
|
@@ -2141,7 +2137,7 @@ declare abstract class TailEvent extends ExtendableEvent {
|
|
|
2141
2137
|
readonly events: TraceItem[];
|
|
2142
2138
|
readonly traces: TraceItem[];
|
|
2143
2139
|
}
|
|
2144
|
-
|
|
2140
|
+
interface TraceItem {
|
|
2145
2141
|
readonly event:
|
|
2146
2142
|
| (
|
|
2147
2143
|
| TraceItemFetchEventInfo
|
|
@@ -2166,84 +2162,84 @@ declare interface TraceItem {
|
|
|
2166
2162
|
readonly scriptTags?: string[];
|
|
2167
2163
|
readonly outcome: string;
|
|
2168
2164
|
}
|
|
2169
|
-
|
|
2165
|
+
interface TraceItemAlarmEventInfo {
|
|
2170
2166
|
readonly scheduledTime: Date;
|
|
2171
2167
|
}
|
|
2172
|
-
|
|
2173
|
-
|
|
2168
|
+
interface TraceItemCustomEventInfo {}
|
|
2169
|
+
interface TraceItemScheduledEventInfo {
|
|
2174
2170
|
readonly scheduledTime: number;
|
|
2175
2171
|
readonly cron: string;
|
|
2176
2172
|
}
|
|
2177
|
-
|
|
2173
|
+
interface TraceItemQueueEventInfo {
|
|
2178
2174
|
readonly queue: string;
|
|
2179
2175
|
readonly batchSize: number;
|
|
2180
2176
|
}
|
|
2181
|
-
|
|
2177
|
+
interface TraceItemEmailEventInfo {
|
|
2182
2178
|
readonly mailFrom: string;
|
|
2183
2179
|
readonly rcptTo: string;
|
|
2184
2180
|
readonly rawSize: number;
|
|
2185
2181
|
}
|
|
2186
|
-
|
|
2182
|
+
interface TraceItemTailEventInfo {
|
|
2187
2183
|
readonly consumedEvents: TraceItemTailEventInfoTailItem[];
|
|
2188
2184
|
}
|
|
2189
|
-
|
|
2185
|
+
interface TraceItemTailEventInfoTailItem {
|
|
2190
2186
|
readonly scriptName: string | null;
|
|
2191
2187
|
}
|
|
2192
|
-
|
|
2188
|
+
interface TraceItemFetchEventInfo {
|
|
2193
2189
|
readonly response?: TraceItemFetchEventInfoResponse;
|
|
2194
2190
|
readonly request: TraceItemFetchEventInfoRequest;
|
|
2195
2191
|
}
|
|
2196
|
-
|
|
2192
|
+
interface TraceItemFetchEventInfoRequest {
|
|
2197
2193
|
readonly cf?: any;
|
|
2198
2194
|
readonly headers: Record<string, string>;
|
|
2199
2195
|
readonly method: string;
|
|
2200
2196
|
readonly url: string;
|
|
2201
2197
|
getUnredacted(): TraceItemFetchEventInfoRequest;
|
|
2202
2198
|
}
|
|
2203
|
-
|
|
2199
|
+
interface TraceItemFetchEventInfoResponse {
|
|
2204
2200
|
readonly status: number;
|
|
2205
2201
|
}
|
|
2206
|
-
|
|
2202
|
+
interface TraceItemJsRpcEventInfo {
|
|
2207
2203
|
readonly rpcMethod: string;
|
|
2208
2204
|
}
|
|
2209
|
-
|
|
2205
|
+
interface TraceItemHibernatableWebSocketEventInfo {
|
|
2210
2206
|
readonly getWebSocketEvent:
|
|
2211
2207
|
| TraceItemHibernatableWebSocketEventInfoMessage
|
|
2212
2208
|
| TraceItemHibernatableWebSocketEventInfoClose
|
|
2213
2209
|
| TraceItemHibernatableWebSocketEventInfoError;
|
|
2214
2210
|
}
|
|
2215
|
-
|
|
2211
|
+
interface TraceItemHibernatableWebSocketEventInfoMessage {
|
|
2216
2212
|
readonly webSocketEventType: string;
|
|
2217
2213
|
}
|
|
2218
|
-
|
|
2214
|
+
interface TraceItemHibernatableWebSocketEventInfoClose {
|
|
2219
2215
|
readonly webSocketEventType: string;
|
|
2220
2216
|
readonly code: number;
|
|
2221
2217
|
readonly wasClean: boolean;
|
|
2222
2218
|
}
|
|
2223
|
-
|
|
2219
|
+
interface TraceItemHibernatableWebSocketEventInfoError {
|
|
2224
2220
|
readonly webSocketEventType: string;
|
|
2225
2221
|
}
|
|
2226
|
-
|
|
2222
|
+
interface TraceLog {
|
|
2227
2223
|
readonly timestamp: number;
|
|
2228
2224
|
readonly level: string;
|
|
2229
2225
|
readonly message: any;
|
|
2230
2226
|
}
|
|
2231
|
-
|
|
2227
|
+
interface TraceException {
|
|
2232
2228
|
readonly timestamp: number;
|
|
2233
2229
|
readonly message: string;
|
|
2234
2230
|
readonly name: string;
|
|
2235
2231
|
readonly stack?: string;
|
|
2236
2232
|
}
|
|
2237
|
-
|
|
2233
|
+
interface TraceDiagnosticChannelEvent {
|
|
2238
2234
|
readonly timestamp: number;
|
|
2239
2235
|
readonly channel: string;
|
|
2240
2236
|
readonly message: any;
|
|
2241
2237
|
}
|
|
2242
|
-
|
|
2238
|
+
interface TraceMetrics {
|
|
2243
2239
|
readonly cpuTime: number;
|
|
2244
2240
|
readonly wallTime: number;
|
|
2245
2241
|
}
|
|
2246
|
-
|
|
2242
|
+
interface UnsafeTraceMetrics {
|
|
2247
2243
|
fromTrace(item: TraceItem): TraceMetrics;
|
|
2248
2244
|
}
|
|
2249
2245
|
declare class URL {
|
|
@@ -2330,7 +2326,7 @@ declare class URLPattern {
|
|
|
2330
2326
|
baseURL?: string,
|
|
2331
2327
|
): URLPatternURLPatternResult | null;
|
|
2332
2328
|
}
|
|
2333
|
-
|
|
2329
|
+
interface URLPatternURLPatternInit {
|
|
2334
2330
|
protocol?: string;
|
|
2335
2331
|
username?: string;
|
|
2336
2332
|
password?: string;
|
|
@@ -2341,11 +2337,11 @@ declare interface URLPatternURLPatternInit {
|
|
|
2341
2337
|
hash?: string;
|
|
2342
2338
|
baseURL?: string;
|
|
2343
2339
|
}
|
|
2344
|
-
|
|
2340
|
+
interface URLPatternURLPatternComponentResult {
|
|
2345
2341
|
input: string;
|
|
2346
2342
|
groups: Record<string, string>;
|
|
2347
2343
|
}
|
|
2348
|
-
|
|
2344
|
+
interface URLPatternURLPatternResult {
|
|
2349
2345
|
inputs: (string | URLPatternURLPatternInit)[];
|
|
2350
2346
|
protocol: URLPatternURLPatternComponentResult;
|
|
2351
2347
|
username: URLPatternURLPatternComponentResult;
|
|
@@ -2356,7 +2352,7 @@ declare interface URLPatternURLPatternResult {
|
|
|
2356
2352
|
search: URLPatternURLPatternComponentResult;
|
|
2357
2353
|
hash: URLPatternURLPatternComponentResult;
|
|
2358
2354
|
}
|
|
2359
|
-
|
|
2355
|
+
interface URLPatternURLPatternOptions {
|
|
2360
2356
|
ignoreCase?: boolean;
|
|
2361
2357
|
}
|
|
2362
2358
|
declare class CloseEvent extends Event {
|
|
@@ -2380,7 +2376,7 @@ declare class CloseEvent extends Event {
|
|
|
2380
2376
|
*/
|
|
2381
2377
|
readonly wasClean: boolean;
|
|
2382
2378
|
}
|
|
2383
|
-
|
|
2379
|
+
interface CloseEventInit {
|
|
2384
2380
|
code?: number;
|
|
2385
2381
|
reason?: string;
|
|
2386
2382
|
wasClean?: boolean;
|
|
@@ -2389,10 +2385,10 @@ declare class MessageEvent extends Event {
|
|
|
2389
2385
|
constructor(type: string, initializer: MessageEventInit);
|
|
2390
2386
|
readonly data: ArrayBuffer | string;
|
|
2391
2387
|
}
|
|
2392
|
-
|
|
2388
|
+
interface MessageEventInit {
|
|
2393
2389
|
data: ArrayBuffer | string;
|
|
2394
2390
|
}
|
|
2395
|
-
|
|
2391
|
+
type WebSocketEventMap = {
|
|
2396
2392
|
close: CloseEvent;
|
|
2397
2393
|
message: MessageEvent;
|
|
2398
2394
|
open: Event;
|
|
@@ -2454,7 +2450,7 @@ declare const WebSocketPair: {
|
|
|
2454
2450
|
1: WebSocket;
|
|
2455
2451
|
};
|
|
2456
2452
|
};
|
|
2457
|
-
|
|
2453
|
+
interface Socket {
|
|
2458
2454
|
get readable(): ReadableStream;
|
|
2459
2455
|
get writable(): WritableStream;
|
|
2460
2456
|
get closed(): Promise<void>;
|
|
@@ -2462,76 +2458,74 @@ declare interface Socket {
|
|
|
2462
2458
|
close(): Promise<void>;
|
|
2463
2459
|
startTls(options?: TlsOptions): Socket;
|
|
2464
2460
|
}
|
|
2465
|
-
|
|
2461
|
+
interface SocketOptions {
|
|
2466
2462
|
secureTransport?: string;
|
|
2467
2463
|
allowHalfOpen: boolean;
|
|
2468
2464
|
highWaterMark?: number | bigint;
|
|
2469
2465
|
}
|
|
2470
|
-
|
|
2466
|
+
interface SocketAddress {
|
|
2471
2467
|
hostname: string;
|
|
2472
2468
|
port: number;
|
|
2473
2469
|
}
|
|
2474
|
-
|
|
2470
|
+
interface TlsOptions {
|
|
2475
2471
|
expectedServerHostname?: string;
|
|
2476
2472
|
}
|
|
2477
|
-
|
|
2473
|
+
interface SocketInfo {
|
|
2478
2474
|
remoteAddress?: string;
|
|
2479
2475
|
localAddress?: string;
|
|
2480
2476
|
}
|
|
2481
|
-
declare abstract class
|
|
2482
|
-
requestDevice(param1?:
|
|
2483
|
-
requestAdapterInfo(unmaskHints?: string[]): Promise<
|
|
2484
|
-
get features():
|
|
2485
|
-
get limits():
|
|
2477
|
+
declare abstract class GPUAdapter {
|
|
2478
|
+
requestDevice(param1?: GPUDeviceDescriptor): Promise<GPUDevice>;
|
|
2479
|
+
requestAdapterInfo(unmaskHints?: string[]): Promise<GPUAdapterInfo>;
|
|
2480
|
+
get features(): GPUSupportedFeatures;
|
|
2481
|
+
get limits(): GPUSupportedLimits;
|
|
2486
2482
|
}
|
|
2487
|
-
|
|
2488
|
-
createBuffer(param1:
|
|
2483
|
+
interface GPUDevice extends EventTarget {
|
|
2484
|
+
createBuffer(param1: GPUBufferDescriptor): GPUBuffer;
|
|
2489
2485
|
createBindGroupLayout(
|
|
2490
|
-
descriptor:
|
|
2491
|
-
):
|
|
2492
|
-
createBindGroup(descriptor:
|
|
2493
|
-
createSampler(descriptor:
|
|
2494
|
-
createShaderModule(
|
|
2495
|
-
descriptor: gpuGPUShaderModuleDescriptor,
|
|
2496
|
-
): gpuGPUShaderModule;
|
|
2486
|
+
descriptor: GPUBindGroupLayoutDescriptor,
|
|
2487
|
+
): GPUBindGroupLayout;
|
|
2488
|
+
createBindGroup(descriptor: GPUBindGroupDescriptor): GPUBindGroup;
|
|
2489
|
+
createSampler(descriptor: GPUSamplerDescriptor): GPUSampler;
|
|
2490
|
+
createShaderModule(descriptor: GPUShaderModuleDescriptor): GPUShaderModule;
|
|
2497
2491
|
createPipelineLayout(
|
|
2498
|
-
descriptor:
|
|
2499
|
-
):
|
|
2492
|
+
descriptor: GPUPipelineLayoutDescriptor,
|
|
2493
|
+
): GPUPipelineLayout;
|
|
2500
2494
|
createComputePipeline(
|
|
2501
|
-
descriptor:
|
|
2502
|
-
):
|
|
2495
|
+
descriptor: GPUComputePipelineDescriptor,
|
|
2496
|
+
): GPUComputePipeline;
|
|
2503
2497
|
createRenderPipeline(
|
|
2504
|
-
descriptor:
|
|
2505
|
-
):
|
|
2498
|
+
descriptor: GPURenderPipelineDescriptor,
|
|
2499
|
+
): GPURenderPipeline;
|
|
2506
2500
|
createCommandEncoder(
|
|
2507
|
-
descriptor?:
|
|
2508
|
-
):
|
|
2509
|
-
createTexture(param1:
|
|
2501
|
+
descriptor?: GPUCommandEncoderDescriptor,
|
|
2502
|
+
): GPUCommandEncoder;
|
|
2503
|
+
createTexture(param1: GPUTextureDescriptor): GPUTexture;
|
|
2510
2504
|
destroy(): void;
|
|
2511
|
-
createQuerySet(descriptor:
|
|
2505
|
+
createQuerySet(descriptor: GPUQuerySetDescriptor): GPUQuerySet;
|
|
2512
2506
|
pushErrorScope(filter: string): void;
|
|
2513
|
-
popErrorScope(): Promise<
|
|
2514
|
-
get queue():
|
|
2515
|
-
get lost(): Promise<
|
|
2516
|
-
get features():
|
|
2517
|
-
get limits():
|
|
2507
|
+
popErrorScope(): Promise<GPUError | null>;
|
|
2508
|
+
get queue(): GPUQueue;
|
|
2509
|
+
get lost(): Promise<GPUDeviceLostInfo>;
|
|
2510
|
+
get features(): GPUSupportedFeatures;
|
|
2511
|
+
get limits(): GPUSupportedLimits;
|
|
2518
2512
|
}
|
|
2519
|
-
|
|
2513
|
+
interface GPUDeviceDescriptor {
|
|
2520
2514
|
label?: string;
|
|
2521
2515
|
requiredFeatures?: string[];
|
|
2522
2516
|
requiredLimits?: Record<string, number | bigint>;
|
|
2523
|
-
defaultQueue?:
|
|
2517
|
+
defaultQueue?: GPUQueueDescriptor;
|
|
2524
2518
|
}
|
|
2525
|
-
|
|
2519
|
+
interface GPUBufferDescriptor {
|
|
2526
2520
|
label: string;
|
|
2527
2521
|
size: number | bigint;
|
|
2528
2522
|
usage: number;
|
|
2529
2523
|
mappedAtCreation: boolean;
|
|
2530
2524
|
}
|
|
2531
|
-
|
|
2525
|
+
interface GPUQueueDescriptor {
|
|
2532
2526
|
label?: string;
|
|
2533
2527
|
}
|
|
2534
|
-
declare abstract class
|
|
2528
|
+
declare abstract class GPUBufferUsage {
|
|
2535
2529
|
static readonly MAP_READ: number;
|
|
2536
2530
|
static readonly MAP_WRITE: number;
|
|
2537
2531
|
static readonly COPY_SRC: number;
|
|
@@ -2543,7 +2537,7 @@ declare abstract class gpuGPUBufferUsage {
|
|
|
2543
2537
|
static readonly INDIRECT: number;
|
|
2544
2538
|
static readonly QUERY_RESOLVE: number;
|
|
2545
2539
|
}
|
|
2546
|
-
|
|
2540
|
+
interface GPUBuffer {
|
|
2547
2541
|
getMappedRange(size?: number | bigint, param2?: number | bigint): ArrayBuffer;
|
|
2548
2542
|
unmap(): void;
|
|
2549
2543
|
destroy(): void;
|
|
@@ -2556,59 +2550,59 @@ declare interface gpuGPUBuffer {
|
|
|
2556
2550
|
get usage(): number;
|
|
2557
2551
|
get mapState(): string;
|
|
2558
2552
|
}
|
|
2559
|
-
declare abstract class
|
|
2553
|
+
declare abstract class GPUShaderStage {
|
|
2560
2554
|
static readonly VERTEX: number;
|
|
2561
2555
|
static readonly FRAGMENT: number;
|
|
2562
2556
|
static readonly COMPUTE: number;
|
|
2563
2557
|
}
|
|
2564
|
-
|
|
2558
|
+
interface GPUBindGroupLayoutDescriptor {
|
|
2565
2559
|
label?: string;
|
|
2566
|
-
entries:
|
|
2560
|
+
entries: GPUBindGroupLayoutEntry[];
|
|
2567
2561
|
}
|
|
2568
|
-
|
|
2562
|
+
interface GPUBindGroupLayoutEntry {
|
|
2569
2563
|
binding: number;
|
|
2570
2564
|
visibility: number;
|
|
2571
|
-
buffer?:
|
|
2572
|
-
sampler?:
|
|
2573
|
-
texture?:
|
|
2574
|
-
storageTexture?:
|
|
2565
|
+
buffer?: GPUBufferBindingLayout;
|
|
2566
|
+
sampler?: GPUSamplerBindingLayout;
|
|
2567
|
+
texture?: GPUTextureBindingLayout;
|
|
2568
|
+
storageTexture?: GPUStorageTextureBindingLayout;
|
|
2575
2569
|
}
|
|
2576
|
-
|
|
2570
|
+
interface GPUStorageTextureBindingLayout {
|
|
2577
2571
|
access?: string;
|
|
2578
2572
|
format: string;
|
|
2579
2573
|
viewDimension?: string;
|
|
2580
2574
|
}
|
|
2581
|
-
|
|
2575
|
+
interface GPUTextureBindingLayout {
|
|
2582
2576
|
sampleType?: string;
|
|
2583
2577
|
viewDimension?: string;
|
|
2584
2578
|
multisampled?: boolean;
|
|
2585
2579
|
}
|
|
2586
|
-
|
|
2580
|
+
interface GPUSamplerBindingLayout {
|
|
2587
2581
|
type?: string;
|
|
2588
2582
|
}
|
|
2589
|
-
|
|
2583
|
+
interface GPUBufferBindingLayout {
|
|
2590
2584
|
type?: string;
|
|
2591
2585
|
hasDynamicOffset?: boolean;
|
|
2592
2586
|
minBindingSize?: number | bigint;
|
|
2593
2587
|
}
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2588
|
+
interface GPUBindGroupLayout {}
|
|
2589
|
+
interface GPUBindGroup {}
|
|
2590
|
+
interface GPUBindGroupDescriptor {
|
|
2597
2591
|
label?: string;
|
|
2598
|
-
layout:
|
|
2599
|
-
entries:
|
|
2592
|
+
layout: GPUBindGroupLayout;
|
|
2593
|
+
entries: GPUBindGroupEntry[];
|
|
2600
2594
|
}
|
|
2601
|
-
|
|
2595
|
+
interface GPUBindGroupEntry {
|
|
2602
2596
|
binding: number;
|
|
2603
|
-
resource:
|
|
2597
|
+
resource: GPUBufferBinding | GPUSampler;
|
|
2604
2598
|
}
|
|
2605
|
-
|
|
2606
|
-
buffer:
|
|
2599
|
+
interface GPUBufferBinding {
|
|
2600
|
+
buffer: GPUBuffer;
|
|
2607
2601
|
offset?: number | bigint;
|
|
2608
2602
|
size?: number | bigint;
|
|
2609
2603
|
}
|
|
2610
|
-
|
|
2611
|
-
|
|
2604
|
+
interface GPUSampler {}
|
|
2605
|
+
interface GPUSamplerDescriptor {
|
|
2612
2606
|
label?: string;
|
|
2613
2607
|
addressModeU?: string;
|
|
2614
2608
|
addressModeV?: string;
|
|
@@ -2621,76 +2615,74 @@ declare interface gpuGPUSamplerDescriptor {
|
|
|
2621
2615
|
compare: string;
|
|
2622
2616
|
maxAnisotropy?: number;
|
|
2623
2617
|
}
|
|
2624
|
-
|
|
2625
|
-
getCompilationInfo(): Promise<
|
|
2618
|
+
interface GPUShaderModule {
|
|
2619
|
+
getCompilationInfo(): Promise<GPUCompilationInfo>;
|
|
2626
2620
|
}
|
|
2627
|
-
|
|
2621
|
+
interface GPUShaderModuleDescriptor {
|
|
2628
2622
|
label?: string;
|
|
2629
2623
|
code: string;
|
|
2630
2624
|
}
|
|
2631
|
-
|
|
2632
|
-
|
|
2625
|
+
interface GPUPipelineLayout {}
|
|
2626
|
+
interface GPUPipelineLayoutDescriptor {
|
|
2633
2627
|
label?: string;
|
|
2634
|
-
bindGroupLayouts:
|
|
2628
|
+
bindGroupLayouts: GPUBindGroupLayout[];
|
|
2635
2629
|
}
|
|
2636
|
-
|
|
2637
|
-
getBindGroupLayout(index: number):
|
|
2630
|
+
interface GPUComputePipeline {
|
|
2631
|
+
getBindGroupLayout(index: number): GPUBindGroupLayout;
|
|
2638
2632
|
}
|
|
2639
|
-
|
|
2633
|
+
interface GPUComputePipelineDescriptor {
|
|
2640
2634
|
label?: string;
|
|
2641
|
-
compute:
|
|
2642
|
-
layout: string |
|
|
2635
|
+
compute: GPUProgrammableStage;
|
|
2636
|
+
layout: string | GPUPipelineLayout;
|
|
2643
2637
|
}
|
|
2644
|
-
|
|
2645
|
-
module:
|
|
2638
|
+
interface GPUProgrammableStage {
|
|
2639
|
+
module: GPUShaderModule;
|
|
2646
2640
|
entryPoint: string;
|
|
2647
2641
|
constants?: Record<string, number>;
|
|
2648
2642
|
}
|
|
2649
|
-
|
|
2643
|
+
interface GPUCommandEncoder {
|
|
2650
2644
|
get label(): string;
|
|
2651
2645
|
beginComputePass(
|
|
2652
|
-
descriptor?:
|
|
2653
|
-
):
|
|
2654
|
-
beginRenderPass(
|
|
2655
|
-
descriptor: gpuGPURenderPassDescriptor,
|
|
2656
|
-
): gpuGPURenderPassEncoder;
|
|
2646
|
+
descriptor?: GPUComputePassDescriptor,
|
|
2647
|
+
): GPUComputePassEncoder;
|
|
2648
|
+
beginRenderPass(descriptor: GPURenderPassDescriptor): GPURenderPassEncoder;
|
|
2657
2649
|
copyBufferToBuffer(
|
|
2658
|
-
source:
|
|
2650
|
+
source: GPUBuffer,
|
|
2659
2651
|
sourceOffset: number | bigint,
|
|
2660
|
-
destination:
|
|
2652
|
+
destination: GPUBuffer,
|
|
2661
2653
|
destinationOffset: number | bigint,
|
|
2662
2654
|
size: number | bigint,
|
|
2663
2655
|
): void;
|
|
2664
|
-
finish(param0?:
|
|
2656
|
+
finish(param0?: GPUCommandBufferDescriptor): GPUCommandBuffer;
|
|
2665
2657
|
copyTextureToBuffer(
|
|
2666
|
-
source:
|
|
2667
|
-
destination:
|
|
2668
|
-
copySize: Iterable<number> |
|
|
2658
|
+
source: GPUImageCopyTexture,
|
|
2659
|
+
destination: GPUImageCopyBuffer,
|
|
2660
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2669
2661
|
): void;
|
|
2670
2662
|
copyBufferToTexture(
|
|
2671
|
-
source:
|
|
2672
|
-
destination:
|
|
2673
|
-
copySize: Iterable<number> |
|
|
2663
|
+
source: GPUImageCopyBuffer,
|
|
2664
|
+
destination: GPUImageCopyTexture,
|
|
2665
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2674
2666
|
): void;
|
|
2675
2667
|
copyTextureToTexture(
|
|
2676
|
-
source:
|
|
2677
|
-
destination:
|
|
2678
|
-
copySize: Iterable<number> |
|
|
2668
|
+
source: GPUImageCopyTexture,
|
|
2669
|
+
destination: GPUImageCopyTexture,
|
|
2670
|
+
copySize: Iterable<number> | GPUExtent3DDict,
|
|
2679
2671
|
): void;
|
|
2680
2672
|
clearBuffer(
|
|
2681
|
-
buffer:
|
|
2673
|
+
buffer: GPUBuffer,
|
|
2682
2674
|
offset?: number | bigint,
|
|
2683
2675
|
size?: number | bigint,
|
|
2684
2676
|
): void;
|
|
2685
2677
|
}
|
|
2686
|
-
|
|
2678
|
+
interface GPUCommandEncoderDescriptor {
|
|
2687
2679
|
label?: string;
|
|
2688
2680
|
}
|
|
2689
|
-
|
|
2690
|
-
setPipeline(pipeline:
|
|
2681
|
+
interface GPUComputePassEncoder {
|
|
2682
|
+
setPipeline(pipeline: GPUComputePipeline): void;
|
|
2691
2683
|
setBindGroup(
|
|
2692
2684
|
index: number,
|
|
2693
|
-
bindGroup:
|
|
2685
|
+
bindGroup: GPUBindGroup | null,
|
|
2694
2686
|
dynamicOffsets?: Iterable<number>,
|
|
2695
2687
|
): void;
|
|
2696
2688
|
dispatchWorkgroups(
|
|
@@ -2700,48 +2692,48 @@ declare interface gpuGPUComputePassEncoder {
|
|
|
2700
2692
|
): void;
|
|
2701
2693
|
end(): void;
|
|
2702
2694
|
}
|
|
2703
|
-
|
|
2695
|
+
interface GPUComputePassDescriptor {
|
|
2704
2696
|
label?: string;
|
|
2705
|
-
timestampWrites?:
|
|
2697
|
+
timestampWrites?: GPUComputePassTimestampWrites;
|
|
2706
2698
|
}
|
|
2707
|
-
|
|
2708
|
-
|
|
2699
|
+
interface GPUQuerySet {}
|
|
2700
|
+
interface GPUQuerySetDescriptor {
|
|
2709
2701
|
label?: string;
|
|
2710
2702
|
}
|
|
2711
|
-
|
|
2712
|
-
querySet:
|
|
2703
|
+
interface GPUComputePassTimestampWrites {
|
|
2704
|
+
querySet: GPUQuerySet;
|
|
2713
2705
|
beginningOfPassWriteIndex?: number;
|
|
2714
2706
|
endOfPassWriteIndex?: number;
|
|
2715
2707
|
}
|
|
2716
|
-
|
|
2708
|
+
interface GPUCommandBufferDescriptor {
|
|
2717
2709
|
label?: string;
|
|
2718
2710
|
}
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
submit(commandBuffers:
|
|
2711
|
+
interface GPUCommandBuffer {}
|
|
2712
|
+
interface GPUQueue {
|
|
2713
|
+
submit(commandBuffers: GPUCommandBuffer[]): void;
|
|
2722
2714
|
writeBuffer(
|
|
2723
|
-
buffer:
|
|
2715
|
+
buffer: GPUBuffer,
|
|
2724
2716
|
bufferOffset: number | bigint,
|
|
2725
2717
|
data: ArrayBuffer | ArrayBufferView,
|
|
2726
2718
|
dataOffset?: number | bigint,
|
|
2727
2719
|
size?: number | bigint,
|
|
2728
2720
|
): void;
|
|
2729
2721
|
}
|
|
2730
|
-
declare abstract class
|
|
2722
|
+
declare abstract class GPUMapMode {
|
|
2731
2723
|
static readonly READ: number;
|
|
2732
2724
|
static readonly WRITE: number;
|
|
2733
2725
|
}
|
|
2734
|
-
|
|
2726
|
+
interface GPUAdapterInfo {
|
|
2735
2727
|
get vendor(): string;
|
|
2736
2728
|
get architecture(): string;
|
|
2737
2729
|
get device(): string;
|
|
2738
2730
|
get description(): string;
|
|
2739
2731
|
}
|
|
2740
|
-
|
|
2732
|
+
interface GPUSupportedFeatures {
|
|
2741
2733
|
has(name: string): boolean;
|
|
2742
2734
|
keys(): string[];
|
|
2743
2735
|
}
|
|
2744
|
-
|
|
2736
|
+
interface GPUSupportedLimits {
|
|
2745
2737
|
get maxTextureDimension1D(): number;
|
|
2746
2738
|
get maxTextureDimension2D(): number;
|
|
2747
2739
|
get maxTextureDimension3D(): number;
|
|
@@ -2774,17 +2766,17 @@ declare interface gpuGPUSupportedLimits {
|
|
|
2774
2766
|
get maxComputeWorkgroupSizeZ(): number;
|
|
2775
2767
|
get maxComputeWorkgroupsPerDimension(): number;
|
|
2776
2768
|
}
|
|
2777
|
-
declare abstract class
|
|
2769
|
+
declare abstract class GPUError {
|
|
2778
2770
|
get message(): string;
|
|
2779
2771
|
}
|
|
2780
|
-
declare abstract class
|
|
2781
|
-
declare abstract class
|
|
2782
|
-
declare abstract class
|
|
2783
|
-
declare abstract class
|
|
2772
|
+
declare abstract class GPUOutOfMemoryError extends GPUError {}
|
|
2773
|
+
declare abstract class GPUInternalError extends GPUError {}
|
|
2774
|
+
declare abstract class GPUValidationError extends GPUError {}
|
|
2775
|
+
declare abstract class GPUDeviceLostInfo {
|
|
2784
2776
|
get message(): string;
|
|
2785
2777
|
get reason(): string;
|
|
2786
2778
|
}
|
|
2787
|
-
|
|
2779
|
+
interface GPUCompilationMessage {
|
|
2788
2780
|
get message(): string;
|
|
2789
2781
|
get type(): string;
|
|
2790
2782
|
get lineNum(): number;
|
|
@@ -2792,19 +2784,19 @@ declare interface gpuGPUCompilationMessage {
|
|
|
2792
2784
|
get offset(): number;
|
|
2793
2785
|
get length(): number;
|
|
2794
2786
|
}
|
|
2795
|
-
|
|
2796
|
-
get messages():
|
|
2787
|
+
interface GPUCompilationInfo {
|
|
2788
|
+
get messages(): GPUCompilationMessage[];
|
|
2797
2789
|
}
|
|
2798
|
-
declare abstract class
|
|
2790
|
+
declare abstract class GPUTextureUsage {
|
|
2799
2791
|
static readonly COPY_SRC: number;
|
|
2800
2792
|
static readonly COPY_DST: number;
|
|
2801
2793
|
static readonly TEXTURE_BINDING: number;
|
|
2802
2794
|
static readonly STORAGE_BINDING: number;
|
|
2803
2795
|
static readonly RENDER_ATTACHMENT: number;
|
|
2804
2796
|
}
|
|
2805
|
-
|
|
2797
|
+
interface GPUTextureDescriptor {
|
|
2806
2798
|
label: string;
|
|
2807
|
-
size: number[] |
|
|
2799
|
+
size: number[] | GPUExtent3DDict;
|
|
2808
2800
|
mipLevelCount?: number;
|
|
2809
2801
|
sampleCount?: number;
|
|
2810
2802
|
dimension?: string;
|
|
@@ -2812,13 +2804,13 @@ declare interface gpuGPUTextureDescriptor {
|
|
|
2812
2804
|
usage: number;
|
|
2813
2805
|
viewFormats?: string[];
|
|
2814
2806
|
}
|
|
2815
|
-
|
|
2807
|
+
interface GPUExtent3DDict {
|
|
2816
2808
|
width: number;
|
|
2817
2809
|
height?: number;
|
|
2818
2810
|
depthOrArrayLayers?: number;
|
|
2819
2811
|
}
|
|
2820
|
-
|
|
2821
|
-
createView(descriptor?:
|
|
2812
|
+
interface GPUTexture {
|
|
2813
|
+
createView(descriptor?: GPUTextureViewDescriptor): GPUTextureView;
|
|
2822
2814
|
destroy(): void;
|
|
2823
2815
|
get width(): number;
|
|
2824
2816
|
get height(): number;
|
|
@@ -2828,8 +2820,8 @@ declare interface gpuGPUTexture {
|
|
|
2828
2820
|
get format(): string;
|
|
2829
2821
|
get usage(): number;
|
|
2830
2822
|
}
|
|
2831
|
-
|
|
2832
|
-
|
|
2823
|
+
interface GPUTextureView {}
|
|
2824
|
+
interface GPUTextureViewDescriptor {
|
|
2833
2825
|
label: string;
|
|
2834
2826
|
format: string;
|
|
2835
2827
|
dimension: string;
|
|
@@ -2839,91 +2831,91 @@ declare interface gpuGPUTextureViewDescriptor {
|
|
|
2839
2831
|
baseArrayLayer?: number;
|
|
2840
2832
|
arrayLayerCount: number;
|
|
2841
2833
|
}
|
|
2842
|
-
declare abstract class
|
|
2834
|
+
declare abstract class GPUColorWrite {
|
|
2843
2835
|
static readonly RED: number;
|
|
2844
2836
|
static readonly GREEN: number;
|
|
2845
2837
|
static readonly BLUE: number;
|
|
2846
2838
|
static readonly ALPHA: number;
|
|
2847
2839
|
static readonly ALL: number;
|
|
2848
2840
|
}
|
|
2849
|
-
|
|
2850
|
-
|
|
2841
|
+
interface GPURenderPipeline {}
|
|
2842
|
+
interface GPURenderPipelineDescriptor {
|
|
2851
2843
|
label?: string;
|
|
2852
|
-
layout: string |
|
|
2853
|
-
vertex:
|
|
2854
|
-
primitive?:
|
|
2855
|
-
depthStencil?:
|
|
2856
|
-
multisample?:
|
|
2857
|
-
fragment?:
|
|
2858
|
-
}
|
|
2859
|
-
|
|
2860
|
-
module:
|
|
2844
|
+
layout: string | GPUPipelineLayout;
|
|
2845
|
+
vertex: GPUVertexState;
|
|
2846
|
+
primitive?: GPUPrimitiveState;
|
|
2847
|
+
depthStencil?: GPUDepthStencilState;
|
|
2848
|
+
multisample?: GPUMultisampleState;
|
|
2849
|
+
fragment?: GPUFragmentState;
|
|
2850
|
+
}
|
|
2851
|
+
interface GPUVertexState {
|
|
2852
|
+
module: GPUShaderModule;
|
|
2861
2853
|
entryPoint: string;
|
|
2862
2854
|
constants?: Record<string, number>;
|
|
2863
|
-
buffers?:
|
|
2855
|
+
buffers?: GPUVertexBufferLayout[];
|
|
2864
2856
|
}
|
|
2865
|
-
|
|
2857
|
+
interface GPUVertexBufferLayout {
|
|
2866
2858
|
arrayStride: number | bigint;
|
|
2867
2859
|
stepMode?: string;
|
|
2868
|
-
attributes:
|
|
2860
|
+
attributes: GPUVertexAttribute[];
|
|
2869
2861
|
}
|
|
2870
|
-
|
|
2862
|
+
interface GPUVertexAttribute {
|
|
2871
2863
|
format: string;
|
|
2872
2864
|
offset: number | bigint;
|
|
2873
2865
|
shaderLocation: number;
|
|
2874
2866
|
}
|
|
2875
|
-
|
|
2867
|
+
interface GPUPrimitiveState {
|
|
2876
2868
|
topology?: string;
|
|
2877
2869
|
stripIndexFormat?: string;
|
|
2878
2870
|
frontFace?: string;
|
|
2879
2871
|
cullMode?: string;
|
|
2880
2872
|
unclippedDepth?: boolean;
|
|
2881
2873
|
}
|
|
2882
|
-
|
|
2874
|
+
interface GPUStencilFaceState {
|
|
2883
2875
|
compare?: string;
|
|
2884
2876
|
failOp?: string;
|
|
2885
2877
|
depthFailOp?: string;
|
|
2886
2878
|
passOp?: string;
|
|
2887
2879
|
}
|
|
2888
|
-
|
|
2880
|
+
interface GPUDepthStencilState {
|
|
2889
2881
|
format: string;
|
|
2890
2882
|
depthWriteEnabled: boolean;
|
|
2891
2883
|
depthCompare: string;
|
|
2892
|
-
stencilFront?:
|
|
2893
|
-
stencilBack?:
|
|
2884
|
+
stencilFront?: GPUStencilFaceState;
|
|
2885
|
+
stencilBack?: GPUStencilFaceState;
|
|
2894
2886
|
stencilReadMask?: number;
|
|
2895
2887
|
stencilWriteMask?: number;
|
|
2896
2888
|
depthBias?: number;
|
|
2897
2889
|
depthBiasSlopeScale?: number;
|
|
2898
2890
|
depthBiasClamp?: number;
|
|
2899
2891
|
}
|
|
2900
|
-
|
|
2892
|
+
interface GPUMultisampleState {
|
|
2901
2893
|
count?: number;
|
|
2902
2894
|
mask?: number;
|
|
2903
2895
|
alphaToCoverageEnabled?: boolean;
|
|
2904
2896
|
}
|
|
2905
|
-
|
|
2906
|
-
module:
|
|
2897
|
+
interface GPUFragmentState {
|
|
2898
|
+
module: GPUShaderModule;
|
|
2907
2899
|
entryPoint: string;
|
|
2908
2900
|
constants?: Record<string, number>;
|
|
2909
|
-
targets:
|
|
2901
|
+
targets: GPUColorTargetState[];
|
|
2910
2902
|
}
|
|
2911
|
-
|
|
2903
|
+
interface GPUColorTargetState {
|
|
2912
2904
|
format: string;
|
|
2913
|
-
blend:
|
|
2905
|
+
blend: GPUBlendState;
|
|
2914
2906
|
writeMask?: number;
|
|
2915
2907
|
}
|
|
2916
|
-
|
|
2917
|
-
color:
|
|
2918
|
-
alpha:
|
|
2908
|
+
interface GPUBlendState {
|
|
2909
|
+
color: GPUBlendComponent;
|
|
2910
|
+
alpha: GPUBlendComponent;
|
|
2919
2911
|
}
|
|
2920
|
-
|
|
2912
|
+
interface GPUBlendComponent {
|
|
2921
2913
|
operation?: string;
|
|
2922
2914
|
srcFactor?: string;
|
|
2923
2915
|
dstFactor?: string;
|
|
2924
2916
|
}
|
|
2925
|
-
|
|
2926
|
-
setPipeline(pipeline:
|
|
2917
|
+
interface GPURenderPassEncoder {
|
|
2918
|
+
setPipeline(pipeline: GPURenderPipeline): void;
|
|
2927
2919
|
draw(
|
|
2928
2920
|
vertexCount: number,
|
|
2929
2921
|
instanceCount?: number,
|
|
@@ -2932,30 +2924,30 @@ declare interface gpuGPURenderPassEncoder {
|
|
|
2932
2924
|
): void;
|
|
2933
2925
|
end(): void;
|
|
2934
2926
|
}
|
|
2935
|
-
|
|
2927
|
+
interface GPURenderPassDescriptor {
|
|
2936
2928
|
label?: string;
|
|
2937
|
-
colorAttachments:
|
|
2938
|
-
depthStencilAttachment?:
|
|
2939
|
-
occlusionQuerySet?:
|
|
2940
|
-
timestampWrites?:
|
|
2929
|
+
colorAttachments: GPURenderPassColorAttachment[];
|
|
2930
|
+
depthStencilAttachment?: GPURenderPassDepthStencilAttachment;
|
|
2931
|
+
occlusionQuerySet?: GPUQuerySet;
|
|
2932
|
+
timestampWrites?: GPURenderPassTimestampWrites;
|
|
2941
2933
|
maxDrawCount?: number | bigint;
|
|
2942
2934
|
}
|
|
2943
|
-
|
|
2944
|
-
view:
|
|
2935
|
+
interface GPURenderPassColorAttachment {
|
|
2936
|
+
view: GPUTextureView;
|
|
2945
2937
|
depthSlice?: number;
|
|
2946
|
-
resolveTarget?:
|
|
2947
|
-
clearValue?: number[] |
|
|
2938
|
+
resolveTarget?: GPUTextureView;
|
|
2939
|
+
clearValue?: number[] | GPUColorDict;
|
|
2948
2940
|
loadOp: string;
|
|
2949
2941
|
storeOp: string;
|
|
2950
2942
|
}
|
|
2951
|
-
|
|
2943
|
+
interface GPUColorDict {
|
|
2952
2944
|
r: number;
|
|
2953
2945
|
g: number;
|
|
2954
2946
|
b: number;
|
|
2955
2947
|
a: number;
|
|
2956
2948
|
}
|
|
2957
|
-
|
|
2958
|
-
view:
|
|
2949
|
+
interface GPURenderPassDepthStencilAttachment {
|
|
2950
|
+
view: GPUTextureView;
|
|
2959
2951
|
depthClearValue?: number;
|
|
2960
2952
|
depthLoadOp?: string;
|
|
2961
2953
|
depthStoreOp?: string;
|
|
@@ -2965,24 +2957,24 @@ declare interface gpuGPURenderPassDepthStencilAttachment {
|
|
|
2965
2957
|
stencilStoreOp?: string;
|
|
2966
2958
|
stencilReadOnly?: boolean;
|
|
2967
2959
|
}
|
|
2968
|
-
|
|
2969
|
-
querySet:
|
|
2960
|
+
interface GPURenderPassTimestampWrites {
|
|
2961
|
+
querySet: GPUQuerySet;
|
|
2970
2962
|
beginningOfPassWriteIndex?: number;
|
|
2971
2963
|
endOfPassWriteIndex?: number;
|
|
2972
2964
|
}
|
|
2973
|
-
|
|
2974
|
-
texture:
|
|
2965
|
+
interface GPUImageCopyTexture {
|
|
2966
|
+
texture: GPUTexture;
|
|
2975
2967
|
mipLevel?: number;
|
|
2976
|
-
origin?: number[] |
|
|
2968
|
+
origin?: number[] | GPUOrigin3DDict;
|
|
2977
2969
|
aspect?: string;
|
|
2978
2970
|
}
|
|
2979
|
-
|
|
2980
|
-
buffer:
|
|
2971
|
+
interface GPUImageCopyBuffer {
|
|
2972
|
+
buffer: GPUBuffer;
|
|
2981
2973
|
offset?: number | bigint;
|
|
2982
2974
|
bytesPerRow?: number;
|
|
2983
2975
|
rowsPerImage?: number;
|
|
2984
2976
|
}
|
|
2985
|
-
|
|
2977
|
+
interface GPUOrigin3DDict {
|
|
2986
2978
|
x?: number;
|
|
2987
2979
|
y?: number;
|
|
2988
2980
|
z?: number;
|
|
@@ -3030,14 +3022,14 @@ declare class EventSource {
|
|
|
3030
3022
|
static readonly CLOSED: number;
|
|
3031
3023
|
static from(stream: ReadableStream): EventSource;
|
|
3032
3024
|
}
|
|
3033
|
-
|
|
3025
|
+
interface EventSourceEventSourceInit {
|
|
3034
3026
|
withCredentials?: boolean;
|
|
3035
3027
|
fetcher?: Fetcher;
|
|
3036
3028
|
}
|
|
3037
|
-
|
|
3029
|
+
type AiImageClassificationInput = {
|
|
3038
3030
|
image: number[];
|
|
3039
3031
|
};
|
|
3040
|
-
|
|
3032
|
+
type AiImageClassificationOutput = {
|
|
3041
3033
|
score?: number;
|
|
3042
3034
|
label?: string;
|
|
3043
3035
|
}[];
|
|
@@ -3045,7 +3037,7 @@ declare abstract class BaseAiImageClassification {
|
|
|
3045
3037
|
inputs: AiImageClassificationInput;
|
|
3046
3038
|
postProcessedOutputs: AiImageClassificationOutput;
|
|
3047
3039
|
}
|
|
3048
|
-
|
|
3040
|
+
type AiImageToTextInput = {
|
|
3049
3041
|
image: number[];
|
|
3050
3042
|
prompt?: string;
|
|
3051
3043
|
max_tokens?: number;
|
|
@@ -3059,17 +3051,17 @@ declare type AiImageToTextInput = {
|
|
|
3059
3051
|
raw?: boolean;
|
|
3060
3052
|
messages?: RoleScopedChatInput[];
|
|
3061
3053
|
};
|
|
3062
|
-
|
|
3054
|
+
type AiImageToTextOutput = {
|
|
3063
3055
|
description: string;
|
|
3064
3056
|
};
|
|
3065
3057
|
declare abstract class BaseAiImageToText {
|
|
3066
3058
|
inputs: AiImageToTextInput;
|
|
3067
3059
|
postProcessedOutputs: AiImageToTextOutput;
|
|
3068
3060
|
}
|
|
3069
|
-
|
|
3061
|
+
type AiObjectDetectionInput = {
|
|
3070
3062
|
image: number[];
|
|
3071
3063
|
};
|
|
3072
|
-
|
|
3064
|
+
type AiObjectDetectionOutput = {
|
|
3073
3065
|
score?: number;
|
|
3074
3066
|
label?: string;
|
|
3075
3067
|
}[];
|
|
@@ -3077,19 +3069,19 @@ declare abstract class BaseAiObjectDetection {
|
|
|
3077
3069
|
inputs: AiObjectDetectionInput;
|
|
3078
3070
|
postProcessedOutputs: AiObjectDetectionOutput;
|
|
3079
3071
|
}
|
|
3080
|
-
|
|
3072
|
+
type AiSentenceSimilarityInput = {
|
|
3081
3073
|
source: string;
|
|
3082
3074
|
sentences: string[];
|
|
3083
3075
|
};
|
|
3084
|
-
|
|
3076
|
+
type AiSentenceSimilarityOutput = number[];
|
|
3085
3077
|
declare abstract class BaseAiSentenceSimilarity {
|
|
3086
3078
|
inputs: AiSentenceSimilarityInput;
|
|
3087
3079
|
postProcessedOutputs: AiSentenceSimilarityOutput;
|
|
3088
3080
|
}
|
|
3089
|
-
|
|
3081
|
+
type AiSpeechRecognitionInput = {
|
|
3090
3082
|
audio: number[];
|
|
3091
3083
|
};
|
|
3092
|
-
|
|
3084
|
+
type AiSpeechRecognitionOutput = {
|
|
3093
3085
|
text?: string;
|
|
3094
3086
|
words?: {
|
|
3095
3087
|
word: string;
|
|
@@ -3102,21 +3094,21 @@ declare abstract class BaseAiSpeechRecognition {
|
|
|
3102
3094
|
inputs: AiSpeechRecognitionInput;
|
|
3103
3095
|
postProcessedOutputs: AiSpeechRecognitionOutput;
|
|
3104
3096
|
}
|
|
3105
|
-
|
|
3097
|
+
type AiSummarizationInput = {
|
|
3106
3098
|
input_text: string;
|
|
3107
3099
|
max_length?: number;
|
|
3108
3100
|
};
|
|
3109
|
-
|
|
3101
|
+
type AiSummarizationOutput = {
|
|
3110
3102
|
summary: string;
|
|
3111
3103
|
};
|
|
3112
3104
|
declare abstract class BaseAiSummarization {
|
|
3113
3105
|
inputs: AiSummarizationInput;
|
|
3114
3106
|
postProcessedOutputs: AiSummarizationOutput;
|
|
3115
3107
|
}
|
|
3116
|
-
|
|
3108
|
+
type AiTextClassificationInput = {
|
|
3117
3109
|
text: string;
|
|
3118
3110
|
};
|
|
3119
|
-
|
|
3111
|
+
type AiTextClassificationOutput = {
|
|
3120
3112
|
score?: number;
|
|
3121
3113
|
label?: string;
|
|
3122
3114
|
}[];
|
|
@@ -3124,10 +3116,10 @@ declare abstract class BaseAiTextClassification {
|
|
|
3124
3116
|
inputs: AiTextClassificationInput;
|
|
3125
3117
|
postProcessedOutputs: AiTextClassificationOutput;
|
|
3126
3118
|
}
|
|
3127
|
-
|
|
3119
|
+
type AiTextEmbeddingsInput = {
|
|
3128
3120
|
text: string | string[];
|
|
3129
3121
|
};
|
|
3130
|
-
|
|
3122
|
+
type AiTextEmbeddingsOutput = {
|
|
3131
3123
|
shape: number[];
|
|
3132
3124
|
data: number[][];
|
|
3133
3125
|
};
|
|
@@ -3135,11 +3127,11 @@ declare abstract class BaseAiTextEmbeddings {
|
|
|
3135
3127
|
inputs: AiTextEmbeddingsInput;
|
|
3136
3128
|
postProcessedOutputs: AiTextEmbeddingsOutput;
|
|
3137
3129
|
}
|
|
3138
|
-
|
|
3130
|
+
type RoleScopedChatInput = {
|
|
3139
3131
|
role: "user" | "assistant" | "system" | "tool";
|
|
3140
3132
|
content: string;
|
|
3141
3133
|
};
|
|
3142
|
-
|
|
3134
|
+
type AiTextGenerationToolInput = {
|
|
3143
3135
|
type: "function";
|
|
3144
3136
|
function: {
|
|
3145
3137
|
name: string;
|
|
@@ -3156,7 +3148,7 @@ declare type AiTextGenerationToolInput = {
|
|
|
3156
3148
|
};
|
|
3157
3149
|
};
|
|
3158
3150
|
};
|
|
3159
|
-
|
|
3151
|
+
type AiTextGenerationInput = {
|
|
3160
3152
|
prompt?: string;
|
|
3161
3153
|
raw?: boolean;
|
|
3162
3154
|
stream?: boolean;
|
|
@@ -3171,7 +3163,7 @@ declare type AiTextGenerationInput = {
|
|
|
3171
3163
|
messages?: RoleScopedChatInput[];
|
|
3172
3164
|
tools?: AiTextGenerationToolInput[];
|
|
3173
3165
|
};
|
|
3174
|
-
|
|
3166
|
+
type AiTextGenerationOutput =
|
|
3175
3167
|
| {
|
|
3176
3168
|
response?: string;
|
|
3177
3169
|
tool_calls?: {
|
|
@@ -3184,7 +3176,7 @@ declare abstract class BaseAiTextGeneration {
|
|
|
3184
3176
|
inputs: AiTextGenerationInput;
|
|
3185
3177
|
postProcessedOutputs: AiTextGenerationOutput;
|
|
3186
3178
|
}
|
|
3187
|
-
|
|
3179
|
+
type AiTextToImageInput = {
|
|
3188
3180
|
prompt: string;
|
|
3189
3181
|
image?: number[];
|
|
3190
3182
|
mask?: number[];
|
|
@@ -3192,53 +3184,52 @@ declare type AiTextToImageInput = {
|
|
|
3192
3184
|
strength?: number;
|
|
3193
3185
|
guidance?: number;
|
|
3194
3186
|
};
|
|
3195
|
-
|
|
3187
|
+
type AiTextToImageOutput = Uint8Array;
|
|
3196
3188
|
declare abstract class BaseAiTextToImage {
|
|
3197
3189
|
inputs: AiTextToImageInput;
|
|
3198
3190
|
postProcessedOutputs: AiTextToImageOutput;
|
|
3199
3191
|
}
|
|
3200
|
-
|
|
3192
|
+
type AiTranslationInput = {
|
|
3201
3193
|
text: string;
|
|
3202
3194
|
target_lang: string;
|
|
3203
3195
|
source_lang?: string;
|
|
3204
3196
|
};
|
|
3205
|
-
|
|
3197
|
+
type AiTranslationOutput = {
|
|
3206
3198
|
translated_text?: string;
|
|
3207
3199
|
};
|
|
3208
3200
|
declare abstract class BaseAiTranslation {
|
|
3209
3201
|
inputs: AiTranslationInput;
|
|
3210
3202
|
postProcessedOutputs: AiTranslationOutput;
|
|
3211
3203
|
}
|
|
3212
|
-
|
|
3204
|
+
type GatewayOptions = {
|
|
3213
3205
|
id: string;
|
|
3214
3206
|
cacheTtl?: number;
|
|
3215
3207
|
skipCache?: boolean;
|
|
3216
3208
|
metadata?: Record<string, number | string | boolean | null | bigint>;
|
|
3217
3209
|
};
|
|
3218
|
-
|
|
3210
|
+
type AiOptions = {
|
|
3219
3211
|
gateway?: GatewayOptions;
|
|
3220
3212
|
prefix?: string;
|
|
3221
3213
|
extraHeaders?: object;
|
|
3222
3214
|
};
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
declare type BaseAiTextToImageModels =
|
|
3215
|
+
type BaseAiTextClassificationModels = "@cf/huggingface/distilbert-sst-2-int8";
|
|
3216
|
+
type BaseAiTextToImageModels =
|
|
3226
3217
|
| "@cf/stabilityai/stable-diffusion-xl-base-1.0"
|
|
3227
3218
|
| "@cf/runwayml/stable-diffusion-v1-5-inpainting"
|
|
3228
3219
|
| "@cf/runwayml/stable-diffusion-v1-5-img2img"
|
|
3229
3220
|
| "@cf/lykon/dreamshaper-8-lcm"
|
|
3230
3221
|
| "@cf/bytedance/stable-diffusion-xl-lightning";
|
|
3231
|
-
|
|
3222
|
+
type BaseAiTextEmbeddingsModels =
|
|
3232
3223
|
| "@cf/baai/bge-small-en-v1.5"
|
|
3233
3224
|
| "@cf/baai/bge-base-en-v1.5"
|
|
3234
3225
|
| "@cf/baai/bge-large-en-v1.5";
|
|
3235
|
-
|
|
3226
|
+
type BaseAiSpeechRecognitionModels =
|
|
3236
3227
|
| "@cf/openai/whisper"
|
|
3237
3228
|
| "@cf/openai/whisper-tiny-en"
|
|
3238
3229
|
| "@cf/openai/whisper-sherpa";
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3230
|
+
type BaseAiImageClassificationModels = "@cf/microsoft/resnet-50";
|
|
3231
|
+
type BaseAiObjectDetectionModels = "@cf/facebook/detr-resnet-50";
|
|
3232
|
+
type BaseAiTextGenerationModels =
|
|
3242
3233
|
| "@cf/meta/llama-3-8b-instruct"
|
|
3243
3234
|
| "@cf/meta/llama-3-8b-instruct-awq"
|
|
3244
3235
|
| "@cf/meta/llama-2-7b-chat-int8"
|
|
@@ -3274,9 +3265,9 @@ declare type BaseAiTextGenerationModels =
|
|
|
3274
3265
|
| "@cf/meta-llama/llama-2-7b-chat-hf-lora"
|
|
3275
3266
|
| "@cf/fblgit/una-cybertron-7b-v2-bf16"
|
|
3276
3267
|
| "@cf/fblgit/una-cybertron-7b-v2-awq";
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3268
|
+
type BaseAiTranslationModels = "@cf/meta/m2m100-1.2b";
|
|
3269
|
+
type BaseAiSummarizationModels = "@cf/facebook/bart-large-cnn";
|
|
3270
|
+
type BaseAiImageToTextModels =
|
|
3280
3271
|
| "@cf/unum/uform-gen2-qwen-500m"
|
|
3281
3272
|
| "@cf/llava-hf/llava-1.5-7b-hf";
|
|
3282
3273
|
declare abstract class Ai {
|
|
@@ -3331,7 +3322,7 @@ declare abstract class Ai {
|
|
|
3331
3322
|
options?: AiOptions,
|
|
3332
3323
|
): Promise<BaseAiImageToText["postProcessedOutputs"]>;
|
|
3333
3324
|
}
|
|
3334
|
-
|
|
3325
|
+
interface BasicImageTransformations {
|
|
3335
3326
|
/**
|
|
3336
3327
|
* Maximum width in image pixels. The value must be an integer.
|
|
3337
3328
|
*/
|
|
@@ -3397,7 +3388,7 @@ declare interface BasicImageTransformations {
|
|
|
3397
3388
|
*/
|
|
3398
3389
|
rotate?: 0 | 90 | 180 | 270 | 360;
|
|
3399
3390
|
}
|
|
3400
|
-
|
|
3391
|
+
interface BasicImageTransformationsGravityCoordinates {
|
|
3401
3392
|
x: number;
|
|
3402
3393
|
y: number;
|
|
3403
3394
|
}
|
|
@@ -3410,7 +3401,7 @@ declare interface BasicImageTransformationsGravityCoordinates {
|
|
|
3410
3401
|
* Note: Currently, these properties cannot be tested in the
|
|
3411
3402
|
* playground.
|
|
3412
3403
|
*/
|
|
3413
|
-
|
|
3404
|
+
interface RequestInitCfProperties extends Record<string, unknown> {
|
|
3414
3405
|
cacheEverything?: boolean;
|
|
3415
3406
|
/**
|
|
3416
3407
|
* A request's cache key is what determines if two requests are
|
|
@@ -3461,8 +3452,7 @@ declare interface RequestInitCfProperties extends Record<string, unknown> {
|
|
|
3461
3452
|
*/
|
|
3462
3453
|
resolveOverride?: string;
|
|
3463
3454
|
}
|
|
3464
|
-
|
|
3465
|
-
extends BasicImageTransformations {
|
|
3455
|
+
interface RequestInitCfPropertiesImageDraw extends BasicImageTransformations {
|
|
3466
3456
|
/**
|
|
3467
3457
|
* Absolute URL of the image file to use for the drawing. It can be any of
|
|
3468
3458
|
* the supported file formats. For drawing of watermarks or non-rectangular
|
|
@@ -3499,8 +3489,7 @@ declare interface RequestInitCfPropertiesImageDraw
|
|
|
3499
3489
|
bottom?: number;
|
|
3500
3490
|
right?: number;
|
|
3501
3491
|
}
|
|
3502
|
-
|
|
3503
|
-
extends BasicImageTransformations {
|
|
3492
|
+
interface RequestInitCfPropertiesImage extends BasicImageTransformations {
|
|
3504
3493
|
/**
|
|
3505
3494
|
* Device Pixel Ratio. Default 1. Multiplier for width/height that makes it
|
|
3506
3495
|
* easier to specify higher-DPI sizes in <img srcset>.
|
|
@@ -3625,12 +3614,12 @@ declare interface RequestInitCfPropertiesImage
|
|
|
3625
3614
|
*/
|
|
3626
3615
|
compression?: "fast";
|
|
3627
3616
|
}
|
|
3628
|
-
|
|
3617
|
+
interface RequestInitCfPropertiesImageMinify {
|
|
3629
3618
|
javascript?: boolean;
|
|
3630
3619
|
css?: boolean;
|
|
3631
3620
|
html?: boolean;
|
|
3632
3621
|
}
|
|
3633
|
-
|
|
3622
|
+
interface RequestInitCfPropertiesR2 {
|
|
3634
3623
|
/**
|
|
3635
3624
|
* Colo id of bucket that an object is stored in
|
|
3636
3625
|
*/
|
|
@@ -3639,14 +3628,13 @@ declare interface RequestInitCfPropertiesR2 {
|
|
|
3639
3628
|
/**
|
|
3640
3629
|
* Request metadata provided by Cloudflare's edge.
|
|
3641
3630
|
*/
|
|
3642
|
-
|
|
3631
|
+
type IncomingRequestCfProperties<HostMetadata = unknown> =
|
|
3643
3632
|
IncomingRequestCfPropertiesBase &
|
|
3644
3633
|
IncomingRequestCfPropertiesBotManagementEnterprise &
|
|
3645
3634
|
IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> &
|
|
3646
3635
|
IncomingRequestCfPropertiesGeographicInformation &
|
|
3647
3636
|
IncomingRequestCfPropertiesCloudflareAccessOrApiShield;
|
|
3648
|
-
|
|
3649
|
-
extends Record<string, unknown> {
|
|
3637
|
+
interface IncomingRequestCfPropertiesBase extends Record<string, unknown> {
|
|
3650
3638
|
/**
|
|
3651
3639
|
* [ASN](https://www.iana.org/assignments/as-numbers/as-numbers.xhtml) of the incoming request.
|
|
3652
3640
|
*
|
|
@@ -3724,7 +3712,7 @@ declare interface IncomingRequestCfPropertiesBase
|
|
|
3724
3712
|
*/
|
|
3725
3713
|
tlsExportedAuthenticator?: IncomingRequestCfPropertiesExportedAuthenticatorMetadata;
|
|
3726
3714
|
}
|
|
3727
|
-
|
|
3715
|
+
interface IncomingRequestCfPropertiesBotManagementBase {
|
|
3728
3716
|
/**
|
|
3729
3717
|
* Cloudflare’s [level of certainty](https://developers.cloudflare.com/bots/concepts/bot-score/) that a request comes from a bot,
|
|
3730
3718
|
* represented as an integer percentage between `1` (almost certainly a bot) and `99` (almost certainly human).
|
|
@@ -3751,7 +3739,7 @@ declare interface IncomingRequestCfPropertiesBotManagementBase {
|
|
|
3751
3739
|
*/
|
|
3752
3740
|
detectionIds: number[];
|
|
3753
3741
|
}
|
|
3754
|
-
|
|
3742
|
+
interface IncomingRequestCfPropertiesBotManagement {
|
|
3755
3743
|
/**
|
|
3756
3744
|
* Results of Cloudflare's Bot Management analysis
|
|
3757
3745
|
*/
|
|
@@ -3763,7 +3751,7 @@ declare interface IncomingRequestCfPropertiesBotManagement {
|
|
|
3763
3751
|
*/
|
|
3764
3752
|
clientTrustScore: number;
|
|
3765
3753
|
}
|
|
3766
|
-
|
|
3754
|
+
interface IncomingRequestCfPropertiesBotManagementEnterprise
|
|
3767
3755
|
extends IncomingRequestCfPropertiesBotManagement {
|
|
3768
3756
|
/**
|
|
3769
3757
|
* Results of Cloudflare's Bot Management analysis
|
|
@@ -3776,9 +3764,7 @@ declare interface IncomingRequestCfPropertiesBotManagementEnterprise
|
|
|
3776
3764
|
ja3Hash: string;
|
|
3777
3765
|
};
|
|
3778
3766
|
}
|
|
3779
|
-
|
|
3780
|
-
HostMetadata,
|
|
3781
|
-
> {
|
|
3767
|
+
interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<HostMetadata> {
|
|
3782
3768
|
/**
|
|
3783
3769
|
* Custom metadata set per-host in [Cloudflare for SaaS](https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/).
|
|
3784
3770
|
*
|
|
@@ -3787,7 +3773,7 @@ declare interface IncomingRequestCfPropertiesCloudflareForSaaSEnterprise<
|
|
|
3787
3773
|
*/
|
|
3788
3774
|
hostMetadata: HostMetadata;
|
|
3789
3775
|
}
|
|
3790
|
-
|
|
3776
|
+
interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
|
|
3791
3777
|
/**
|
|
3792
3778
|
* Information about the client certificate presented to Cloudflare.
|
|
3793
3779
|
*
|
|
@@ -3809,7 +3795,7 @@ declare interface IncomingRequestCfPropertiesCloudflareAccessOrApiShield {
|
|
|
3809
3795
|
/**
|
|
3810
3796
|
* Metadata about the request's TLS handshake
|
|
3811
3797
|
*/
|
|
3812
|
-
|
|
3798
|
+
interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
|
|
3813
3799
|
/**
|
|
3814
3800
|
* The client's [`HELLO` message](https://www.rfc-editor.org/rfc/rfc5246#section-7.4.1.2), encoded in hexadecimal
|
|
3815
3801
|
*
|
|
@@ -3838,7 +3824,7 @@ declare interface IncomingRequestCfPropertiesExportedAuthenticatorMetadata {
|
|
|
3838
3824
|
/**
|
|
3839
3825
|
* Geographic data about the request's origin.
|
|
3840
3826
|
*/
|
|
3841
|
-
|
|
3827
|
+
interface IncomingRequestCfPropertiesGeographicInformation {
|
|
3842
3828
|
/**
|
|
3843
3829
|
* The [ISO 3166-1 Alpha 2](https://www.iso.org/iso-3166-country-codes.html) country code the request originated from.
|
|
3844
3830
|
*
|
|
@@ -3915,7 +3901,7 @@ declare interface IncomingRequestCfPropertiesGeographicInformation {
|
|
|
3915
3901
|
metroCode?: string;
|
|
3916
3902
|
}
|
|
3917
3903
|
/** Data about the incoming request's TLS certificate */
|
|
3918
|
-
|
|
3904
|
+
interface IncomingRequestCfPropertiesTLSClientAuth {
|
|
3919
3905
|
/** Always `"1"`, indicating that the certificate was presented */
|
|
3920
3906
|
certPresented: "1";
|
|
3921
3907
|
/**
|
|
@@ -4008,7 +3994,7 @@ declare interface IncomingRequestCfPropertiesTLSClientAuth {
|
|
|
4008
3994
|
certNotAfter: string;
|
|
4009
3995
|
}
|
|
4010
3996
|
/** Placeholder values for TLS Client Authorization */
|
|
4011
|
-
|
|
3997
|
+
interface IncomingRequestCfPropertiesTLSClientAuthPlaceholder {
|
|
4012
3998
|
certPresented: "0";
|
|
4013
3999
|
certVerified: "NONE";
|
|
4014
4000
|
certRevoked: "0";
|
|
@@ -4306,10 +4292,10 @@ declare type Iso3166Alpha2Code =
|
|
|
4306
4292
|
| "ZW";
|
|
4307
4293
|
/** The 2-letter continent codes Cloudflare uses */
|
|
4308
4294
|
declare type ContinentCode = "AF" | "AN" | "AS" | "EU" | "NA" | "OC" | "SA";
|
|
4309
|
-
|
|
4295
|
+
type CfProperties<HostMetadata = unknown> =
|
|
4310
4296
|
| IncomingRequestCfProperties<HostMetadata>
|
|
4311
4297
|
| RequestInitCfProperties;
|
|
4312
|
-
|
|
4298
|
+
interface D1Meta {
|
|
4313
4299
|
duration: number;
|
|
4314
4300
|
size_after: number;
|
|
4315
4301
|
rows_read: number;
|
|
@@ -4318,15 +4304,15 @@ declare interface D1Meta {
|
|
|
4318
4304
|
changed_db: boolean;
|
|
4319
4305
|
changes: number;
|
|
4320
4306
|
}
|
|
4321
|
-
|
|
4307
|
+
interface D1Response {
|
|
4322
4308
|
success: true;
|
|
4323
4309
|
meta: D1Meta & Record<string, unknown>;
|
|
4324
4310
|
error?: never;
|
|
4325
4311
|
}
|
|
4326
|
-
|
|
4312
|
+
type D1Result<T = unknown> = D1Response & {
|
|
4327
4313
|
results: T[];
|
|
4328
4314
|
};
|
|
4329
|
-
|
|
4315
|
+
interface D1ExecResult {
|
|
4330
4316
|
count: number;
|
|
4331
4317
|
duration: number;
|
|
4332
4318
|
}
|
|
@@ -4353,11 +4339,11 @@ declare abstract class D1PreparedStatement {
|
|
|
4353
4339
|
// but this will ensure type checking on older versions still passes.
|
|
4354
4340
|
// TypeScript's interface merging will ensure our empty interface is effectively
|
|
4355
4341
|
// ignored when `Disposable` is included in the standard lib.
|
|
4356
|
-
|
|
4342
|
+
interface Disposable {}
|
|
4357
4343
|
/**
|
|
4358
4344
|
* An email message that can be sent from a Worker.
|
|
4359
4345
|
*/
|
|
4360
|
-
|
|
4346
|
+
interface EmailMessage {
|
|
4361
4347
|
/**
|
|
4362
4348
|
* Envelope From attribute of the email message.
|
|
4363
4349
|
*/
|
|
@@ -4370,7 +4356,7 @@ declare interface EmailMessage {
|
|
|
4370
4356
|
/**
|
|
4371
4357
|
* An email message that is sent to a consumer Worker and can be rejected/forwarded.
|
|
4372
4358
|
*/
|
|
4373
|
-
|
|
4359
|
+
interface ForwardableEmailMessage extends EmailMessage {
|
|
4374
4360
|
/**
|
|
4375
4361
|
* Stream of the email message content.
|
|
4376
4362
|
*/
|
|
@@ -4400,7 +4386,7 @@ declare interface ForwardableEmailMessage extends EmailMessage {
|
|
|
4400
4386
|
/**
|
|
4401
4387
|
* A binding that allows a Worker to send email messages.
|
|
4402
4388
|
*/
|
|
4403
|
-
|
|
4389
|
+
interface SendEmail {
|
|
4404
4390
|
send(message: EmailMessage): Promise<void>;
|
|
4405
4391
|
}
|
|
4406
4392
|
declare abstract class EmailEvent extends ExtendableEvent {
|
|
@@ -4418,7 +4404,7 @@ declare module "cloudflare:email" {
|
|
|
4418
4404
|
};
|
|
4419
4405
|
export { _EmailMessage as EmailMessage };
|
|
4420
4406
|
}
|
|
4421
|
-
|
|
4407
|
+
interface Hyperdrive {
|
|
4422
4408
|
/**
|
|
4423
4409
|
* Connect directly to Hyperdrive as if it's your database, returning a TCP socket.
|
|
4424
4410
|
*
|
|
@@ -4465,8 +4451,8 @@ declare interface Hyperdrive {
|
|
|
4465
4451
|
*/
|
|
4466
4452
|
readonly database: string;
|
|
4467
4453
|
}
|
|
4468
|
-
|
|
4469
|
-
|
|
4454
|
+
type Params<P extends string = any> = Record<P, string | string[]>;
|
|
4455
|
+
type EventContext<Env, P extends string, Data> = {
|
|
4470
4456
|
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
4471
4457
|
functionPath: string;
|
|
4472
4458
|
waitUntil: (promise: Promise<any>) => void;
|
|
@@ -4480,12 +4466,12 @@ declare type EventContext<Env, P extends string, Data> = {
|
|
|
4480
4466
|
params: Params<P>;
|
|
4481
4467
|
data: Data;
|
|
4482
4468
|
};
|
|
4483
|
-
|
|
4469
|
+
type PagesFunction<
|
|
4484
4470
|
Env = unknown,
|
|
4485
4471
|
Params extends string = any,
|
|
4486
4472
|
Data extends Record<string, unknown> = Record<string, unknown>,
|
|
4487
4473
|
> = (context: EventContext<Env, Params, Data>) => Response | Promise<Response>;
|
|
4488
|
-
|
|
4474
|
+
type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
|
|
4489
4475
|
request: Request<unknown, IncomingRequestCfProperties<unknown>>;
|
|
4490
4476
|
functionPath: string;
|
|
4491
4477
|
waitUntil: (promise: Promise<any>) => void;
|
|
@@ -4500,7 +4486,7 @@ declare type EventPluginContext<Env, P extends string, Data, PluginArgs> = {
|
|
|
4500
4486
|
data: Data;
|
|
4501
4487
|
pluginArgs: PluginArgs;
|
|
4502
4488
|
};
|
|
4503
|
-
|
|
4489
|
+
type PagesPluginFunction<
|
|
4504
4490
|
Env = unknown,
|
|
4505
4491
|
Params extends string = any,
|
|
4506
4492
|
Data extends Record<string, unknown> = Record<string, unknown>,
|
|
@@ -4515,7 +4501,7 @@ declare module "assets:*" {
|
|
|
4515
4501
|
// The message includes metadata about the broker, the client, and the payload
|
|
4516
4502
|
// itself.
|
|
4517
4503
|
// https://developers.cloudflare.com/pub-sub/
|
|
4518
|
-
|
|
4504
|
+
interface PubSubMessage {
|
|
4519
4505
|
// Message ID
|
|
4520
4506
|
readonly mid: number;
|
|
4521
4507
|
// MQTT broker FQDN in the form mqtts://BROKER.NAMESPACE.cloudflarepubsub.com:PORT
|
|
@@ -4541,10 +4527,24 @@ declare interface PubSubMessage {
|
|
|
4541
4527
|
payload: string | Uint8Array;
|
|
4542
4528
|
}
|
|
4543
4529
|
// JsonWebKey extended by kid parameter
|
|
4544
|
-
|
|
4530
|
+
interface JsonWebKeyWithKid extends JsonWebKey {
|
|
4545
4531
|
// Key Identifier of the JWK
|
|
4546
4532
|
readonly kid: string;
|
|
4547
4533
|
}
|
|
4534
|
+
interface RateLimitOptions {
|
|
4535
|
+
key: string;
|
|
4536
|
+
}
|
|
4537
|
+
interface RateLimitOutcome {
|
|
4538
|
+
success: boolean;
|
|
4539
|
+
}
|
|
4540
|
+
interface RateLimit {
|
|
4541
|
+
/**
|
|
4542
|
+
* Rate limit a request based on the provided options.
|
|
4543
|
+
* @see https://developers.cloudflare.com/workers/runtime-apis/bindings/rate-limit/
|
|
4544
|
+
* @returns A promise that resolves with the outcome of the rate limit.
|
|
4545
|
+
*/
|
|
4546
|
+
limit(options: RateLimitOptions): Promise<RateLimitOutcome>;
|
|
4547
|
+
}
|
|
4548
4548
|
// Namespace for RPC utility types. Unfortunately, we can't use a `module` here as these types need
|
|
4549
4549
|
// to referenced by `Fetcher`. This is included in the "importable" version of the types which
|
|
4550
4550
|
// strips all `module` blocks.
|
|
@@ -4752,19 +4752,15 @@ declare module "cloudflare:sockets" {
|
|
|
4752
4752
|
/**
|
|
4753
4753
|
* Data types supported for holding vector metadata.
|
|
4754
4754
|
*/
|
|
4755
|
-
|
|
4756
|
-
| string
|
|
4757
|
-
| number
|
|
4758
|
-
| boolean
|
|
4759
|
-
| string[];
|
|
4755
|
+
type VectorizeVectorMetadataValue = string | number | boolean | string[];
|
|
4760
4756
|
/**
|
|
4761
4757
|
* Additional information to associate with a vector.
|
|
4762
4758
|
*/
|
|
4763
|
-
|
|
4759
|
+
type VectorizeVectorMetadata =
|
|
4764
4760
|
| VectorizeVectorMetadataValue
|
|
4765
4761
|
| Record<string, VectorizeVectorMetadataValue>;
|
|
4766
|
-
|
|
4767
|
-
|
|
4762
|
+
type VectorFloatArray = Float32Array | Float64Array;
|
|
4763
|
+
interface VectorizeError {
|
|
4768
4764
|
code?: number;
|
|
4769
4765
|
error: string;
|
|
4770
4766
|
}
|
|
@@ -4773,11 +4769,11 @@ declare interface VectorizeError {
|
|
|
4773
4769
|
*
|
|
4774
4770
|
* This list is expected to grow as support for more operations are released.
|
|
4775
4771
|
*/
|
|
4776
|
-
|
|
4772
|
+
type VectorizeVectorMetadataFilterOp = "$eq" | "$ne";
|
|
4777
4773
|
/**
|
|
4778
4774
|
* Filter criteria for vector metadata used to limit the retrieved query result set.
|
|
4779
4775
|
*/
|
|
4780
|
-
|
|
4776
|
+
type VectorizeVectorMetadataFilter = {
|
|
4781
4777
|
[field: string]:
|
|
4782
4778
|
| Exclude<VectorizeVectorMetadataValue, string[]>
|
|
4783
4779
|
| null
|
|
@@ -4792,8 +4788,8 @@ declare type VectorizeVectorMetadataFilter = {
|
|
|
4792
4788
|
* Supported distance metrics for an index.
|
|
4793
4789
|
* Distance metrics determine how other "similar" vectors are determined.
|
|
4794
4790
|
*/
|
|
4795
|
-
|
|
4796
|
-
|
|
4791
|
+
type VectorizeDistanceMetric = "euclidean" | "cosine" | "dot-product";
|
|
4792
|
+
interface VectorizeQueryOptions {
|
|
4797
4793
|
topK?: number;
|
|
4798
4794
|
namespace?: string;
|
|
4799
4795
|
returnValues?: boolean;
|
|
@@ -4803,7 +4799,7 @@ declare interface VectorizeQueryOptions {
|
|
|
4803
4799
|
/**
|
|
4804
4800
|
* Information about the configuration of an index.
|
|
4805
4801
|
*/
|
|
4806
|
-
|
|
4802
|
+
type VectorizeIndexConfig =
|
|
4807
4803
|
| {
|
|
4808
4804
|
dimensions: number;
|
|
4809
4805
|
metric: VectorizeDistanceMetric;
|
|
@@ -4814,7 +4810,7 @@ declare type VectorizeIndexConfig =
|
|
|
4814
4810
|
/**
|
|
4815
4811
|
* Metadata about an existing index.
|
|
4816
4812
|
*/
|
|
4817
|
-
|
|
4813
|
+
interface VectorizeIndexDetails {
|
|
4818
4814
|
/** The unique ID of the index */
|
|
4819
4815
|
readonly id: string;
|
|
4820
4816
|
/** The name of the index. */
|
|
@@ -4829,7 +4825,7 @@ declare interface VectorizeIndexDetails {
|
|
|
4829
4825
|
/**
|
|
4830
4826
|
* Represents a single vector value set along with its associated metadata.
|
|
4831
4827
|
*/
|
|
4832
|
-
|
|
4828
|
+
interface VectorizeVector {
|
|
4833
4829
|
/** The ID for the vector. This can be user-defined, and must be unique. It should uniquely identify the object, and is best set based on the ID of what the vector represents. */
|
|
4834
4830
|
id: string;
|
|
4835
4831
|
/** The vector values */
|
|
@@ -4842,7 +4838,7 @@ declare interface VectorizeVector {
|
|
|
4842
4838
|
/**
|
|
4843
4839
|
* Represents a matched vector for a query along with its score and (if specified) the matching vector information.
|
|
4844
4840
|
*/
|
|
4845
|
-
|
|
4841
|
+
type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
4846
4842
|
Omit<VectorizeVector, "values"> & {
|
|
4847
4843
|
/** The score or rank for similarity, when returned as a result */
|
|
4848
4844
|
score: number;
|
|
@@ -4850,7 +4846,7 @@ declare type VectorizeMatch = Pick<Partial<VectorizeVector>, "values"> &
|
|
|
4850
4846
|
/**
|
|
4851
4847
|
* A set of vector {@link VectorizeMatch} for a particular query.
|
|
4852
4848
|
*/
|
|
4853
|
-
|
|
4849
|
+
interface VectorizeMatches {
|
|
4854
4850
|
matches: VectorizeMatch[];
|
|
4855
4851
|
count: number;
|
|
4856
4852
|
}
|
|
@@ -4858,7 +4854,7 @@ declare interface VectorizeMatches {
|
|
|
4858
4854
|
* Results of an operation that performed a mutation on a set of vectors.
|
|
4859
4855
|
* Here, `ids` is a list of vectors that were successfully processed.
|
|
4860
4856
|
*/
|
|
4861
|
-
|
|
4857
|
+
interface VectorizeVectorMutation {
|
|
4862
4858
|
/* List of ids of vectors that were successfully processed. */
|
|
4863
4859
|
ids: string[];
|
|
4864
4860
|
/* Total count of the number of processed vectors. */
|
|
@@ -4869,7 +4865,7 @@ declare interface VectorizeVectorMutation {
|
|
|
4869
4865
|
* with the v2 version of Vectorize.
|
|
4870
4866
|
* Here, `mutationId` is the identifier for the last mutation processed by Vectorize.
|
|
4871
4867
|
*/
|
|
4872
|
-
|
|
4868
|
+
interface VectorizeVectorMutationV2 {
|
|
4873
4869
|
/* The identifier for the last mutation processed by Vectorize. */
|
|
4874
4870
|
mutationId: string;
|
|
4875
4871
|
}
|
|
@@ -4918,7 +4914,7 @@ declare abstract class VectorizeIndex {
|
|
|
4918
4914
|
* The interface for "version_metadata" binding
|
|
4919
4915
|
* providing metadata about the Worker Version using this binding.
|
|
4920
4916
|
*/
|
|
4921
|
-
|
|
4917
|
+
type WorkerVersionMetadata = {
|
|
4922
4918
|
/** The ID of the Worker Version using this binding */
|
|
4923
4919
|
id: string;
|
|
4924
4920
|
/** The tag of the Worker Version using this binding */
|
|
@@ -4926,7 +4922,7 @@ declare type WorkerVersionMetadata = {
|
|
|
4926
4922
|
/** The timestamp of when the Worker Version was uploaded */
|
|
4927
4923
|
timestamp: string;
|
|
4928
4924
|
};
|
|
4929
|
-
|
|
4925
|
+
interface DynamicDispatchLimits {
|
|
4930
4926
|
/**
|
|
4931
4927
|
* Limit CPU time in milliseconds.
|
|
4932
4928
|
*/
|
|
@@ -4936,7 +4932,7 @@ declare interface DynamicDispatchLimits {
|
|
|
4936
4932
|
*/
|
|
4937
4933
|
subRequests?: number;
|
|
4938
4934
|
}
|
|
4939
|
-
|
|
4935
|
+
interface DynamicDispatchOptions {
|
|
4940
4936
|
/**
|
|
4941
4937
|
* Limit resources of invoked Worker script.
|
|
4942
4938
|
*/
|
|
@@ -4948,7 +4944,7 @@ declare interface DynamicDispatchOptions {
|
|
|
4948
4944
|
[key: string]: any;
|
|
4949
4945
|
};
|
|
4950
4946
|
}
|
|
4951
|
-
|
|
4947
|
+
interface DispatchNamespace {
|
|
4952
4948
|
/**
|
|
4953
4949
|
* @param name Name of the Worker script.
|
|
4954
4950
|
* @param args Arguments to Worker script.
|