@cloudflare/workers-types 5.20260823.1 → 5.20260826.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/experimental/index.d.ts +40 -3
- package/experimental/index.ts +40 -3
- package/index.d.ts +40 -3
- package/index.ts +40 -3
- package/package.json +1 -1
package/experimental/index.d.ts
CHANGED
|
@@ -1596,10 +1596,16 @@ interface CryptoKeyArbitraryKeyAlgorithm {
|
|
|
1596
1596
|
declare class DigestStream extends WritableStream<
|
|
1597
1597
|
ArrayBuffer | ArrayBufferView
|
|
1598
1598
|
> {
|
|
1599
|
-
constructor(
|
|
1599
|
+
constructor(
|
|
1600
|
+
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1601
|
+
options?: DigestStreamOptions,
|
|
1602
|
+
);
|
|
1600
1603
|
readonly digest: Promise<ArrayBuffer>;
|
|
1601
1604
|
get bytesWritten(): number | bigint;
|
|
1602
1605
|
}
|
|
1606
|
+
interface DigestStreamOptions {
|
|
1607
|
+
toWellFormed?: boolean;
|
|
1608
|
+
}
|
|
1603
1609
|
/**
|
|
1604
1610
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1605
1611
|
*
|
|
@@ -1691,6 +1697,9 @@ declare class ErrorEvent extends Event {
|
|
|
1691
1697
|
get error(): any;
|
|
1692
1698
|
}
|
|
1693
1699
|
interface ErrorEventErrorEventInit {
|
|
1700
|
+
bubbles?: boolean;
|
|
1701
|
+
cancelable?: boolean;
|
|
1702
|
+
composed?: boolean;
|
|
1694
1703
|
message?: string;
|
|
1695
1704
|
filename?: string;
|
|
1696
1705
|
lineno?: number;
|
|
@@ -1703,7 +1712,7 @@ interface ErrorEventErrorEventInit {
|
|
|
1703
1712
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1704
1713
|
*/
|
|
1705
1714
|
declare class MessageEvent extends Event {
|
|
1706
|
-
constructor(type: string, initializer
|
|
1715
|
+
constructor(type: string, initializer?: MessageEventInit);
|
|
1707
1716
|
/**
|
|
1708
1717
|
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1709
1718
|
*
|
|
@@ -1736,7 +1745,14 @@ declare class MessageEvent extends Event {
|
|
|
1736
1745
|
readonly ports: MessagePort[];
|
|
1737
1746
|
}
|
|
1738
1747
|
interface MessageEventInit {
|
|
1739
|
-
|
|
1748
|
+
bubbles?: boolean;
|
|
1749
|
+
cancelable?: boolean;
|
|
1750
|
+
composed?: boolean;
|
|
1751
|
+
data?: any;
|
|
1752
|
+
origin?: string;
|
|
1753
|
+
lastEventId?: string;
|
|
1754
|
+
source?: MessagePort;
|
|
1755
|
+
ports?: MessagePort[];
|
|
1740
1756
|
}
|
|
1741
1757
|
/**
|
|
1742
1758
|
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
@@ -3805,6 +3821,9 @@ declare class CloseEvent extends Event {
|
|
|
3805
3821
|
readonly wasClean: boolean;
|
|
3806
3822
|
}
|
|
3807
3823
|
interface CloseEventInit {
|
|
3824
|
+
bubbles?: boolean;
|
|
3825
|
+
cancelable?: boolean;
|
|
3826
|
+
composed?: boolean;
|
|
3808
3827
|
code?: number;
|
|
3809
3828
|
reason?: string;
|
|
3810
3829
|
wasClean?: boolean;
|
|
@@ -12773,11 +12792,25 @@ type BrowserRunJsonOptions = BrowserRunCommonOptions &
|
|
|
12773
12792
|
);
|
|
12774
12793
|
type BrowserRunContentOptions = BrowserRunCommonOptions;
|
|
12775
12794
|
type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
|
|
12795
|
+
type BrowserRunRedirectHop = {
|
|
12796
|
+
/** URL that returned the redirect. */
|
|
12797
|
+
url: string;
|
|
12798
|
+
/** HTTP status of the redirect. */
|
|
12799
|
+
status: number;
|
|
12800
|
+
/** Redirect response headers, including `location`. */
|
|
12801
|
+
headers: Record<string, string>;
|
|
12802
|
+
};
|
|
12776
12803
|
type BrowserRunResponseMeta = {
|
|
12777
12804
|
/** HTTP status code of the rendered page */
|
|
12778
12805
|
status: number;
|
|
12779
12806
|
/** Page title */
|
|
12780
12807
|
title: string;
|
|
12808
|
+
/** Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted. */
|
|
12809
|
+
headers?: Record<string, string>;
|
|
12810
|
+
/** URL that served the response, after any redirects the browser followed. */
|
|
12811
|
+
finalUrl?: string;
|
|
12812
|
+
/** HTTP redirects followed to reach `finalUrl`, oldest first. Omitted for direct navigation and for client-side redirects such as meta refresh. An empty array means redirects occurred but their intermediate responses could not be read. */
|
|
12813
|
+
redirectChain?: BrowserRunRedirectHop[];
|
|
12781
12814
|
};
|
|
12782
12815
|
/**
|
|
12783
12816
|
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
@@ -12843,6 +12876,7 @@ type BrowserRunLinksSuccessResponse = {
|
|
|
12843
12876
|
success: true;
|
|
12844
12877
|
/** Extracted links */
|
|
12845
12878
|
result: string[];
|
|
12879
|
+
meta: BrowserRunResponseMeta;
|
|
12846
12880
|
};
|
|
12847
12881
|
/** Success response for `scrape` action. */
|
|
12848
12882
|
type BrowserRunScrapeSuccessResponse = {
|
|
@@ -12873,6 +12907,7 @@ type BrowserRunScrapeSuccessResponse = {
|
|
|
12873
12907
|
}>;
|
|
12874
12908
|
}>;
|
|
12875
12909
|
}>;
|
|
12910
|
+
meta: BrowserRunResponseMeta;
|
|
12876
12911
|
};
|
|
12877
12912
|
/** Success response for `snapshot` action. Each field is present only when the
|
|
12878
12913
|
* corresponding entry was requested in `formats`.
|
|
@@ -12907,12 +12942,14 @@ type BrowserRunJsonSuccessResponse = {
|
|
|
12907
12942
|
success: true;
|
|
12908
12943
|
/** JSON data extracted from the page using an AI model */
|
|
12909
12944
|
result: Record<string, unknown>;
|
|
12945
|
+
meta: BrowserRunResponseMeta;
|
|
12910
12946
|
};
|
|
12911
12947
|
/** Success response for `markdown` action. */
|
|
12912
12948
|
type BrowserRunMarkdownSuccessResponse = {
|
|
12913
12949
|
success: true;
|
|
12914
12950
|
/** Extracted markdown content */
|
|
12915
12951
|
result: string;
|
|
12952
|
+
meta: BrowserRunResponseMeta;
|
|
12916
12953
|
};
|
|
12917
12954
|
/** Error response for BrowserRun actions. */
|
|
12918
12955
|
type BrowserRunErrorResponse = {
|
package/experimental/index.ts
CHANGED
|
@@ -1600,10 +1600,16 @@ export interface CryptoKeyArbitraryKeyAlgorithm {
|
|
|
1600
1600
|
export declare class DigestStream extends WritableStream<
|
|
1601
1601
|
ArrayBuffer | ArrayBufferView
|
|
1602
1602
|
> {
|
|
1603
|
-
constructor(
|
|
1603
|
+
constructor(
|
|
1604
|
+
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1605
|
+
options?: DigestStreamOptions,
|
|
1606
|
+
);
|
|
1604
1607
|
readonly digest: Promise<ArrayBuffer>;
|
|
1605
1608
|
get bytesWritten(): number | bigint;
|
|
1606
1609
|
}
|
|
1610
|
+
export interface DigestStreamOptions {
|
|
1611
|
+
toWellFormed?: boolean;
|
|
1612
|
+
}
|
|
1607
1613
|
/**
|
|
1608
1614
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1609
1615
|
*
|
|
@@ -1695,6 +1701,9 @@ export declare class ErrorEvent extends Event {
|
|
|
1695
1701
|
get error(): any;
|
|
1696
1702
|
}
|
|
1697
1703
|
export interface ErrorEventErrorEventInit {
|
|
1704
|
+
bubbles?: boolean;
|
|
1705
|
+
cancelable?: boolean;
|
|
1706
|
+
composed?: boolean;
|
|
1698
1707
|
message?: string;
|
|
1699
1708
|
filename?: string;
|
|
1700
1709
|
lineno?: number;
|
|
@@ -1707,7 +1716,7 @@ export interface ErrorEventErrorEventInit {
|
|
|
1707
1716
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1708
1717
|
*/
|
|
1709
1718
|
export declare class MessageEvent extends Event {
|
|
1710
|
-
constructor(type: string, initializer
|
|
1719
|
+
constructor(type: string, initializer?: MessageEventInit);
|
|
1711
1720
|
/**
|
|
1712
1721
|
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1713
1722
|
*
|
|
@@ -1740,7 +1749,14 @@ export declare class MessageEvent extends Event {
|
|
|
1740
1749
|
readonly ports: MessagePort[];
|
|
1741
1750
|
}
|
|
1742
1751
|
export interface MessageEventInit {
|
|
1743
|
-
|
|
1752
|
+
bubbles?: boolean;
|
|
1753
|
+
cancelable?: boolean;
|
|
1754
|
+
composed?: boolean;
|
|
1755
|
+
data?: any;
|
|
1756
|
+
origin?: string;
|
|
1757
|
+
lastEventId?: string;
|
|
1758
|
+
source?: MessagePort;
|
|
1759
|
+
ports?: MessagePort[];
|
|
1744
1760
|
}
|
|
1745
1761
|
/**
|
|
1746
1762
|
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
@@ -3814,6 +3830,9 @@ export declare class CloseEvent extends Event {
|
|
|
3814
3830
|
readonly wasClean: boolean;
|
|
3815
3831
|
}
|
|
3816
3832
|
export interface CloseEventInit {
|
|
3833
|
+
bubbles?: boolean;
|
|
3834
|
+
cancelable?: boolean;
|
|
3835
|
+
composed?: boolean;
|
|
3817
3836
|
code?: number;
|
|
3818
3837
|
reason?: string;
|
|
3819
3838
|
wasClean?: boolean;
|
|
@@ -12787,11 +12806,25 @@ export type BrowserRunJsonOptions = BrowserRunCommonOptions &
|
|
|
12787
12806
|
);
|
|
12788
12807
|
export type BrowserRunContentOptions = BrowserRunCommonOptions;
|
|
12789
12808
|
export type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
|
|
12809
|
+
export type BrowserRunRedirectHop = {
|
|
12810
|
+
/** URL that returned the redirect. */
|
|
12811
|
+
url: string;
|
|
12812
|
+
/** HTTP status of the redirect. */
|
|
12813
|
+
status: number;
|
|
12814
|
+
/** Redirect response headers, including `location`. */
|
|
12815
|
+
headers: Record<string, string>;
|
|
12816
|
+
};
|
|
12790
12817
|
export type BrowserRunResponseMeta = {
|
|
12791
12818
|
/** HTTP status code of the rendered page */
|
|
12792
12819
|
status: number;
|
|
12793
12820
|
/** Page title */
|
|
12794
12821
|
title: string;
|
|
12822
|
+
/** Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted. */
|
|
12823
|
+
headers?: Record<string, string>;
|
|
12824
|
+
/** URL that served the response, after any redirects the browser followed. */
|
|
12825
|
+
finalUrl?: string;
|
|
12826
|
+
/** HTTP redirects followed to reach `finalUrl`, oldest first. Omitted for direct navigation and for client-side redirects such as meta refresh. An empty array means redirects occurred but their intermediate responses could not be read. */
|
|
12827
|
+
redirectChain?: BrowserRunRedirectHop[];
|
|
12795
12828
|
};
|
|
12796
12829
|
/**
|
|
12797
12830
|
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
@@ -12857,6 +12890,7 @@ export type BrowserRunLinksSuccessResponse = {
|
|
|
12857
12890
|
success: true;
|
|
12858
12891
|
/** Extracted links */
|
|
12859
12892
|
result: string[];
|
|
12893
|
+
meta: BrowserRunResponseMeta;
|
|
12860
12894
|
};
|
|
12861
12895
|
/** Success response for `scrape` action. */
|
|
12862
12896
|
export type BrowserRunScrapeSuccessResponse = {
|
|
@@ -12887,6 +12921,7 @@ export type BrowserRunScrapeSuccessResponse = {
|
|
|
12887
12921
|
}>;
|
|
12888
12922
|
}>;
|
|
12889
12923
|
}>;
|
|
12924
|
+
meta: BrowserRunResponseMeta;
|
|
12890
12925
|
};
|
|
12891
12926
|
/** Success response for `snapshot` action. Each field is present only when the
|
|
12892
12927
|
* corresponding entry was requested in `formats`.
|
|
@@ -12921,12 +12956,14 @@ export type BrowserRunJsonSuccessResponse = {
|
|
|
12921
12956
|
success: true;
|
|
12922
12957
|
/** JSON data extracted from the page using an AI model */
|
|
12923
12958
|
result: Record<string, unknown>;
|
|
12959
|
+
meta: BrowserRunResponseMeta;
|
|
12924
12960
|
};
|
|
12925
12961
|
/** Success response for `markdown` action. */
|
|
12926
12962
|
export type BrowserRunMarkdownSuccessResponse = {
|
|
12927
12963
|
success: true;
|
|
12928
12964
|
/** Extracted markdown content */
|
|
12929
12965
|
result: string;
|
|
12966
|
+
meta: BrowserRunResponseMeta;
|
|
12930
12967
|
};
|
|
12931
12968
|
/** Error response for BrowserRun actions. */
|
|
12932
12969
|
export type BrowserRunErrorResponse = {
|
package/index.d.ts
CHANGED
|
@@ -1571,10 +1571,16 @@ interface CryptoKeyArbitraryKeyAlgorithm {
|
|
|
1571
1571
|
declare class DigestStream extends WritableStream<
|
|
1572
1572
|
ArrayBuffer | ArrayBufferView
|
|
1573
1573
|
> {
|
|
1574
|
-
constructor(
|
|
1574
|
+
constructor(
|
|
1575
|
+
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1576
|
+
options?: DigestStreamOptions,
|
|
1577
|
+
);
|
|
1575
1578
|
readonly digest: Promise<ArrayBuffer>;
|
|
1576
1579
|
get bytesWritten(): number | bigint;
|
|
1577
1580
|
}
|
|
1581
|
+
interface DigestStreamOptions {
|
|
1582
|
+
toWellFormed?: boolean;
|
|
1583
|
+
}
|
|
1578
1584
|
/**
|
|
1579
1585
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1580
1586
|
*
|
|
@@ -1666,6 +1672,9 @@ declare class ErrorEvent extends Event {
|
|
|
1666
1672
|
get error(): any;
|
|
1667
1673
|
}
|
|
1668
1674
|
interface ErrorEventErrorEventInit {
|
|
1675
|
+
bubbles?: boolean;
|
|
1676
|
+
cancelable?: boolean;
|
|
1677
|
+
composed?: boolean;
|
|
1669
1678
|
message?: string;
|
|
1670
1679
|
filename?: string;
|
|
1671
1680
|
lineno?: number;
|
|
@@ -1678,7 +1687,7 @@ interface ErrorEventErrorEventInit {
|
|
|
1678
1687
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1679
1688
|
*/
|
|
1680
1689
|
declare class MessageEvent extends Event {
|
|
1681
|
-
constructor(type: string, initializer
|
|
1690
|
+
constructor(type: string, initializer?: MessageEventInit);
|
|
1682
1691
|
/**
|
|
1683
1692
|
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1684
1693
|
*
|
|
@@ -1711,7 +1720,14 @@ declare class MessageEvent extends Event {
|
|
|
1711
1720
|
readonly ports: MessagePort[];
|
|
1712
1721
|
}
|
|
1713
1722
|
interface MessageEventInit {
|
|
1714
|
-
|
|
1723
|
+
bubbles?: boolean;
|
|
1724
|
+
cancelable?: boolean;
|
|
1725
|
+
composed?: boolean;
|
|
1726
|
+
data?: any;
|
|
1727
|
+
origin?: string;
|
|
1728
|
+
lastEventId?: string;
|
|
1729
|
+
source?: MessagePort;
|
|
1730
|
+
ports?: MessagePort[];
|
|
1715
1731
|
}
|
|
1716
1732
|
/**
|
|
1717
1733
|
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
@@ -3728,6 +3744,9 @@ declare class CloseEvent extends Event {
|
|
|
3728
3744
|
readonly wasClean: boolean;
|
|
3729
3745
|
}
|
|
3730
3746
|
interface CloseEventInit {
|
|
3747
|
+
bubbles?: boolean;
|
|
3748
|
+
cancelable?: boolean;
|
|
3749
|
+
composed?: boolean;
|
|
3731
3750
|
code?: number;
|
|
3732
3751
|
reason?: string;
|
|
3733
3752
|
wasClean?: boolean;
|
|
@@ -12498,11 +12517,25 @@ type BrowserRunJsonOptions = BrowserRunCommonOptions &
|
|
|
12498
12517
|
);
|
|
12499
12518
|
type BrowserRunContentOptions = BrowserRunCommonOptions;
|
|
12500
12519
|
type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
|
|
12520
|
+
type BrowserRunRedirectHop = {
|
|
12521
|
+
/** URL that returned the redirect. */
|
|
12522
|
+
url: string;
|
|
12523
|
+
/** HTTP status of the redirect. */
|
|
12524
|
+
status: number;
|
|
12525
|
+
/** Redirect response headers, including `location`. */
|
|
12526
|
+
headers: Record<string, string>;
|
|
12527
|
+
};
|
|
12501
12528
|
type BrowserRunResponseMeta = {
|
|
12502
12529
|
/** HTTP status code of the rendered page */
|
|
12503
12530
|
status: number;
|
|
12504
12531
|
/** Page title */
|
|
12505
12532
|
title: string;
|
|
12533
|
+
/** Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted. */
|
|
12534
|
+
headers?: Record<string, string>;
|
|
12535
|
+
/** URL that served the response, after any redirects the browser followed. */
|
|
12536
|
+
finalUrl?: string;
|
|
12537
|
+
/** HTTP redirects followed to reach `finalUrl`, oldest first. Omitted for direct navigation and for client-side redirects such as meta refresh. An empty array means redirects occurred but their intermediate responses could not be read. */
|
|
12538
|
+
redirectChain?: BrowserRunRedirectHop[];
|
|
12506
12539
|
};
|
|
12507
12540
|
/**
|
|
12508
12541
|
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
@@ -12568,6 +12601,7 @@ type BrowserRunLinksSuccessResponse = {
|
|
|
12568
12601
|
success: true;
|
|
12569
12602
|
/** Extracted links */
|
|
12570
12603
|
result: string[];
|
|
12604
|
+
meta: BrowserRunResponseMeta;
|
|
12571
12605
|
};
|
|
12572
12606
|
/** Success response for `scrape` action. */
|
|
12573
12607
|
type BrowserRunScrapeSuccessResponse = {
|
|
@@ -12598,6 +12632,7 @@ type BrowserRunScrapeSuccessResponse = {
|
|
|
12598
12632
|
}>;
|
|
12599
12633
|
}>;
|
|
12600
12634
|
}>;
|
|
12635
|
+
meta: BrowserRunResponseMeta;
|
|
12601
12636
|
};
|
|
12602
12637
|
/** Success response for `snapshot` action. Each field is present only when the
|
|
12603
12638
|
* corresponding entry was requested in `formats`.
|
|
@@ -12632,12 +12667,14 @@ type BrowserRunJsonSuccessResponse = {
|
|
|
12632
12667
|
success: true;
|
|
12633
12668
|
/** JSON data extracted from the page using an AI model */
|
|
12634
12669
|
result: Record<string, unknown>;
|
|
12670
|
+
meta: BrowserRunResponseMeta;
|
|
12635
12671
|
};
|
|
12636
12672
|
/** Success response for `markdown` action. */
|
|
12637
12673
|
type BrowserRunMarkdownSuccessResponse = {
|
|
12638
12674
|
success: true;
|
|
12639
12675
|
/** Extracted markdown content */
|
|
12640
12676
|
result: string;
|
|
12677
|
+
meta: BrowserRunResponseMeta;
|
|
12641
12678
|
};
|
|
12642
12679
|
/** Error response for BrowserRun actions. */
|
|
12643
12680
|
type BrowserRunErrorResponse = {
|
package/index.ts
CHANGED
|
@@ -1575,10 +1575,16 @@ export interface CryptoKeyArbitraryKeyAlgorithm {
|
|
|
1575
1575
|
export declare class DigestStream extends WritableStream<
|
|
1576
1576
|
ArrayBuffer | ArrayBufferView
|
|
1577
1577
|
> {
|
|
1578
|
-
constructor(
|
|
1578
|
+
constructor(
|
|
1579
|
+
algorithm: string | SubtleCryptoHashAlgorithm,
|
|
1580
|
+
options?: DigestStreamOptions,
|
|
1581
|
+
);
|
|
1579
1582
|
readonly digest: Promise<ArrayBuffer>;
|
|
1580
1583
|
get bytesWritten(): number | bigint;
|
|
1581
1584
|
}
|
|
1585
|
+
export interface DigestStreamOptions {
|
|
1586
|
+
toWellFormed?: boolean;
|
|
1587
|
+
}
|
|
1582
1588
|
/**
|
|
1583
1589
|
* The **`TextDecoder`** interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.
|
|
1584
1590
|
*
|
|
@@ -1670,6 +1676,9 @@ export declare class ErrorEvent extends Event {
|
|
|
1670
1676
|
get error(): any;
|
|
1671
1677
|
}
|
|
1672
1678
|
export interface ErrorEventErrorEventInit {
|
|
1679
|
+
bubbles?: boolean;
|
|
1680
|
+
cancelable?: boolean;
|
|
1681
|
+
composed?: boolean;
|
|
1673
1682
|
message?: string;
|
|
1674
1683
|
filename?: string;
|
|
1675
1684
|
lineno?: number;
|
|
@@ -1682,7 +1691,7 @@ export interface ErrorEventErrorEventInit {
|
|
|
1682
1691
|
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MessageEvent)
|
|
1683
1692
|
*/
|
|
1684
1693
|
export declare class MessageEvent extends Event {
|
|
1685
|
-
constructor(type: string, initializer
|
|
1694
|
+
constructor(type: string, initializer?: MessageEventInit);
|
|
1686
1695
|
/**
|
|
1687
1696
|
* The **`data`** read-only property of the MessageEvent interface represents the data sent by the message emitter.
|
|
1688
1697
|
*
|
|
@@ -1715,7 +1724,14 @@ export declare class MessageEvent extends Event {
|
|
|
1715
1724
|
readonly ports: MessagePort[];
|
|
1716
1725
|
}
|
|
1717
1726
|
export interface MessageEventInit {
|
|
1718
|
-
|
|
1727
|
+
bubbles?: boolean;
|
|
1728
|
+
cancelable?: boolean;
|
|
1729
|
+
composed?: boolean;
|
|
1730
|
+
data?: any;
|
|
1731
|
+
origin?: string;
|
|
1732
|
+
lastEventId?: string;
|
|
1733
|
+
source?: MessagePort;
|
|
1734
|
+
ports?: MessagePort[];
|
|
1719
1735
|
}
|
|
1720
1736
|
/**
|
|
1721
1737
|
* The **`PromiseRejectionEvent`** interface represents events which are sent to the global script context when JavaScript Promises are rejected. These events are particularly useful for telemetry and debugging purposes.
|
|
@@ -3737,6 +3753,9 @@ export declare class CloseEvent extends Event {
|
|
|
3737
3753
|
readonly wasClean: boolean;
|
|
3738
3754
|
}
|
|
3739
3755
|
export interface CloseEventInit {
|
|
3756
|
+
bubbles?: boolean;
|
|
3757
|
+
cancelable?: boolean;
|
|
3758
|
+
composed?: boolean;
|
|
3740
3759
|
code?: number;
|
|
3741
3760
|
reason?: string;
|
|
3742
3761
|
wasClean?: boolean;
|
|
@@ -12512,11 +12531,25 @@ export type BrowserRunJsonOptions = BrowserRunCommonOptions &
|
|
|
12512
12531
|
);
|
|
12513
12532
|
export type BrowserRunContentOptions = BrowserRunCommonOptions;
|
|
12514
12533
|
export type BrowserRunMarkdownOptions = BrowserRunCommonOptions;
|
|
12534
|
+
export type BrowserRunRedirectHop = {
|
|
12535
|
+
/** URL that returned the redirect. */
|
|
12536
|
+
url: string;
|
|
12537
|
+
/** HTTP status of the redirect. */
|
|
12538
|
+
status: number;
|
|
12539
|
+
/** Redirect response headers, including `location`. */
|
|
12540
|
+
headers: Record<string, string>;
|
|
12541
|
+
};
|
|
12515
12542
|
export type BrowserRunResponseMeta = {
|
|
12516
12543
|
/** HTTP status code of the rendered page */
|
|
12517
12544
|
status: number;
|
|
12518
12545
|
/** Page title */
|
|
12519
12546
|
title: string;
|
|
12547
|
+
/** Origin response headers, lowercased. Repeated headers are joined with a newline. Credential and transport-only headers that do not survive rendering are omitted. */
|
|
12548
|
+
headers?: Record<string, string>;
|
|
12549
|
+
/** URL that served the response, after any redirects the browser followed. */
|
|
12550
|
+
finalUrl?: string;
|
|
12551
|
+
/** HTTP redirects followed to reach `finalUrl`, oldest first. Omitted for direct navigation and for client-side redirects such as meta refresh. An empty array means redirects occurred but their intermediate responses could not be read. */
|
|
12552
|
+
redirectChain?: BrowserRunRedirectHop[];
|
|
12520
12553
|
};
|
|
12521
12554
|
/**
|
|
12522
12555
|
* A node in the page's accessibility tree, as exposed to assistive technology.
|
|
@@ -12582,6 +12615,7 @@ export type BrowserRunLinksSuccessResponse = {
|
|
|
12582
12615
|
success: true;
|
|
12583
12616
|
/** Extracted links */
|
|
12584
12617
|
result: string[];
|
|
12618
|
+
meta: BrowserRunResponseMeta;
|
|
12585
12619
|
};
|
|
12586
12620
|
/** Success response for `scrape` action. */
|
|
12587
12621
|
export type BrowserRunScrapeSuccessResponse = {
|
|
@@ -12612,6 +12646,7 @@ export type BrowserRunScrapeSuccessResponse = {
|
|
|
12612
12646
|
}>;
|
|
12613
12647
|
}>;
|
|
12614
12648
|
}>;
|
|
12649
|
+
meta: BrowserRunResponseMeta;
|
|
12615
12650
|
};
|
|
12616
12651
|
/** Success response for `snapshot` action. Each field is present only when the
|
|
12617
12652
|
* corresponding entry was requested in `formats`.
|
|
@@ -12646,12 +12681,14 @@ export type BrowserRunJsonSuccessResponse = {
|
|
|
12646
12681
|
success: true;
|
|
12647
12682
|
/** JSON data extracted from the page using an AI model */
|
|
12648
12683
|
result: Record<string, unknown>;
|
|
12684
|
+
meta: BrowserRunResponseMeta;
|
|
12649
12685
|
};
|
|
12650
12686
|
/** Success response for `markdown` action. */
|
|
12651
12687
|
export type BrowserRunMarkdownSuccessResponse = {
|
|
12652
12688
|
success: true;
|
|
12653
12689
|
/** Extracted markdown content */
|
|
12654
12690
|
result: string;
|
|
12691
|
+
meta: BrowserRunResponseMeta;
|
|
12655
12692
|
};
|
|
12656
12693
|
/** Error response for BrowserRun actions. */
|
|
12657
12694
|
export type BrowserRunErrorResponse = {
|
package/package.json
CHANGED