File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11configured_endpoints : 21
2- openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-090302cbdfdd8758ae5907f93842b16040a66772578d0327349135378e0bce40 .yml
3- openapi_spec_hash : cb19458f0642bea3cf6eaf91113f9fda
2+ openapi_spec_url : https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase/browserbase-3032c74460ad9c1c4b0a1b2d9107c556f292974a8ce12d525660a9cf31f10bc1 .yml
3+ openapi_spec_hash : 8ac1c673ce4e72b88bbbf30100b95e8f
44config_hash : cf04ecfb8dad5fbd8b85be25d6e9ec55
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ export interface FetchAPICreateResponse {
1919 id : string ;
2020
2121 /**
22- * The response body content
22+ * The response body content. A string for `raw` and `markdown` formats; a
23+ * structured object for `json` format (the schema-extracted result).
2324 */
24- content : string ;
25+ content : string | { [ key : string ] : unknown } ;
2526
2627 /**
2728 * The MIME type of the response
@@ -60,10 +61,23 @@ export interface FetchAPICreateParams {
6061 */
6162 allowRedirects ?: boolean ;
6263
64+ /**
65+ * Output format for the response content. `raw` (default) returns the response
66+ * body unchanged; `json` returns structured data (requires `schema`); `markdown`
67+ * returns the page as markdown.
68+ */
69+ format ?: 'raw' | 'json' | 'markdown' ;
70+
6371 /**
6472 * Whether to enable proxy support for the request
6573 */
6674 proxies ?: boolean ;
75+
76+ /**
77+ * JSON Schema describing the desired structure of the response. Only used when
78+ * `format` is `json`.
79+ */
80+ schema ?: { [ key : string ] : unknown } ;
6781}
6882
6983export declare namespace FetchAPI {
Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ describe('resource fetchAPI', () => {
2525 url : 'https://example.com' ,
2626 allowInsecureSsl : true ,
2727 allowRedirects : true ,
28+ format : 'raw' ,
2829 proxies : true ,
30+ schema : { foo : 'bar' } ,
2931 } ) ;
3032 } ) ;
3133} ) ;
You can’t perform that action at this time.
0 commit comments