Skip to content

Commit 9c0b78d

Browse files
feat: [AI-1748][apps/api] Obtain custom certificates in API during session reservation
1 parent de76605 commit 9c0b78d

5 files changed

Lines changed: 6 additions & 53 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: 21
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-3032c74460ad9c1c4b0a1b2d9107c556f292974a8ce12d525660a9cf31f10bc1.yml
3-
openapi_spec_hash: 8ac1c673ce4e72b88bbbf30100b95e8f
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-090302cbdfdd8758ae5907f93842b16040a66772578d0327349135378e0bce40.yml
3+
openapi_spec_hash: cb19458f0642bea3cf6eaf91113f9fda
44
config_hash: cf04ecfb8dad5fbd8b85be25d6e9ec55

src/browserbase/resources/fetch_api.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict
6-
from typing_extensions import Literal
7-
85
import httpx
96

107
from ..types import fetch_api_create_params
@@ -50,9 +47,7 @@ def create(
5047
url: str,
5148
allow_insecure_ssl: bool | Omit = omit,
5249
allow_redirects: bool | Omit = omit,
53-
format: Literal["raw", "json", "markdown"] | Omit = omit,
5450
proxies: bool | Omit = omit,
55-
schema: Dict[str, object] | Omit = omit,
5651
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5752
# The extra values given here take precedence over values defined on the client or passed to this method.
5853
extra_headers: Headers | None = None,
@@ -70,15 +65,8 @@ def create(
7065
7166
allow_redirects: Whether to follow HTTP redirects
7267
73-
format: Output format for the response content. `raw` (default) returns the response
74-
body unchanged; `json` returns structured data (requires `schema`); `markdown`
75-
returns the page as markdown.
76-
7768
proxies: Whether to enable proxy support for the request
7869
79-
schema: JSON Schema describing the desired structure of the response. Only used when
80-
`format` is `json`.
81-
8270
extra_headers: Send extra headers
8371
8472
extra_query: Add additional query parameters to the request
@@ -94,9 +82,7 @@ def create(
9482
"url": url,
9583
"allow_insecure_ssl": allow_insecure_ssl,
9684
"allow_redirects": allow_redirects,
97-
"format": format,
9885
"proxies": proxies,
99-
"schema": schema,
10086
},
10187
fetch_api_create_params.FetchAPICreateParams,
10288
),
@@ -133,9 +119,7 @@ async def create(
133119
url: str,
134120
allow_insecure_ssl: bool | Omit = omit,
135121
allow_redirects: bool | Omit = omit,
136-
format: Literal["raw", "json", "markdown"] | Omit = omit,
137122
proxies: bool | Omit = omit,
138-
schema: Dict[str, object] | Omit = omit,
139123
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
140124
# The extra values given here take precedence over values defined on the client or passed to this method.
141125
extra_headers: Headers | None = None,
@@ -153,15 +137,8 @@ async def create(
153137
154138
allow_redirects: Whether to follow HTTP redirects
155139
156-
format: Output format for the response content. `raw` (default) returns the response
157-
body unchanged; `json` returns structured data (requires `schema`); `markdown`
158-
returns the page as markdown.
159-
160140
proxies: Whether to enable proxy support for the request
161141
162-
schema: JSON Schema describing the desired structure of the response. Only used when
163-
`format` is `json`.
164-
165142
extra_headers: Send extra headers
166143
167144
extra_query: Add additional query parameters to the request
@@ -177,9 +154,7 @@ async def create(
177154
"url": url,
178155
"allow_insecure_ssl": allow_insecure_ssl,
179156
"allow_redirects": allow_redirects,
180-
"format": format,
181157
"proxies": proxies,
182-
"schema": schema,
183158
},
184159
fetch_api_create_params.FetchAPICreateParams,
185160
),

src/browserbase/types/fetch_api_create_params.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict
6-
from typing_extensions import Literal, Required, Annotated, TypedDict
5+
from typing_extensions import Required, Annotated, TypedDict
76

87
from .._utils import PropertyInfo
98

@@ -20,18 +19,5 @@ class FetchAPICreateParams(TypedDict, total=False):
2019
allow_redirects: Annotated[bool, PropertyInfo(alias="allowRedirects")]
2120
"""Whether to follow HTTP redirects"""
2221

23-
format: Literal["raw", "json", "markdown"]
24-
"""Output format for the response content.
25-
26-
`raw` (default) returns the response body unchanged; `json` returns structured
27-
data (requires `schema`); `markdown` returns the page as markdown.
28-
"""
29-
3022
proxies: bool
3123
"""Whether to enable proxy support for the request"""
32-
33-
schema: Dict[str, object]
34-
"""JSON Schema describing the desired structure of the response.
35-
36-
Only used when `format` is `json`.
37-
"""

src/browserbase/types/fetch_api_create_response.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Dict, Union
3+
from typing import Dict
44

55
from pydantic import Field as FieldInfo
66

@@ -13,12 +13,8 @@ class FetchAPICreateResponse(BaseModel):
1313
id: str
1414
"""Unique identifier for the fetch request"""
1515

16-
content: Union[str, Dict[str, object]]
17-
"""The response body content.
18-
19-
A string for `raw` and `markdown` formats; a structured object for `json` format
20-
(the schema-extracted result).
21-
"""
16+
content: str
17+
"""The response body content"""
2218

2319
content_type: str = FieldInfo(alias="contentType")
2420
"""The MIME type of the response"""

tests/api_resources/test_fetch_api.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def test_method_create_with_all_params(self, client: Browserbase) -> None:
3030
url="https://example.com",
3131
allow_insecure_ssl=True,
3232
allow_redirects=True,
33-
format="raw",
3433
proxies=True,
35-
schema={"foo": "bar"},
3634
)
3735
assert_matches_type(FetchAPICreateResponse, fetch_api, path=["response"])
3836

@@ -79,9 +77,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncBrowserbas
7977
url="https://example.com",
8078
allow_insecure_ssl=True,
8179
allow_redirects=True,
82-
format="raw",
8380
proxies=True,
84-
schema={"foo": "bar"},
8581
)
8682
assert_matches_type(FetchAPICreateResponse, fetch_api, path=["response"])
8783

0 commit comments

Comments
 (0)