@cloudflare/workers-types 4.20260702.1 → 5.20260704.1
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/README.md +2 -58
- package/experimental/index.d.ts +89 -20
- package/experimental/index.ts +93 -20
- package/index.d.ts +327 -117
- package/index.ts +331 -117
- package/package.json +1 -1
- package/2021-11-03/index.d.ts +0 -16306
- package/2021-11-03/index.ts +0 -16261
- package/2022-01-31/index.d.ts +0 -16373
- package/2022-01-31/index.ts +0 -16328
- package/2022-03-21/index.d.ts +0 -16382
- package/2022-03-21/index.ts +0 -16337
- package/2022-08-04/index.d.ts +0 -16383
- package/2022-08-04/index.ts +0 -16338
- package/2022-10-31/index.d.ts +0 -16403
- package/2022-10-31/index.ts +0 -16358
- package/2022-11-30/index.d.ts +0 -16408
- package/2022-11-30/index.ts +0 -16363
- package/2023-03-01/index.d.ts +0 -16414
- package/2023-03-01/index.ts +0 -16369
- package/2023-07-01/index.d.ts +0 -16414
- package/2023-07-01/index.ts +0 -16369
- package/entrypoints.svg +0 -53
- package/latest/index.d.ts +0 -16447
- package/latest/index.ts +0 -16402
- package/oldest/index.d.ts +0 -16306
- package/oldest/index.ts +0 -16261
package/index.ts
CHANGED
|
@@ -342,7 +342,14 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
342
342
|
ByteLengthQueuingStrategy: typeof ByteLengthQueuingStrategy;
|
|
343
343
|
CountQueuingStrategy: typeof CountQueuingStrategy;
|
|
344
344
|
ErrorEvent: typeof ErrorEvent;
|
|
345
|
+
MessageChannel: typeof MessageChannel;
|
|
346
|
+
MessagePort: typeof MessagePort;
|
|
345
347
|
EventSource: typeof EventSource;
|
|
348
|
+
ReadableStreamBYOBRequest: typeof ReadableStreamBYOBRequest;
|
|
349
|
+
ReadableStreamDefaultController: typeof ReadableStreamDefaultController;
|
|
350
|
+
ReadableByteStreamController: typeof ReadableByteStreamController;
|
|
351
|
+
WritableStreamDefaultController: typeof WritableStreamDefaultController;
|
|
352
|
+
TransformStreamDefaultController: typeof TransformStreamDefaultController;
|
|
346
353
|
CompressionStream: typeof CompressionStream;
|
|
347
354
|
DecompressionStream: typeof DecompressionStream;
|
|
348
355
|
TextEncoderStream: typeof TextEncoderStream;
|
|
@@ -358,6 +365,8 @@ export interface ServiceWorkerGlobalScope extends WorkerGlobalScope {
|
|
|
358
365
|
AbortSignal: typeof AbortSignal;
|
|
359
366
|
TextDecoder: typeof TextDecoder;
|
|
360
367
|
TextEncoder: typeof TextEncoder;
|
|
368
|
+
navigator: Navigator;
|
|
369
|
+
Navigator: typeof Navigator;
|
|
361
370
|
URL: typeof URL;
|
|
362
371
|
URLSearchParams: typeof URLSearchParams;
|
|
363
372
|
URLPattern: typeof URLPattern;
|
|
@@ -465,10 +474,12 @@ export declare const scheduler: Scheduler;
|
|
|
465
474
|
export declare const performance: Performance;
|
|
466
475
|
export declare const Cloudflare: Cloudflare;
|
|
467
476
|
export declare const origin: string;
|
|
477
|
+
export declare const navigator: Navigator;
|
|
468
478
|
export interface TestController {}
|
|
469
479
|
export interface ExecutionContext<Props = unknown> {
|
|
470
480
|
waitUntil(promise: Promise<any>): void;
|
|
471
481
|
passThroughOnException(): void;
|
|
482
|
+
readonly exports: Cloudflare.Exports;
|
|
472
483
|
readonly props: Props;
|
|
473
484
|
cache?: CacheContext;
|
|
474
485
|
readonly access?: CloudflareAccessContext;
|
|
@@ -541,6 +552,14 @@ export interface ExportedHandler<
|
|
|
541
552
|
export interface StructuredSerializeOptions {
|
|
542
553
|
transfer?: any[];
|
|
543
554
|
}
|
|
555
|
+
export declare abstract class Navigator {
|
|
556
|
+
sendBeacon(url: string, body?: BodyInit): boolean;
|
|
557
|
+
readonly userAgent: string;
|
|
558
|
+
readonly hardwareConcurrency: number;
|
|
559
|
+
readonly platform: string;
|
|
560
|
+
readonly language: string;
|
|
561
|
+
readonly languages: string[];
|
|
562
|
+
}
|
|
544
563
|
export interface AlarmInvocationInfo {
|
|
545
564
|
readonly isRetry: boolean;
|
|
546
565
|
readonly retryCount: number;
|
|
@@ -623,7 +642,11 @@ export declare abstract class DurableObjectNamespace<
|
|
|
623
642
|
jurisdiction: DurableObjectJurisdiction,
|
|
624
643
|
): DurableObjectNamespace<T>;
|
|
625
644
|
}
|
|
626
|
-
export type DurableObjectJurisdiction =
|
|
645
|
+
export type DurableObjectJurisdiction =
|
|
646
|
+
| "eu"
|
|
647
|
+
| "fedramp"
|
|
648
|
+
| "fedramp-high"
|
|
649
|
+
| "us";
|
|
627
650
|
export interface DurableObjectNamespaceNewUniqueIdOptions {
|
|
628
651
|
jurisdiction?: DurableObjectJurisdiction;
|
|
629
652
|
}
|
|
@@ -649,6 +672,7 @@ export interface DurableObjectClass<
|
|
|
649
672
|
> {}
|
|
650
673
|
export interface DurableObjectState<Props = unknown> {
|
|
651
674
|
waitUntil(promise: Promise<any>): void;
|
|
675
|
+
readonly exports: Cloudflare.Exports;
|
|
652
676
|
readonly props: Props;
|
|
653
677
|
readonly id: DurableObjectId;
|
|
654
678
|
readonly storage: DurableObjectStorage;
|
|
@@ -805,82 +829,89 @@ export declare class Event {
|
|
|
805
829
|
*
|
|
806
830
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/type)
|
|
807
831
|
*/
|
|
808
|
-
|
|
832
|
+
get type(): string;
|
|
809
833
|
/**
|
|
810
834
|
* The **`eventPhase`** read-only property of the being evaluated.
|
|
811
835
|
*
|
|
812
836
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/eventPhase)
|
|
813
837
|
*/
|
|
814
|
-
|
|
838
|
+
get eventPhase(): number;
|
|
815
839
|
/**
|
|
816
840
|
* The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM.
|
|
817
841
|
*
|
|
818
842
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/composed)
|
|
819
843
|
*/
|
|
820
|
-
|
|
844
|
+
get composed(): boolean;
|
|
821
845
|
/**
|
|
822
846
|
* The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not.
|
|
823
847
|
*
|
|
824
848
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/bubbles)
|
|
825
849
|
*/
|
|
826
|
-
|
|
850
|
+
get bubbles(): boolean;
|
|
827
851
|
/**
|
|
828
852
|
* The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
|
|
829
853
|
*
|
|
830
854
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelable)
|
|
831
855
|
*/
|
|
832
|
-
|
|
856
|
+
get cancelable(): boolean;
|
|
833
857
|
/**
|
|
834
858
|
* The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event.
|
|
835
859
|
*
|
|
836
860
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented)
|
|
837
861
|
*/
|
|
838
|
-
|
|
862
|
+
get defaultPrevented(): boolean;
|
|
839
863
|
/**
|
|
840
864
|
* The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not.
|
|
841
865
|
* @deprecated
|
|
842
866
|
*
|
|
843
867
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/returnValue)
|
|
844
868
|
*/
|
|
845
|
-
|
|
869
|
+
get returnValue(): boolean;
|
|
846
870
|
/**
|
|
847
871
|
* The **`currentTarget`** read-only property of the Event interface identifies the element to which the event handler has been attached.
|
|
848
872
|
*
|
|
849
873
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/currentTarget)
|
|
850
874
|
*/
|
|
851
|
-
|
|
875
|
+
get currentTarget(): EventTarget | undefined;
|
|
852
876
|
/**
|
|
853
877
|
* The read-only **`target`** property of the dispatched.
|
|
854
878
|
*
|
|
855
879
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/target)
|
|
856
880
|
*/
|
|
857
|
-
|
|
881
|
+
get target(): EventTarget | undefined;
|
|
858
882
|
/**
|
|
859
883
|
* The deprecated **`Event.srcElement`** is an alias for the Event.target property.
|
|
860
884
|
* @deprecated
|
|
861
885
|
*
|
|
862
886
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/srcElement)
|
|
863
887
|
*/
|
|
864
|
-
|
|
888
|
+
get srcElement(): EventTarget | undefined;
|
|
865
889
|
/**
|
|
866
890
|
* The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created.
|
|
867
891
|
*
|
|
868
892
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/timeStamp)
|
|
869
893
|
*/
|
|
870
|
-
|
|
894
|
+
get timeStamp(): number;
|
|
871
895
|
/**
|
|
872
896
|
* The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents.
|
|
873
897
|
*
|
|
874
898
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/isTrusted)
|
|
875
899
|
*/
|
|
876
|
-
|
|
900
|
+
get isTrusted(): boolean;
|
|
877
901
|
/**
|
|
878
902
|
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
879
903
|
* @deprecated
|
|
880
904
|
*
|
|
881
905
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
882
906
|
*/
|
|
883
|
-
cancelBubble: boolean;
|
|
907
|
+
get cancelBubble(): boolean;
|
|
908
|
+
/**
|
|
909
|
+
* The **`cancelBubble`** property of the Event interface is deprecated.
|
|
910
|
+
* @deprecated
|
|
911
|
+
*
|
|
912
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Event/cancelBubble)
|
|
913
|
+
*/
|
|
914
|
+
set cancelBubble(value: boolean);
|
|
884
915
|
/**
|
|
885
916
|
* The **`stopImmediatePropagation()`** method of the If several listeners are attached to the same element for the same event type, they are called in the order in which they were added.
|
|
886
917
|
*
|
|
@@ -984,7 +1015,7 @@ export declare class AbortController {
|
|
|
984
1015
|
*
|
|
985
1016
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortController/signal)
|
|
986
1017
|
*/
|
|
987
|
-
|
|
1018
|
+
get signal(): AbortSignal;
|
|
988
1019
|
/**
|
|
989
1020
|
* The **`abort()`** method of the AbortController interface aborts an asynchronous operation before it has completed.
|
|
990
1021
|
*
|
|
@@ -1021,13 +1052,13 @@ export declare abstract class AbortSignal extends EventTarget {
|
|
|
1021
1052
|
*
|
|
1022
1053
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/aborted)
|
|
1023
1054
|
*/
|
|
1024
|
-
|
|
1055
|
+
get aborted(): boolean;
|
|
1025
1056
|
/**
|
|
1026
1057
|
* The **`reason`** read-only property returns a JavaScript value that indicates the abort reason.
|
|
1027
1058
|
*
|
|
1028
1059
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/reason)
|
|
1029
1060
|
*/
|
|
1030
|
-
|
|
1061
|
+
get reason(): any;
|
|
1031
1062
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
1032
1063
|
get onabort(): any | null;
|
|
1033
1064
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AbortSignal/abort_event) */
|
|
@@ -1093,13 +1124,13 @@ export declare class Blob {
|
|
|
1093
1124
|
*
|
|
1094
1125
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
|
|
1095
1126
|
*/
|
|
1096
|
-
|
|
1127
|
+
get size(): number;
|
|
1097
1128
|
/**
|
|
1098
1129
|
* The **`type`** read-only property of the Blob interface returns the MIME type of the file.
|
|
1099
1130
|
*
|
|
1100
1131
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
1101
1132
|
*/
|
|
1102
|
-
|
|
1133
|
+
get type(): string;
|
|
1103
1134
|
/**
|
|
1104
1135
|
* The **`slice()`** method of the Blob interface creates and returns a new `Blob` object which contains data from a subset of the blob on which it's called.
|
|
1105
1136
|
*
|
|
@@ -1150,13 +1181,13 @@ export declare class File extends Blob {
|
|
|
1150
1181
|
*
|
|
1151
1182
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/name)
|
|
1152
1183
|
*/
|
|
1153
|
-
|
|
1184
|
+
get name(): string;
|
|
1154
1185
|
/**
|
|
1155
1186
|
* The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).
|
|
1156
1187
|
*
|
|
1157
1188
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/File/lastModified)
|
|
1158
1189
|
*/
|
|
1159
|
-
|
|
1190
|
+
get lastModified(): number;
|
|
1160
1191
|
}
|
|
1161
1192
|
export interface FileOptions {
|
|
1162
1193
|
type?: string;
|
|
@@ -1213,7 +1244,7 @@ export declare abstract class Crypto {
|
|
|
1213
1244
|
*
|
|
1214
1245
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Crypto/subtle)
|
|
1215
1246
|
*/
|
|
1216
|
-
|
|
1247
|
+
get subtle(): SubtleCrypto;
|
|
1217
1248
|
/**
|
|
1218
1249
|
* The **`Crypto.getRandomValues()`** method lets you get cryptographically strong random values.
|
|
1219
1250
|
*
|
|
@@ -1535,9 +1566,9 @@ export declare class TextDecoder {
|
|
|
1535
1566
|
input?: ArrayBuffer | ArrayBufferView,
|
|
1536
1567
|
options?: TextDecoderDecodeOptions,
|
|
1537
1568
|
): string;
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1569
|
+
get encoding(): string;
|
|
1570
|
+
get fatal(): boolean;
|
|
1571
|
+
get ignoreBOM(): boolean;
|
|
1541
1572
|
}
|
|
1542
1573
|
/**
|
|
1543
1574
|
* The **`TextEncoder`** interface takes a stream of code points as input and emits a stream of UTF-8 bytes.
|
|
@@ -1558,7 +1589,7 @@ export declare class TextEncoder {
|
|
|
1558
1589
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TextEncoder/encodeInto)
|
|
1559
1590
|
*/
|
|
1560
1591
|
encodeInto(input: string, buffer: Uint8Array): TextEncoderEncodeIntoResult;
|
|
1561
|
-
|
|
1592
|
+
get encoding(): string;
|
|
1562
1593
|
}
|
|
1563
1594
|
export interface TextDecoderConstructorOptions {
|
|
1564
1595
|
fatal: boolean;
|
|
@@ -1712,13 +1743,13 @@ export declare class FormData {
|
|
|
1712
1743
|
*
|
|
1713
1744
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/get)
|
|
1714
1745
|
*/
|
|
1715
|
-
get(name: string): string | null;
|
|
1746
|
+
get(name: string): (File | string) | null;
|
|
1716
1747
|
/**
|
|
1717
1748
|
* The **`getAll()`** method of the FormData interface returns all the values associated with a given key from within a `FormData` object.
|
|
1718
1749
|
*
|
|
1719
1750
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/FormData/getAll)
|
|
1720
1751
|
*/
|
|
1721
|
-
getAll(name: string): string[];
|
|
1752
|
+
getAll(name: string): (File | string)[];
|
|
1722
1753
|
/**
|
|
1723
1754
|
* The **`has()`** method of the FormData interface returns whether a `FormData` object contains a certain key.
|
|
1724
1755
|
*
|
|
@@ -1744,7 +1775,7 @@ export declare class FormData {
|
|
|
1744
1775
|
*/
|
|
1745
1776
|
set(name: string, value: Blob, filename?: string): void;
|
|
1746
1777
|
/* Returns an array of key, value pairs for every entry in the list. */
|
|
1747
|
-
entries(): IterableIterator<[key: string, value: string]>;
|
|
1778
|
+
entries(): IterableIterator<[key: string, value: File | string]>;
|
|
1748
1779
|
/* Returns a list of keys in the list. */
|
|
1749
1780
|
keys(): IterableIterator<string>;
|
|
1750
1781
|
/* Returns a list of values in the list. */
|
|
@@ -1752,13 +1783,13 @@ export declare class FormData {
|
|
|
1752
1783
|
forEach<This = unknown>(
|
|
1753
1784
|
callback: (
|
|
1754
1785
|
this: This,
|
|
1755
|
-
value: string,
|
|
1786
|
+
value: File | string,
|
|
1756
1787
|
key: string,
|
|
1757
1788
|
parent: FormData,
|
|
1758
1789
|
) => void,
|
|
1759
1790
|
thisArg?: This,
|
|
1760
1791
|
): void;
|
|
1761
|
-
[Symbol.iterator](): IterableIterator<[key: string, value: string]>;
|
|
1792
|
+
[Symbol.iterator](): IterableIterator<[key: string, value: File | string]>;
|
|
1762
1793
|
}
|
|
1763
1794
|
export interface ContentOptions {
|
|
1764
1795
|
html?: boolean;
|
|
@@ -1904,6 +1935,12 @@ export declare class Headers {
|
|
|
1904
1935
|
*/
|
|
1905
1936
|
get(name: string): string | null;
|
|
1906
1937
|
getAll(name: string): string[];
|
|
1938
|
+
/**
|
|
1939
|
+
* The **`getSetCookie()`** method of the Headers interface returns an array containing the values of all Set-Cookie headers associated with a response.
|
|
1940
|
+
*
|
|
1941
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Headers/getSetCookie)
|
|
1942
|
+
*/
|
|
1943
|
+
getSetCookie(): string[];
|
|
1907
1944
|
/**
|
|
1908
1945
|
* The **`has()`** method of the Headers interface returns a boolean stating whether a `Headers` object contains a certain header.
|
|
1909
1946
|
*
|
|
@@ -1947,12 +1984,14 @@ export type BodyInit =
|
|
|
1947
1984
|
| ArrayBufferView
|
|
1948
1985
|
| Blob
|
|
1949
1986
|
| URLSearchParams
|
|
1950
|
-
| FormData
|
|
1987
|
+
| FormData
|
|
1988
|
+
| Iterable<ArrayBuffer | ArrayBufferView>
|
|
1989
|
+
| AsyncIterable<ArrayBuffer | ArrayBufferView>;
|
|
1951
1990
|
export declare abstract class Body {
|
|
1952
1991
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/body) */
|
|
1953
|
-
|
|
1992
|
+
get body(): ReadableStream | null;
|
|
1954
1993
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bodyUsed) */
|
|
1955
|
-
|
|
1994
|
+
get bodyUsed(): boolean;
|
|
1956
1995
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/arrayBuffer) */
|
|
1957
1996
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
1958
1997
|
/* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/bytes) */
|
|
@@ -1995,39 +2034,39 @@ export interface Response extends Body {
|
|
|
1995
2034
|
*
|
|
1996
2035
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/status)
|
|
1997
2036
|
*/
|
|
1998
|
-
|
|
2037
|
+
status: number;
|
|
1999
2038
|
/**
|
|
2000
2039
|
* The **`statusText`** read-only property of the Response interface contains the status message corresponding to the HTTP status code in Response.status.
|
|
2001
2040
|
*
|
|
2002
2041
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/statusText)
|
|
2003
2042
|
*/
|
|
2004
|
-
|
|
2043
|
+
statusText: string;
|
|
2005
2044
|
/**
|
|
2006
2045
|
* The **`headers`** read-only property of the with the response.
|
|
2007
2046
|
*
|
|
2008
2047
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/headers)
|
|
2009
2048
|
*/
|
|
2010
|
-
|
|
2049
|
+
headers: Headers;
|
|
2011
2050
|
/**
|
|
2012
2051
|
* The **`ok`** read-only property of the Response interface contains a Boolean stating whether the response was successful (status in the range 200-299) or not.
|
|
2013
2052
|
*
|
|
2014
2053
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/ok)
|
|
2015
2054
|
*/
|
|
2016
|
-
|
|
2055
|
+
ok: boolean;
|
|
2017
2056
|
/**
|
|
2018
2057
|
* The **`redirected`** read-only property of the Response interface indicates whether or not the response is the result of a request you made which was redirected.
|
|
2019
2058
|
*
|
|
2020
2059
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/redirected)
|
|
2021
2060
|
*/
|
|
2022
|
-
|
|
2061
|
+
redirected: boolean;
|
|
2023
2062
|
/**
|
|
2024
2063
|
* The **`url`** read-only property of the Response interface contains the URL of the response.
|
|
2025
2064
|
*
|
|
2026
2065
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Response/url)
|
|
2027
2066
|
*/
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2067
|
+
url: string;
|
|
2068
|
+
webSocket: WebSocket | null;
|
|
2069
|
+
cf: any | undefined;
|
|
2031
2070
|
/**
|
|
2032
2071
|
* The **`type`** read-only property of the Response interface contains the type of the response.
|
|
2033
2072
|
*
|
|
@@ -2079,45 +2118,51 @@ export interface Request<
|
|
|
2079
2118
|
*
|
|
2080
2119
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/method)
|
|
2081
2120
|
*/
|
|
2082
|
-
|
|
2121
|
+
method: string;
|
|
2083
2122
|
/**
|
|
2084
2123
|
* The **`url`** read-only property of the Request interface contains the URL of the request.
|
|
2085
2124
|
*
|
|
2086
2125
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/url)
|
|
2087
2126
|
*/
|
|
2088
|
-
|
|
2127
|
+
url: string;
|
|
2089
2128
|
/**
|
|
2090
2129
|
* The **`headers`** read-only property of the with the request.
|
|
2091
2130
|
*
|
|
2092
2131
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/headers)
|
|
2093
2132
|
*/
|
|
2094
|
-
|
|
2133
|
+
headers: Headers;
|
|
2095
2134
|
/**
|
|
2096
2135
|
* The **`redirect`** read-only property of the Request interface contains the mode for how redirects are handled.
|
|
2097
2136
|
*
|
|
2098
2137
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/redirect)
|
|
2099
2138
|
*/
|
|
2100
|
-
|
|
2101
|
-
|
|
2139
|
+
redirect: string;
|
|
2140
|
+
fetcher: Fetcher | null;
|
|
2102
2141
|
/**
|
|
2103
2142
|
* The read-only **`signal`** property of the Request interface returns the AbortSignal associated with the request.
|
|
2104
2143
|
*
|
|
2105
2144
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/signal)
|
|
2106
2145
|
*/
|
|
2107
|
-
|
|
2108
|
-
|
|
2146
|
+
signal: AbortSignal;
|
|
2147
|
+
cf?: Cf;
|
|
2109
2148
|
/**
|
|
2110
2149
|
* The **`integrity`** read-only property of the Request interface contains the subresource integrity value of the request.
|
|
2111
2150
|
*
|
|
2112
2151
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/integrity)
|
|
2113
2152
|
*/
|
|
2114
|
-
|
|
2153
|
+
integrity: string;
|
|
2115
2154
|
/**
|
|
2116
2155
|
* The **`keepalive`** read-only property of the Request interface contains the request's `keepalive` setting (`true` or `false`), which indicates whether the browser will keep the associated request alive if the page that initiated it is unloaded before the request is complete.
|
|
2117
2156
|
*
|
|
2118
2157
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/keepalive)
|
|
2119
2158
|
*/
|
|
2120
|
-
|
|
2159
|
+
keepalive: boolean;
|
|
2160
|
+
/**
|
|
2161
|
+
* The **`cache`** read-only property of the Request interface contains the cache mode of the request.
|
|
2162
|
+
*
|
|
2163
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Request/cache)
|
|
2164
|
+
*/
|
|
2165
|
+
cache?: "no-store" | "no-cache";
|
|
2121
2166
|
}
|
|
2122
2167
|
export interface RequestInit<Cf = CfProperties> {
|
|
2123
2168
|
/* A string to set request's method. */
|
|
@@ -2130,6 +2175,8 @@ export interface RequestInit<Cf = CfProperties> {
|
|
|
2130
2175
|
redirect?: string;
|
|
2131
2176
|
fetcher?: Fetcher | null;
|
|
2132
2177
|
cf?: Cf;
|
|
2178
|
+
/* A string indicating how the request will interact with the browser's cache to set request's cache. */
|
|
2179
|
+
cache?: "no-store" | "no-cache";
|
|
2133
2180
|
/* A cryptographic hash of the resource to be fetched by request. Sets request's integrity. */
|
|
2134
2181
|
integrity?: string;
|
|
2135
2182
|
/* An AbortSignal to set request's signal. */
|
|
@@ -2158,10 +2205,6 @@ export type Fetcher<
|
|
|
2158
2205
|
fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
|
|
2159
2206
|
connect(address: SocketAddress | string, options?: SocketOptions): Socket;
|
|
2160
2207
|
};
|
|
2161
|
-
export interface FetcherPutOptions {
|
|
2162
|
-
expiration?: number;
|
|
2163
|
-
expirationTtl?: number;
|
|
2164
|
-
}
|
|
2165
2208
|
export interface KVNamespaceListKey<Metadata, Key extends string = string> {
|
|
2166
2209
|
name: Key;
|
|
2167
2210
|
expiration?: number;
|
|
@@ -2407,6 +2450,7 @@ export interface R2ListOptions {
|
|
|
2407
2450
|
cursor?: string;
|
|
2408
2451
|
delimiter?: string;
|
|
2409
2452
|
startAfter?: string;
|
|
2453
|
+
include?: ("httpMetadata" | "customMetadata")[];
|
|
2410
2454
|
}
|
|
2411
2455
|
export interface R2Bucket {
|
|
2412
2456
|
head(key: string): Promise<R2Object | null>;
|
|
@@ -2669,7 +2713,7 @@ export interface ReadableStream<R = any> {
|
|
|
2669
2713
|
*
|
|
2670
2714
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStream/locked)
|
|
2671
2715
|
*/
|
|
2672
|
-
|
|
2716
|
+
get locked(): boolean;
|
|
2673
2717
|
/**
|
|
2674
2718
|
* The **`cancel()`** method of the ReadableStream interface returns a Promise that resolves when the stream is canceled.
|
|
2675
2719
|
*
|
|
@@ -2740,7 +2784,7 @@ export declare const ReadableStream: {
|
|
|
2740
2784
|
*/
|
|
2741
2785
|
export declare class ReadableStreamDefaultReader<R = any> {
|
|
2742
2786
|
constructor(stream: ReadableStream);
|
|
2743
|
-
|
|
2787
|
+
get closed(): Promise<void>;
|
|
2744
2788
|
cancel(reason?: any): Promise<void>;
|
|
2745
2789
|
/**
|
|
2746
2790
|
* The **`read()`** method of the ReadableStreamDefaultReader interface returns a Promise providing access to the next chunk in the stream's internal queue.
|
|
@@ -2762,7 +2806,7 @@ export declare class ReadableStreamDefaultReader<R = any> {
|
|
|
2762
2806
|
*/
|
|
2763
2807
|
export declare class ReadableStreamBYOBReader {
|
|
2764
2808
|
constructor(stream: ReadableStream);
|
|
2765
|
-
|
|
2809
|
+
get closed(): Promise<void>;
|
|
2766
2810
|
cancel(reason?: any): Promise<void>;
|
|
2767
2811
|
/**
|
|
2768
2812
|
* The **`read()`** method of the ReadableStreamBYOBReader interface is used to read data into a view on a user-supplied buffer from an associated readable byte stream.
|
|
@@ -2799,7 +2843,7 @@ export interface ReadableStreamGetReaderOptions {
|
|
|
2799
2843
|
*
|
|
2800
2844
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamBYOBRequest)
|
|
2801
2845
|
*/
|
|
2802
|
-
export
|
|
2846
|
+
export declare abstract class ReadableStreamBYOBRequest {
|
|
2803
2847
|
/**
|
|
2804
2848
|
* The **`view`** getter property of the ReadableStreamBYOBRequest interface returns the current view.
|
|
2805
2849
|
*
|
|
@@ -2825,7 +2869,7 @@ export interface ReadableStreamBYOBRequest {
|
|
|
2825
2869
|
*
|
|
2826
2870
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableStreamDefaultController)
|
|
2827
2871
|
*/
|
|
2828
|
-
export
|
|
2872
|
+
export declare abstract class ReadableStreamDefaultController<R = any> {
|
|
2829
2873
|
/**
|
|
2830
2874
|
* The **`desiredSize`** read-only property of the required to fill the stream's internal queue.
|
|
2831
2875
|
*
|
|
@@ -2856,7 +2900,7 @@ export interface ReadableStreamDefaultController<R = any> {
|
|
|
2856
2900
|
*
|
|
2857
2901
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/ReadableByteStreamController)
|
|
2858
2902
|
*/
|
|
2859
|
-
export
|
|
2903
|
+
export declare abstract class ReadableByteStreamController {
|
|
2860
2904
|
/**
|
|
2861
2905
|
* The **`byobRequest`** read-only property of the ReadableByteStreamController interface returns the current BYOB request, or `null` if there are no pending requests.
|
|
2862
2906
|
*
|
|
@@ -2893,7 +2937,7 @@ export interface ReadableByteStreamController {
|
|
|
2893
2937
|
*
|
|
2894
2938
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultController)
|
|
2895
2939
|
*/
|
|
2896
|
-
export
|
|
2940
|
+
export declare abstract class WritableStreamDefaultController {
|
|
2897
2941
|
/**
|
|
2898
2942
|
* The read-only **`signal`** property of the WritableStreamDefaultController interface returns the AbortSignal associated with the controller.
|
|
2899
2943
|
*
|
|
@@ -2912,7 +2956,7 @@ export interface WritableStreamDefaultController {
|
|
|
2912
2956
|
*
|
|
2913
2957
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStreamDefaultController)
|
|
2914
2958
|
*/
|
|
2915
|
-
export
|
|
2959
|
+
export declare abstract class TransformStreamDefaultController<O = any> {
|
|
2916
2960
|
/**
|
|
2917
2961
|
* The **`desiredSize`** read-only property of the TransformStreamDefaultController interface returns the desired size to fill the queue of the associated ReadableStream.
|
|
2918
2962
|
*
|
|
@@ -2962,7 +3006,7 @@ export declare class WritableStream<W = any> {
|
|
|
2962
3006
|
*
|
|
2963
3007
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStream/locked)
|
|
2964
3008
|
*/
|
|
2965
|
-
|
|
3009
|
+
get locked(): boolean;
|
|
2966
3010
|
/**
|
|
2967
3011
|
* The **`abort()`** method of the WritableStream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
2968
3012
|
*
|
|
@@ -2994,19 +3038,19 @@ export declare class WritableStreamDefaultWriter<W = any> {
|
|
|
2994
3038
|
*
|
|
2995
3039
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/closed)
|
|
2996
3040
|
*/
|
|
2997
|
-
|
|
3041
|
+
get closed(): Promise<void>;
|
|
2998
3042
|
/**
|
|
2999
3043
|
* The **`ready`** read-only property of the that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
|
|
3000
3044
|
*
|
|
3001
3045
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/ready)
|
|
3002
3046
|
*/
|
|
3003
|
-
|
|
3047
|
+
get ready(): Promise<void>;
|
|
3004
3048
|
/**
|
|
3005
3049
|
* The **`desiredSize`** read-only property of the to fill the stream's internal queue.
|
|
3006
3050
|
*
|
|
3007
3051
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WritableStreamDefaultWriter/desiredSize)
|
|
3008
3052
|
*/
|
|
3009
|
-
|
|
3053
|
+
get desiredSize(): number | null;
|
|
3010
3054
|
/**
|
|
3011
3055
|
* The **`abort()`** method of the the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
|
|
3012
3056
|
*
|
|
@@ -3048,13 +3092,13 @@ export declare class TransformStream<I = any, O = any> {
|
|
|
3048
3092
|
*
|
|
3049
3093
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/readable)
|
|
3050
3094
|
*/
|
|
3051
|
-
|
|
3095
|
+
get readable(): ReadableStream<O>;
|
|
3052
3096
|
/**
|
|
3053
3097
|
* The **`writable`** read-only property of the TransformStream interface returns the WritableStream instance controlled by this `TransformStream`.
|
|
3054
3098
|
*
|
|
3055
3099
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/TransformStream/writable)
|
|
3056
3100
|
*/
|
|
3057
|
-
|
|
3101
|
+
get writable(): WritableStream<I>;
|
|
3058
3102
|
}
|
|
3059
3103
|
export declare class FixedLengthStream extends IdentityTransformStream {
|
|
3060
3104
|
constructor(
|
|
@@ -3301,86 +3345,170 @@ export interface UnsafeTraceMetrics {
|
|
|
3301
3345
|
*/
|
|
3302
3346
|
export declare class URL {
|
|
3303
3347
|
constructor(url: string | URL, base?: string | URL);
|
|
3348
|
+
/**
|
|
3349
|
+
* The **`origin`** read-only property of the URL interface returns a string containing the Unicode serialization of the origin of the represented URL.
|
|
3350
|
+
*
|
|
3351
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/origin)
|
|
3352
|
+
*/
|
|
3353
|
+
get origin(): string;
|
|
3304
3354
|
/**
|
|
3305
3355
|
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3306
3356
|
*
|
|
3307
3357
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3308
3358
|
*/
|
|
3309
|
-
href: string;
|
|
3359
|
+
get href(): string;
|
|
3310
3360
|
/**
|
|
3311
|
-
* The **`
|
|
3361
|
+
* The **`href`** property of the URL interface is a string containing the whole URL.
|
|
3312
3362
|
*
|
|
3313
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/
|
|
3363
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/href)
|
|
3314
3364
|
*/
|
|
3315
|
-
|
|
3365
|
+
set href(value: string);
|
|
3316
3366
|
/**
|
|
3317
3367
|
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3318
3368
|
*
|
|
3319
3369
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3320
3370
|
*/
|
|
3321
|
-
protocol: string;
|
|
3371
|
+
get protocol(): string;
|
|
3372
|
+
/**
|
|
3373
|
+
* The **`protocol`** property of the URL interface is a string containing the protocol or scheme of the URL, including the final `':'`.
|
|
3374
|
+
*
|
|
3375
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/protocol)
|
|
3376
|
+
*/
|
|
3377
|
+
set protocol(value: string);
|
|
3322
3378
|
/**
|
|
3323
3379
|
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3324
3380
|
*
|
|
3325
3381
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3326
3382
|
*/
|
|
3327
|
-
username: string;
|
|
3383
|
+
get username(): string;
|
|
3384
|
+
/**
|
|
3385
|
+
* The **`username`** property of the URL interface is a string containing the username component of the URL.
|
|
3386
|
+
*
|
|
3387
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/username)
|
|
3388
|
+
*/
|
|
3389
|
+
set username(value: string);
|
|
3328
3390
|
/**
|
|
3329
3391
|
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3330
3392
|
*
|
|
3331
3393
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3332
3394
|
*/
|
|
3333
|
-
password: string;
|
|
3395
|
+
get password(): string;
|
|
3396
|
+
/**
|
|
3397
|
+
* The **`password`** property of the URL interface is a string containing the password component of the URL.
|
|
3398
|
+
*
|
|
3399
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/password)
|
|
3400
|
+
*/
|
|
3401
|
+
set password(value: string);
|
|
3334
3402
|
/**
|
|
3335
3403
|
* The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
|
|
3336
3404
|
*
|
|
3337
3405
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3338
3406
|
*/
|
|
3339
|
-
host: string;
|
|
3407
|
+
get host(): string;
|
|
3408
|
+
/**
|
|
3409
|
+
* The **`host`** property of the URL interface is a string containing the host, which is the URL.hostname, and then, if the port of the URL is nonempty, a `':'`, followed by the URL.port of the URL.
|
|
3410
|
+
*
|
|
3411
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/host)
|
|
3412
|
+
*/
|
|
3413
|
+
set host(value: string);
|
|
3340
3414
|
/**
|
|
3341
3415
|
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3342
3416
|
*
|
|
3343
3417
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3344
3418
|
*/
|
|
3345
|
-
hostname: string;
|
|
3419
|
+
get hostname(): string;
|
|
3420
|
+
/**
|
|
3421
|
+
* The **`hostname`** property of the URL interface is a string containing either the domain name or IP address of the URL.
|
|
3422
|
+
*
|
|
3423
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hostname)
|
|
3424
|
+
*/
|
|
3425
|
+
set hostname(value: string);
|
|
3346
3426
|
/**
|
|
3347
3427
|
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3348
3428
|
*
|
|
3349
3429
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3350
3430
|
*/
|
|
3351
|
-
port: string;
|
|
3431
|
+
get port(): string;
|
|
3432
|
+
/**
|
|
3433
|
+
* The **`port`** property of the URL interface is a string containing the port number of the URL.
|
|
3434
|
+
*
|
|
3435
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/port)
|
|
3436
|
+
*/
|
|
3437
|
+
set port(value: string);
|
|
3438
|
+
/**
|
|
3439
|
+
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3440
|
+
*
|
|
3441
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3442
|
+
*/
|
|
3443
|
+
get pathname(): string;
|
|
3352
3444
|
/**
|
|
3353
3445
|
* The **`pathname`** property of the URL interface represents a location in a hierarchical structure.
|
|
3354
3446
|
*
|
|
3355
3447
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
3356
3448
|
*/
|
|
3357
|
-
pathname: string;
|
|
3449
|
+
set pathname(value: string);
|
|
3358
3450
|
/**
|
|
3359
3451
|
* The **`search`** property of the URL interface is a search string, also called a _query string_, that is a string containing a `'?'` followed by the parameters of the URL.
|
|
3360
3452
|
*
|
|
3361
3453
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3362
3454
|
*/
|
|
3363
|
-
search: string;
|
|
3455
|
+
get search(): string;
|
|
3364
3456
|
/**
|
|
3365
|
-
* The **`
|
|
3457
|
+
* The **`search`** property of the URL interface is a search string, also called a _query string_, that is a string containing a `'?'` followed by the parameters of the URL.
|
|
3366
3458
|
*
|
|
3367
|
-
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/
|
|
3459
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/search)
|
|
3368
3460
|
*/
|
|
3369
|
-
|
|
3461
|
+
set search(value: string);
|
|
3370
3462
|
/**
|
|
3371
3463
|
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3372
3464
|
*
|
|
3373
3465
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3374
3466
|
*/
|
|
3375
|
-
hash: string;
|
|
3376
|
-
|
|
3377
|
-
|
|
3467
|
+
get hash(): string;
|
|
3468
|
+
/**
|
|
3469
|
+
* The **`hash`** property of the URL interface is a string containing a `'#'` followed by the fragment identifier of the URL.
|
|
3470
|
+
*
|
|
3471
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/hash)
|
|
3472
|
+
*/
|
|
3473
|
+
set hash(value: string);
|
|
3474
|
+
/**
|
|
3475
|
+
* The **`searchParams`** read-only property of the access to the [MISSING: httpmethod('GET')] decoded query arguments contained in the URL.
|
|
3476
|
+
*
|
|
3477
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/searchParams)
|
|
3478
|
+
*/
|
|
3479
|
+
get searchParams(): URLSearchParams;
|
|
3378
3480
|
/**
|
|
3379
3481
|
* The **`toJSON()`** method of the URL interface returns a string containing a serialized version of the URL, although in practice it seems to have the same effect as ```js-nolint toJSON() ``` None.
|
|
3380
3482
|
*
|
|
3381
3483
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/toJSON)
|
|
3382
3484
|
*/
|
|
3383
3485
|
toJSON(): string;
|
|
3486
|
+
/*function toString() { [native code] }*/
|
|
3487
|
+
toString(): string;
|
|
3488
|
+
/**
|
|
3489
|
+
* The **`URL.canParse()`** static method of the URL interface returns a boolean indicating whether or not an absolute URL, or a relative URL combined with a base URL, are parsable and valid.
|
|
3490
|
+
*
|
|
3491
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/canParse_static)
|
|
3492
|
+
*/
|
|
3493
|
+
static canParse(url: string, base?: string): boolean;
|
|
3494
|
+
/**
|
|
3495
|
+
* The **`URL.parse()`** static method of the URL interface returns a newly created URL object representing the URL defined by the parameters.
|
|
3496
|
+
*
|
|
3497
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/parse_static)
|
|
3498
|
+
*/
|
|
3499
|
+
static parse(url: string, base?: string): URL | null;
|
|
3500
|
+
/**
|
|
3501
|
+
* The **`createObjectURL()`** static method of the URL interface creates a string containing a URL representing the object given in the parameter.
|
|
3502
|
+
*
|
|
3503
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL_static)
|
|
3504
|
+
*/
|
|
3505
|
+
static createObjectURL(object: File | Blob): string;
|
|
3506
|
+
/**
|
|
3507
|
+
* The **`revokeObjectURL()`** static method of the URL interface releases an existing object URL which was previously created by calling Call this method when you've finished using an object URL to let the browser know not to keep the reference to the file any longer.
|
|
3508
|
+
*
|
|
3509
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URL/revokeObjectURL_static)
|
|
3510
|
+
*/
|
|
3511
|
+
static revokeObjectURL(object_url: string): void;
|
|
3384
3512
|
}
|
|
3385
3513
|
/**
|
|
3386
3514
|
* The **`URLSearchParams`** interface defines utility methods to work with the query string of a URL.
|
|
@@ -3389,11 +3517,7 @@ export declare class URL {
|
|
|
3389
3517
|
*/
|
|
3390
3518
|
export declare class URLSearchParams {
|
|
3391
3519
|
constructor(
|
|
3392
|
-
init?:
|
|
3393
|
-
| URLSearchParams
|
|
3394
|
-
| string
|
|
3395
|
-
| Record<string, string>
|
|
3396
|
-
| [key: string, value: string][],
|
|
3520
|
+
init?: Iterable<Iterable<string>> | Record<string, string> | string,
|
|
3397
3521
|
);
|
|
3398
3522
|
/**
|
|
3399
3523
|
* The **`size`** read-only property of the URLSearchParams interface indicates the total number of search parameter entries.
|
|
@@ -3412,7 +3536,7 @@ export declare class URLSearchParams {
|
|
|
3412
3536
|
*
|
|
3413
3537
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/delete)
|
|
3414
3538
|
*/
|
|
3415
|
-
delete(name: string): void;
|
|
3539
|
+
delete(name: string, value?: string): void;
|
|
3416
3540
|
/**
|
|
3417
3541
|
* The **`get()`** method of the URLSearchParams interface returns the first value associated to the given search parameter.
|
|
3418
3542
|
*
|
|
@@ -3430,7 +3554,7 @@ export declare class URLSearchParams {
|
|
|
3430
3554
|
*
|
|
3431
3555
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/URLSearchParams/has)
|
|
3432
3556
|
*/
|
|
3433
|
-
has(name: string): boolean;
|
|
3557
|
+
has(name: string, value?: string): boolean;
|
|
3434
3558
|
/**
|
|
3435
3559
|
* The **`set()`** method of the URLSearchParams interface sets the value associated with a given search parameter to the given value.
|
|
3436
3560
|
*
|
|
@@ -3476,6 +3600,7 @@ export declare class URLPattern {
|
|
|
3476
3600
|
get pathname(): string;
|
|
3477
3601
|
get search(): string;
|
|
3478
3602
|
get hash(): string;
|
|
3603
|
+
get hasRegExpGroups(): boolean;
|
|
3479
3604
|
test(input?: string | URLPatternInit, baseURL?: string): boolean;
|
|
3480
3605
|
exec(
|
|
3481
3606
|
input?: string | URLPatternInit,
|
|
@@ -3591,25 +3716,25 @@ export interface WebSocket extends EventTarget<WebSocketEventMap> {
|
|
|
3591
3716
|
*
|
|
3592
3717
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/readyState)
|
|
3593
3718
|
*/
|
|
3594
|
-
|
|
3719
|
+
readyState: number;
|
|
3595
3720
|
/**
|
|
3596
3721
|
* The **`WebSocket.url`** read-only property returns the absolute URL of the WebSocket as resolved by the constructor.
|
|
3597
3722
|
*
|
|
3598
3723
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/url)
|
|
3599
3724
|
*/
|
|
3600
|
-
|
|
3725
|
+
url: string | null;
|
|
3601
3726
|
/**
|
|
3602
3727
|
* The **`WebSocket.protocol`** read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the `protocols` parameter when creating the WebSocket object, or the empty string if no connection is established.
|
|
3603
3728
|
*
|
|
3604
3729
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/protocol)
|
|
3605
3730
|
*/
|
|
3606
|
-
|
|
3731
|
+
protocol: string | null;
|
|
3607
3732
|
/**
|
|
3608
3733
|
* The **`WebSocket.extensions`** read-only property returns the extensions selected by the server.
|
|
3609
3734
|
*
|
|
3610
3735
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebSocket/extensions)
|
|
3611
3736
|
*/
|
|
3612
|
-
|
|
3737
|
+
extensions: string | null;
|
|
3613
3738
|
/**
|
|
3614
3739
|
* The **`WebSocket.binaryType`** property controls the type of binary data being received over the WebSocket connection.
|
|
3615
3740
|
*
|
|
@@ -3843,6 +3968,26 @@ export declare abstract class MessagePort extends EventTarget {
|
|
|
3843
3968
|
get onmessage(): any | null;
|
|
3844
3969
|
set onmessage(value: any | null);
|
|
3845
3970
|
}
|
|
3971
|
+
/**
|
|
3972
|
+
* The **`MessageChannel`** interface of the Channel Messaging API allows us to create a new message channel and send data through it via its two MessagePort properties.
|
|
3973
|
+
*
|
|
3974
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel)
|
|
3975
|
+
*/
|
|
3976
|
+
export declare class MessageChannel {
|
|
3977
|
+
constructor();
|
|
3978
|
+
/**
|
|
3979
|
+
* The **`port1`** read-only property of the the port attached to the context that originated the channel.
|
|
3980
|
+
*
|
|
3981
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port1)
|
|
3982
|
+
*/
|
|
3983
|
+
readonly port1: MessagePort;
|
|
3984
|
+
/**
|
|
3985
|
+
* The **`port2`** read-only property of the the port attached to the context at the other end of the channel, which the message is initially sent to.
|
|
3986
|
+
*
|
|
3987
|
+
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageChannel/port2)
|
|
3988
|
+
*/
|
|
3989
|
+
readonly port2: MessagePort;
|
|
3990
|
+
}
|
|
3846
3991
|
export interface MessagePortPostMessageOptions {
|
|
3847
3992
|
transfer?: any[];
|
|
3848
3993
|
}
|
|
@@ -13545,6 +13690,13 @@ export interface ForwardableEmailMessage extends EmailMessage {
|
|
|
13545
13690
|
* @returns A promise that resolves when the email message is replied.
|
|
13546
13691
|
*/
|
|
13547
13692
|
reply(message: EmailMessage): Promise<EmailSendResult>;
|
|
13693
|
+
/**
|
|
13694
|
+
* Reply to the sender of this email message with a message built from the given
|
|
13695
|
+
* fields. Threading headers (In-Reply-To/References) are set automatically.
|
|
13696
|
+
* @param builder The reply message contents.
|
|
13697
|
+
* @returns A promise that resolves when the email message is replied.
|
|
13698
|
+
*/
|
|
13699
|
+
reply(builder: EmailReplyMessageBuilder): Promise<EmailSendResult>;
|
|
13548
13700
|
}
|
|
13549
13701
|
/** A file attachment for an email message */
|
|
13550
13702
|
export type EmailAttachment =
|
|
@@ -13567,23 +13719,50 @@ export interface EmailAddress {
|
|
|
13567
13719
|
name: string;
|
|
13568
13720
|
email: string;
|
|
13569
13721
|
}
|
|
13722
|
+
/**
|
|
13723
|
+
* Recipient fields for `SendEmail.send()`. At least one of `to`, `cc`, or
|
|
13724
|
+
* `bcc` must be provided.
|
|
13725
|
+
*/
|
|
13726
|
+
export type EmailDestinations = {
|
|
13727
|
+
to?: string | EmailAddress | (string | EmailAddress)[];
|
|
13728
|
+
cc?: string | EmailAddress | (string | EmailAddress)[];
|
|
13729
|
+
bcc?: string | EmailAddress | (string | EmailAddress)[];
|
|
13730
|
+
} & (
|
|
13731
|
+
| {
|
|
13732
|
+
to: string | EmailAddress | (string | EmailAddress)[];
|
|
13733
|
+
}
|
|
13734
|
+
| {
|
|
13735
|
+
cc: string | EmailAddress | (string | EmailAddress)[];
|
|
13736
|
+
}
|
|
13737
|
+
| {
|
|
13738
|
+
bcc: string | EmailAddress | (string | EmailAddress)[];
|
|
13739
|
+
}
|
|
13740
|
+
);
|
|
13741
|
+
/**
|
|
13742
|
+
* Fields shared by all composed emails (no recipients). Used directly by
|
|
13743
|
+
* `ForwardableEmailMessage.reply()`, which always replies to the original
|
|
13744
|
+
* sender, and extended by `EmailMessageBuilder` for `SendEmail.send()`.
|
|
13745
|
+
*/
|
|
13746
|
+
export interface EmailReplyMessageBuilder {
|
|
13747
|
+
from: string | EmailAddress;
|
|
13748
|
+
subject: string;
|
|
13749
|
+
replyTo?: string | EmailAddress;
|
|
13750
|
+
headers?: Record<string, string>;
|
|
13751
|
+
text?: string;
|
|
13752
|
+
html?: string;
|
|
13753
|
+
attachments?: EmailAttachment[];
|
|
13754
|
+
}
|
|
13755
|
+
/**
|
|
13756
|
+
* Fields for composing an email without constructing raw MIME, for
|
|
13757
|
+
* `SendEmail.send()`. Requires at least one of `to`, `cc`, or `bcc`.
|
|
13758
|
+
*/
|
|
13759
|
+
export type EmailMessageBuilder = EmailReplyMessageBuilder & EmailDestinations;
|
|
13570
13760
|
/**
|
|
13571
13761
|
* A binding that allows a Worker to send email messages.
|
|
13572
13762
|
*/
|
|
13573
13763
|
export interface SendEmail {
|
|
13574
13764
|
send(message: EmailMessage): Promise<EmailSendResult>;
|
|
13575
|
-
send(builder:
|
|
13576
|
-
from: string | EmailAddress;
|
|
13577
|
-
to: string | EmailAddress | (string | EmailAddress)[];
|
|
13578
|
-
subject: string;
|
|
13579
|
-
replyTo?: string | EmailAddress;
|
|
13580
|
-
cc?: string | EmailAddress | (string | EmailAddress)[];
|
|
13581
|
-
bcc?: string | EmailAddress | (string | EmailAddress)[];
|
|
13582
|
-
headers?: Record<string, string>;
|
|
13583
|
-
text?: string;
|
|
13584
|
-
html?: string;
|
|
13585
|
-
attachments?: EmailAttachment[];
|
|
13586
|
-
}): Promise<EmailSendResult>;
|
|
13765
|
+
send(builder: EmailMessageBuilder): Promise<EmailSendResult>;
|
|
13587
13766
|
}
|
|
13588
13767
|
export declare abstract class EmailEvent extends ExtendableEvent {
|
|
13589
13768
|
readonly message: ForwardableEmailMessage;
|
|
@@ -14541,6 +14720,13 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14541
14720
|
| `${number} ${WorkflowDurationLabel}${"s" | ""}`
|
|
14542
14721
|
| number;
|
|
14543
14722
|
export type WorkflowDelayDuration = WorkflowSleepDuration;
|
|
14723
|
+
export type WorkflowDynamicDelayContext = {
|
|
14724
|
+
ctx: WorkflowStepContext<WorkflowDelayFunction>;
|
|
14725
|
+
error: Error;
|
|
14726
|
+
};
|
|
14727
|
+
export type WorkflowDelayFunction = (
|
|
14728
|
+
input: WorkflowDynamicDelayContext,
|
|
14729
|
+
) => WorkflowDelayDuration | Promise<WorkflowDelayDuration>;
|
|
14544
14730
|
export type WorkflowTimeoutDuration = WorkflowSleepDuration;
|
|
14545
14731
|
export type WorkflowRetentionDuration = WorkflowSleepDuration;
|
|
14546
14732
|
export type WorkflowBackoff = "constant" | "linear" | "exponential";
|
|
@@ -14548,7 +14734,7 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14548
14734
|
export type WorkflowStepConfig = {
|
|
14549
14735
|
retries?: {
|
|
14550
14736
|
limit: number;
|
|
14551
|
-
delay: WorkflowDelayDuration | number;
|
|
14737
|
+
delay: WorkflowDelayDuration | number | WorkflowDelayFunction;
|
|
14552
14738
|
backoff?: WorkflowBackoff;
|
|
14553
14739
|
};
|
|
14554
14740
|
timeout?: WorkflowTimeoutDuration | number;
|
|
@@ -14577,13 +14763,24 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14577
14763
|
type: string;
|
|
14578
14764
|
sensitive?: WorkflowStepSensitivity;
|
|
14579
14765
|
};
|
|
14580
|
-
export type WorkflowStepContext = {
|
|
14766
|
+
export type WorkflowStepContext<Delay = WorkflowDelayDuration | number> = {
|
|
14581
14767
|
step: {
|
|
14582
14768
|
name: string;
|
|
14583
14769
|
count: number;
|
|
14584
14770
|
};
|
|
14585
14771
|
attempt: number;
|
|
14586
|
-
config:
|
|
14772
|
+
config: {
|
|
14773
|
+
retries?: {
|
|
14774
|
+
limit: number;
|
|
14775
|
+
backoff?: WorkflowBackoff;
|
|
14776
|
+
} & (Delay extends WorkflowDelayFunction
|
|
14777
|
+
? {}
|
|
14778
|
+
: {
|
|
14779
|
+
delay: WorkflowDelayDuration | number;
|
|
14780
|
+
});
|
|
14781
|
+
timeout?: WorkflowTimeoutDuration | number;
|
|
14782
|
+
sensitive?: WorkflowStepSensitivity;
|
|
14783
|
+
};
|
|
14587
14784
|
};
|
|
14588
14785
|
export type WorkflowRollbackContext<T = unknown> = {
|
|
14589
14786
|
ctx: WorkflowStepContext;
|
|
@@ -14605,10 +14802,18 @@ export declare namespace CloudflareWorkersModule {
|
|
|
14605
14802
|
callback: (ctx: WorkflowStepContext) => Promise<T>,
|
|
14606
14803
|
rollbackOptions?: WorkflowStepRollbackOptions<T>,
|
|
14607
14804
|
): Promise<T>;
|
|
14608
|
-
do<T extends Rpc.Serializable<T
|
|
14805
|
+
do<T extends Rpc.Serializable<T>, const C extends WorkflowStepConfig>(
|
|
14609
14806
|
name: string,
|
|
14610
|
-
config:
|
|
14611
|
-
callback: (
|
|
14807
|
+
config: C,
|
|
14808
|
+
callback: (
|
|
14809
|
+
ctx: WorkflowStepContext<
|
|
14810
|
+
C["retries"] extends {
|
|
14811
|
+
delay: infer D;
|
|
14812
|
+
}
|
|
14813
|
+
? D
|
|
14814
|
+
: WorkflowDelayDuration | number
|
|
14815
|
+
>,
|
|
14816
|
+
) => Promise<T>,
|
|
14612
14817
|
rollbackOptions?: WorkflowStepRollbackOptions<T>,
|
|
14613
14818
|
): Promise<T>;
|
|
14614
14819
|
sleep: (name: string, duration: WorkflowSleepDuration) => Promise<void>;
|
|
@@ -15576,6 +15781,7 @@ export declare namespace TailStream {
|
|
|
15576
15781
|
readonly dispatchNamespace?: string;
|
|
15577
15782
|
readonly entrypoint?: string;
|
|
15578
15783
|
readonly executionModel: string;
|
|
15784
|
+
readonly durableObjectId?: string;
|
|
15579
15785
|
readonly scriptName?: string;
|
|
15580
15786
|
readonly scriptTags?: string[];
|
|
15581
15787
|
readonly scriptVersion?: ScriptVersion;
|
|
@@ -16203,6 +16409,13 @@ export interface WorkflowError {
|
|
|
16203
16409
|
code?: number;
|
|
16204
16410
|
message: string;
|
|
16205
16411
|
}
|
|
16412
|
+
export interface WorkflowInstanceTerminateOptions {
|
|
16413
|
+
/**
|
|
16414
|
+
* If true, run registered rollback handlers before terminating the instance.
|
|
16415
|
+
* Only steps that registered rollback handlers are rolled back.
|
|
16416
|
+
*/
|
|
16417
|
+
rollback?: boolean;
|
|
16418
|
+
}
|
|
16206
16419
|
export interface WorkflowInstanceRestartOptions {
|
|
16207
16420
|
/**
|
|
16208
16421
|
* Restart from a specific step. If omitted, the instance restarts from the beginning.
|
|
@@ -16236,8 +16449,9 @@ export declare abstract class WorkflowInstance {
|
|
|
16236
16449
|
public resume(): Promise<void>;
|
|
16237
16450
|
/**
|
|
16238
16451
|
* Terminate the instance. If it is errored, terminated or complete, an error will be thrown.
|
|
16452
|
+
* @param options Options for termination, including whether registered rollback handlers should run.
|
|
16239
16453
|
*/
|
|
16240
|
-
public terminate(): Promise<void>;
|
|
16454
|
+
public terminate(options?: WorkflowInstanceTerminateOptions): Promise<void>;
|
|
16241
16455
|
/**
|
|
16242
16456
|
* Restart the instance. Optionally restart from a specific step, preserving
|
|
16243
16457
|
* cached results for all steps before it.
|