Skip to content

Commit 09f29fa

Browse files
author
Jakub Kulhan
committed
autoupdated protocol.json & generated files
1 parent 4e4b6b2 commit 09f29fa

10 files changed

+375
-3
lines changed

gen-src/ChromeDevtoolsProtocol/Domain/NetworkDomain.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use ChromeDevtoolsProtocol\Model\Network\DataReceivedEvent;
1212
use ChromeDevtoolsProtocol\Model\Network\DeleteCookiesRequest;
1313
use ChromeDevtoolsProtocol\Model\Network\EmulateNetworkConditionsRequest;
14+
use ChromeDevtoolsProtocol\Model\Network\EnableReportingApiRequest;
1415
use ChromeDevtoolsProtocol\Model\Network\EnableRequest;
1516
use ChromeDevtoolsProtocol\Model\Network\EventSourceMessageReceivedEvent;
1617
use ChromeDevtoolsProtocol\Model\Network\GetAllCookiesResponse;
@@ -31,6 +32,7 @@
3132
use ChromeDevtoolsProtocol\Model\Network\LoadingFailedEvent;
3233
use ChromeDevtoolsProtocol\Model\Network\LoadingFinishedEvent;
3334
use ChromeDevtoolsProtocol\Model\Network\ReplayXHRRequest;
35+
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportAddedEvent;
3436
use ChromeDevtoolsProtocol\Model\Network\RequestInterceptedEvent;
3537
use ChromeDevtoolsProtocol\Model\Network\RequestServedFromCacheEvent;
3638
use ChromeDevtoolsProtocol\Model\Network\RequestWillBeSentEvent;
@@ -159,6 +161,12 @@ public function enable(ContextInterface $ctx, EnableRequest $request): void
159161
}
160162

161163

164+
public function enableReportingApi(ContextInterface $ctx, EnableReportingApiRequest $request): void
165+
{
166+
$this->internalClient->executeCommand($ctx, 'Network.enableReportingApi', $request);
167+
}
168+
169+
162170
public function getAllCookies(ContextInterface $ctx): GetAllCookiesResponse
163171
{
164172
$request = new \stdClass();
@@ -365,6 +373,20 @@ public function awaitLoadingFinished(ContextInterface $ctx): LoadingFinishedEven
365373
}
366374

367375

376+
public function addReportingApiReportAddedListener(callable $listener): SubscriptionInterface
377+
{
378+
return $this->internalClient->addListener('Network.reportingApiReportAdded', function ($event) use ($listener) {
379+
return $listener(ReportingApiReportAddedEvent::fromJson($event));
380+
});
381+
}
382+
383+
384+
public function awaitReportingApiReportAdded(ContextInterface $ctx): ReportingApiReportAddedEvent
385+
{
386+
return ReportingApiReportAddedEvent::fromJson($this->internalClient->awaitEvent($ctx, 'Network.reportingApiReportAdded'));
387+
}
388+
389+
368390
public function addRequestInterceptedListener(callable $listener): SubscriptionInterface
369391
{
370392
return $this->internalClient->addListener('Network.requestIntercepted', function ($event) use ($listener) {

gen-src/ChromeDevtoolsProtocol/Domain/NetworkDomainInterface.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use ChromeDevtoolsProtocol\Model\Network\DataReceivedEvent;
1111
use ChromeDevtoolsProtocol\Model\Network\DeleteCookiesRequest;
1212
use ChromeDevtoolsProtocol\Model\Network\EmulateNetworkConditionsRequest;
13+
use ChromeDevtoolsProtocol\Model\Network\EnableReportingApiRequest;
1314
use ChromeDevtoolsProtocol\Model\Network\EnableRequest;
1415
use ChromeDevtoolsProtocol\Model\Network\EventSourceMessageReceivedEvent;
1516
use ChromeDevtoolsProtocol\Model\Network\GetAllCookiesResponse;
@@ -30,6 +31,7 @@
3031
use ChromeDevtoolsProtocol\Model\Network\LoadingFailedEvent;
3132
use ChromeDevtoolsProtocol\Model\Network\LoadingFinishedEvent;
3233
use ChromeDevtoolsProtocol\Model\Network\ReplayXHRRequest;
34+
use ChromeDevtoolsProtocol\Model\Network\ReportingApiReportAddedEvent;
3335
use ChromeDevtoolsProtocol\Model\Network\RequestInterceptedEvent;
3436
use ChromeDevtoolsProtocol\Model\Network\RequestServedFromCacheEvent;
3537
use ChromeDevtoolsProtocol\Model\Network\RequestWillBeSentEvent;
@@ -193,6 +195,17 @@ public function emulateNetworkConditions(ContextInterface $ctx, EmulateNetworkCo
193195
public function enable(ContextInterface $ctx, EnableRequest $request): void;
194196

195197

198+
/**
199+
* Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports.
200+
*
201+
* @param ContextInterface $ctx
202+
* @param EnableReportingApiRequest $request
203+
*
204+
* @return void
205+
*/
206+
public function enableReportingApi(ContextInterface $ctx, EnableReportingApiRequest $request): void;
207+
208+
196209
/**
197210
* Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field.
198211
*
@@ -537,6 +550,30 @@ public function addLoadingFinishedListener(callable $listener): SubscriptionInte
537550
public function awaitLoadingFinished(ContextInterface $ctx): LoadingFinishedEvent;
538551

539552

553+
/**
554+
* Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.
555+
*
556+
* Listener will be called whenever event Network.reportingApiReportAdded is fired.
557+
*
558+
* @param callable $listener
559+
*
560+
* @return SubscriptionInterface
561+
*/
562+
public function addReportingApiReportAddedListener(callable $listener): SubscriptionInterface;
563+
564+
565+
/**
566+
* Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.
567+
*
568+
* Method will block until first Network.reportingApiReportAdded event is fired.
569+
*
570+
* @param ContextInterface $ctx
571+
*
572+
* @return ReportingApiReportAddedEvent
573+
*/
574+
public function awaitReportingApiReportAdded(ContextInterface $ctx): ReportingApiReportAddedEvent;
575+
576+
540577
/**
541578
* Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
542579
*
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
/**
6+
* Request for Network.enableReportingApi command.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class EnableReportingApiRequest implements \JsonSerializable
13+
{
14+
/**
15+
* Whether to enable or disable events for the Reporting API
16+
*
17+
* @var bool
18+
*/
19+
public $enable;
20+
21+
22+
public static function fromJson($data)
23+
{
24+
$instance = new static();
25+
if (isset($data->enable)) {
26+
$instance->enable = (bool)$data->enable;
27+
}
28+
return $instance;
29+
}
30+
31+
32+
public function jsonSerialize()
33+
{
34+
$data = new \stdClass();
35+
if ($this->enable !== null) {
36+
$data->enable = $this->enable;
37+
}
38+
return $data;
39+
}
40+
41+
42+
/**
43+
* Create new instance using builder.
44+
*
45+
* @return EnableReportingApiRequestBuilder
46+
*/
47+
public static function builder(): EnableReportingApiRequestBuilder
48+
{
49+
return new EnableReportingApiRequestBuilder();
50+
}
51+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
use ChromeDevtoolsProtocol\Exception\BuilderException;
6+
7+
/**
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class EnableReportingApiRequestBuilder
13+
{
14+
private $enable;
15+
16+
17+
/**
18+
* Validate non-optional parameters and return new instance.
19+
*/
20+
public function build(): EnableReportingApiRequest
21+
{
22+
$instance = new EnableReportingApiRequest();
23+
if ($this->enable === null) {
24+
throw new BuilderException('Property [enable] is required.');
25+
}
26+
$instance->enable = $this->enable;
27+
return $instance;
28+
}
29+
30+
31+
/**
32+
* @param bool $enable
33+
*
34+
* @return self
35+
*/
36+
public function setEnable($enable): self
37+
{
38+
$this->enable = $enable;
39+
return $this;
40+
}
41+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
/**
6+
* The status of a Reporting API report.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ReportStatusEnum
13+
{
14+
const QUEUED = 'Queued';
15+
const PENDING = 'Pending';
16+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
/**
6+
* An object representing a report generated by the Reporting API.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ReportingApiReport implements \JsonSerializable
13+
{
14+
/**
15+
* The URL of the document that triggered the report.
16+
*
17+
* @var string
18+
*/
19+
public $initiatorUrl;
20+
21+
/**
22+
* The name of the endpoint group that should be used to deliver the report.
23+
*
24+
* @var string
25+
*/
26+
public $destination;
27+
28+
/**
29+
* The type of the report (specifies the set of data that is contained in the report body).
30+
*
31+
* @var string
32+
*/
33+
public $type;
34+
35+
/**
36+
* When the report was generated.
37+
*
38+
* @var int|float
39+
*/
40+
public $timestamp;
41+
42+
/**
43+
* How many uploads deep the related request was.
44+
*
45+
* @var int
46+
*/
47+
public $depth;
48+
49+
/** @var object */
50+
public $body;
51+
52+
53+
public static function fromJson($data)
54+
{
55+
$instance = new static();
56+
if (isset($data->initiatorUrl)) {
57+
$instance->initiatorUrl = (string)$data->initiatorUrl;
58+
}
59+
if (isset($data->destination)) {
60+
$instance->destination = (string)$data->destination;
61+
}
62+
if (isset($data->type)) {
63+
$instance->type = (string)$data->type;
64+
}
65+
if (isset($data->timestamp)) {
66+
$instance->timestamp = $data->timestamp;
67+
}
68+
if (isset($data->depth)) {
69+
$instance->depth = (int)$data->depth;
70+
}
71+
if (isset($data->body)) {
72+
$instance->body = $data->body;
73+
}
74+
return $instance;
75+
}
76+
77+
78+
public function jsonSerialize()
79+
{
80+
$data = new \stdClass();
81+
if ($this->initiatorUrl !== null) {
82+
$data->initiatorUrl = $this->initiatorUrl;
83+
}
84+
if ($this->destination !== null) {
85+
$data->destination = $this->destination;
86+
}
87+
if ($this->type !== null) {
88+
$data->type = $this->type;
89+
}
90+
if ($this->timestamp !== null) {
91+
$data->timestamp = $this->timestamp;
92+
}
93+
if ($this->depth !== null) {
94+
$data->depth = $this->depth;
95+
}
96+
if ($this->body !== null) {
97+
$data->body = $this->body;
98+
}
99+
return $data;
100+
}
101+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
3+
namespace ChromeDevtoolsProtocol\Model\Network;
4+
5+
/**
6+
* Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.
7+
*
8+
* @generated This file has been auto-generated, do not edit.
9+
*
10+
* @author Jakub Kulhan <[email protected]>
11+
*/
12+
final class ReportingApiReportAddedEvent implements \JsonSerializable
13+
{
14+
/** @var ReportingApiReport */
15+
public $report;
16+
17+
18+
public static function fromJson($data)
19+
{
20+
$instance = new static();
21+
if (isset($data->report)) {
22+
$instance->report = ReportingApiReport::fromJson($data->report);
23+
}
24+
return $instance;
25+
}
26+
27+
28+
public function jsonSerialize()
29+
{
30+
$data = new \stdClass();
31+
if ($this->report !== null) {
32+
$data->report = $this->report->jsonSerialize();
33+
}
34+
return $data;
35+
}
36+
}

gen-src/ChromeDevtoolsProtocol/Model/Page/BackForwardCacheNotRestoredReasonEnum.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ final class BackForwardCacheNotRestoredReasonEnum
9090
const WEB_SHARE = 'WebShare';
9191
const REQUESTED_STORAGE_ACCESS_GRANT = 'RequestedStorageAccessGrant';
9292
const WEB_NFC = 'WebNfc';
93-
const WEB_FILE_SYSTEM = 'WebFileSystem';
9493
const OUTSTANDING_NETWORK_REQUEST_FETCH = 'OutstandingNetworkRequestFetch';
9594
const OUTSTANDING_NETWORK_REQUEST_X_H_R = 'OutstandingNetworkRequestXHR';
9695
const APP_BANNER = 'AppBanner';

0 commit comments

Comments
 (0)