Skip to content

Commit 4589097

Browse files
feat(api): api update
1 parent b635a05 commit 4589097

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 36
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-d71b08e421ccdda9a2754c307e97df0ee7444926306a00624dca2bc7d56548ac.yml
3-
openapi_spec_hash: ebfbed20b5837ccf8db8bb40ab23baac
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-c7625b4a7beb9e7d9827f3b836e6539cbc5f26b6754891d4352716e38cdecd73.yml
3+
openapi_spec_hash: cbee9cf164cc6704a6febb4d9737e83e
44
config_hash: 7ec4851ee8d93177947e95df5ae897b5

src/Web/WebExtractResponse/Metadata.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/**
1212
* @phpstan-type MetadataShape = array{
1313
* maxCrawlDepth: int,
14+
* numBlocked: int,
1415
* numFailed: int,
1516
* numSkipped: int,
1617
* numSucceeded: int,
@@ -25,6 +26,12 @@ final class Metadata implements BaseModel
2526
#[Required]
2627
public int $maxCrawlDepth;
2728

29+
/**
30+
* Number of crawled pages excluded because they were anti-bot challenges, error pages, or parked-domain placeholders.
31+
*/
32+
#[Required]
33+
public int $numBlocked;
34+
2835
#[Required]
2936
public int $numFailed;
3037

@@ -44,6 +51,7 @@ final class Metadata implements BaseModel
4451
* ```
4552
* Metadata::with(
4653
* maxCrawlDepth: ...,
54+
* numBlocked: ...,
4755
* numFailed: ...,
4856
* numSkipped: ...,
4957
* numSucceeded: ...,
@@ -56,6 +64,7 @@ final class Metadata implements BaseModel
5664
* ```
5765
* (new Metadata)
5866
* ->withMaxCrawlDepth(...)
67+
* ->withNumBlocked(...)
5968
* ->withNumFailed(...)
6069
* ->withNumSkipped(...)
6170
* ->withNumSucceeded(...)
@@ -74,6 +83,7 @@ public function __construct()
7483
*/
7584
public static function with(
7685
int $maxCrawlDepth,
86+
int $numBlocked,
7787
int $numFailed,
7888
int $numSkipped,
7989
int $numSucceeded,
@@ -82,6 +92,7 @@ public static function with(
8292
$self = new self;
8393

8494
$self['maxCrawlDepth'] = $maxCrawlDepth;
95+
$self['numBlocked'] = $numBlocked;
8596
$self['numFailed'] = $numFailed;
8697
$self['numSkipped'] = $numSkipped;
8798
$self['numSucceeded'] = $numSucceeded;
@@ -98,6 +109,17 @@ public function withMaxCrawlDepth(int $maxCrawlDepth): self
98109
return $self;
99110
}
100111

112+
/**
113+
* Number of crawled pages excluded because they were anti-bot challenges, error pages, or parked-domain placeholders.
114+
*/
115+
public function withNumBlocked(int $numBlocked): self
116+
{
117+
$self = clone $this;
118+
$self['numBlocked'] = $numBlocked;
119+
120+
return $self;
121+
}
122+
101123
public function withNumFailed(int $numFailed): self
102124
{
103125
$self = clone $this;

0 commit comments

Comments
 (0)