Skip to content

Commit ff409ed

Browse files
feat(api): api update
1 parent 551faa5 commit ff409ed

3 files changed

Lines changed: 64 additions & 4 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: 37
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-31c3cdf42b1a2e726724539dd613d902c72afdf75fa8da028c79eee9d6d71ea4.yml
3-
openapi_spec_hash: 409abf0799543827d54ea7293ffa5b74
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-c7e18da06db76bc8a22f2466e13b1958aedf1791ae3310e289f4c5a3dd522936.yml
3+
openapi_spec_hash: 17d1ac64568e4f0ef529692cd3667175
44
config_hash: 2bea1743c84d63bd61f8501a6ea63065

‎src/context/dev/types/web_web_scrape_html_response.py‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from .._models import BaseModel
99

10-
__all__ = ["WebWebScrapeHTMLResponse", "Metadata", "MetadataAlternate", "KeyMetadata"]
10+
__all__ = ["WebWebScrapeHTMLResponse", "Metadata", "MetadataAlternate", "ActionsApplied", "KeyMetadata"]
1111

1212

1313
class MetadataAlternate(BaseModel):
@@ -88,6 +88,27 @@ class Metadata(BaseModel):
8888
"""Twitter card metadata with the twitter: prefix removed and keys camel-cased."""
8989

9090

91+
class ActionsApplied(BaseModel):
92+
instruction: str
93+
94+
status: Literal["applied", "failed", "skipped"]
95+
"""Applied means the requested page state was visibly verified.
96+
97+
Failed means it was not verified. Skipped means it was not attempted.
98+
"""
99+
100+
completion_evidence: Optional[str] = FieldInfo(alias="completionEvidence", default=None)
101+
"""Visible page evidence used to verify an applied action."""
102+
103+
duration_ms: Optional[float] = FieldInfo(alias="durationMs", default=None)
104+
105+
error: Optional[str] = None
106+
107+
method: Optional[str] = None
108+
109+
target_description: Optional[str] = FieldInfo(alias="targetDescription", default=None)
110+
111+
91112
class KeyMetadata(BaseModel):
92113
"""Metadata about the API key used for the request.
93114
@@ -130,6 +151,15 @@ class WebWebScrapeHTMLResponse(BaseModel):
130151
url: str
131152
"""The URL that was scraped"""
132153

154+
actions_applied: Optional[List[ActionsApplied]] = FieldInfo(alias="actionsApplied", default=None)
155+
"""One verified outcome per requested browser action, in request order."""
156+
157+
actions_html_stale: Optional[bool] = FieldInfo(alias="actionsHtmlStale", default=None)
158+
"""
159+
True when an action was applied but the returned content could not be refreshed
160+
afterward.
161+
"""
162+
133163
key_metadata: Optional[KeyMetadata] = None
134164
"""Metadata about the API key used for the request.
135165

‎src/context/dev/types/web_web_scrape_md_response.py‎

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from .._models import BaseModel
99

10-
__all__ = ["WebWebScrapeMdResponse", "Metadata", "MetadataAlternate", "KeyMetadata"]
10+
__all__ = ["WebWebScrapeMdResponse", "Metadata", "MetadataAlternate", "ActionsApplied", "KeyMetadata"]
1111

1212

1313
class MetadataAlternate(BaseModel):
@@ -88,6 +88,27 @@ class Metadata(BaseModel):
8888
"""Twitter card metadata with the twitter: prefix removed and keys camel-cased."""
8989

9090

91+
class ActionsApplied(BaseModel):
92+
instruction: str
93+
94+
status: Literal["applied", "failed", "skipped"]
95+
"""Applied means the requested page state was visibly verified.
96+
97+
Failed means it was not verified. Skipped means it was not attempted.
98+
"""
99+
100+
completion_evidence: Optional[str] = FieldInfo(alias="completionEvidence", default=None)
101+
"""Visible page evidence used to verify an applied action."""
102+
103+
duration_ms: Optional[float] = FieldInfo(alias="durationMs", default=None)
104+
105+
error: Optional[str] = None
106+
107+
method: Optional[str] = None
108+
109+
target_description: Optional[str] = FieldInfo(alias="targetDescription", default=None)
110+
111+
91112
class KeyMetadata(BaseModel):
92113
"""Metadata about the API key used for the request.
93114
@@ -121,6 +142,15 @@ class WebWebScrapeMdResponse(BaseModel):
121142
url: str
122143
"""The URL that was scraped"""
123144

145+
actions_applied: Optional[List[ActionsApplied]] = FieldInfo(alias="actionsApplied", default=None)
146+
"""One verified outcome per requested browser action, in request order."""
147+
148+
actions_html_stale: Optional[bool] = FieldInfo(alias="actionsHtmlStale", default=None)
149+
"""
150+
True when an action was applied but the returned content could not be refreshed
151+
afterward.
152+
"""
153+
124154
key_metadata: Optional[KeyMetadata] = None
125155
"""Metadata about the API key used for the request.
126156

0 commit comments

Comments
 (0)